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.

Programming and booting from the nand on the TMDSEVM6657

Other Parts Discussed in Thread: TMDSEVM6657

Hello.

I currently have an application that works well when I program the application over the JTAG cable from a Windows PC. I would like to program this application to the nand memory on the EVM.

I'm using the C6657 EVM that you can purchase from TI's store: http://www.ti.com/tool/tmdsevm6657

My current test is that the first thing my application does is turn off 4 the 4 LEDs that are on the board. However, it never gets to this point with any of the attempts that I've done to try and program the nand.

Is there a document available that documents the procedure to turn a application.out file from CCSv5 to whatever format the nand needs, and then whatever is needed to program that image to the DSP, and then what DIP switches should be used to boot that image.

I've attempted to follow the instructions in /opt/ti/mcsdk_2_01_02_06/tools/writer/nand but I have had no success.

Thanks,
Bill Lynch

  • Hi Ganapathi,

    So, as far as I know, I don't have a preproduction board. (The two boards I purchased were just from the normal TI store). So my understanding is that I don't need to update the FPGA firmware.

    I've created a very simple application that simply flashes the LEDs on the board. I've included that application in an attachment.

    Now, I'll follow the steps as given in the documentation linked in that thread:

    First, I was instructed to set the switches to "no boot". I followed the instructions and ended up with this layout.

    Next, I was instructed to program the DSP with nandwrite.out. I did this using CCSv5 and it's debug program feature. 

    When I do this, I get the following console messages, which look like the normal ones I get when I program over CCSv5.

    C66xx_0: GEL Output: Setup_Memory_Map...
    C66xx_0: GEL Output: Setup_Memory_Map... Done.
    C66xx_0: GEL Output:
    Connecting Target...
    C66xx_0: GEL Output: DSP core #0
    C66xx_0: GEL Output: C6657L GEL file Ver is 1.003
    C66xx_0: GEL Output: Global Default Setup...
    C66xx_0: GEL Output: Setup Cache...
    C66xx_0: GEL Output: L1P = 32K
    C66xx_0: GEL Output: L1D = 32K
    C66xx_0: GEL Output: L2 = ALL SRAM
    C66xx_0: GEL Output: Setup Cache... Done.
    C66xx_0: GEL Output: Main PLL (PLL1) Setup ...
    C66xx_0: GEL Output: PLL not in Bypass, Enable BYPASS in the PLL Controller...
    C66xx_0: GEL Output: PLL1 Setup for DSP @ 1000.0 MHz.
    C66xx_0: GEL Output: SYSCLK2 = 333.3333 MHz, SYSCLK5 = 200.0 MHz.
    C66xx_0: GEL Output: SYSCLK8 = 15.625 MHz.
    C66xx_0: GEL Output: PLL1 Setup... Done.
    C66xx_0: GEL Output: Power on all PSC modules and DSP domains...
    C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=12, md=4!
    C66xx_0: GEL Output: Power on all PSC modules and DSP domains... Done.
    C66xx_0: GEL Output: DDR3 PLL (PLL2) Setup ...
    C66xx_0: GEL Output: DDR3 PLL Setup... Done.
    C66xx_0: GEL Output: DDR3 Init begin (1333 auto)
    C66xx_0: GEL Output: XMC Setup ... Done
    C66xx_0: GEL Output:
    DDR3 initialization is complete.
    C66xx_0: GEL Output: DDR3 Init done
    C66xx_0: GEL Output: DDR3 memory test... Started
    C66xx_0: GEL Output: DDR3 memory test... Passed
    C66xx_0: GEL Output: PLL and DDR3 Initialization completed(0) ...
    C66xx_0: GEL Output: configSGMIISerdes Setup... Begin
    C66xx_0: GEL Output: SGMII SERDES has been configured.
    C66xx_0: GEL Output: Enabling EDC ...
    C66xx_0: GEL Output: L1P error detection logic is enabled.
    C66xx_0: GEL Output: L2 error detection/correction logic is enabled.
    C66xx_0: GEL Output: MSMC error detection/correction logic is enabled.
    C66xx_0: GEL Output: Enabling EDC ...Done
    C66xx_0: GEL Output: Global Default Setup... Done.
    C66xx_0: GEL Output: Invalidate All Cache...
    C66xx_0: GEL Output: Invalidate All Cache... Done.
    C66xx_0: GEL Output: GEL Reset...
    C66xx_0: GEL Output: GEL Reset... Done.
    C66xx_0: GEL Output: Disable all EDMA3 interrupts and events.

    This leaves me at the beginning of main() for the program. At this point, I'm supposed to load simple_swap_16.dat into the 0x0C000000. I note that the length that the number of words in simple_swap_16.dat is reported as 0x1A. The documentation linked to does not verify that 0x1A is the correct value, but I believe I'm grabbing the correct value.

    Once I've loaded the memory into the DSP, I can see in the memory viewer that the first 26 DWords have changed. Which makes sense.

    I hit play as the documentation suggests, and I see, as the documentation suggests:

    NAND writer for Micron MT29F1G08xxx devices.
    Variable 'dataSizeUint32' is zero.
    It must be set the the number of words in image!
    Execution will stall until the variable is updated.

    At this point, I'll write 0x1A into that variable using the CCSv5 Debug capabilities. After continuing the program, I see:

    ID read from device:
    Device ID[0]: 0x00
    Device ID[1]: 0x00
    Device ID[2]: 0x00
    Device ID[3]: 0x00
    Device ID[4]: 0x00
    onfi ID[0]: O (should be "O")
    onfi ID[1]: N (should be "N")
    onfi ID[2]: F (should be "F")
    onfi ID[3]: I (should be "I")
    Erasing 1 blocks starting at block 0
    Erased block 0, status = 0x80
    Block 0 erased.
    Programming 1 blocks starting at block 0
    Attempting to program block 0
    Attempting to read block 0
    Data compare complete, no errors

    Which looks to match the output from the documentation.

    Supposedly the card will now boot simple_swap_16.bit from the nand memory

    Now, I'm supposed to change the switches on the board. Here's another picture with the settings after making those changes.

     

    After I've done this, I power cycle the board, and then I use the RST_FULL switch on the EVM. Now, using CCSv5 I think it's executing this code, but I really have no idea what the code is supposed to be doing such that I could look at external memory changes (for example) to verify this. I'm not that great at reading assembly, and sadly, that's what the code is written in.

    Now, that being said, let's assume that it did work.

    Now I'd like to program my own application to the nand.

    That document basically says that it uses nandboot.bat to create simple_swap_16.bin, simple_swap_16.ccs and simple_swap_16.dat. I'm not sure where the first two files are used (unless they are just intermediate files).

    So I'm going to try and create a blink.dat file.

    Using Code Composer Studio, I've created a file named C6657-LED-Demo-RTSC.out. This is simply the binary that code composer studio generated. It's little endian, and the .map file reports that it strictly uses the L2SRAM.

    Now, for whatever reason, the batch file that is provided fails all over the place for me. First, it expects that the TI compiler is in my path, which isn't true. And it expects there to be a copy command named cp, which also isn't true. I've made what I feel are the minimal changes to get this working, and I've included those files as well as an attachment.

    Either way, I now have a file that I can use with the nandwriter from earlier. When I load the memory into 0x0C000000, it reports that this application is 0x400 DWords. The flash program reports:

    NAND writer for Micron MT29F1G08xxx devices.

    ID read from device:
    Device ID[0]: 0x00
    Device ID[1]: 0x00
    Device ID[2]: 0x00
    Device ID[3]: 0x00
    Device ID[4]: 0x00

    onfi ID[0]: O (should be "O")
    onfi ID[1]: N (should be "N")
    onfi ID[2]: F (should be "F")
    onfi ID[3]: I (should be "I")

    Erasing 1 blocks starting at block 0
    Erased block 0, status = 0x80
    Block 0 erased.
    Programming 1 blocks starting at block 0
    Attempting to program block 0
    Attempting to read block 0
    Data compare complete, no errors

    Now, I poweroff the card, and swap the switches back to the second image. This should be nand boot mode. I then reapply the power, wait a moment, and then hold the RST_FULL button for about a second. At this point, I would expect my application to be loaded into the local memories, and the leds to start cycling (which is what would happen when I load the application over CCSv5 directly). 

    Instead, I see no indication that the program is running. 

    So, now I'd like to get some additional debug information out of the system. First, the Program Counter is reporting that it's executing code at 0x20B044F4, which is not an address that my program uses according to C6657-LED-Demo-RTSC.map file. The Data Sheet, however, reports that the address is part of the Boot ROM.

    So perhaps it takes longer than I expect to load from the nand? In this case, I'll wait a minute and see where the PC gets to. And after about a minute of waiting, it seems to have settled on address 0x20B044F4, which is still part of the Boot ROM, and I have no idea what is at that location.

    Thoughts

    I'd be glad to do more debugging steps, but I'm not sure where this process broke. Could you take a look through my various bits and let me know if you can either reproduce my problem, or if you can see where I messed up?

    Thanks!
    Bill Lynch

    C6657-LED-Demo-RTSC.zip