Boot Images for OMAP-L137

From Texas Instruments Wiki
Jump to: navigation, search

Important Note:

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


This document to the OMAP-L137 ARM+DSP SOC. The content also applies to AM1707 and C6747 devices unless otherwise specified.

Introduction

The OMAP-L137 contains an ARM9 core as well as a C674x DSP core. Out of reset, the ARM is held in reset and the DSP begins executing the bootloader. The following instructions show how to boot code that flashes the LEDs on the OMAP-L137 EVM. There is a separate section for booting code to run on the ARM and booting code to run on the DSP.

Booting DSP Binaries

Description

This section provides information on how to boot an DSP executable on DSP-boot devices. A simple test program is used, in which the DSP repeatedly blinks the LEDs on the OMAP-L137 EVM after booting.

This section does not apply to the AM1707 devices.

The general flow is as follows:

  • DSP comes out of reset
  • DSP copies DSP LED program from external medium (SPI, NAND, UART, etc) to memory
  • DSP executes LED flashing program

Obtaining the software

The following software is required:

  • Sample code and bootable images: here
    • Precompiled AIS boot image for blinking LEDs on the OMAP-L137 EVM
    • CCS version 3.3 DSP project and source code for blinking LEDs with the DSP on the OMAP-L137
    • CFG files for the AISgen tool used for generating AIS boot image
  • Serial flash loading utility: here

Running

OMAP-L137 EVM

  • Compile the source code
    • Two projects are provided, one for the DSP UBL and one for the ARM LED blinking program. Open each project file in CCS and push Build in the respective processor window. Precompiled .out files are located in the Debug directories of the software package.
  • Generate AIS image
    • Open a command window and navigate to the directory of HexAIS_OMAP-L137.exe
    • Run the following command: HexAIS_OMAP-L137.exe -o OMAPL137-ARM-LED.bin DSP\Debug\OMAPL137-ARM-LED-DSP.out ARM\Debug\OMAPL137-ARM-LED-ARM.out
      • Note: The order of the source .out files matters. The bootloader will jump to the entrypoint of the first .out file listed, which in this case is the DSP UBL.

Windows 7 users

Please run the AISGen and the HexAISGen utilities under administrative privileges. For AISGen tool, you can right click and open as administrator and with the command line utility you can use

 C:> runas /user:Administrator HexAIS_OMAP-L137.exe -o OMAPL137-ARM-LED.bin DSP\Debug\OMAPL137-ARM-LED-DSP.out ARM\Debug\OMAPL137- ARM-LED-ARM.out


  • Flash the AIS image
    • For NAND, NOR, and SPI bootmodes, use the serial flasher to flash the image to the desired boot medium using the "-flash_noubl" option. See the serial flasher wiki for more details.
      • Make sure to check the ROM revision of your device to select the proper targetType
    • For UART bootmode, use the serial loader to loader to boot from the UART host as follows:
      • ./slh_OMAP-L137.exe -waitForDevice OMAPL137-ARM-LED.bin

C674x EVM

The same instructions for the OMAP-L137 EVM apply for this device as well

Debug

If the LED is not flashing, you will need to check the DSP for possible issues. The DSP should be awake and able to connect to in CCS, with the PC in the shared memory region (0x80000000 - 0x8001FFFF). Otherwise an error could have occurred during the boot sequence. See this page for help debugging boot issues:

http://processors.wiki.ti.com/index.php/OMAP-L1x_Debug_Gel_Files

Booting ARM Binaries

Description

This section provides information on how to boot an ARM executable on DSP-boot devices. A DSP user boot loader (UBL) will run first and is required to wake up the ARM, which will begin execution of the ARM application. The DSP and ARM programs are combined into a single AIS image which can be flashed and booted directly.

This section does not apply to the C6748 devices.

A simple test program is used, in which the ARM repeatedly blinks the LEDs on the OMAP-L137 EVM after booting.

The general flow is as follows:

  • DSP comes out of reset
  • DSP copies DSP UBL and ARM LED flashing program from external medium (SPI, NAND, UART, etc) to memory
  • DSP executes UBL which sets ARM reset vector to entry point of LED flashing program in memory
    • The memory location where the ARM reset vector is stored (0xFFFF0000) is not accessible by the DSP. Therefore the PRU subsystem is used to perform the write.
    • The global macro "DEVICE_ARM_UBL_LOAD_ADDR"  in the DSP UBL file "device.h" must be set to the entry point of the ARM program to be run
    • There is no restriction on what the entry point of the ARM program may be set to
  • DSP wakes up ARM and spins in while(1) loop
  • ARM executes LED flashing program

Note: A few points to keep in mind are:

  • The ARM and DSP .map files cannot overlap. If both programs use the same memory address, they will overwrite each other and most likely crash. The linker command files should be written to prevent this.
  • The ARM must be in supervisor mode in order to modify SYSCFG register, such as the ones that control the device pin multiplexing. The TI Code Generation tools for the ARM put the ARM in user mode by default, so this project includes a separate boot.asm file which keeps the ARM in supervisor mode after reset. This file should be included in all projects where the ARM needs to access certain SYSCFG registers that require supervisor mode.
  • The AISgen GUI for OMAP-L137 cannot accept multiple application files and create a single AIS image as done in this example. Therefore the command line tool HexAIS is used instead.

Obtaining the software

The following software is required:

  • Sample code and bootable images: here
    • Precompiled AIS boot image or blinking LEDs on the OMAP-L137 EVM
    • CCS version 3.3 ARM and DSP projects and source code for blinking LEDs with the ARM on the OMAP-L137
    • INI file for the HexAIS tool used for generating AIS boot image
      • Note that for NOR boot, the INI file must modified to select NOR boot mode and the correct bus width. The default INI file can be used for all other boot modes.
  • HexAIS tool: Included in the base directory of the sample code
  • Serial flash loading utility: here

Running

OMAP-L137 EVM

  • Compile the source code
    • Two projects are provided, one for the DSP UBL and one for the ARM LED blinking program. Open each project file in CCS and push Build in the respective processor window. Precompiled .out files are located in the Debug directories of the software package.
  • Generate AIS image
    • Open a command window and navigate to the directory of HexAIS_OMAP-L137.exe
    • Run the following command: HexAIS_OMAP-L137.exe -o OMAPL137-ARM-LED.bin DSP\Debug\OMAPL137-ARM-LED-DSP.out ARM\Debug\OMAPL137-ARM-LED-ARM.out
      • Note that the order of the source .out files matters. The bootloader will jump to the entrypoint of the first .out file listed, which in this case is the DSP UBL.
  • Flash the AIS image
    • For NAND, NOR, and SPI bootmodes, use the serial flasher to flash the image to the desired boot medium using the "-flash_noubl" option. See the serial flasher wiki for more details.
      • Make sure to check the ROM revision of your device to select the proper targetType
    • For UART bootmode, use the serial loader to loader to boot from the UART host as follows:
      • ./slh_OMAP-L137.exe -waitForDevice OMAPL137-ARM-LED.bin

AM17x EVM

This is an ARM only device, so it can natively boot ARM code. The instruction for the OMAP-L137 EVM apply, except during the creation of the AIS bin file, the DSP.out file should not be included.

Debug

If the LED is not flashing, you will need to check both the DSP and ARM for possible issues. Both should be awake and able to connect to in CCS, with each PC in the shared memory region (0x80000000 - 0x8001FFFF). Otherwise an error could have occurred during the boot sequence. See this page for help debugging boot issues:

http://processors.wiki.ti.com/index.php/OMAP-L1x_Debug_Gel_Files