Boot Images for OMAP-L138

From Texas Instruments Wiki
Jump to: navigation, search

This document applies to the OMAP-L138 ARM+DSP SOC. The content also applies to AM1808 and C6748 devices unless otherwise specified.

Booting ARM Binaries

Description

This section provides information on taking an ARM executable file and using the AISgen tool to convert it to a bootable image.

This section does not apply to C6748 devices.

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

Note that the ARM must be in supervisor mode in order to write to the PINMUX registers. 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. This file should be included in all projects where the ARM needs to access certain SYSCFG registers that require supervisor mode.

Obtaining the software

The following software is required:

  • Sample code and bootable images: here
    • Precompiled AIS boot images (SPI, NAND, NOR, UART) for blinking LEDs on the OMAP-L138 EVM
    • CCS version 3.3 project and source code for blinking LEDs on the OMAP-L138 EVM
    • Config files for the AISgen tool used for generating AIS boot images
  • AISgen tool: here (under Associated Files)
  • Serial flash loading utility: here

Running

  • Compile the source code (optional)
    • Open the project file in CCS and push Build. A precompiled .out file is located in the Debug directory of the software package.
  • Generate AIS image (optional)
    • Open the AISgen tool and select File->Load Configuration

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-L138 <options>
    • Choose the .cfg file (located in the "Debug" directory of this software package) corresponding to the desired boot medium.
    • Choose the correct Device Type for the silicon revision you are using. If you are unsure, use the GEL file provided in the Debug section below to determine this.
    • Provide the path to the OMAP-L138-ARM-LED.out file for the "ARM Application File" box
    • Provide the path where the destination AIS file will be created
    • Click Generate AIS
  • 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.
    • For UART bootmode, use the serial loader to loader to boot from the UART host as follows:
      • ./slh_OMAP-L138.exe -waitForDevice OMAPL138-ARM-LED-uart.bin

Debug

If the LED is not flashing, 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 DSP Binaries

Description

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

This section does not apply to AM1808 devices.

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

This is a very straightforward process, with a few key things to remember:

  • The ARM must set the HOST1CFG register to change the DSP reset vector. This should point to the entry point of the DSP executable, but it can only be set to 1KB boundaries (i.e. the bottom 10 bits are reserved and read as 0). Therefore the linker command file for the DSP application should specifically force the entry point to also be aligned to a 1KB boundary. For this example, a memory region named "entry_point" was created at address 0x80010000, and the section ".text:_c_int00" was assigned to that memory region.
  • 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.
  • For silicon revision 1.0 and 1.1, the KICK registers must be unlocked before writing to the HOST1CFG register. Also for all revisions the ARM must be in supervisor mode as well. 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. This file should be included in all projects where the ARM needs to access certain SYSCFG registers that require supervisor mode.

Note: Starterware users don`t need to include the boot.asm in the projects as Starterware system_config library for ARM enters the main() function in priviledged mode. Also, boot.asm could cause conflicts with the init.asm file while booting as init.asm allows users to customize their boot entry points.

  • If any sections of the DSP memory map are located in DSP L2 RAM (0x11800000), be aware of two things:
    • 1: Make sure all L2 RAM addresses in the DSP linker command file are referenced in the 0x118xxxxx range and not 0x008xxxxx, as the ARM cannot write to the 0x008xxxxx address range
    • 2: Use the "Configure PSC" function of AISGen to enable the DSP LPSC (PSC0,#15). If the DSP megamodule is in reset, the L2 RAM will not be accessible so the section loads will fail. The AISGen CFG file included with this project enables PSC0,#15 by default

Obtaining the software

The following software is required:

  • Sample code and bootable images: here
    • Precompiled AIS boot images (SPI, NAND, NOR, UART) for blinking LEDs on the OMAP-L138 and C6748 EVM
    • CCS version 3.3 ARM and DSP projects and source code for blinking LEDs with the DSP on the OMAP-L138 and C6748 EVM
    • Config files for the AISgen tool used for generating AIS boot images
  • AISgen tool: here (under Associated Files)
  • Serial flash loading utility: here

Running

OMAP-L138 EVM

  • Compile the source code
    • Two projects are provided, one for the ARM UBL and one for the DSP 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 the AISgen tool and select File->Load Configuration
    • Choose the .cfg file (located in the base directory of the OMAPL138-DSP-LED folder) corresponding to the desired boot medium.
    • Choose the correct Device Type for the silicon revision you are using. If you are unsure, use the GEL file provided in the Debug section below to determine this.
    • Fill in the "ARM Application File" field with both the ARM UBL and the DSP program. When given two source application files, the AISgen tool will combine them into a single image, in the order that they are listed.
      • First, click the "..." button and provide the path to the OMAPL138-DSP-LED-ARM.out file
      • Next, click the "+" button and choose the OMAPL138-DSP-LED-DSP.out file
    • Fill in the "AIS Output File" field by giving the path where the destination AIS file will be created
    • Click Generate AIS
  • 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.
    • For UART bootmode, use the serial loader to loader to boot from the UART host as follows:
      • ./slh_OMAP-L138.exe -waitForDevice OMAPL138-ARM-LED-uart.bin

C6748 EVM

In this case, only the DSP program is required. The same instructions above apply with a few exceptions

  • Use the C6748-LED-x.cfg file to create C6748-LED-x.bin. Note that only the DSP application is needed as an input file
  • When flashing, use the -targetType C6748 option

Debug

If the LED is not flashing, you will need to check both the ARM and DSP 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

Booting from SD/MMC Cards

See the following wiki for information on flashing SD/MMC cards: [1]