Name
Setup — Preparing the LPC2468 OEM Board for eCos Development
Overview
In a typical development environment, the LPC2468 OEM Board boots from internal flash into RedBoot. eCos applications are configured for RAM startup and then downloaded and run on the board via the debugger arm-eabi-gdb. Preparing the board therefore usually involves programming a suitable RedBoot image into flash memory.
The following RedBoot configurations are supported:
Configuration | Description | Use | File |
---|---|---|---|
ROM | RedBoot running from ROM | redboot_ROM.ecm | redboot_ROM.hex |
RAM | RedBoot running from RAM | redboot_RAM.ecm | redboot_RAM.srec |
For serial communications, all versions run with 8 bits, no parity, and 1 stop bit at 38400 baud. This baud rate can be changed via the RedBoot baud command.
Initial Installation
Flash Installation
This process assumes that a Microsoft Windows machine with the Embedded Systems Academy Flash Magic utility is available.
The first step is to set up the board as described in the Embedded Artists documentation. The FlashMagic tool from http://www.flashmagictool.com must be installed to program applications or RedBoot into flash. Older versions of Windows may also require the FTDI USB driver from http://www.ftdichip.com/Drivers/VCP.htm be installed and configured as described in the Embedded Artists documentation.
Install the ISP jumpers (P2.10 and RESET) and press the reset button. The board is now running a special NXP boot loader. Start FlashMagic and set the Serial Port to the FTDI USB COMx device activated when the target hardware is connected to the host by a suitable USB cable. Select 38400 baud and change the device to LPC2468. Older versions of FlashMagic also require the Interface “None (ISP)” and 12MHz Oscillator Frequency - these settings are available under preferences in newer versions and are set correctly by default.
Test communication with the board by using the “ISP->Read Device Signature” menu entry. If communication is not successful, check that the correct USB cable is used and connected, the ISP jumpers are installed and the correct COM port is being used.
Check “Erase blocks used by Hex File” under
“Erase” OR in recent versions of FlashMagic select
“Sectors used by File” next to “Erase”.
In the “File” section, select the
redboot_ROM.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 flash erase and write operations.
When the process completes, the utility should be closed. Verify the programming has been successful by starting 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). Remove the ISP jumpers. Reset the board and RedBoot should start. The output should be similar to the following:
+**Warning** FLASH configuration checksum error or invalid key Use 'fconfig -i' to [re]initialize database Ethernet eth0: MAC address 0e:00:00:ea:18:f0 IP: 10.0.2.8/255.0.0.0, Gateway: 10.0.0.3 Default server: 0.0.0.0, DNS server IP: 10.0.0.1 RedBoot(tm) bootstrap and debug environment [ROM] eCosCentric certified release, version 4.5.9 - built 10:17:51, Apr 26 2021 Copyright (C) 2000-2009 Free Software Foundation, Inc. Copyright (C) 2003-2021 eCosCentric Limited The RedBoot bootloader is a component of the eCos real-time operating system. Want to know more? Visit www.ecoscentric.com for everything eCos & RedBoot related. This is free software, covered by the eCosPro Non-Commercial Public License and eCos 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: Embedded Artists LPC2468 OEM Board (ARM7TDMI) RAM: 0xa0000000-0xa2000000 [0xa000aa18-0xa1fed000 available] FLASH: 0x00000000-0x0007dfff, 8 x 0x1000 blocks, 14 x 0x8000 blocks, 6 x 0x1000 blocks FLASH: 0x80000000-0x803fffff, 64 x 0x10000 blocks RedBoot>
It is now necessary to initialize the flash file system and the flash configuration. This can be done with the following commands:
RedBoot>fis init
About to initialize [format] FLASH image system - continue (y/n)?y
*** Initialize FLASH Image System ... Erase from 0x803f0000-0x803fffff: . ... Program from 0xa1ff0000-0xa2000000 to 0x803f0000: . 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.2
Console baud rate: 38400 DNS server IP address:10.0.0.1
Network hardware address [MAC] for eth0: 0x0E:0x00:0x00:0xEA:0x18:0xF0 GDB connection port: 9000 Force console for special debug messages: false Network debug at boot time: false Default network device: lpc2xxx Update RedBoot non-volatile configuration - continue (y/n)? y ... Erase from 0x803f0000-0x803fffff: . ... Program from 0xa1ff0000-0xa2000000 to 0x803f0000: . RedBoot>
Replace the IP addresses in the above with those for your own network. The above also accepts the default for the MAC address, if more than one LPC2468 is to be used on the same network then different MAC addresses should be used; Embedded Artists boards are supplied with a sticker showing an assigned MAC address, and this should be used by preference.
It is it ever necessary to reinstall RedBoot, the above directions can be repeated. Alternatively, a new RedBoot may be installed from RedBoot itself. It is not possible to do this directly, since RedBoot is executing from the flash that needs to be erased and reprogrammed. Instead it is necessary to run a RAM version of RedBoot, use that to download the new ROM RedBoot to RAM, and then program that to flash.
The following shows an example session to do this. It assumes that
redboot_RAM.srec
and
redboot_ROM.bin
are available via TFTP on the
server set up in fconfig.
RedBoot>load redboot_RAM.srec
Using default protocol (TFTP) Entry point: 0xa0100040, address range: 0xa0100000-0xa011bab4 RedBoot>go
+Ethernet eth0: MAC address 0e:00:00:ea:18:f0 IP: 10.0.2.8/255.0.0.0, Gateway: 10.0.0.3 Default server: 10.0.1.2, DNS server IP: 10.0.0.1 RedBoot(tm) bootstrap and debug environment [RAM] eCosCentric certified release, version 4.5.9 - built 10:17:32, Apr 26 2021 Copyright (C) 2000-2009 Free Software Foundation, Inc. Copyright (C) 2003-2021 eCosCentric Limited The RedBoot bootloader is a component of the eCos real-time operating system. Want to know more? Visit www.ecoscentric.com for everything eCos & RedBoot related. This is free software, covered by the eCosPro Non-Commercial Public License and eCos 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: Embedded Artists LPC2468 OEM Board (ARM7TDMI) RAM: 0xa0000000-0xa2000000 [0xa0126970-0xa1fed000 available] FLASH: 0x00000000-0x0007dfff, 8 x 0x1000 blocks, 14 x 0x8000 blocks, 6 x 0x1000 blocks FLASH: 0x80000000-0x803fffff, 64 x 0x10000 blocks RedBoot>load -r -b %{freememlo} redboot_ROM.bin
Using default protocol (TFTP) Raw file loaded 0xa0125c00-0xa0142ba3, assumed entry at 0xa0125c00 RedBoot>fis write -f 0x00000000 -b %{freememlo} -l 0x20000
* CAUTION * about to program FLASH at 0x00000000..0x0001ffff from 0xa0125c00 - continue (y/n)?y
... Erase from 0x00000000-0x0001ffff: ........... ... Program from 0xa0125c00-0xa0145c00 to 0x00000000: ........... RedBoot>reset
+Ethernet eth0: MAC address 0e:00:00:ea:18:f0 IP: 10.0.2.8/255.0.0.0, Gateway: 10.0.0.3 Default server: 10.0.1.2, DNS server IP: 10.0.0.1 RedBoot(tm) bootstrap and debug environment [ROM] eCosCentric certified release, version 4.5.9 - built 10:17:51, Apr 26 2021 Copyright (C) 2000-2009 Free Software Foundation, Inc. Copyright (C) 2003-2021 eCosCentric Limited The RedBoot bootloader is a component of the eCos real-time operating system. Want to know more? Visit www.ecoscentric.com for everything eCos & RedBoot related. This is free software, covered by the eCosPro Non-Commercial Public License and eCos 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: Embedded Artists LPC2468 OEM Board (ARM7TDMI) RAM: 0xa0000000-0xa2000000 [0xa000aa18-0xa1fed000 available] FLASH: 0x00000000-0x0007dfff, 8 x 0x1000 blocks, 14 x 0x8000 blocks, 6 x 0x1000 blocks FLASH: 0x80000000-0x803fffff, 64 x 0x10000 blocks RedBoot>
Rebuilding RedBoot
Should it prove necessary to rebuild the RedBoot binary, this is done
most conveniently at the command line. Assuming your PATH
and
ECOS_REPOSITORY
environment variables have been set correctly,
the steps needed to rebuild RedBoot for the LPC2468-32 are:
$ mkdir redboot_ealpc2468_rom $ cd redboot_ealpc2468_rom $ ecosconfig new ea_lpc2468_32 redboot $ ecosconfig import $ECOS_REPOSITORY/hal/arm/lpc2xxx/ea_lpc2468/current/misc/redboot_ROM.ecm $ ecosconfig resolve $ ecosconfig tree $ make
At the end of the build the install/bin
subdirectory should contain
the file redboot.hex
.
Substitute 16 for 32 in the above to build RedBoot for the LPC2468-16 module.
2024-03-18 | eCosPro Non-Commercial Public License |