C5515 Boot-Image Programmer

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Bootloader Features

The bootloader is a program that runs from ROM at power-on and loads a boot-image from a peripheral to the internal RAM of the C5515 DSP. It is always invoked after power-on-reset. Once the transfer is completed, the bootloader switches control to the user code so that it is automatically executed.

In order to ensure the code cannot be accessed and read outside of the system, only encrypted images can be boot from MMC/SD and USB. Both encrypted and non-encrypted images can boot from NAND, NOR, 16-bit SPI EEPROM, and I2C EEPROM.

The C5515 has a fixed order in which it checks for a valid boot-image on each supported boot device. The order is NOR Flash, NAND Flash, 16-bit SPI EEPROM, I2C EEPROM, MMC/SD, and USB. The first device with valid boot-image is used to load and execute the user code. If none of these devices has a valid boot-image, the bootloader goes into an endless loop checking for data received on the USB. If a valid boot image is received, it is used to load and execute user code. If no valid boot-image is received, the bootloader continues to monitor the devices.

The C5515 eZdsp only contains a NOR Flash memory, which supports both encrypted and non-encrypted boot images.

How to program a boot image onto C5515 EVM

Figure 2
Figure 3
Figure 4

Once a boot image (*.bin) is generated, customers can burn the boot image into the NOR Flash, NAND Flash, 16-bit SPI EEPROM, I2C EEPROM, and MMC/SD card, on the C5515 EVM through a utility called programmer that runs on C5515 using an emulator with Code Composer Studio™ software.

First, load the programmer_c5515_evm.out from File:5515evm.zip using the Code Composer Studio as shown in Figure 2 by selecting “Load Program…” under the Target menu in CCS.

Next, run the program, when the user will be asked to select the device from the following:

Choose the device...

1<filepath> - NOR Flash

2<filepath> - NAND Flash

3<filepath> - SPI

4<filepath> - IIC EEPROM

Figure 3 shows how to program lednonencrypted.bin to the NOR flash memory using programmer_c5515_evm.out.

NOTE: There cannot be any white spaces in the file directory path or the program will not run correctly. Programmer will not be able to find the input file as it considers the white space the end of the input.

Please remember that the bootloader runs in a fix order of peripherals for boot image; that means all the previous Flash and EEPROM peripherals have to be properly cleaned. There is a cleaner file available at File:5515evm.zip.

NOTE: Be sure to set the PLL clock frequency to 12.288 MHz in order for the I2C EEPROM to work properly. All other peripherals will also run at this frequency

Setting the PLL clock frequency

See Figure 4:

  1. Download the 5515evm.gel file available at File:5515evm.zip.
  2. Under “View” menu in CCS, select “Target Configurations”
  3. Double-click on the active target. The “Basic” configuration setup window will open.
  4. Click on “Advanced” at the bottom of the setup window.
  5. Click on the “C55xx” connection
  6. Under CPU Properties, click on “Browse” to select a different .gel file
  7. Load 5515evm.gel and click "Save".
  8. Launch the new Target Configuration. The “Scripts” menu in CCS should become available
  9. Select Scripts>C5505EVM_Configuration>SetPLL_12p288MHz

How to program a boot image onto C5515 eZdsp

Figure 5
Figure 6

Once a boot image (*.bin) is generated, customers can burn the boot image into the NOR Flash memory of the C5515 eZdsp through a utility called programmer that runs on C5515 using an emulator with Code Composer Studio™ software.

First, load the programmer_c5515_eZdsp.out from File:Programmer C5515 eZdsp.zip using the Code Composer Studio as shown in Figure 5 by selecting “Load Program…” under the Target menu in CCS.

Next, run the program, when the user will be asked to input the filepath and filename for the boot image:

C5515 eZDSP...Input <filepath>

Figure 6 show how to program lednonencrypted.bin to the C5515 eZdsp using programmer_c5515_eZdsp.out.

NOTE: There cannot be any white spaces in the file directory path or the program will not run correctly. Programmer will not be able to find the input file as it considers the white space the end of the input.

Common Mistakes in Boot Image User Code

A frequent issue is that the user code works fine in CCS environment but fails to work after converted to boot image. This is most likely because the user code relies on a GEL file in the CCS environment to initialize and setup PLL. This is easily corrected by not using GEL in CCS environment, but instead including all the necessary initialization steps in the user code. It is a good practice to re-initialize everything you need from within your bootloaded user code.

Another common mistake is allocating program code to SARAM31 memory. The bootloader writes to SARAM31 (byte address 0x4E000 – 0x4FFFF) thus any user code residing in SARAM31 will be corrupted. Do not use SARAM31 if you intend to convert this code to a boot image. Once the bootloader has finished loading the program into RAM, SARAM31 can be used.

Software Tools Checklist

These are the required tools to test boot from flash or EEPROM:

  1. hex55.exe to convert .out COFF file to binary.
  2. programmer.out to download to flash and EEPROM.
  3. CCS to run programmer.out.
  4. 5515evm.gel to set the PLL frequency for the I2C EEPROM.
  5. cleaner.bin file to erase previous boot images from peripherals.
Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox