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.

How to download test code into NOR Flash in davinci EVM DM6646

HI,

I am trying to download a simple Hello word code to flash (Say nor flash) in CCS v 5, currently it is downloading into DDR2 of my EVM.

I am using Spectrum Digital davinci Evaluation module with JTAG Emulator.

I want to store the code even the power is off.

below is my linker command file:

-stack 0x00000800 /* Stack Size */
-heap 0x00000800 /* Heap Size */

MEMORY
{
IRAM: o = 0x00000000 l = 0x00004000
DRAM: o = 0x00008000 l = 0x00004000
AEMIF: o = 0x02000000 l = 0x02000000
DDR2: o = 0x80000000 l = 0x10000000
}

SECTIONS
{
.bss > DDR2
.cinit > DDR2
.cio > DDR2
.const > DDR2
.stack > DDR2
.sysmem > DDR2
.text > DDR2
.ddr2 > DDR2
}

Update:

Hi, I have gone through  http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility ,  but a bit confused? It says downloading u boot, I want to flash (Download) my own application code say a hello word program to NAND/NOR.

I have generated a bin file of my program and want to download it to NOR flash and run the same when I power ON the EVM, please help me

I have been routed here from: 

Regards,

Azhagiri S

  • Hi,
    Use the following commands to flash simple hello world application to NOR flash of DM6446 EVM.

    sfh_DM6446.exe -norerase

    sfh_DM6446.exe -norflash_noubl hello.bin

    Make sure that you followed correct procedures to convert *.out to *.bin because it may not work if you have not converted properly.

    Please let us know the results.
  • Hi Shankari,

    below is my experiment, and after this I restarted the board and no LED is glowing. I have also attached my sample LED code from spectrum digital.

    Regards,

    Azhagiri


    LOG:

    step 1:

    C:\> sfh_DM6446.exe -norerase

    -----------------------------------------------------
    TI Serial Flasher Host Program for DM644x
    (C) 2010, Texas Instruments, Inc.
    Ver. 1.50
    -----------------------------------------------------


    Platform is Windows.
    Globally erasing NOR flash.


    Attempting to connect to device COM1...
    Press any key to end this program at any time.


    Waiting for the DM644x...
    BOOTME commmand received. Returning ACK and header...
    ACK command sent. Waiting for BEGIN command...
    Target: BOOTME

    Waiting for the DM644x...
    BOOTME commmand received. Returning ACK and header...
    ACK command sent. Waiting for BEGIN command...
    Target: BEGIN
    BEGIN commmand received. Sending CRC table...
    100% [ ]
    CRC table sent....



    Waiting for DONE...
    DONE received. Sending the UBL...
    100% [ ]
    UBL sent....


    DONE received. UBL was accepted.
    UBL transmitted successfully.


    Waiting for SFT on the DM644x...
    Target: Starting UART Boot...
    Target: BOOTUBL
    BOOTUBL commmand received. Returning CMD and command...
    CMD value sent. Waiting for DONE...
    Target: DONE
    DONE received. Command was accepted.
    Target: CFI Query...passed.
    Target: NOR Initialization:
    Target: Command Set: Intel
    Target: Manufacturer: INTEL
    Target: Size: 0x00000010 MB
    Target: Erasing the NOR Flash
    Target: Erased through 0x02020000
    Target: Erased through 0x02040000
    Target: Erased through 0x02060000
    Target: Erased through 0x02080000
    Target: Erased through 0x020A0000
    Target: Erased through 0x020C0000
    Target: Erased through 0x020E0000
    Target: Erased through 0x02100000
    Target: Erased through 0x02120000
    Target: Erased through 0x02140000
    Target: Erased through 0x02160000
    Target: Erased through 0x02180000
    Target: Erased through 0x021A0000
    Target: Erased through 0x021C0000
    Target: Erased through 0x021E0000
    Target: Erased through 0x02200000
    Target: Erased through 0x02220000
    Target: Erased through 0x02240000
    Target: Erased through 0x02260000
    Target: Erased through 0x02280000
    Target: Erased through 0x022A0000
    Target: Erased through 0x022C0000
    Target: Erased through 0x022E0000
    Target: Erased through 0x02300000
    Target: Erased through 0x02320000
    Target: Erased through 0x02340000
    Target: Erased through 0x02360000
    Target: Erased through 0x02380000
    Target: Erased through 0x023A0000
    Target: Erased through 0x023C0000
    Target: Erased through 0x023E0000
    Target: Erased through 0x02400000
    Target: Erased through 0x02420000
    Target: Erased through 0x02440000
    Target: Erased through 0x02460000
    Target: Erased through 0x02480000
    Target: Erased through 0x024A0000
    Target: Erased through 0x024C0000
    Target: Erased through 0x024E0000
    Target: Erased through 0x02500000
    Target: Erased through 0x02520000
    Target: Erased through 0x02540000
    Target: Erased through 0x02560000
    Target: Erased through 0x02580000
    Target: Erased through 0x025A0000
    Target: Erased through 0x025C0000
    Target: Erased through 0x025E0000
    Target: Erased through 0x02600000
    Target: Erased through 0x02620000
    Target: Erased through 0x02640000
    Target: Erased through 0x02660000
    Target: Erased through 0x02680000
    Target: Erased through 0x026A0000
    Target: Erased through 0x026C0000
    Target: Erased through 0x026E0000
    Target: Erased through 0x02700000
    Target: Erased through 0x02720000
    Target: Erased through 0x02740000
    Target: Erased through 0x02760000
    Target: Erased through 0x02780000
    Target: Erased through 0x027A0000
    Target: Erased through 0x027C0000
    Target: Erased through 0x027E0000
    Target: Erased through 0x02800000
    Target: Erased through 0x02820000
    Target: Erased through 0x02840000
    Target: Erased through 0x02860000
    Target: Erased through 0x02880000
    Target: Erased through 0x028A0000
    Target: Erased through 0x028C0000
    Target: Erased through 0x028E0000
    Target: Erased through 0x02900000
    Target: Erased through 0x02920000
    Target: Erased through 0x02940000
    Target: Erased through 0x02960000
    Target: Erased through 0x02980000
    Target: Erased through 0x029A0000
    Target: Erased through 0x029C0000
    Target: Erased through 0x029E0000
    Target: Erased through 0x02A00000
    Target: Erased through 0x02A20000
    Target: Erased through 0x02A40000
    Target: Erased through 0x02A60000
    Target: Erased through 0x02A80000
    Target: Erased through 0x02AA0000
    Target: Erased through 0x02AC0000
    Target: Erased through 0x02AE0000
    Target: Erased through 0x02B00000
    Target: Erased through 0x02B20000
    Target: Erased through 0x02B40000
    Target: Erased through 0x02B60000
    Target: Erased through 0x02B80000
    Target: Erased through 0x02BA0000
    Target: Erased through 0x02BC0000
    Target: Erased through 0x02BE0000
    Target: Erased through 0x02C00000
    Target: Erased through 0x02C20000
    Target: Erased through 0x02C40000
    Target: Erased through 0x02C60000
    Target: Erased through 0x02C80000
    Target: Erased through 0x02CA0000
    Target: Erased through 0x02CC0000
    Target: Erased through 0x02CE0000
    Target: Erased through 0x02D00000
    Target: Erased through 0x02D20000
    Target: Erased through 0x02D40000
    Target: Erased through 0x02D60000
    Target: Erased through 0x02D80000
    Target: Erased through 0x02DA0000
    Target: Erased through 0x02DC0000
    Target: Erased through 0x02DE0000
    Target: Erased through 0x02E00000
    Target: Erased through 0x02E20000
    Target: Erased through 0x02E40000
    Target: Erased through 0x02E60000
    Target: Erased through 0x02E80000
    Target: Erased through 0x02EA0000
    Target: Erased through 0x02EC0000
    Target: Erased through 0x02EE0000
    Target: Erased through 0x02F00000
    Target: Erased through 0x02F20000
    Target: Erased through 0x02F40000
    Target: Erased through 0x02F60000
    Target: Erased through 0x02F80000
    Target: Erased through 0x02FA0000
    Target: Erased through 0x02FC0000
    Target: Erased through 0x02FE0000
    Target: Erased through 0x02FE8000
    Target: Erased through 0x02FF0000
    Target: Erased through 0x02FF8000
    Target: Erased through 0x03000000
    Target: Erase Completed
    Target: Erase completed successfully.
    Target: DONE
    Target: DONE

    Operation completed successfully.

    C:\>



    Step 2:

    C:\>sfh_DM644x.exe -norflash_noubl led.bin

    Log:
    -----------------------------------------------------
    TI Serial Flasher Host Program for DM644x
    (C) 2010, Texas Instruments, Inc.
    Ver. 1.50
    -----------------------------------------------------


    Platform is Windows.
    Flashing NOR with led.bin.


    Attempting to connect to device COM1...
    Press any key to end this program at any time.


    Waiting for the DM644x...
    BOOTME commmand received. Returning ACK and header...
    ACK command sent. Waiting for BEGIN command...
    Target: BEGIN
    BEGIN commmand received. Sending CRC table...
    100% [ ]
    CRC table sent....



    Waiting for DONE...
    DONE received. Sending the UBL...
    100% [ ]
    UBL sent....


    DONE received. UBL was accepted.
    UBL transmitted successfully.


    Waiting for SFT on the DM644x...
    Target: Starting UART Boot...
    Target: BOOTUBL
    BOOTUBL commmand received. Returning CMD and command...
    CMD value sent. Waiting for DONE...
    Target: DONE
    DONE received. Command was accepted.
    Sending the Application image
    Waiting for SENDIMG sequence...
    SENDIMG received. Returning ACK and header for image data...
    ACK command sent. Waiting for BEGIN command...
    BEGIN commmand received.
    100% [ ]
    Image data sent...


    Waiting for DONE...
    DONE received. All bytes of image data received...
    Target: Erasing the NOR Flash
    Target: Erased through 0x02020000
    Target: Erase Completed
    Target: Writing the NOR Flash
    Target: NOR Write OK through 0x02008000.
    Target: NOR Write OK through 0x02008E20.
    Target: DONE
    Target: DONE

    Operation completed successfully.

    C:\>
  • I have used this link for creating .bin file from .out file:

    e2e.ti.com/.../1296486

    e2e.ti.com/.../1520251

    Regards,

    Azhagiri
  • Hi Azhagiri,

    Try to change memory allocation to various sections in your linker command file from DDR2 to AEMIF.
    I suspect this might be the issue.
    Also check the BOOT mode settings.
    For NOR flash Boot.
    SW3-1 SW3-2
    1 0
  • Switch Config is same as you have told, I have changed LCF as below: 

    -stack 0x00000800 /* Stack Size */
    -heap 0x00000800 /* Heap Size */

    MEMORY
    {
    IRAM: o = 0x00000000 l = 0x00004000
    DRAM: o = 0x00008000 l = 0x00004000
    AEMIF: o = 0x02000000 l = 0x02000000
    DDR2: o = 0x80000000 l = 0x10000000
    }

    SECTIONS
    {
    .bss > AEMIF
    .cinit > AEMIF
    .cio > AEMIF
    .const > AEMIF
    .stack > AEMIF
    .sysmem > AEMIF
    .text > AEMIF
    .ddr2 > AEMIF
    }

    and ran:

    sfh_DM644x.exe -norerase  and 

    sfh_DM644x.exe -norflash_noubl led.bin

    still no improve. same log as mentioned in previous update.

    If I change switch config to NOR boot and run in hyper terminal I get below LOG, but no lED glowing

    U-Boot 1.1.3 (Mar  3 2006 - 01:16:59)

     

    U-Boot code: 81080000 -> 810973A8  BSS: -> 810A02B8

    RAM Configuration:

    Bank #0: 80000000 256 MB

    unknown vendor=89 Flash:  0 kB

    *** Warning - bad CRC, using default environment

     

    In:    serial

    Out:   serial

    Err:   serial

    ARM Clock :- 283MZ

    DDR Clock :- 189MZ

    Hit any key to stop autoboot:  0

    BOOTP broadcast 1

    WARN: emac_send_packet: No link

    BOOTP broadcast 2

    WARN: emac_send_packet: No link

    BOOTP broadcast 3

    WARN: emac_send_packet: No link

    BOOTP broadcast 4

    WARN: emac_send_packet: No link

    BOOTP broadcast 5

    WARN: emac_send_packet: No link

    BOOTP broadcast 6

    WARN: emac_send_packet: No link

    BOOTP broadcast 7

    WARN: emac_send_packet: No link

    BOOTP broadcast 8

    WARN: emac_send_packet: No link

    BOOTP broadcast 9

    WARN: emac_send_packet: No link

    BOOTP broadcast 10

    WARN: emac_send_packet: No link

     

    Retry count exceeded; starting again

    -Azhagiri