Name
Setup — Preparing the SEAD3 board for eCos Development
Overview
In a typical development environment the SEAD3 board boots from flash into the RedBoot ROM monitor. eCos applications are configured for a RAM startup, and then downloaded and run on the board via the debugger mips-sde-elf-gdb. Preparing the board therefore involves programming a suitable RedBoot image into flash memory.
The following RedBoot configurations are supported:
Configuration | Description | Use | File |
---|---|---|---|
ROMRAM | RedBoot loaded from boot flash, running in RAM | redboot_ROMRAM.ecm | redboot_romram.bin |
ROM | RedBoot running from boot flash | redboot_ROM.ecm | redboot_rom.bin |
JTAG | RedBoot debug | redboot_JTAG.ecm | redboot.elf |
For serial communications all versions run at 115200 baud with 8 bits, no parity, and 1 stop bit. The baud rates can be changed via the baud RedBoot command. RedBoot will support communication on both UARTs. Ethernet communication and flash management are also supported.
Switch Setting
The LX50, LX110 and LX155 boards need the SW1 and SW2 switch banks set in order to execute code properly. These are mostly to overcome problems in the hardware or FPGA firmware.
The LX50 needs to run at 50MHz, and the SDRAM must be mapped to zero, so the switches are set as follows:
Switch | Setting |
---|---|
SW1[1] | ON |
SW1[2] | OFF |
SW1[3] | OFF |
SW1[4] | ON |
SW1[5] | OFF |
SW1[6] | OFF |
SW1[7] | OFF |
SW1[8] | OFF |
SW2[1] | OFF |
SW2[2] | OFF |
SW2[3] | ON |
SW2[4] | OFF |
The LX110 and LX155 also need to run at 50MHz, but the SDRAM does not need to be mapped to zero, so the switches are set as follows:
Switch | Setting |
---|---|
SW1[1] | ON |
SW1[2] | OFF |
SW1[3] | OFF |
SW1[4] | ON |
SW1[5] | OFF |
SW1[6] | OFF |
SW1[7] | OFF |
SW1[8] | OFF |
SW2[1] | OFF |
SW2[2] | OFF |
SW2[3] | OFF |
SW2[4] | OFF |
These settings are the defaults for the boards as delivered from MIPS and should generally not be altered.
Initial Installation
RedBoot is installed using the USB download mechanism available on the board. The reader is referred to the SEAD3 documentation for a full description; however, the following steps should suffice to install RedBoot.
Connect a USB cable between your host machine and the SEAD3 board's USB download connector.
If your host system is Windows based open "Printers and Faxes" in the Start Menu. Click on "Add a printer". Then click "Next". Select "Local printer attached to this computer". Uncheck the box that says "Automatically detect and install my Plug and Play printer". Click "Next". Select a printer port. Click on "Use the following port", and select USB001 (virtual printer port for USB). If you have previously installed a USB printer, you may see more than one USBxxx choice. You must choose the one associated with the port connected to your USB cable. If necessary, use trial and error. When you have finished click "Next". Under "Manufacturers", select "Generic". Under "Printers", select "Generic/Text Only". Click "Next".
Locate the file redboot_ROMRAM.fl
and load
into WordPad; make sure "Word Wrap" is turned
OFF and that "Print page numbers" is unchecked in "Print Setup".
Print the document to the printer set up above.
For Linux users the file can be copied to the printer using a command similar to either of the following:
% cat redboot_ROMRAM.fl >/dev/usblp0
% cat redboot_ROMRAM.fl >/dev/usb/lp0
It may be necessary to execute this as root, depending on the permissions on the printer device.
Disconnect the USB cable and either connect a serial cable between the board and your host or plug the USB cable into the UART1 USB adaptor socket. Run a terminal emulator (HyperTerminal, TeraTerm or minicom) at 115200 baud attached to the serial port. Power cycle the SEAD3 board and you should see output similar to this:
+**Warning** FLASH configuration checksum error or invalid key Use 'fconfig -i' to [re]initialize database Ethernet eth0: MAC address 00:d0:a0:00:08:1c IP: 10.0.2.4/255.0.0.0, Gateway: 10.0.0.3 Default server: 0.0.0.0 DNS server IP: 10.0.0.1, DNS domain name: <null> RedBoot(tm) bootstrap and debug environment [ROMRAM] Non-certified release, version UNKNOWN - built 14:40:05, Apr 23 2010 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 eCosCentric Limited RedBoot is free software, covered by the eCos license, derived from the GNU General Public License. You are welcome to change it and/or distribute copies of it under certain conditions. Under the license terms, RedBoot's source code and full license terms must have been made available to you. Redboot comes with ABSOLUTELY NO WARRANTY. Platform: LX110 (M14Kc) LE RAM: 0x80000000-0x9b000000 [0x8000b8b0-0x9afbd000 available] FLASH: 0x9c000000-0x9dffffff, 128 x 0x40000 blocks RedBoot>
The exact details may vary slightly, depending on whether or not the ethernet is plugged in yet. If no ethernet cable in plugged in there may be a delay before this output completes. At this stage the RedBoot flash management initialization has not yet happened so the warning about the configuration checksum error is expected. To perform the flash initialization use the fis init -f command:
RedBoot>fis init
About to initialize [format] FLASH image system - continue (y/n)?y
*** Initialize FLASH Image System ... Unlocking from 0x9dfc0000-0x9dffffff: . ... Erase from 0x9dfc0000-0x9dffffff: . ... Program from 0x9afc0000-0x9b000000 to 0x9dfc0000: . ... Locking from 0x9dfc0000-0x9dffffff: . RedBoot>
At this stage the block of flash at location 0x9dFc0000 holds information about the various flash blocks, allowing other flash management operations to be performed. The next step is to set up RedBoot's non-volatile configuration values:
RedBoot> fconfig -i Initialize non-volatile configuration - continue (y/n)? y Run script at boot: false Use BOOTP for network configuration: true Default server IP address: 10.0.1.1 Console baud rate: 115200 DNS domain name: xxxxxxx.com DNS server IP address: 10.0.0.1 GDB connection port: 9000 Force console for special debug messages: false Network debug at boot time: false Update RedBoot non-volatile configuration - continue (y/n)? y ... Unlocking from 0x9dfc0000-0x9dffffff: . ... Erase from 0x9dfc0000-0x9dffffff: . ... Program from 0x9afc0000-0x9b000000 to 0x9dfc0000: . ... Locking from 0x9dfc0000-0x9dffffff: . RedBoot>
For most of these configuration variables the default value is correct. If there is no suitable BOOTP service running on the local network then BOOTP should be disabled, and instead RedBoot will prompt for a fixed IP address, netmask, and addresses for the local gateway and DNS server.
Initialization is now complete. Press the board reset button and the following output should be seen:
+Ethernet eth0: MAC address 00:d0:a0:00:08:1c IP: 10.0.2.4/255.0.0.0, Gateway: 10.0.0.3 Default server: 10.0.1.1 DNS server IP: 10.0.0.1, DNS domain name: <null> RedBoot(tm) bootstrap and debug environment [ROMRAM] Non-certified release, version UNKNOWN - built 14:40:05, Apr 23 2010 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 eCosCentric Limited RedBoot is free software, covered by the eCos license, derived from the GNU General Public License. You are welcome to change it and/or distribute copies of it under certain conditions. Under the license terms, RedBoot's source code and full license terms must have been made available to you. Redboot comes with ABSOLUTELY NO WARRANTY. Platform: LX110 (M14Kc) LE RAM: 0x80000000-0x9b000000 [0x8000b8b0-0x9afbd000 available] FLASH: 0x9c000000-0x9dffffff, 128 x 0x40000 blocks RedBoot>
When RedBoot issues its prompt it is also ready to accept connections from mips-sde-elf-gdb, allowing eCos applications to be downloaded and debugged.
Occasionally it may prove necessary to update the installed RedBoot image. This can be done by repeating this process.
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 ROMRAM version of RedBoot are:
$ mkdir redboot_romram $ cd redboot_romran $ ecosconfig new sead3_14kc redboot $ ecosconfig import $ECOS_REPOSITORY/hal/mips/sead3/current/misc/redboot_ROMRAM.ecm $ ecosconfig resolve $ ecosconfig tree $ make
At the end of the build
the install/bin
subdirectory
should contain the required
file redboot_romram.fl
. This builds RedBoot for the
LX155/M14Kc or LX110/M14Kc boards; to build for the LX50/M14K board substitute
sead3_14k for sead3_14kc in the above.
Rebuilding the ROM and JTAG versions involves basically the same
process. The ROM version uses the file
redboot_ROM.ecm
and generates an ELF
executable redboot.elf
, which will be
automatically converted to redboot_romram.fl
for
flash programming. The JTAG version uses the file
redboot_JTAG.ecm
and generates an ELF executable
redboot.elf
, which may need to be converted to
another format before it can be used with the JTAG software.
Note | |
---|---|
The program that creates the |
2024-03-18 | eCosPro Non-Commercial Public License |