Software
Download
The software for this board can be downloaded as a complete package fron the Elektor-homepage under the name
030042-11.zip. Because the controller has no bootstraploader of its own, it has to be placed in the flash and requires the flash to programmed in an external programmer prior to the first use. The file Flash552.hex in the directory Flash is the operating system OS552 (which is an adapted version of the OS535 of Wickenhäuser) and a small hello-world-program. After programming the flash and putting it in the board, the board is ready for use.
Operating system
Central element of the software is the operating system OS552. This allows for the board to be debugged and for the flash to be reprogrammed in-circuit. Immediately after startup the operating system is startet, the board is in the debug mode. It sends a special character to the PC via the serial interface. When on the PC the debugger or the Flashmon program are running, a command is sent back to the board and it stays in the debug mode. This state is shown by the flashing LED on the board. When the command from the PC is not sent, the OS552 checks if there is a 0x02 (LJMP) instruction on address 0x00000 in the flash. If so, the system sees this as a valid used program and switches to the run mode. The program from flash address 0x00000 is mapped to the controller address 0x0000 and started. In the Flash552.hex-file the user program is a hello-world-program. On a terminal on the PC (e.g. Hyperterminal for Windows) the text "Hello World" is printed, which is repeated when pressing a key.
In-circuit-programming
The program FlashMon from the development enviroment of Wickenhäuser allows it to reprogram the flash in the circuit. Before this can be tested, the .bix-file in the zip-file has to be copied into the bin-directory of the development enviroment.
When the program FlashMon is running on the PC when the board is switched on and the board is connected to the PC with a serial cable, the board is switched to the programming mode. Now the flash can be erased and reprogrammed with the program FlashMon. After the first command, the .bix-file is downloaded to the RAM of the board. This is the flashloader, which interprets the commands from FlashMon and erases or reprogrammes the flash. With the command to erase the flash, only the used memory in the flash in erased, the OS552 will remain in the flash.
Debugging
With the software debugger SLD51 the software can be downloaded to the RAM of the board and can be tested. The usual features like single-step, run and breakpoints are supported. Furthermore the registers can be read. When the SLD51 is running when starting up the board, it switches to the debug mode and awaits further commands.
|