Texas Instruments C6678 Evaluation Kit – Booting Your Program from NAND/NOR

5280-cimg3088-_2d00_-small

If you’ve bought a evaluation kit for the Texas Instruments C6678 evaluation kit, and am wondering how to get your .out program binary to load on boot, and am confused by the manuals, here are a set of “golden path” instructions. (Actually, most of it is cut-and-pasted from various readme.txt files in different directories. It’s just placed here in proper order for normal people like me to understand.)

Procedure to Modify I2C Configuration

For some reason, the evaluation kit ships with the EEPROM’s nandBoot.bootFormat setting at ibl_BOOT_FORMAT_BBLOB. If we are using the .out file created with Code Composer, we need to change this is ibl_BOOT_FORMAT_ELF in order to boot the binary.

You likely only need to do this once to change the I2C configuration. Fortunately, TI has a helper program that makes use of the file i2cConfig.gel to change the I2C program.

- Modify the i2cConfig.gel file to your needs. It is located at C:\ti\mcsdk_2_01_02_05\tools\boot_loader\ibl\src\util\i2cConfig\i2cConfig.gel
 - Look for: setConfig_c6678_main() , this is the function you will calll later to set the i2c config
 - Look for: ibl.bootModes[1].u.nandBoot.bootFormat : If this is ibl_BOOT_FORMAT_BBLOB, change to ibl_BOOT_FORMAT_ELF;

- Load NO BOOT as usual , Launch Selected Configuration
 Set the dip switches (pin1, pin2, pin3, pin4) to:
 SW3(off, on, on, on),
 SW4(on, on, on, on),
 SW5(on, on, on, on),
 SW6(on, on, on, on)
 - Connect Target on Core 0
 - Load C:\ti\mcsdk_2_01_02_05\tools\boot_loader\ibl\src\make\bin\i2cparam_0x51_c6678_le_0x500.out program
 - Gel Files -> Load Gel File C:\ti\mcsdk_2_01_02_05\tools\boot_loader\ibl\src\util\i2cConfig\i2cConfig.gel
 - Scripts -> evm C6678 IBL -> setConfig_c6678_main()
 - Done

Procedure to Load NOR

NOR Writer Utility

NOR Writer is a simple utility to program a CCS format image/data file to the NOR flash.

Steps to program the NOR:

1. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM.

2. Copy the binary file to writer\nor\evmc66xxl\bin directory, and rename it to app.bin.

3. Change the file_name and start_addr in writer\nor\evmc66xxl\bin\norwriter_input.txt if necessary.
 By default the NOR writer will load app.bin to DSP memory and write the data to NOR device start byte address 0,
 the start_addr should always be set to the start byte addess of a sector.

4. Open CCSv5 and launch the evmc66xx emulator target configuration and connect to core 0.

5. Load the program writer\nor\evmc66xxl\bin\norwriter_evm66xxl.out to CCS, be sure evmc66xxl.gel is used in CCS
 and DDR is intialized.

6. Open the Memory view (in CCSv5, view->Memory Browser), and view the memory address 0x80000000.

7. Load app.bin to 0x80000000:
 * In CCSv5, right click mouse in memory window, select "load memory".
 * Browse and select writer\nor\evmc66xxl\bin\app.bin (raw data format), click "next"
 * Set the Start Address to "0x80000000", Type-size to 32-bits, leave swap unchecked, click "finish"
 8. After the binary file is loaded into the memory, run the program (in CCSv5, press F8), it will start to program the
 NOR.

9. When programming is completed, the console will print "NOR programming completed successfully", if there
 is any error, the console will show the error message.

NOR Boot:
 Set the dip switches (pin1, pin2, pin3, pin4) to:
 SW3(off, off, on, off),
 SW4(on, on, on, on),
 SW5(on, on, on, off),
 SW6(on, on, on, on)
 This will set the boot param index to 0 to boot the NOR image, by default
 the boot configuration table sets the NOR offset address to be 0 and
 image format to be ELF for image 0.

 Procedure to Load NAND

– Programming the application on NAND or NOR flash
NOTE: This step is not needed if the application is booted from Ethernet.
(a) Use the NAND or NOR writer c6678 EVM from the tools directory.
(a) Flash the Application to NAND or NOR. For instructions please follow
the instructions given along with the NAND/NOR writer.

For all the I2C boot modes, user needs to set the boot dip switches to I2C master, bus address 0x51.
NAND Writer Utility

NAND Writer is a simple utility to program a CCS format image/data file to the NAND flash.

Steps to program the NAND:

1. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM.

2. Copy the binary file to writer\nand\evmc66xxl\bin directory, and rename it to app.bin.

3. Change the file_name and start_addr in writer\nand\evmc66xxl\bin\nandwriter_input.txt if necessary.
 By default the NAND writer will load app.bin to DSP memory and write the data to NAND device start byte address 16384
 (start address of block 1). The start_addr should always be set to the start byte addess of a block.

4. Open CCSv5 and launch the evmc66xx emulator target configuration and connect to core 0.

5. Load the program writer\nand\evmc66xxl\bin\nandwriter_evm66xxl.out to CCS, be sure evmc66xxl.gel is used in CCS
 and DDR is intialized.

6. Open the Memory view (in CCSv5, view->Memory Browser), and view the memory address 0x80000000.

7. Load app.bin to 0x80000000:
 * In CCSv5, right click mouse in memory window, select "load memory".
 * Browse and select writer\nand\evmc66xxl\bin\app.bin (raw data format), click "next"
 * Set the Start Address to "0x80000000", Type-size to 32-bits, leave swap unchecked, click "finish"

8. After the data file is loaded into the memory, run the program (in CCSv5, press F8), it will start to program the
 NAND.

9. When programming is completed, the console will print "NAND programming completed successfully", if there
 is any error, the console will show the error message.

NAND Boot:
 Set the dip switches (pin1, pin2, pin3, pin4) to:
 SW3(off, off, on, off),
 SW4(on, off, on, on),
 SW5(on, on, on, off),
 SW6(on, on, on, on)
 This will set the boot param index to 2 to boot the NAND image, by default
 the boot configuration table sets the NAND offset address to be 16384
 (start of block 1).
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: