A Development system is used by system designers to design and test the software and hardware of a microprocessor-based system before going for practical implementation (or fabrication). The microprocessor development system consists of a set of hardware and software tools. The hardware of a development system usually contains a standard PC (Personal Computer), a printer, and an emulator. The software tools are also called program development tools and they are editor, assembler, library builder, linker, debugger, and simulator. These software tools can be run on a PC in order to write, assemble, debug, modify, and test the assembly language programs.
Editor is a software tool that, when run on a PC, allows the user to type/enter and modify the assembly language program. The editor provides a set of commands for the insertion, deletion, and modification of letters, characters, statements, etc. The main function of an editor is to help the user to construct the assembly language program in the right format. The program created using an editor is known as the source program and it is usually saved with the file extension “.ASM”.
The assembler is a software tool that, when run on a PC, converts the assembly language program to a machine language program. Several types of assemblers are available and they are one-pass assemblers, two-pass assemblers, macro assemblers, cross assemblers, resident assemblers, and meta assemblers.
In a one-pass assembler, the source code is processed only once and we can use only backward reference. In a one-pass assembler, as the source code is processed, any labels encountered are given an address and stored in a table. Whenever a label is encountered, the assembler may look backward to find the address of the label. If the label is not yet defined then it issues an error message (because the assembler will not look forward). Since only one pass is used to translate the source code, a one-pass assembler is very fast, but because of the forward reference problem, the one-pass assembler is not used often.
Most of the popularly used assemblers are two-pass assemblers. In a two-pass assembler, the first pass is made through source code for the purpose of assigning an address to all the labels and storing this information in a symbol table. The second pass is made to actually translate the source code into machine code.
The input for the assembler is the source program which is saved with the file extension “.ASM”. The assembler usually generates two output files called object file and list file. The object file consists of relocatable machine codes of the program and it is saved with the file extension “.OBJ”. The list file contains the assembly language statements, the binary codes for each instruction, and the address of each instruction. The list file is saved with the file extension “.LST”.
The list file also indicates any syntax errors in the source program. The assembler will not identify the logical errors in the source program. In order to correct the errors indicated on the list file, the user has to use the editor again. The corrected source program is saved again and then reassembled. Usually, it may take several times through the edit-assemble loop to eliminate the syntax errors from the source program.
The library builder is used to create library files which are a collection of procedures of
frequently used functions. Actually, a library file is a collection of assembled object files. While developing software for a particular application, the programmers can link the library files in their programs. When the library file is linked with a program, only the procedure required by the program is copied from the library file and added to the program.
The input to the library building is a set of assembled object files of program modules/procedures. The library builder combines the program modules/procedures into a single file known as a library file and it is saved with the file extension “.LIB”.
The linker is a software tool that is used to combine relocatable object files of program modules and library functions into a single executable file. While developing a program for a particular application it is much more efficient to develop the program in modules. The entire task program can be divided into smaller tasks and procedures for each task can be developed individually. These procedures are called program modules.
For certain tasks, we can use library files if they are available. Each module can be individually assembled, tested, and debugged. Then the object files of program modules and the library files can be linked to get an executable file. The linker also generates a link map file which contains the address information of the linked files. Some examples of linkers are Microsoft’s Linker LINK, Borland’s Turbo Linker LINK, etc.
Debugger is a software tool that allows the execution of a program in a single step or break-point mode under the control of a user. The process of locating and correcting the errors in a program using a debugger is known as debugging.
The debugger allows the designer to load the object code program into the memory of the PC, execute the program and troubleshoot or debug it. The debugger allows the designer to look at the contents of registers and memory locations after running the program. It allows the system designer to change the contents of registers and memory locations and return the program.
Some debuggers allow the user to stop execution after each instruction so that the memory/register content can be checked or altered. A debugger also allows the user to set a breakpoint at any point in the user program. When the user runs the program, the PC will execute instructions up to this breakpoint and stop. The user can then examine the register and memory contents to see whether the results are correct up to that point. If the results are correct, the user can move the breakpoint to a later point in the program. If the results are not correct, the user can check the program up to that point to find out why they are not correct.
Debugger tools can help the user to isolate a problem in the program. Once the problem errors are identified, the algorithm can be modified. Then the user can use the editor to correct the source program, reassemble the corrected source program, relink, and run the program again.
The simulator is a program that can be run on the development system (Personal computer) to simulate the operations of the newly designed system. Some of the operations that can be simulated are given below:
1. Execute a program and display the result.
2. Single-step execution of a program.
3. Break-point execution of a program.
4. Display the contents of the register/memory.
A simulator usually shows the contents of registers and memory locations on the screen of computer and allows the system designer to perform all of the operations listed above, with the added advantage of watching the data change as the program operates. This feature saves considerable time because the register/memory contents do not have to be displayed using separate commands. The visual representation also gives the programmer a better feel for what is taking place in the program.
An emulator is a mixture of hardware and software. It is usually used to test and debug the hardware and software of a newly designed microprocessor-based system. The emulator has a multicore cable that connects the PC of the development system and the newly designed hardware of the microprocessor system. A connector/plug at one end of the cable is plugged into new hardware in place of its microprocessor. The other end of the cable is connected to the parallel port of the PC.
Through this connection the software of the emulator allows the designer to download the object code program into RAM in the system being tested and run it. Like a debugger, an emulator allows the system designer to load and run programs, examine and change the contents of registers, examine and change the contents of memory locations and
insert breakpoints in the program. The simulators do not have the ability to perform actual IO or internal hardware operations such as timing or data transmission and reception.