This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Booting from NAND on evm6678l

Hello,

I am trying to boot a simple program (blinks LEDs) from the on-board NAND flash, and I'm running into some issues.

Here is my current procedure:

  1. Build the application and test it using the emulator to boot the evm6678l
  2. I then use "bin2css.bat" to create an app.dat file from the CCS generated app.out
  3. Next, I unplug the evm, set the bootmode pins to EMIF16/no boot and follow the instructions found in <CCSv5>/mcsdk_2_00_00_beta1/tools/writer/nand/docs/README.txt (shown below)

 


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 (please refer to the EVM technical
   reference manual on how to set the boot mode dip switchs)

2. Copy the CCS format data file to tools\writer\nand\evmc6xxxl\bin directory, and rename it to app.dat.

3. Change the file_name and start_addr in tools\writer\nand\evmc6xxxl\bin\nandwriter_input.txt if necessary.
   By default the nand writer will load app.dat to DSP memory and write the data to NAND device start address 0.

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

5. Load the program tools\writer\nand\evmc6xxxl\bin\nandwriter_evm6xxxl.out to CCS, be sure evmc6xxxl.gel is used in CCS,

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

7. Load app.dat to 0x80000000:
     * In CCSv5, right click mouse in memory window, select "load memory".
     * Browse and select tools\writer\nand\evmc6xxxl\bin\app.dat.
     * Select the option "Use the file header information to set the start address and size of the memory block to be
       loaded" and click "next".
     * Change the Start Address to "0x80000000" if it is not 0x80000000, and 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.


Steps to re-build nandwriter:

1. Import the nandwriter CCS project from tools\writer\nand\evmc6xxxl directory (in CCSv5, Project->Import Existing CCS/
   CCE Eclipse Projects).

2. Clean and build the nandwriter project.

3. After the project build is completed, nandwriter_evm6xxxl.out and nandwriter_evm6xxxl.map will be generated under
   tools\writer\nand\evmc6xxxl\bin directory.


 

However, steps 7 & 8 of the above procedure are very flaky.  Sometimes I cannot access the memory, and more often than not, the memory is constantly refreshing to random values.  Nevertheless, I've tried several times to load the "app.dat" file and run the nandwritter utility.  Which seems to work do about half the time, at least it reports back that it successfully wrote it to flash.  However, I have to wonder what it actually wrote to flash since when I refresh the memory after the initial memory upload, random values again appear.

 

In any case, assuming all of the above worked, I disconnect CCSv5 from the evm6678 and reset it.  However nothing happens.  I've also tried a similar procedure with the NOR flash utility, with the same problems.  Any help would be great.  Thanks!

  • We have two EVMC6678 boards.  One seems to be a bit flaky.  Repeating the steps on the other board provided much more sane results.  However, after board reboot, no program seems to load.  Again, the basic steps I'm doing are:

    1. Compile and test program
    2. create a *.dat file from *.out
    3. Write it to NAND
    4. use the I2C boot config program to set NAND as secondary boot (after IBL)
    5. reboot board

    Is there something I'm missing here?  I even used the pre-compiled POST binary with its associated instructions.  And now even the POST doesn't run after POR.

    If anyone has some insight, I'd really appreciate it.  Thanks!

     

  • Booting from Flash will be supported in the MCSDK Beta2 release expected at the end of this week.  It requires a new IBL, which will have to be flashed into your I2C.  The new IBL will utilize the device configuration dip switch pins to indicate NAND boot.  Details on how to do this will be in the IBL readme.txt file.  Stay tuned.

    Regards,

    Travis

  • Great.  Thanks a lot for the information, Travis.  I'll check out the new MCSDK.

  • From the description, I assume that you are using MCSDK 2.0 Beta-1 release. To set up NAND boot for Beta-1, you need to re-program the I2C boot config table on the EEPROM 0x51 and the boot image on NAND properly:

    1. Be sure the evmc66xxl.gel is loaded to CCS that initialize the DDR properly, since the writer utility requires the .dat file to be loaded to the DDR before writing to the EEPROM/NAND.

    2. When you program the boot config table, be sure that i2cconfig.gel is run properly, you may need to wait for some time after you run the script, since sometimes CCS is slow to run the gel script.

    As Travis mentioned, in Beta-2 release, we support the DIP switch controlled boot, you may refer to the BIOS MCSDK 2.0 UG for details (https://twiki.dal.design.ti.com/bin/view/ASP/DSPS/Germantown/MCSDK200Post)

     

    Hao.