Crossware

Table of Contents        Previous topic       Next topic       

Building the Debug Monitor

Before you can use the debug monitor, you must compile it and install it on your target board.

To create a debug monitor for the Atmel T89C51RD2 or Atmel T89C51AC2 chip, select New from the File menu and click on the Projects tab (File->New->Projects).  Select T89C51RD2 Debug Monitor or T89C51AC2 Debug Monitor from the list as appropriate and click on OK.  You will then be prompted to enter a project name and directory.  When you have done this, click on Finish.  A project containing the appropriate files will then be created and opened.  You can then immediately build the debug monitor and download it to your target board using Atmel's Flexible In-System Programmer (FLIP).  The unmodified debug monitor will run clock doubled using timer 1 as the baud rate generator at 38,400 baud on a system with an 11.059MHz crystal.  However, you can rapidly modify this configuration using the UART Code Creation Wizard (Wizards->UART).

For commercial licences, which include the full source code for the debug monitor, a number of preconfigured Embedded Development Studio projects are provided to simplify the build process.







If you are reading the on-line version of this user guide, you can click on any of the above links to open the associated project.

The debugger can then be compiled and linked by selecting Rebuild All from the Build menu.

The debug monitor will be created in Intel hex. format.  To produce it in a different format, change the output format in the linker options (Build->Settings->Linker).  The appropriate format will depend on the method you use to transfer the debug monitor to your target system.

The resulting program can be installed on your target board by either programming an EPROM, downloading via the PC's serial port or by some other means appropriate to your target system. Note that if you download the debug monitor via a serial port, make sure you close the serial port after the download process, otherwise the serial port will not be available for remote debugging.

By default, the debug monitor will be built assuming an oscillator frequency of 11.059 MHz to give a baud rate of 19200, with a data format of 8 data bits, no parity and 1 stop bit.  If your target board has a different oscillator frequency or you require a different baud rate or data format, you must modify InitSerialPort() in functions.c.

Other modifications may be required.  Some of these are described in the next section.