RedBoot support is available for the EB40, EB40A, EB42 and EB55
boards. By default all these boards are shipped with only 256Kbytes of
RAM. To minimize the amount of RAM used by RedBoot, only very basic
flash management is provided, comprising of just the fis
erase and fis write commands.
RedBoot supports both serial ports. On all AT91 evaluation boards, serial
port A requires a straight through cable to connect with a PC, whereas
serial port B requires a null modem cable. If you fail to be able to
connect to Angel in the instructions below when installing RedBoot, be
sure to verify you are using the appropriate cable for the serial port.
The default serial port settings for RedBoot are 38400,8,N,1.
The following RedBoot configurations are supported:
Configuration
Mode
Description
File
ROM
[ROM]
RedBoot running from the board's flash boot
sector.
redboot_ROM.ecm
RAM
[RAM]
RedBoot running from RAM with RedBoot in the
flash boot sector.
RedBoot installation is essentially the same for all boards, however
the details differ slightly. Please make sure you follow the
directions from the correct section below. Any errors could result in
an unusable board.
This development board comes with ARM's debug tool, Angel, installed
in flash. At this time, Angel will not be replaced. Rather, RedBoot
will be placed in the alternate half of flash. Switch SW1 is used to
select which monitor to boot. Once RedBoot is installed, selecting SW1
to lower mem will choose Angel, whereas selecting
SW1 to upper mem will choose RedBoot.
Set SW1 to lower mem and connect serial port A to a
host computer. Using GDB from the host and Angel on the board,
download and run the RAM mode image of RedBoot to the board.
arm-elf-gdb redboot_RAM.elf
(gdb) tar rdi s=/dev/ttyS0
Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for
AT91EB40 (2.00)
Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31
Serial Rate: 9600
Connected to ARM RDI target.
(gdb) set $cpsr=0xd3
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x2020000
Loading section .text, size 0x7fd8 lma 0x2020040
Loading section .rodata, size 0x15a0 lma 0x2028018
Loading section .data, size 0x2e4 lma 0x20295b8
Start address 0x2020040 , load size 39068
Transfer rate: 6250 bits/sec, 500 bytes/write.
(gdb) cont
Continuing.
Once RedBoot is started, the GDB session connected with Angel
must be suspended (this can be done using Ctrl-Z) or terminated
(with Ctrl-C or the Windows task manager). Follow this
by connecting to the board using a terminal emulator such as
hyperterminal or minicom at 38400-8N1. At this point, RedBoot will be running on the board in
RAM.
RedBoot> version
RedBoot(tm) bootstrap and debug environment [RAM]
Non-certified release, version UNKNOWN - built 14:09:27, Jul 20 2001
Platform: Atmel AT91/EB40 (ARM7TDMI)
Copyright (C) 2000, 2001, Red Hat, Inc.
RAM: 0x02000000-0x02080000, 0x020116d8-0x0207fd00 available
FLASH: 0x01010000 - 0x01020000, 256 blocks of 0x00000100 bytes each.
RedBoot>
Now, download the ROM mode image.
RedBoot> load -m ymodem -b %{FREEMEMLO}
Use your terminal emulator to send the file redboot_ROM.srec via YModem.
e.g. Transfer->Send File in Hyperterminal, or
Ctrl-A S in minicom.
Finally, program it to flash.
RedBoot> fi wr -f 0x01010000 -b %{FREEMEMLO} -l 0x10000
SW1 should now be set to upper mem to select booting
with RedBoot rather than Angel. Finally, press the "reset" pushbutton and
RedBoot should come up on the board.
These development boards come with ARM's debug tool, Angel, installed
in flash. At this time, Angel will not be replaced. Rather, RedBoot
will be placed in the alternate half of flash. Jumper JP1 is used to
select which monitor to boot. Once RedBoot is installed, setting JP1
to STD will choose Angel, whereas setting JP1 to
USER will choose RedBoot.
Set JP1 to STD and connect serial port A to a host
computer. Using GDB from the host and Angel on the board, download
the RAM mode image of RedBoot to the board, and start it using the
'cont' command.
arm-elf-gdb redboot_RAM.elf
(gdb) tar rdi s=/dev/ttyS0
Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for AT91EB55 (2.20)
Angel Debug Monitor rebuilt on Feb 03 2002 at 16:10:20
Serial Rate: 9600
Connected to ARM RDI target.
(gdb) set $cpsr=0xd3
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x2008000
Loading section .text, size 0xb0b8 lma 0x2008040
Loading section .rodata, size 0x1c27 lma 0x20130f8
Loading section .data, size 0x5f0 lma 0x2014d20
Start address 0x2008040, load size 54031
Transfer rate: 6264 bits/sec, 500 bytes/write.
(gdb) cont
Continuing.
Once RedBoot is started, the GDB session connected with Angel must be
suspended (this can be done using Ctrl-Z) or terminated
(with Ctrl-C or the Windows task manager). Follow this by connecting to
the board using a terminal emulator such as hyperterminal or minicom
at 38400-8N1. At this point, RedBoot will be running on the board in
RAM.
RedBoot> version
RedBoot(tm) bootstrap and debug environment [RAM]
Non-certified release, version UNKNOWN - built 16:29:03, Jan 22 2004
Platform: Atmel AT91/EB42 (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
RAM: 0x02000000-0x02040000, [0x02006a00-0x02040000] available
0x00000000-0x00002000, [0x00000000-0x00002000] available
FLASH: 0x01000000 - 0x01200000, 32 blocks of 0x00010000 bytes each.
RedBoot>
Now, download the ROM mode image.
RedBoot> load -m ymodem -b %{FREEMEMLO}
Use your terminal emulator to send the file redboot_ROM.srec via YModem.
e.g. Transfer->Send File in Hyperterminal, or
Ctrl-A S in minicom.
Finally, program it to flash.
RedBoot> fi wr -f 0x01100000 -b %{FREEMEMLO} -l 0x10000
Set JP1 to the USER setting, press the "reset"
pushbutton and RedBoot should come up on the board.
The flash based RedBoot image occupies virtual addresses 0x01010000 - 0x0101dfff.
Note that the flash driver for the EB40 does not recognise the flash from
0x01000000 - 0x0100ffff. This is because it cannot be detected unless jumper
J7 is set, which allows writing to the protected lower area of flash containing
Angel. Setting J7 is not recommended due to the possibility of overwriting Angel
and making the board irrecoverable without an EmbeddedICE.
Use just one of the TARGET and
PLATFORM_DIR variable pairs only.
The names of configuration files are listed above with the
description of the associated modes.
When reprogramming RedBoot using RedBoot itself, you should
load a RedBoot RAM image as normal, and load the new ROM image
into RAM. However before programming the new image into Flash
you must switch SW1 to lower mem (EB40)
or set JP1 to STD (EB40A, EB42, EB55) before writing to Flash.
Warning!
Failure to set SW1 to
lower mem (EB40) or JP1 to
STD (EB40A, EB42, EB55) will cause the
installation of RedBoot to overwrite Angel, thus making the board
unbootable. Only hardware JTAG can restore the
board once in this state.
RedBoot will detect the presence of the optional plug-in AT91MEC01 Memory
Extension Card if plugged into an AT91 Evaluation Board. To verify that
RedBoot has been able to detect the card, run the version
command, which will display the known RAM memory regions. The MEC01 card
extension RAM is always mapped to the address 0x05000000:
RedBoot> version
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 03:29:03, Jan 23 2004
Platform: Atmel AT91/EB42 (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
RAM: 0x02000000-0x02040000, [0x02006a00-0x02040000] available
0x00000000-0x00002000, [0x00000000-0x00002000] available
0x05000000-0x05200000, [0x05000000-0x05200000] available
FLASH: 0x01000000 - 0x01200000, 32 blocks of 0x00010000 bytes each.
RedBoot>
eCos programs by default are linked to only use the standard
on-board memory as it is not known at build time if the MEC01 card
is present. To exploit the 2Mbyte MEC01 extension RAM and use that
by default, a CDL option must be enabled in the platform HAL of the
chosen AT91 board. Visit the platform HAL configuration to determine
the appropriate option to use.
Warning!
Before fitting the MEC01 card
to your AT91 evaluation board, be sure that you have configured
the jumpers on the MEC01 correctly. The correct settings can be
found within the AT91MEC01 Memory Extension Card User Guide,
section 3.2, "Configuring the AT91 Evaluation Board EBI". Note
that in the documentation the EB40 and EB40A correspond to the EB01.