Name

Setup — Preparing the MCB1700 Board for eCos Development

Overview

Applications can be developed on the MCB1700 board either by using a hardware JTAG-debugger based approach, or via a serial connection between the host and a GDB Stubrom installed on the board. In this latter case the board boots from internal flash into the Stubrom. eCos applications are configured for RAM startup and then downloaded and run on the board via the debugger arm-eabi-gdb.

Stubrom Installation

For serial communications, the Stubrom runs with 8 bits, no parity, and 1 stop bit at 38400 baud. This rate can be changed in the platform HAL configuration. Under normal circumstances, the Stubrom runs in-place from the internal Flash.

Programming The Stubrom

This process assumes that a Microsoft Windows host machine with the Embedded Systems Academy Free Flash Magic utility is available. You can install Flash Magic from http://www.flashmagictool.com. This machine also needs an RS232 serial port, either native or through a USB adaptor. In addition to bidrectional data transfer, control is also needed over the DTR and RTS lines. If necessary copy the stubrom.hex file to an easily accessible location. The stubrom file is located within your eCosPro installation in the \eCosPro\ecos-<ver>loaders\mcb1700\gdbstub\ROM\ directory.

Supply the board with power via the USB DEVICE socket and connect a serial cable between the MCB1700 board COM0 port and the host.

Start Flash Magic and set the Communications section to select the host COM port connected to the board, 38400 baud, device LPC1768, Interface “None (ISP)” and 12MHz Oscillator Frequency. Test communication with the board by using the “ISP->Read Device Signature” menu entry. If communication is not successful, check that the serial cable is connected, and the correct COM port is being used.

Check “Erase blocks used by Hex File” under “Erase”. In the “Hex File” section, select the stubrom.hex file. Under “Options”, all boxes should be clear except “Verify after programming”. Now press the “Start” button. The utility should show the progress of the upload.

When the process completes, the utility should be closed. Verify the programming has been successful by connecting to the second (COM1) serial port on the board, start a terminal emulation application such as HyperTerminal or minicom on the host PC and set the serial communication parameters to 38400 baud, 8 data bits, no parity, 1 stop bit (8N1) and no flow control (handshaking). Reset the board and the Stubrom should start. The output should be similar to the following:

$T050f:6e220000;0d:f07f0010;#80

Rebuilding The Stubrom

Should it prove necessary to rebuild the Stubrom binary, this is done most conveniently at the command line. The steps needed to rebuild the the ROM version of the Stubrom are:

$ mkdir stubs_mcb1700_rom
$ cd stubs_mcb1700_rom
$ ecosconfig new mcb1700 stubs
$ ecosconfig resolve
$ ecosconfig tree
$ make

At the end of the build the install/bin subdirectory should contain the file stubrom.hex.