NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on The site is now set to read only.

AM18XX SitaraWare Booting And Flashing

From Texas Instruments Wiki
Jump to: navigation, search

Important Note:

The software found on this site is available for download, but is no longer being actively developed and maintained. This wiki is in maintenance mode and the software is supported on Sitara E2E forum


IMPORTANT - The content of this page is due to change quite frequently and thus the quality and accuracy are not guaranteed until this message has been removed. For suggestion/recommendation, please send mail to your local FAE.

AM18XX Booting and Flashing


Two types of images can be flashed to the SPI flash. A bootstrap image and a application binary image. The application can be in usual raw binary format (.bin) and can be flashed. However, the bootstrap image is required to be in a special format called the AIS format. This can be generated using the AIS Gen utility which is part of the package (SitaraWare_xx_yy_mm_pp/tools/ais_gen/).

AISGen is only supported on Windows host

Follow the below steps to generate a .ais file from a .out file.

  • Specify the Boot loader file with the location of the ELF file .out and the location of .ais file name for AIS binary Image.
  • Click on Generate AIS. The binary image in AIS format will now be available in the specified folder.

Given below is the screenshot of AIS generator with the default settings, generating AIS image from boot.out file.


Flashing using Serial Flasher

  • Required
    • Microsoft Dot Net Framework
    • The Serial flasher (/tools/flash_writer/sfh_OMAP-L138.exe)
    • Serial port of the EVM connected to the host serial port via NULL modem cable
    • Image of bootloader in AIS format (Generated using /tools/ais_gen/AISgen_d800k006_Install_v1.5.exe)
    • Binary Image of the application
  • How To Flash :
    • Configure the BOOT pins for UART Boot mode. (see Boot Modes)
    • Erase the target by executing the command "sfh_OMAP-L138.exe -erase". On request for reset, reset the EVM. It will erase the entire FLASH.
    • Flash the boot loader and binary application using the command "sfh_OMAP-L138.exe -flash "<Boot_loader.ais>" "<Binary_Application.bin>".
    • Configure the BOOT pins for SPI boot mode (see Boot Modes) and reboot the EVM. The application starts running.

Flashing using CCS

  • Required
    • SPI flash writer Object file spi_flash_writer.out (available in /tools/flash_writer/).
  • How To Flash :
    • Configure the BOOT pins for Emulation boot mode (see Boot Modes).
    • Load the GEL file AM1808.gel (available in /tools/gel)
    • Connect to the target
    • Execute the GEL function
      • Go to the menu toolbar, Scripts->Full EVM->SPI1_PinMux.
    • Load the spi_flash_writer.out onto the EVM.
    • It will be prompted for binary AIS Bootloader file name. Update the file path with the path of .ais binary image which we need to flash.
    • It will be prompted again for application file name. Provide file path of the application.
    • Once SPI flash writing completes, disconnect from CCS and put the boot mode pins in the SPI boot mode (see Boot Modes).
    • Reboot the EVM.

Boot Modes

The device supports variety of boot modes through ARM ROM Bootloader. Boot mode selection is determined by the state of the BOOT pins. States of BOOT pins on AM1808 EVM for UART, SPI and Emulation boot modes are given below.

  • UART Boot Mode
Pin No. 1 2 3 4 5 6 7 8
  • SPI Boot Mode
Pin No. 1 2 3 4 5 6 7 8
  • Emulation Boot Mode
Pin No. 1 2 3 4 5 6 7 8



SitaraWare AM18XX provides a simple bootloader, which can be flashed to the on board SPI flash, which after a power-on-reset can bootstrap the board. Additionally it can load an application from the flash to DDR and transfer the control to the application. This can be used for out-of-box experience. At present, only SPIflash based boot loading is supported.

Upon board power on, the RBL [Read Only Memory BootLoader], residing in the ROM of the AM18XX kickstarts. RBL checks the boot mode setting (which should be SPI mode in case of SitaraWare bootloading) and depending upon the boot mode setting it copies boot loader from the respective flash device. RBL requires boot loader to be in .ais format. “AIS gen for D800k006” is the tool used to convert to .ais format from .out. RBL copies the boot loader to On chip-RAM location 0x80000000 and gives control to it. Boot loader initializes PLL0 and PLL1 for all the devices and then it initializes DDR. Once all the initialization is done, it copies the application from flash to the DDR and transfers the control to the application. The application starts to execute from DDR.

Execution Flow

  1. Entry point to the bootloader is the function Entry() which is inside the file bl_init.s (src/gcc). This function initializes stack and bss.
  2. Invokes bl_start(), which is in the file bl_main.c.
    1. This invokes DeviceConfig(), an EVM dependent function, for AM1808, function will be present in the file bl_devam1808.c.This calls PLL and DDR initialization functions.
    2. PLLInit() Initializes PLL0 and PLL1.
    3. DDRInit() function initializes the DDR.
  3. Initializes the UART by calling UartConfigure().
  4. Executes Imagecopy() function which is present in the device independent file bl_copy.c .Depending upon the defined boot mode it calls one of the SPIBootcopy()/ NANDBootcopy()/ NorBootcopy() function. This function copies the application to the DDR and makes the processor to execute from this location (Refer memory layout of DDR).

SPI FLash Memory Layout

The following diagram represents the blocks of memory and its contents in SPI Flash.


On-chip RAM

Below diagram represents On-chip memory contents.



Below diagram represents DDR memory contents.