ARM/ARM7 Atmel AT91 Evaluation Boards (EBXX)

Overview

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:

ConfigurationModeDescriptionFile
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_RAM.ecm
ROMRAM[ROMRAM]RedBoot running from RAM, but contained in the board's flash boot sector.redboot_ROMRAM.ecm

Initial Installation Method

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.

Installing RedBoot on the EB40

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, Free Software Foundation, 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 0xe100
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.

Installing RedBoot on the EB40A, EB42 or EB55

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:58:52, May  7 2003            
                                                                                
Platform: Atmel AT91/EB55 (ARM7TDMI)                                            
Copyright (C) 2000, 2001, 2002, Free Software Foundation, Inc.                                   
                                                                                
RAM: 0x02000000-0x02040000, 0x020068a8-0x0203f000 available                     
FLASH: 0x01010000 - 0x01200000, 31 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.

Special RedBoot Commands

None.

Memory Maps

This processor has no MMU, so the only memory map is for physical addresses.

The memory layout of the EB40 is as follows:

Physical Address Range     Description
-----------------------    ----------------------------------
0x00000000 - 0x00000fff    On-chip SRAM
0x01000000 - 0x0101ffff    Flash
0x02000000 - 0x0207ffff    RAM
0xffe00000 - 0xffffffff    I/O registers
The flash based RedBoot image occupies virtual addresses 0x01010000 - 0x0101dfff.

The memory layout of the EB40A is as follows:

Physical Address Range     Description
-----------------------    ----------------------------------
0x00000000 - 0x0003ffff    On-chip SRAM
0x01000000 - 0x011fffff    Flash
0x02000000 - 0x02ffffff    External SRAM (optional)
0xffe00000 - 0xffffffff    I/O registers
The flash based RedBoot image occupies virtual addresses 0x01100000 - 0x0110ffff.

The memory layout of the EB42 and EB55 is as follows:

Physical Address Range     Description
-----------------------    ----------------------------------
0x00000000 - 0x00001fff    On-chip SRAM
0x01000000 - 0x011fffff    Flash
0x02000000 - 0x0203ffff    RAM
0xffe00000 - 0xffffffff    I/O registers
The flash based RedBoot image occupies virtual addresses 0x01100000 - 0x0110ffff.

Rebuilding RedBoot

These shell variables provide the platform-specific information needed for building RedBoot according to the procedure described in Chapter 3:

export ARCH_DIR=arm

export TARGET=eb40
export PLATFORM_DIR=at91/eb40

export TARGET=eb40a
export PLATFORM_DIR=at91/eb40a

export TARGET=eb42
export PLATFORM_DIR=at91/eb42

export TARGET=eb55
export PLATFORM_DIR=at91/eb55
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.