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.

RTOS/TMS320C6678: Flash booting Issues

Part Number: TMS320C6678

Tool/software: TI-RTOS

I've got a c6678 le rev 3B dev board and I'm using CCS version 7.1.0.00016 with PDK 2.0.5

I want to burn a boot program into flash;the NAND flash to be specific,

The boot program at the moment is rudimentary-small enough to fit in the L2 memory of core0 and all it does is spit out text to the serial debug.

If I load this .out program into core 0 in the debugger over the ice it works OK and I see the debug.

When I follow the procedures set out in 

Processor SDK RTOS BOOT C66x document

http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_BOOT_C66x 

all appears to be good in that the NAND writer program reports that it has written and verified the flash update

but when I boot from the NAND flash it hasn't worked.

Any ideas as to why this NAND update is problematic and the writer has not worked when it says it has written and verified the update?

Jack

  • Jack,

    If you check the datasheet for this device, the bootROM on this device doesn`t natively support NAND boot. The NAND boot supported by the PRocessor SDK RTOS is using a secondary/intermediate bootloader (IBL). Can you confirm that the IBL is programmed in the I2C EEPROM and the DEVSTAT register is configured for I2C NAND boot. 

    http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings

    Regards,

    Rahul

  • Hi Rahul,

    I have 3 dev boards

    which all appear to have IBL code in prom because they throw out:

    IBL version: 1.0.0.16

    IBL: PLL and DDR Initialisation Complete

    IBL Result code 00

    IBL: Booting from NAND

    They all have DEVSTAT(0x2620020) as either 0x83b or 0x82b which correctly reflects I2C NAND access.

    On one of the boards the NAND image 0 boot throws "DDR OK" continually - running a valid flash DDR test program!?

    On the other two boards the NAND image0 boot throws out a lot of debug associated with Linux booting

    On all 3 boards the NAND image 1 boot it doesn't  produce extra output - no valid flash program!?

    I believe that the NAND image 0 flash boot seems to work on all boards

    but I cannot reflash the image0 , even though I can run the writer and it says it has written and verified

    Jack

  • Hi Rahul,

    The NAND writer has no effect on the program that is in the flash - it seems that the writing process

    may be updating to a different place from which the program is read from.

    So the flash write may be good but it is not the image that gets booted!?

  • Jack, 

    The instructions to program images into NAND are in the ReadME.txt attached

    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.
    
    
    Steps to re-build nandwriter:
    
    1. Uses CCS to build nandwriter:
       * Import the nandwriter CCS project from writer\nand\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
       CCE Eclipse Projects).
       * Clean and build the nandwriter project.
       * After the project build is completed, nandwriter_evm66xxl.out and nandwriter_evm66xxl.map will be generated under 
         writer\nand\evmc66xxl\bin directory.
    
    2. Uses Makefile to build nandwriter:
       NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
       "make" would be required. The following build procedure should also work on MINGW-MSYS Bourne shell.
    
        Before starting the build following environment setup has to be done 
        1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
           Linux bash shell: 
              export C_DIR=/opt/TI/TI_CGT_C6000_7.2.1/
           MSYS bash shell: 
              export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
        2) Code Generation tool binaries should be in the path e.g.
           Linux bash shell: 
              export PATH=/opt/TI/TI_CGT_C6000_7.2.1/bin:$PATH
           MSYS bash shell: 
              export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
        3) variable PFORM_LIB_DIR should be set the directory of the Platform Library root, e.g.
           Linux bash shell: 
              export PFORM_LIB_DIR=pdk_C66xx_1_0_0_10/packages/ti/platform
           MSYS bash shell: 
              export PFORM_LIB_DIR='"C:/Program Files/Texas Instruments/pdk_C66xx_1_0_0_10/packages/ti/platform"'
    
        The makefile for building the nandwriter is in the directory "tools/writer/nand/evmc66xxl"
        Following are the steps to build nandwriter, e.g.:
        cd tools/writer/nand/evmc66xxl
        make DEVICE=<device number>
            supported device numbers are 
                C6678
                C6670
                C6657
    
    Please refer to BIOS MCSDK 2.0 User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details.

    The C6678 EVM comes with default images programmed in NAND, NOR and I2C. IF you want to restore the images in the EVM, then you can use the script provided here:

    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Using_Program_EVM

    The script has been moved to the following location in Processor SDK RTOS:

    • EVM programming script: processor_sdk_rtos_c667x_x_xx_xx_xx\bin\program_evm.js 
    • Prebuilt binaries: processor_sdk_rtos_c667x_x_xx_xx_xx\prebuilt-images

    Hope this helps.

    Regards,

    Rahul