Setup — Preparing the Adder board for eCos Development


In a typical development environment, the Adder board boots from flash into the RedBoot ROM monitor. eCos applications are configured for RAM startup and then downloaded and run on the board via the debugger powerpc-eabi-gdb. Preparing the board therefore usually involves programming a suitable RedBoot image into flash memory.

The following RedBoot configurations are supported:

ROMRAMRedBoot running from RAM, but contained in the board's flash boot sector.adder[II]_redboot_ROMRAM.ecmadder[II]_redboot_ROMRAM.bin

For serial communications, all versions run with 8 bits, no parity, and 1 stop bit at 38400 baud. The baud rate can be changed using the flash configuration console baud rate option. RedBoot also supports ethernet communication and flash management.

Initial Installation

Flash Installation

The Adder boards are shipped from A&M with a version of RedBoot already installed. If the software distribution you are using provides a more recent certified version of RedBoot then you should install that in place of the existing version.

Updating RedBoot is a simple matter of downloading a new binary image and overwriting the existing ROM image. Connect a serial cable between the Adder board and a host computer and start a terminal emulator such as HyperTerminal or minicom. When RedBoot starts up you will see something similar to this:

+... waiting for BOOTP information
Ethernet eth0: MAC address 00:02:b3:46:01:00
IP:, Gateway:
Default server:, DNS server IP:

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version UNKNOWN - built 17:00:15, Jan  5 2004

Platform: A&M Adder II (PowerPC 852T)
Copyright (C) 2000, 2001, 2002, Free Software Foundation, Inc.

RAM: 0x00000000-0x00800000, [0x0003afc0-0x007ed000] available
FLASH: 0xfe000000 - 0xfe400000, 64 blocks of 0x00010000 bytes each.

To download the new RedBoot image to the board via ethernet, ensure that the ethernet cable is connected (if not, connect it and reset RedBoot). Then copy the new RedBoot image (adderII_redboot_ROMRAM.bin) to the TFTP server directory (/tftpboot on Linux). You can now download the new RedBoot image with the following command:

RedBoot> load -r -b %{FREEMEMLO} -h adderII_redboot_ROMRAM.bin

If the TFTP server is running on the machine with the IP address shown against "Default server" at startup, then the -h <host> option may be omitted.

Alternatively, if no TFTP server is available, the file may be downloaded more slowly over the serial line with the following command:

RedBoot> load -r -b %{FREEMEMLO} -m ymodem

Use the terminal emulator's Y-Modem file transfer option to send the file adderII_redboot_ROMRAM.bin. Once the file has been uploaded, you can check that it has been transferred correctly using the cksum command. On the host (Linux or Cygwin) run the cksum program on the binary file:

$ cksum adderII_redboot_ROMRAM.bin
1574308703 150312 adderII_redboot_ROMRAM.bin

In RedBoot, run the cksum command on the data that has just been loaded:

RedBoot> cksum -b %{FREEMEMLO} -l 150312
POSIX cksum = 1574308703 150312 (0x5dd60b5f 0x00024b28)

The second number in the output of the host cksum program is the file size, which should be used as the argument to the -l option in the RedBoot cksum command. The first numbers in each instance are the checksums, which should be equal.

If the program has downloaded successfully, then it can be programmed into the flash using the following command:

RedBoot> fis create -b %{FREEMEMLO} RedBoot
An image named 'RedBoot' exists - continue (y/n)? y
... Erase from 0xfe000000-0xfe030000: ...
... Program from 0x0003b000-0x0006b000 at 0xfe000000: ...
... Erase from 0xfe3f0000-0xfe400000: .
... Program from 0x007f0000-0x00800000 at 0xfe3f0000: .

The Adder board may now be reset either by cycling the power, or with the reset command. It should then display the startup screen for the new version of RedBoot.

This description has used the Adder II as an example. The process for the Adder I is identical except that the new image file is called adder_redboot_ROMRAM.bin. Make sure you load the correct file if both are present.

Rebuilding RedBoot

Should it prove necessary to rebuild a RedBoot binary, this is done most conveniently at the command line. The steps needed to rebuild the the ROMRAM version of RedBoot for the Adder I are:

$ mkdir redboot_adder_romram
$ cd redboot_adder_romram
$ ecosconfig new adder redboot
$ ecosconfig import $ECOS_REPOSITORY/hal/powerpc/adder/v2_0_9/misc/adder_redboot_ROMRAM.ecm
$ ecosconfig resolve
$ ecosconfig tree
$ make

To rebuild the ROMRAM version of RedBoot for the Adder II:

$ mkdir redboot_adderII_romram
$ cd redboot_adderII_romram
$ ecosconfig new adderII redboot
$ ecosconfig import $ECOS_REPOSITORY/hal/powerpc/adder/v2_0_9/misc/adderII_redboot_ROMRAM.ecm
$ ecosconfig resolve
$ ecosconfig tree
$ make

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