Legacy AT91Bootstrap


AT91Bootstrap is a first step bootloader providing a set of algorithms to manage hardware initialization (GPIO, Clock, SDRAM, etc), to download your main application from specified FLASH media to main memory and to start it.

In the linux4SAM pre-built demo it is used to configure the hardware and to load and start the standard U-Boot bootloader, it can also be configured to start directly the linux kernel.

Load AT91Bootstrap on SAM9 boards

This section describes How to load AT91Bootstrap into the boot media with SAM-BA.

  • Connect the USB Device Interface to your host machine using the USB Device Cable
  • Make sure that the chip can execute the bootROM monitor SAM-BA-boot :

  • Start SAM-BA GUI Application
  • Select the the board in the drop-down menu and choose the USB Connection


  • Eventually plug back a jumper to access the media on which u-boot must be loaded to
  • In the main SAM-BA window :


  1. Choose the proper media tab (DataFlash, NandFlash, etc.) in the SAM-BA GUI interface
  2. Initialize the media choosing the Enable action in the Scripts rolling menu and press Execute
  3. Choose Send boot file, press Execute
  4. Select the at91bootstrap binary file and press Open ; the media is written down
  5. Close SAM-BA, remove the USB cable

Boot strategies

AT91 chips embed a boot ROM code. It is enabled depending on BMS (Boot Mode Select) pin state on reset. This ROM code scans the contents of different media like SPI DATAFLASH, NAND FLASH or SDCARD to determine if a valid application is available then it download the application into SAM9 internal SRAM and run it. To determine if a valid application is present the ROM code checks the eight ARM exception vectors.

If no application is available then SAM-BA application is executed. It waits for transactions either on the USB device, or on the DBGU serial port, Then the SAM-BA tool can be used to program FLASH or EEPROM present on your board.

For more information on this topic, please check the corresponding SAM product datasheet section Boot Program . You can find a valuable summary in the document named SAM9 Boot Strategies or see the cross matrix below..

ROM Code boot Sequence example


Boot capabilities matrix

Here is :
Aqua led a summary of the boot feature available for each board (re-compilation needed)
Green led the solution chosen for the Linux4SAM pre-built binaries.

Product Boot from
DataFlash (SPI0 CS0)
Boot from
DataFlash (SPI0 CS1)
Boot from
NAND Flash
Boot from
SD card
Boot from
NOR Flash
Boot from
Internal Flash (1)
at91sam9260ek Aqua led    Green led (2) Green led (3)      
at91sam9xeek           Green led   
at91sam9261ek Green led (4) Aqua led    Green led (5) Aqua led (6)    
at91sam9263ek Green led (7)   Green led (8) Aqua led (9)    
at91sam9rlek Green led (10)   Green led    Aqua led       
at91sam9g20ek Aqua led    Green led (11) Green led    Aqua led (12)    
at91sam9g10ek Green led (13) Aqua led    Green led    Aqua led       
at91sam9g45ekes Aqua led (14)   Green led         
at91sam9m10ekes Green led (15)   Green led    Aqua led       
at91sam9m10g45ek Green led (16)   Green led    Aqua led       

Known issues with old AT91Bootstrap

The Dataflash version of AT91Bootstrap (version 1.10 or older) will load a second level bootloader or application from the address 0x8000. Dataflash memories have page size of 1056 bytes, (0x420 hex) and the load address 0x8000 is thus in the middle of a page.

Pointing hand Newer version of AT91Bootstrap (from version 1.11) will load a second level bootloader or application from the address 0x8400.

Build AT91Bootstrap from sources

In brief

To compile an AT91Bootstrap project:

  1. go into the board directory
  2. select your board by going into the corresponding board directory
  3. select your media by going into the corresponding directory
  4. run make

Example: To compile a DataFlash boot project for AT91SAM9260-EK board, type the following commands:

cd board/at91sam9260ek/dataflash
make clean
or if you want to specify the cross-compiler :
make CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix->

path_to_cross-compiler is only needed if it is not in your PATH.
Usually cross-compiler-prefix- looks like arm-linux- or arm-elf-


1 : Only available on products with embedded Flash

2 , 4 , 10 , 11 , 13 , 14 , 15 , 16 : On board DataFlash chip

3 : Please check at91sam9260 errata #

5 , 6 : Supported on SAM9261 rev B onwards

7 : Removable DataFlash card

8 , 9 : Supported on SAM9263 rev B onwards

12 : Supported on SAM9G20 recent rev A, rev B and newer

r2 - 17 Apr 2018 - 09:49:51 - NicolasFerre
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip® and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM