NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. 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


TIBanner.png


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[edit]

Flashing[edit]

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/).

NOTE
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.

Aisgenfile.jpg

Flashing using Serial Flasher[edit]

  • 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[edit]

  • 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[edit]

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
State OFF OFF OFF OFF OFF OFF ON ON
  • SPI Boot Mode
Pin No. 1 2 3 4 5 6 7 8
State OFF OFF OFF OFF OFF OFF OFF OFF
  • Emulation Boot Mode
Pin No. 1 2 3 4 5 6 7 8
State OFF OFF OFF OFF ON OFF OFF ON

 

Bootloader[edit]

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[edit]

  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[edit]

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

Xyz.jpg

On-chip RAM[edit]

Below diagram represents On-chip memory contents.

ONCHIP.jpg

DDR[edit]

Below diagram represents DDR memory contents.

Ddr1.jpg

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article AM18XX SitaraWare Booting And Flashing here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article AM18XX SitaraWare Booting And Flashing here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article AM18XX SitaraWare Booting And Flashing here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article AM18XX SitaraWare Booting And Flashing here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article AM18XX SitaraWare Booting And Flashing here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article AM18XX SitaraWare Booting And Flashing here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article AM18XX SitaraWare Booting And Flashing here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article AM18XX SitaraWare Booting And Flashing here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article AM18XX SitaraWare Booting And Flashing here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity