Site Index
   Support Home
   C6000 Home
   DaVinci EVM
   EVMDM6437
   EVM6424
   EVMDM642
   XEVM642
   DSKTCI6482
   EVMTCI6482
   DSK6455
   EVM6455
   EVM6418
   DSK6713
   DSK6416
   Ordering Info.
Google

C6000 Site
Support Site
Main Site

Programming the FPGA Loader with FlashBurn

To start the FlashBurn process, launch Code Composer Studio. Now launch FlashBurn by clicking Tools -> FlashBurn as shown in the figure below:

FlashBurn will now launch. Use File -> Open to open the sample FlashBurn configuration document

   c:\ti\boards\evmdm642\flashburn\fpga_loader.cdd

You should see a window that looks like this:

The important fields are the "File To Burn" field at the top and the "FBTC Program File" at the bottom. The "File To Burn" field specifies the .hex file to program into Flash, in this case the ASCII hex version of the FPGA loader:

    File to Burn -> fpga_loader_ahex.hex

The "FBTC Program File" is a piece of code that FlashBurn executes on the EVMDM642 to manipulate the Flash. It is supplied with the FlashBurn distribution in:

    FBTC Program File -> FBTC642.out

Since these files reside in the same directory as their FlashBurn projects, you do not need to explicitly specify the path the to files.

Select Program -> Program Flash option to start programming the Flash. After about 4 seconds the procedure should be complete. The EVMDM642 programming algorithm erases the Flash on demand so you do not need to use FlashBurn’s erase function.


EVMDM642 Boot Process

When the EVMDM642 comes out of reset, it copies 1Kbyte of data from the beginning of Flash memory (CE1, address 0x90000000) to the beginning of the EVMDM642’s internal memory at address 0. It then jumps to address 0 and starts execution.

Since applications are significantly larger than 1Kbyte, a Flash bootable program includes a boot code stub in the first 1Kbyte region that loads the application from Flash. To make the process easier, the C6000 hex utility is capable of packing application code in an easy to parse bootloader table.

Making a Program Bootable
The fpga_loader example is a good example of a bootable BIOS program, open the fpga_loader project in c:ti\boards\evmdm642\flashburn\fpga_loader to view an example of the completed steps below:

  1. Create a memory section called BOOT using the BIOS configuration tool under System -> Mem by right clicking on "MEM – Memory Section Manager" and selecting Insert MEM. The section should start at address 0 with a length of 0x400. If a memory section such as ISRAM already exists at address 0, you’ll need to move its start address to 0x400 and decrease its length by 0x400.

  2. Add the boot code that parses the boot table to your program using Project -> Add Files to Project. You can use the boot.asm that comes with the POST as a base for your own projects. The boot code is stored in a section called .boot_load using the .sect directive at the top of boot.asm.

  3. The .boot_load section defined in step 2 is a logical section. The BOOT section defined in step 1 is a real physical section. The linker command file specifies which logical memory sections should be linked in each physical memory section. Since the BIOS configuration tool only auto-generates a linker command file linking standard BIOS and C runtime sections, the auto-generated file postcfg.cmd will not include any references to the BOOT section you just created. Create a separate linker command file such as userlinker.cmd in the POST project that places the .boot_load section in BOOT and then include the autogenerated linker command file postcfg.cmd to add the standard references.


Generating a Bootable Hex File

This section describes the steps necessary to convert the post.out file into the post.hex file needed by FlashBurn as an example you can apply to your own programs. You do not have to perform these actions simply to put the fpga_loader in Flash if you have an existing hex file already.

A hex file contains binary data at the addresses you specify in a file format readable by the Flashburn utility and other Flash programmers. The utility requires several flags to select the proper output format. In this example, the flags are stored in the file fpga_loader_hex.cmd which is a text file that can be edited to suit other purposes. The key flags are:

Flag Description
-a Select ASCII hex file format for output
-memwidth 8 Generate output for an 8-bit wide Flash device
-bootorg 0x90000400 Address to place the boot table (base of Flash + 0x400)
-bootsection .boot_load 0x90000000 Place the .boot_load memory section at the beginning of Flash (address 0x90000000)

To convert the file Debug\post.out into the hex file post.hex using the flags stored in post_hex.cmd, open a DOS Command Prompt window and type the following:

    cd c:\ti\boards\evmdm642\examples\flashburn\fpga_loader
    hex6x fpga_loader_ahex.cmd

The file fpga_loader_ahex.hex is now ready for programming with FlashBurn. By default, it is created in the fpga_loader directory. Copy fpga_loader.hex to the FlashBurn directory for easier programming. For more details on the hex utility, please see the Code Composer help under Code Generation Tools -> Hex Conversion Utility.

©Copyright 2002-2010 Spectrum Digital, Inc. All Rights Reserved.