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.

Burning Flash using CCS

I am using CCS3.3. In this version of CCS, Flash Burn Utility is not available.

In my my system I am having DM6467 and a nor flash.

I do not have OS running on this board so I guess I will not be able to burn the flash via UART.

 

What is the way to burn the flash in this case ?

 

Regards,

Onkar

  • Actually there is a way to burn the flash of a DM6467 without using CCS and without having a OS already booting on the board, typically if you were trying to get the board to boot Linux you would use the serial boot and flash loading utility.

    If you wanted to burn the flash from CCS than you could use the utilities from within your DVSDK, namely DVSDK_xx_xx\PSP_xx_xx\bin, the source for these tools is included in DVSDK_xx_xx\PSP_xx_xx\board_utilities\dm646x\bootloader.tar.gz.

  • Will DVSDK support custom boards ?

  • The DVSDK is built around the EVM, so for out of the box support you would need to be using the EVM or essentially a clone of the EVM with all the hardware you are using being the same as the EVM. For a custom board you may have to make modifications, primarily in the PSP portion of the DVSDK which contains the Linux hardware drivers, essentially you would have to modify the drivers, than rebuild the kernel, and boot the new kernel on the custom board.

  • What is normally chosen way (where I need not buy the tools)to burn the flash for first time with custom boards using DM6467 ?

     

    Regards,

    Onkar

  • The most common way would be to use the serial flash loading utility mentioned previously, there are no extra tools you need to purchase to use these utilities, though you may have to modify them if you have a different flash configuration than the default EVM setup. You could also take these tools and adapt them to be used with CCS with some effort, though in general using the serial boot method has been sufficient for most customers as many never even buy CCS.

  • I downloaded this utility. But still I am not very clear about how/where do I make the changes and how would I rebuild/recompile it ?

    I tried runing this utility to erase the flash, it is not working.  Just gives message "Waiting for DM646x". 

    My board is having NOR flash whereas EVM6467 has NANDFLASH. But still I guess atleast erasing should work without modifications.

     

  • Atleast I should get "BOOTME" message when I power up my board with connections to hyperterminal.... I am not even getting BOOTME message.

    Note:- I am using same crystal values as on EVM6467 board

  • I agree, if you are in NOR boot mode and you do not have a vlid u-boot in flash, RBM should default to UART boot mode and you should see BOOTME message; if you are not seeing this, then I would double check to make sure you are in the correct boot mode, and perhaps check contents of flash if possible.

     

  • Hi Juan,

    Thanks for your reply.

    I have a basic question. We are using UART for burning the flash for the first time. So the flash is empty, since it is a brand new chip.

    I wanted to know if I am expected to see the BOOTME message even if the flash is empty and i make the settings as per suggested by you in the earlier post? Or should the flash be burnt with UBL or something else?

    Regards,

    Onkar

  • patki.onkar said:
    I wanted to know if I am expected to see the BOOTME message even if the flash is empty and i make the settings as per suggested by you in the earlier post? Or should the flash be burnt with UBL or something else?

    If you are configured for the serial boot mode than you should see BOOTME on the appropriate UART interface, you do not need to have anything in flash to get this far. Have you ever seen anything on the UART interface?

    One other thing to keep in mind is that just because the DM6467 has a NOR flash utility does not mean that it will be compatible with your particular NOR flash, these devices can vary somewhat so you would need to compare your particular flash's datasheet against the burning code to see if the proper sequence and timings are being followed. It is possible that it will work out of the box, but you have to be careful with such an assumption.

     

  • Hi Bernie,

    Thanks for your reply.

    Initially, I have successfully tested the UART interface via CCS and have confirmed that it is working properly.

    But when I switch to UART boot mode, I dont get any message at all on HyperTerminal , not even BOOTME.

    Is there some step which I am missing?

    Thanks and Regards,

    Onkar

  • As Bernie pointed out, if you are in UART boot mode, you should always see BOOTME message even if you are not running anything; since it appears you have your own board w/ NOR flash, do you have the flexibility to configure your board for UART vs NOR flash boot modes.  When you are in NOR flash boot mode, you will only see BOOTME if no valid u-boot signature is found in flash and the DM6467 defaults back to UART boot mode.  Seeing BOOTME message is a prerequisite to running the serial flash utility (it guarantees hardware is in a known state); unfortunately, once you get past this step, you will likely need to modify serial flash utility to support your specific NOR Flash device.

     

  • patki.onkar said:

    But when I switch to UART boot mode, I dont get any message at all on HyperTerminal , not even BOOTME.

    I just tried this on my DM6467 EVM from Spectrum Digital ( SW3 [4:1] = 0001 ) and I was able to see the BOOTME message.  Are you certain you are placing your hardware in UART boot mode?

    FYI, I also tried putting my EVM in NOR boot mode and saw the BOOTME message after a few seconds, when hardware defaulted to UART boot mode since it did not find NOR flash.

  • Hi Juan,

    We are not using DM6467 EVM but using our own custom board containing DM6467 processor.

    On checking,we observed that we are getting some waveforms @ CS2# and also uart0 also tested ok as I mentioned initially. Also, the switch settings are appropriate for UART0 boot mode.

    How can I confirm whether the boot mode has been appropriately set, apart from BOOTME message? Is there some other method?

    Thanks

    Onkar

  • Hi Juan,

    I wanted to ask another question. The external switch that is being used to select the boot modes are connected via 4K7 resistors to 3.3V in our circuit. Does the value of this pullup/pull-down resistor affect the manner in which DSP processor recognize the boot mode?

    If yes, what will be a more appropriate value? Something around 1K or 2.2K?

    Regards,

    Onkar

  • Hi Juan & Bernie,

    Thanks for your help.

    I have finally managed to get the BOOTME message from DM6467 in UART boot mode.

    Now, I am planning to boot via a NOR flash on my board. Assuming that my NOR flash is compatible with the one on DVEVM6446, here are the steps which I am thinking to follow-

    1. Grab a copy of u-boot for DM6467.

    2. Replace the NAND flash file and its corresponding functions and accessories with NOR flash file and functions from the u-boot for DM6446.

    3. Recompile the U-boot and use it for bootloading Linux kernel image.

    I just wanted to confirm whether these steps would ensure successful bootloading or whether I shall have to undergo any more steps.

    Secondly, is there a source code available directly for U-Boot with NOR flash for DM6467?

    Thanks and Regards,

    Onkar

  • patki.onkar said:
    I have finally managed to get the BOOTME message from DM6467 in UART boot mode.

    I am glad to hear you got it working, but I am curious what you had to do to fix it?

    patki.onkar said:
    I just wanted to confirm whether these steps would ensure successful bootloading or whether I shall have to undergo any more steps.

    This sounds about right, though it may be worth seeing if you can get the existing NAND based U-Boot to boot out of NOR for starters, I expect it will function up until the point you need to actually write something back to the NOR (i.e. saveenv and memory operations will fail if they try to write to a non existant NAND).

    patki.onkar said:
    Secondly, is there a source code available directly for U-Boot with NOR flash for DM6467?

    I have not come across one, but I suspect the code from the DM644x will port fairly easily to the DM6467.

  • Hi..

    Thanks for reply.

    The NAND FLASH used on EVM6467 is 128MBytes while NOR FLASH we have used is 16MB- similar to EVM6446 board.

    So will I require corresponding modifications is paging/memory block mapping etc?

     

    Regards,

    Onkar

  • patki.onkar said:

    The NAND FLASH used on EVM6467 is 128MBytes while NOR FLASH we have used is 16MB- similar to EVM6446 board.

    So will I require corresponding modifications is paging/memory block mapping etc?

    Certainly, the accesses to NOR flash are entirely different from the NAND flash, from a reading perspective the NOR just shows up as a flat memory space in your memory map so no block issues are present for reads, the blocks come into play when you write/erase the NOR, and that will certainly be different from the implementation used on the DM6467's NAND.

  • Hi Bernie,

     

    I tried loading bootloader available for DM646X- which is for nand flash with command---

    sfh_DM646x.exe -norflash -v ubl_dm646x_297.bin uboot.bin

    With this command, it shows erasing of NOR is done, but this hangs at the time of writing into NOR flash.

     

    So I think I have to modify DM646x uboot for NORFLASH using the procedure mentioned previously.

     

    Regards,

    Onkar

  • Onkar,

    There should be only one line you need to change in u-boot and rebuild it for NOR flash.  It has been a while since I have done this, but there should be a file under

       .../uboot/include/configs/davinci.h   (davinci.h is used for DM644x, make sure there is not a different file for DM6467)

    edit the following line in this file (should be near the top of the file)

    #define CFG_ENV_IS_IN_FLASH 1

    When this variable is set to 1, u-boot will be built for NOR flash, when this line is commented out (or set to 0), it will build for NAND flash.

     

  • Hi Juan,

     

    Thanks for reply. We are trying the same thing and trying to build the makefile in linux environment, but it is giving many errors such as "no such file or directory" for the header files included.

    So we need make any changes in folder structure while building the make file ?

     

    Regards,

    Onkar

  • no changes in folder structure should be necessary. To build u-boot, you need to go to u-boot root directory and type

    host % make mrproper

    host % make davinci_config     (should be different for DM6467)

    host % make

    You should be able to build u-boot without any source code modifications; then change that one line of code as suggested in my previous post (may not be necessary as u-boot default is NOR flash).

  • Hi,

     

    We are working on same. Just wanted to confirm the version of u-boot.

    We are working with u-boot-1.2.0. Will it do or we need to go for some another/latest version of u-boot?

    Regards,

    Onkar

  • Hi Juan,

    I followed the steps suggested by you in the previous post, and was successful in generating u-boot.bin for the NOR flash with DM6467.

    Then in command prompt, I typed the following commands using DM646X Boot Flash utility

    sfh_dm646x.exe -norerase

    The NOR Flash got erased successfully.

    Then I typed

    sfh_dm646x.exe -norflash -v ubl_dm646x_nor.bin u-boot.bin (where u-boot.bin) is the newly built file)

    The operation proceeds successfully till the steps

    ########################################################################################

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


    Platform is Windows.
    Flashing NOR with ubl_dm646x_nor.bin and u-boot.bin.


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


    Waiting for the DM646x...
            Target:  BOOTME
    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...
            Target:    DONE
    DONE received.  Sending the UBL...
     100% [                                                              ]
                                  UBL sent....


            Target:    DONE
    DONE received.  UBL was accepted.
    UBL transmitted successfully.


    Waiting for SFT on the DM646x...
            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 UBL image
    Waiting for SENDIMG sequence...
            Target: CFI Query...passed.
            Target: NOR Initialization:
            Target:         Command Set: AMD
            Target:         Manufacturer: AMD
            Target:         Size: 0x00000010 MB
            Target: SENDIMG
    SENDIMG received. Returning ACK and header for image data...
    ACK command sent. Waiting for BEGIN command...
            Target:   BEGIN
    BEGIN commmand received.
     100% [                                                              ]
                               Image data sent...


    Waiting for DONE...
            Target:    DONE
    DONE received.  All bytes of image data received...
            Target: Erasing the NOR Flash
            Target: Erased through 0x42020000
            Target: Erase Completed
            Target: Writing UBL to NOR flash
            Target: Writing the NOR Flash

    And after this step, NOTHING

    The program just hangs until I abort it.

    Am I going wrong somewhere or whether I am missing any steps?

    Thanks,

    Onkar

  • Hi,

    I solved the problem, seems my switch settings were incorrect.

    Thanks,

    Onkar

  •  

    Hi,

    I am facing another problem .

    AFter burning the NOR flash with u-boot, I get the following series of messages

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


    Platform is Windows.
    Flashing NOR with ubl_DM646x_nor.bin and u-boot.bin.


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


    Waiting for the DM646x...
            Target:  BOOTME
    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...
            Target:    DONE
    DONE received.  Sending the UBL...
     100% [                                                              ]
                                  UBL sent....


            Target:    DONE
    DONE received.  UBL was accepted.
    UBL transmitted successfully.


    Waiting for SFT on the DM646x...
            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 UBL image
    Waiting for SENDIMG sequence...
            Target: CFI Query...passed.
            Target: NOR Initialization:
            Target:         Command Set: AMD
            Target:         Manufacturer: AMD
            Target:         Size: 0x00000010 MB
            Target: SENDIMG
    SENDIMG received. Returning ACK and header for image data...
    ACK command sent. Waiting for BEGIN command...
            Target:   BEGIN
    BEGIN commmand received.
     100% [                                                              ]
                               Image data sent...


    Waiting for DONE...
            Target:    DONE
    DONE received.  All bytes of image data received...
            Target: Erasing the NOR Flash
            Target: Erased through 0x42020000
            Target: Erase Completed
            Target: Writing UBL to NOR flash
            Target: Writing the NOR Flash
            Target: NOR Write OK through 0x42002C08.
            Target:    DONE
    Sending the Application image
    Waiting for SENDIMG sequence...
            Target: SENDIMG
    SENDIMG received. Returning ACK and header for image data...
    ACK command sent. Waiting for BEGIN command...
            Target:   BEGIN
    BEGIN commmand received.
     100% [                                                              ]
                               Image data sent...


    Waiting for DONE...
            Target:    DONE
    DONE received.  All bytes of image data received...
            Target: Erasing the NOR Flash
            Target: Erased through 0x42040000
            Target: Erase Completed
            Target: Writing APP to NOR flash
            Target: Writing the NOR Flash
            Target: NOR Write OK through 0x42020010.
            Target: Writing the NOR Flash
            Target: NOR Write OK through 0x42028000.
            Target: NOR Write OK through 0x42030000.
            Target: NOR Write OK through 0x42038000.
            Target: NOR Write OK through 0x420383F0.
            Target:    DONE
            Target:    DONE

    Operation completed successfully.

    I am however skeptical about the addresses in BOLD above.

    AFter shifting to NOR Boot mode, I get BOOTME message continuously on Hyperterminal as if no u-boot has been loaded.

    Can someone point out whether I am missing something?

    Thanks and Regards,

    Onkar

     

  • Hi,

    One more thing, I am also trying to use serial boot loader utility and still not able to load kernel image in DDR. So I guess I am going somewhere wrong in using this utility.

    Steps I am following are as follows

    1.

    slh_dm646x.exe  -load2DDR UBL_DM646x_NOR.bin

    2.

    slh_dm646x.exe -load2DDR -startADDR 0x80200000 u-boot.bin

    3.
    slh_dm646x.exe -load2DDR -startADDR 0x81000000 uImage

    ---------------- in this whole process my jumper settings are 1000- UART MODE

    After doing this I just get BOOTME on hyperterminal.
    Am I going wrong somewhere (may be in jumper setting/ sequence of instructions/ addr etc) ?

    Regards,
    Onkar


  • Hi,

    Adding to the previous post, after burning the NOR flash, I am getting the message as "Operation completed successfully". Then when I power-cycle the board, I get BOOTME message continuously on HyperTerminal. ( while still being in UART mode )

    When I change to NOR boot mode, the BOOTME messages stop, but I dont get any additional data on hyperterminal indicating that U-Boot is getting loaded.

    When I check Chip Select, R/W signal and data lines on NOR Flash, I get data signals on CRO, indicating that data is being read from NOR flash, (on RESET). But I dont get any data on hyperterminal.

    Is this a problem related to UBL header or U-Boot address? Or is it something else?

    I am using SPANSION S29GL128P90TFIR2 NOR FLash.

    Thanks and Regards,

    Onkar

     

  • few things worth noting.

    1) If you want to burn u-boot back into flash, you need to use Serial Flashing Utility (as opposed to Serial Loader Utility); it appears you have tried both, but Serial Flashing is the correct one.

    2) Even if flashing is successful, if your hardware is in UART boot mode, you will see BOOTME messages.

    3) Assuming your NOR flash is connected to CS2 memory space 0x42000000 is the correct address for NOR Flash (see data-sheet for more details)

    If after successful flash you see some activity but you do not see any UART output whe booting system in NOR boot then we have to question is flashing was indeed successful.  You see, booting system in NOR boot mode will generate activity as RBL tries to look for valid u-bbot image in NOR flash; if it cannot  find it, it should default to UART boot mode; if it did find it but u-boot was somehow corrupt or not written properly despite 'sucessful' message, you may not see any output.  Have you made the proper modifications to Serial Flashing Utility to support your NOR flash device?  What commands are you using to flash at DOS prompr?

  • Hi,

    As you said we have tried both utilities.

    1. Initially we tried serial flasher to burn flash with uImage.

    2. As this did not give expected results, just to make sure the tool flow, command sequence  are correct  we used serial loader to load uImage into DDR.

    Here the commands were

     

    1.slh_dm646x.exe  -load2DDR UBL_DM646x_NOR.bin

    2. slh_dm646x.exe  -load2DDR -startADDR 0x80200000  u-boot.bin

    3. slh_dm646x.exe  -load2DDR -startADDR 0x81000000  uImage

    
    
    ---------------- in this whole process my jumper settings are 1000- UART MODE

    Still we did not get the expected results.

     

    In previous post you have said about ""modifications in Serial Utility". By this you mean modifications in uboot (#define CFG_ENV_IS_IN_FLASH   1) or modification in utility itself ?

     

    Regards,

    Onkar

  • Onkar,

    I would like to see the commands you used for serial flash utility (as opposed to serial load utility); serial load utility will load things into IRAM or DDR which will be lost as soon as power is removed.  You need to use serial flash utility.

    by modifications, I meant to serial flash utility at first, with potential modifications also required at u-boot and Linux kernel level.  You need to ensure that the NOR flash command codes used by the utility apply to your NOR flash part.

  • Hi Juan,

    For Serial FLash Utility I am using the following commands,

    sfh_DM646x.exe -norerase

    sfh_DM646x.exe -norflash -v ubl_Dm646x_nor.bin u-boot.bin

    After that, I get the message Operation Completed successfully, and BOOTME messages in UART mode. But after that, when I shift to NOR Boot mode, I dont get any message on Hyper Terminal.

    I have noticed a point that in this utility, the MAGIC NUMBER for NOR flash burn in sfh utility is is different from MAgic number for the same in ubl.h file. One ends with 11 and in the other file, the same number ends with 99. Does this affect the burning of NOR flash? Also, isnt it supposed to give an error as BAD MAGIC NUMBER?

    Is there any other point I am missing?

    Thanks,

    Onkar

  • Hi,

    In the serial flasher utility, there are two definitions,

    In sft.h and ubl.h,

    UBL_NOR_BURN = 0xA1ACED11

    UBL_NOR_ERASE = 0xA1ACED22

    In sfh.cs and sft.h

    UBL_MAGIC_NOR_FLASH = 0xA1ACED99

    UBL_MAGIC_NOR_ERASE = 0xA1ACEDAA

    Can someone tell me the difference between the two? Could they be responsible for corrupting the data written in NOR Flash?

    Thanks,

    Onkar

  • Hi,

    Can anyone help me out there?

    Regards,

    Onkar

  • Onkar,

    Have you been successful in flashing the NOR?

    I am also using NOR flash with 6467 and am trying to flash the NOR.  I downloaded DM646x_FlashAndBootUtils_1_50 and see that it has a prebuilt UBL for NOR (UBL_DM646x_NOR.bin).  I assume that I also need a specific u-boot for NOR.  I downloaded a TI u-boot from http://git.denx.de/?p=u-boot/u-boot-ti.git;a=summary, but wasn't able to build it successfully.  Do you have a prebuilt 6467 NOR u-boot?  Any help is greatly appreciated.

    VFaul