Linux & Open Source related information for AT91 Smart ARM Microcontrollers
Search: 

AT91Bootstrap

Introduction

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.

More information see the AT91Bootstrap application note.

Pre-built binaries

DataFlash

Board Description Binary
at91sam9260ek AT91Bootstrap binary with 2nd level application in Dataflash chip (SPI 0 CS 1) dataflash_at91sam9260ek.bin
at91sam9xeek AT91Bootstrap binary with 2nd level application in Dataflash chip (SPI 0 CS 1) dataflash_at91sam9xeek.bin
at91sam9261ek AT91Bootstrap binary with 2nd level application in Dataflash chip (SPI 0 CS 0) dataflash_at91sam9261ek.bin
at91sam9263ek AT91Bootstrap binary with 2nd level application in Dataflash card (SPI 0 CS 0) dataflash_at91sam9263ek.bin
at91sam9rlek AT91Bootstrap binary with 2nd level application in Dataflash card (SPI 0 CS 0) dataflash_at91sam9rlek.bin
at91sam9g20ek AT91Bootstrap binary with 2nd level application in Dataflash chip (SPI 0 CS 1) dataflash_at91sam9g20ek.bin
at91sam9g10ek AT91Bootstrap binary with 2nd level application in Dataflash chip (SPI 0 CS 0) dataflash_at91sam9g10ek.bin
at91sam9g45ekes ROM Code replacement 2
at91sam9m10ekes AT91Bootstrap binary with 2nd level application in Dataflash chip (SPI 0 CS 0) dataflash_at91sam9m10ekes.bin
at91sam9m10g45ek AT91Bootstrap binary with 2nd level application in Dataflash chip (SPI 0 CS 0) dataflash_at91sam9m10g45ek.bin

NandFlash

Board Description Binary
at91sam9260ek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9260ek.bin
at91sam9xeek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9xeek.bin
at91sam9261ek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9261ek.bin
at91sam9263ek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9263ek.bin
at91sam9rlek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9rlek.bin
at91sam9g20ek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9g20ek.bin
at91sam9g10ek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9g10ek.bin
at91sam9g45ekes AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9g45ekes.bin
at91sam9m10ekes AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9m10ekes.bin
at91sam9m10g45ek AT91Bootstrap binary with 2nd level application in NandFlash nandflash_at91sam9m10g45ek.bin

Old binaries AT91Bootstrap directory on Linux4sam FTP

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 :

AT91SAM9260-EK AT91SAM9261-EK AT91SAM9263-EK (RevA)
  • J7 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • follow the AT91SAM9260EKSamBaRecovery recovery method, if needed
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • J4 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • remove DataFlash Jumper (J21)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • plug DataFlash Jumper (J21) back in position 1-2
  • J5-6 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • remove DataFlash Card (J9)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • reinsert the DataFlash Card in J9
AT91SAM9XE-EK AT91SAM9RL-EK AT91SAM9263-EK (RevB)
  • erase the content of the internal FLASH by putting the J7 jumper in position 1-2
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • open now J7 (or put in position 2-3), to boot in normal operating mode
  • J11 must be on 1-2 position (BMS=1) to boot from the on-chip Boot ROM
  • remove DataFlash and NAND Flash Jumpers (J12 & J13)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • close DataFlash and NAND Flash Jumpers (J12 & J13)
  • J5-6 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • remove DataFlash Card (J9)
  • remove NAND Flash Jumpers (J29)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • reinsert the DataFlash Card in J9 (only for DataFlash demo)
  • close NAND Flash Jumper (J29) 1
AT91SAMG20-EK AT91SAMG10-EK AT91SAM9G45-EKES
  • J7 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • remove DataFlash and NAND Flash Jumpers (J33 & J34)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • close DataFlash and NAND Flash Jumpers (J33 & J34)
  • J4 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • remove DataFlash and NAND Flash Jumpers (J21 & J24)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • close DataFlash (J21) back in position 1-2
  • close NAND Flash Jumper (J24)
  • Check and conform to the Default Jumpers Settings
  • First of all, be sure that the ROM code replacement is located in Dataflash to workaround the issue with SAM-BA access through USB. Please refer to the Errata on AT91SAM9G45 Engineering Sample Devices document
  • JP8 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • remove NAND Flash Jumper (JP10)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • close NAND Flash Jumper (JP10)
AT91SAM9M10-EKES and AT91SAM9M10G45-EK    
  • Check and conform to the Default Jumpers Settings
  • JP8 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • remove NAND Flash Jumper (JP10)
  • power up the board
  • verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • close NAND Flash Jumper (JP10)
   

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

    SAM-BA_selectboard.jpg

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

SAM-BA_mainwin-bootstrap.png

  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

9263_rom_boot_sequence.png

Boot capabilities matrix

Here is :
led-aqua a summary of the boot feature available for each board (re-compilation needed)
led-green 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 3
at91sam9260ek led-aqua    led-green 4 led-green 5      
at91sam9xeek           led-green   
at91sam9261ek led-green 4 led-aqua    led-green 6 led-aqua 6    
at91sam9263ek led-green 7   led-green 8 led-aqua 8    
at91sam9rlek led-green 4   led-green    led-aqua       
at91sam9g20ek led-aqua    led-green 4 led-green         
at91sam9g10ek led-green 4 led-aqua    led-green    led-aqua       
at91sam9g45ekes led-aqua 4   led-green         
at91sam9m10ekes led-green 4   led-green    led-aqua       
at91sam9m10g45ek led-green 4   led-green    led-aqua       

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.

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

Sources and build process are described in the AT91Bootstrap application note page on http://www.atmel.com .

Description Sources and information Sources and old revisions
alternative location
AT91Bootstrap sources and binaries archive Sources and information on Atmel website On Linux4sam.org FTP server

A rewritten version of AT91bootstrap that supports some more options is available as part of the buildroot project at http://buildroot.uclibc.org/

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
and
make
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-


Notes

1: If you experience issues with NAND flash accesses,
please refer to the AT91SAM9263-EK Evaluation Board Rev. B User Guide chapter 1.5 NAND Flash Access Issue

2: To workaround the issue with SAM-BA access through USB, a ROM code replacement is located in Dataflash. Please refer to the Errata on AT91SAM9G45 Engineering Sample Devices document

3: Only available on products with embedded Flash

4: On board DataFlash chip

5: Please check at91sam9260 errata # 44.2.1.1

6: Supported on SAM9261 rev B and onward

7: Removable DataFlash card

8: Supported on SAM9263 rev B and onward


  Attachment Action Size Date Who Comment
png 9263_rom_boot_sequence.png props, move 42.6 K 18 Sep 2007 - 15:39 NicolasFerre  
png SAM-BA_mainwin-bootstrap.png props, move 28.6 K 11 Sep 2007 - 12:27 NicolasFerre SAM-BA main window flashing bootstrap
r57 - 21 Jan 2011 - 10:05:11 - NicolasFerre
This site is powered by the TWiki collaboration platformCopyright © 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.
Atmel® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
ARM® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.
Syndicate this site RSSATOM