CROSSWARE 7 V8051NT HIGHLIGHTS q Significantly reduces software development timescales q Enables debug and verification without hardware q Allows programmers to simulate complete target system 8051 Virtual Workshop for Windows source level simulation context coloured C source context coloured assembler source context coloured listing context coloured embedded assembler locals watch window four customisable watch windows freeze watch windows support for 8051 variants capture state seamless integration interrupt simulation extendible to simulation of complete target system on-line manuals printed manuals uart simulation timer simulation port views serial port views interrupt view multiple cycle counters multiple formats code coverage data coverage source code profiling call stack works with Crossware Windows tool chain works with your own tool chain disassembly window source level break points memory breakpoints step into step over step out step backwards trace trigger external interrupts map code to xdata memory memory mapped i/o trap delayed interrupts Crossware Products Old Post House Silver Street Litlington Royston Herts SG8 0QE United Kingdom Telephone + 44 (0) 1763 853500 Facsimilie + 44 (0) 1763 853330 Web http://www.crossware.com E-mail sales@crossware.com 1 REF: V8051NT/0302
The 8051 Virtual Workshop is a revolutionary new development tool which allows 8051 programmers to simulate their complete target system. It allows the software debugging and verification process to proceed in the absence of any target hardware. Used to its full potential, it can reduce software development timescales by at least an order of magnitude. The 8051 Virtual Workshop runs under Windows 9x, Windows NT4.0, Windows 2000 and Windows XP. At the heart of the system is an 8051 Instruction Set Simulator with full source level and graphical debugging facilities. What turns this simulator into a Workshop is the fact that it can rapidly be extended into a total simulation of the target system. The traditional debugging process requires the presence of the hardware on which the software will run. Debugging may proceed using either a sophisticated in-circuit emulator or a simple serial port debug monitor. There are a number of drawbacks to this approach. Firstly the hardware has to be available and early in the design process it may not even exist; later the scarce development hardware boards will be in high demand and will be allocated on a priority basis to those with the most pressing need. Secondly problems with the hardware may hinder the software development process - it is very difficult in the early stages of a development to identify the source of a problem as either software or hardware. The Virtual Workshop puts control in the hands of the programmer. No longer dependent upon hardware, the programmer can develop, debug and verify the software and be confident that, when it is integrated with the hardware, it will function as designed. Developments in software design, in particular the introduction of real time UML (Unified Modelling Language), mean that the software engineer can get the design right first time. The Virtual Workshop allows the programmer to get the source code right first time too. Adding extensions to the Virtual Workshop is fast and effective due to the Wizards, tutorial and support provided with the package. The graphical simulation of a text display can take as little as two hours to develop, including the interpretation and analysis the display driver datasheet. A library of virtual components will build up over time and so later target systems can be simulated with hardly any effort at all. The system truly frees the programmer from the constraints of the rest of the development process. The 8051 Virtual Workshop integrates seamlessly with the Crossware Embedded Development Studio which provides project management, editing and other advanced facilities. It works extremely effectively with the 8051 ANSI C compilers and assemblers from Crossware but it works equally well stand-alone, with tool chains from other vendors. 2
Seamless Integration with the Embedded Development Studio The Embedded Development Studio forms an integrated environment that binds together the various Crossware tools. It automatically detects the presence of the Virtual Workshop and loads it to create a single unified application. The text windows that you see as you single step through your program are exactly the same as those you use to create and edit your source code. If you set a breakpoint as you edit your code, this is where execution will stop when you instruct the Simulator to Go. When the Virtual Workshop is used stand-alone', the Embedded Development Studio provides a customisable interface to your tool set. You can therefore edit and keep your project up-to-date using all of the sophisticated features of the Embedded Development Studio using your existing compiler, assembler and linker. Virtual Workshop extensions programmed in Microsoft Visual C++ using the Microsoft Foundation Classes will also integrate seamlessly with the Embedded Development Studio. The Embedded Development Studio is included with the Virtual Workshop. Please see separate datasheet for full details. Variants Supported The software fully simulates the 8051 and 8052 microcontrollers, the 8051 and 8052 microcontrollers, the Dallas DS5000, the Dallas DS87C320, the multiple dptr's of the Atmel, Philips and Dallas chips and the multiple dptr's and arithmetic unit of the Siemens 80C517. Support for additional variants are under development. Source Level Simulation The instruction set simulator at the heart of the Virtual Workshop will allow you to step through, trace and run your program at the source level. As execution proceeds you can watch its progression through your source code, stepping into, over and out of functions and halting at source level breakpoints. Alternatively, if your program does not contain any debugging information or if you want to view the detailed assembler code, a disassembly window is available. 3
Multiple Watch Windows for Local and Global Variables If you are programming in C, then you will want to view your C variables. You can open up to five watch windows to view these. One of these windows will automatically display local variables, automatically updating the variables listed as the move into and out of scope. The other four can display global and local variables of your choice. You can expand structures, unions and arrays and the address field will tell you where each variable or element is stored. You can freeze a complete watch window so that it doesn t get updated and so compare current and past values of the same variables. You can display values and addresses in decimal or hexadecimal. You can display the complete type information of your variables. Call Stack The call stack allows you to follow the progress of your program through the layers of function calls. The call stack window shows the name of each active function, and the values of the program counter, stack pointer and the source code line number reached in each function. You can navigate through the functions in the call stack - double clicking on the function name in the call stack window will take you to the location in your source code reached in that function. Views of Memory Areas You can open multiple views and watch all memory areas, setting breakpoints when memory locations are written, read or both. Coloured highlighting shows you which locations are changing and optionally you can enable data coverage so that you can clearly see which memory locations have been accessed and which have not. You can edit any memory location in hexadecimal or ASCII format. 4
View Named Registers You can open a view to display and edit named registers. Where an extension is active and providing support for an 8051 variant, the registers shown will be those of the variant. Interrupt Simulation and Views Interrupts are fully simulated and extendible to support enhancements provided by 8051 variants. External interrupts are level and edge sensitive and so will be triggered by an appropriate change to the port input line. An interrupt activity view shows you graphically which interrupts are enabled, how the interrupt priority masks are set and which interrupts are active at what priority level. UART Simulation and Views Cycle accurate simulation of the 8051 UART allows true simulation of serial I/O. A serial port activity view shows you the mode settings, driver source and clock doubling and interrupt flags. Bar indicators display the progress of the transmit and receive buffers as the data is clocked through. Legends will show you if your program has read the most recent input byte or if a byte has been overwritten by the next one before it was read. Input and output to the UART can be via a text window, a file or to and from Virtual Workshop extensions. If input is from an extension, the simulation will be sensitive to the RB8 bit allowing the 8051 multiprocessor communications protocol to be supported. Variants such as the Dallas DS87C320, which support two UARTS are supported with an additional I/O features and an additional activity view. 5
Timer Simulation and Views The 8051 and 8052 timers are fully simulated and the decrement feature present on many variants is supported too. The timer view shows the activity of the timers so that you can graphically see them in operation. Watchdog timers are simulated where the variant extension supports it The Port View The port views (one for each port) show the masked input, the unmasked input and the status of the latch. Input data for a port can be stored in a binary file and read as your program executes and of course input and output can be from and to Virtual Workshop extensions. State Capture The state capture facility allows you to store the complete internal state of the simulated microcontroller. You can capture the internal state any number of times and select and view them at a later stage. When you select and view a captured state, all of the memory views are updated to show the captured state. You can fully restore a captured state. Then, when you next run the simulator it will start with all conditions, memory, cycle counters, program counter, etc restored to the values current at the moment you captured the state. You can use this feature to repeatedly run a small segment of your code. Even the states of your Virtual Workshop extensions will be restored if you follow our programming guidelines. 6
The Extension Interface The extension interface allows you to extend the Virtual Workshop so that it simulates additional features specific to your target system. You can add extensions to simulate as little or as much as you like. You can simulate all of your target system and develop your software to completion without any target hardware. The extension interface consists of a set of C function calls. You provide DLL s which support the calls of your choice. You can therefore write a very simple C program to interface to your simulating 8051 program supporting any algorithm or protocol you wish. It is easy though to write your extensions in C++ using the Microsoft Foundation Classes. We provide a wizard that works with the Microsoft environment to create an outline Virtual Workshop extension for you. You can then rapidly add your own target specific features providing algorithms, protocols, dialog boxes, menu items etc to create an extension that will integrate seamlessley with the Virtual Workshop. Multiple extensions are supported and so you can provide separate extensions for the different elements of your target system. And if you want your extensions to communicate with each other or with an entirely separate application that is possible too. Tutorial Writing powerful, graphical Virtual Workshop extensions using Microsoft Visual C++ is easy once you know how to do it. To get you up to speed as quickly as possible, a tutorial will take you step by step through the complete extension creation process. 7
Multiple Cycle Counters The status line contains three cycle counters. One of these displays the number of cycles executed since the start of the program, another displays the number cycles executed since the last command was issued (such as Step, Trace or Go). The third is a trip counter and displays the number of cycles executed since you last reset it to zero. Source Code Profiling As the simulator runs your program, it can optionally capture information about the execution history. It can use this information to produce an execution profile of your source code. This will tell you how much time your program spent executing in the different parts of your code. The profile results are listed in a text window, sorted in accordance with your selected criteria. A double click on a listed item will take you to the relevant line of your source code. Code and Data Coverage The information captured during execution can also be used to provide a coverage analysis. Code coverage will show you which parts of your code have been executed and which have not. Data coverage will show you which internal and external data memory locations have been accessed during execution. Memory The Virtual Workshop directly supports up to 64k of program memory, 64k of external ram, 256 bytes of internal ram and 128 bytes of SFR memory. You can easily add support for additional banked memory using your own extensions. Program File Formats The file formats supported for the 8051 program code are Intel hex, OMF51, IEEE695 and Binary. IEEE695 can contain comprehensive debugging information, Intel hex and OMF51 can be produced by the majority of 8051 tools, Intel hex is accepted by the majority of eprom programmers and binary format will be the same as an eprom image so if all you have is the eprom, you can transfer it to a file and load it into the simulator. Crossware Products is the business name of Crossware Limited. Registered address as above. Registered in England and Wales under company registration number 3328113. CROSSWARE is a registered trademark of Crossware Associates. 8