The AT91CAP9A-DK can boot from either NAND flash or Dataflash. However, you can also store U-Boot and its environment in NOR flash. Because the NOR flash is not a default search location for the boot ROM, you cannot boot only from NOR. Instead, you must load the bootstrap file from Dataflash or NAND flash, which will then load U-Boot from NOR flash. This document describes how to load the bootloaders into the proper locations for this configuration.
Building the Bootloader Images
- Download the sources and decompress the archive into a working directory.
- Enter the directory for the board and configuration that you want.
cd at91bootstrap-<version>/board/at91cap9adk/norflash/
- AT91 Bootstrap uses a basic make command, with CROSS_COMPILE variable. Assuming that the toolchain is in your path,
make CROSS_COMPILE=armv5l-linux-
will compile the AT91 Bootstrap Loader. The resulting file, norflash_at91cap9adk.bin, will be in the current working directory.
- Download the sources and decompress the archive into a working directory.
- Enter the U-Boot directory.
- Configure U-Boot to use NOR flash by modifying the file include/configs/at91cap9adk.h as follows:
#undef CFG_USE_DATAFLASH
#define CFG_USE_NORFLASH 1
then type the command:
make at91cap9adk_config
- U-Boot uses a basic make command, with CROSS_COMPILE variable. Assuming that the toolchain is in your path,
make CROSS_COMPILE=armv5l-linux-
will compile U-Boot. The resulting file will be in the U-Boot root directory as u-boot.bin.
Burning the Images to NAND Flash
- Unplug the board.
- Remove any SD or DataFlash cards from the board.
- If a bootloader exists in the on-board DataFlash or NAND flash, erase it.
- Plug the board in to the power supply to power on the board.
- Replace any jumpers and cards that you removed.
- Plug the B-Type USB connector into the USB Gadget port on the board, and the A-Type connector into your host machine.
- Start the SAM-BA tool. Select AT91CAP9-DK-MEM33, and \usb\ARM0 (Windows) or /dev/ttyUSB0 (Linux) as your Connection. Click Connect.
- Burn the AT91 Bootstrap Loader file to NAND flash:
- Click on the NandFlash tab, select Enable NandFlash under the scripts dropdown.
- Click the NandFlash tab.
- Select Enable NandFlash under the Scripts dropdown and click Execute.
- Select Send Boot File under the Scripts dropdown and click Execute.
- Navigate to the .bin file and click Open.
- Burn U-Boot to NOR Flash.
- Click the NorFlash tab.
- Select Enable NorFlash under the Scripts dropdown and click Execute.
- Click the Browse button next to Send File Name under the Download/Upload File section. Navigate to the u-boot.bin file and click Open.
- Set the Address box to 0x8000.
- Click Send File.
- Close SAM-BA and reset the board.
NAND Flash Memory Map
NOR Flash Memory Map
Start Address |
Size |
Function |
0x4000 |
0x4000 |
U-Boot Environment |
0x8000 |
0x30000 |
U-Boot |