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.

Restoring U-Boot 1.2.0 on DM6467

Other Parts Discussed in Thread: CCSTUDIO

PROBLEM:

Oops.  I was changing the MVPro4.01 kernel/modules/TI binaries on my DM6467 to MVPro5.0.  I used the prep-hdd script and binaries from DVSDK 2.00 to update the hard-drive in one big step.  Then, I used tftp to get the new kernel from my host, and was able to boot it from memory.  It was working – everything was great.

So, I needed to write it to the NAND flash.  Since the U-Boot example commands did not include information for the DM6467 with 128MB nand flash, I typed ‘nand erase’, hoping to get some information about what parameters are expected by that command so I could check them against the examples given.  Oops – that erased the whole flash, including U-Boot.

Right now my board boots to a BOOTPSP prompt after failing to boot from NAND.  Is there any way to quickly re-flash U-Boot?

WHAT I HAVE TRIED:

Using the directions shown at: http://tiexpressdsp.com/index.php/Serial_Boot_and_Flash_Loading_Utility

I got the latest Serial Flasher Host utility .tar.gz from SourceForge, and I have the ubl_dm646x_297.bin and u-boot-1.2.0-dm6467.bin files from the LSP 2.00 release.  The SourceForge download also included a ubl_dm646x_nand.bin binary.

 

With the BM dipswitches set to 0001, I ran the sfh_DM646x.exe Serial Flasher Host utility, and everything seemed OK.  (See output below).  I changed the BM dipswitches back to 0111 (SPI boot) and I get the same error as if the entire NAND was erased, which is:

 

Booting PSP Boot Loader
Starting NAND Copy
NAND Boot failed. Starting UART
 BOOTPSP


But, the output of the Serial Flasher Host utility suggested a successful burn:

 

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

Platform is Windows.
Flashing NAND with ubl_dm646x_297.bin and u-boot-1.2.0-dm6467.bin.

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

Waiting for the DM646x...
BOOTME commmand received. Returning ACK and header...
ACK command sent. Waiting for BEGIN command...
        Target:  BOOTME
Waiting for the DM646x...
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 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...
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: Writing UBL to NAND flash
        Target: Unprotecting blocks 0x00000001 through 0x00000005.
        Target: Number of blocks needed for header and data: 0x0x00000001
        Target: Attempting to start in block number 0x0x00000001.
        Target: Erasing block 0x00000001 through 0x00000001.
        Target: Writing header and image data to Block 0x00000001, Page 0x00000000
        Target: Erasing block 0x00000002 through 0x00000002.
        Target: Writing header and image data to Block 0x00000002, Page 0x00000000
        Target: Erasing block 0x00000003 through 0x00000003.
        Target: Writing header and image data to Block 0x00000003, Page 0x00000000
        Target: Erasing block 0x00000004 through 0x00000004.
        Target: Writing header and image data to Block 0x00000004, Page 0x00000000
        Target: Erasing block 0x00000005 through 0x00000005.
        Target: Writing header and image data to Block 0x00000005, Page 0x00000000
        Target: Protecting the entire NAND flash.
        Target:    DONE
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: Writing APP to NAND flash
        Target: Unprotecting blocks 0x00000006 through 0x00000032.
        Target: Number of blocks needed for header and data: 0x0x00000002
        Target: Attempting to start in block number 0x0x00000006.
        Target: Erasing block 0x00000006 through 0x00000007.
        Target: Writing header and image data to Block 0x00000006, Page 0x00000000
        Target: Erasing block 0x00000008 through 0x00000009.
        Target: Writing header and image data to Block 0x00000008, Page 0x00000000
        Target: Erasing block 0x0000000A through 0x0000000B.
        Target: Writing header and image data to Block 0x0000000A, Page 0x00000000
        Target: Erasing block 0x0000000C through 0x0000000D.
        Target: Writing header and image data to Block 0x0000000C, Page 0x00000000
        Target: Erasing block 0x0000000E through 0x0000000F.
        Target: Writing header and image data to Block 0x0000000E, Page 0x00000000
        Target: Erasing block 0x00000010 through 0x00000011.
        Target: Writing header and image data to Block 0x00000010, Page 0x00000000
        Target: Erasing block 0x00000012 through 0x00000013.
        Target: Writing header and image data to Block 0x00000012, Page 0x00000000
        Target: Erasing block 0x00000014 through 0x00000015.
        Target: Writing header and image data to Block 0x00000014, Page 0x00000000
        Target: Erasing block 0x00000016 through 0x00000017.
        Target: Writing header and image data to Block 0x00000016, Page 0x00000000
        Target: Erasing block 0x00000018 through 0x00000019.
        Target: Writing header and image data to Block 0x00000018, Page 0x00000000
        Target: Erasing block 0x0000001A through 0x0000001B.
        Target: Writing header and image data to Block 0x0000001A, Page 0x00000000
        Target: Erasing block 0x0000001C through 0x0000001D.
        Target: Writing header and image data to Block 0x0000001C, Page 0x00000000
        Target: Erasing block 0x0000001E through 0x0000001F.
        Target: Writing header and image data to Block 0x0000001E, Page 0x00000000
        Target: Erasing block 0x00000020 through 0x00000021.
        Target: Writing header and image data to Block 0x00000020, Page 0x00000000
        Target: Erasing block 0x00000022 through 0x00000023.
        Target: Writing header and image data to Block 0x00000022, Page 0x00000000
        Target: Erasing block 0x00000024 through 0x00000025.
        Target: Writing header and image data to Block 0x00000024, Page 0x00000000
        Target: Erasing block 0x00000026 through 0x00000027.
        Target: Writing header and image data to Block 0x00000026, Page 0x00000000
        Target: Erasing block 0x00000028 through 0x00000029.
        Target: Writing header and image data to Block 0x00000028, Page 0x00000000
        Target: Erasing block 0x0000002A through 0x0000002B.
        Target: Writing header and image data to Block 0x0000002A, Page 0x00000000
        Target: Erasing block 0x0000002C through 0x0000002D.
        Target: Writing header and image data to Block 0x0000002C, Page 0x00000000
        Target: Erasing block 0x0000002E through 0x0000002F.
        Target: Writing header and image data to Block 0x0000002E, Page 0x00000000
        Target: Erasing block 0x00000030 through 0x00000031.
        Target: Writing header and image data to Block 0x00000030, Page 0x00000000
        Target: Protecting the entire NAND flash.
        Target:    DONE
        Target:    DONE
Operation completed successfully.

 

I tried several different command lines for the sfh utility, with the same results:

sfh_DM646x.exe –nandflash ubl_dm646x_297.bin u-boot-1.2.0-dm6467.bin      (Using the .bins from the LSP release)

sfh_DM646x.exe –nandflash ubl_dm646x_nand.bin u-boot-1.2.0-dm6467.bin      (Using the UBL bin from sourceforge)

sfh_DM646x.exe –nandflash –UBLStartAddr 0x0100 APPStartAddr 0x8108000 APPStartAddr 0x81080000 ubl_dm646x_297.bin u-boot-1.2.0-dm6467.bin  (forcing the start and load addresses to the ones specified as the typical defaults in the wiki)

 

Do you see anything obvious that I am doing wrong? 

I am beginning to suspect that either the ubl or U-boot bins are corrupt.  I see that at least one other person is having the same problem:  http://e2e.ti.com/forums/p/7826/30761.aspx

Best regards,

EricR

  • No progress for me on this. 

    I did realize that the Serial Flasher Host utility is apparently trying to put both UBL and U-Boot onto the NAND flash.  Which isn't exactly what I wanted, and I don't think that is how the board was originally configured either.

    What I want to do is to put UBL into the SPI device (if it is not already there - how do I confirm?) and then put U-Boot into the NAND device.  Then using U-Boot I will put my kernel image into the NAND device.

    Any ideas?

  • Just as a quick test to see if the Serial Flasher Host utility put UBL and U-Boot on the NAND device, I switched BM[0:3] to '1110' to boot from NAND, bypassing the SPI device.  This time I see:

    DM646x initialization passed!
    TI UBL Version: 1.50
    Booting Catalog Boot Loader
    BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000006.
       DONE
    Jumping to entry point at 0x81080000.


    U-Boot 1.2.0 (May 20 2009 - 01:04:07)

    I2C:   ready
    DRAM:  256 MB
    unknown vendor=0 Flash:  0 kB
    NAND:  NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB )No oob scheme defined for oobsize 256
    BUG: failure at nand_base.c:3398/nand_scan()!
    BUG!

    So, it seems that the NAND writer utility doesn't put everything exactly correctly into the NAND device, but now I *do* understand why I was having trouble trying to boot from the SPI device.  What apparently was happening was that the SPI copy of UBL (included on the DM6467 EVM by default) was trying to download the U-boot binary from the NAND device and instead finding a copy of UBL and some or all of a copy of U-Boot, since I'd written that per the other web link directions.

    So, to reiterate, I just want to restore the original boot configuration of the board.  This seems to consist of UBL on SPI, U-Boot and a copy of the kernel on NAND, and BM[0:3] set to 0111, to boot from the SPI device.

    Ideas, comments, or insults?

  • Hi Eric,

    I got the same problem with you !!!

    I have tried a lot of ways to restore the board for SPI BOOT or NAND boot.

    Use sfh_DM646x.exe tool is ok the boot from NAND flash(UBL+U-BOOT), but burn uImage to 0xa0000 then reboot the board will fail !!! (http://e2e.ti.com/forums/t/8514.aspx)

    SPI EEPROM still has UBL inside, boot from SPI mode then shows: Booting PSP Boot Loader

    >>Starting NAND Copy

    >>NAND Boot failed. Starting UART
    >> BOOTPSP

    It seems that UBL can not find the u-boot on NAND flash which burned by sfh_DM646x.exe tool !!!

    I wonder who can completely boot all things from NAND flash !!!

    Tai Chang

     

     

  • You may have tried this already, but in terms of restoring u-boot I had pretty good luck with the instructions on pp.7-9 of the "LSP 2.0 DaVinci Linux EVM Installation User's Guide" (sprug94).  This can be found in the DVSDK directory in PSP_02_00_00_090/docs.

    I had a DM6467 EVM that had been used for other development and found the instructions exactly what I needed to restore things to their original state.

    Hope this helps.

       -Robert

     

  • Hi Robert,

    Thanks for the feedback. 

    One reason I did not try the method in Section 1.3.1.3 of SPRUG94A (page 8)is that I don't have the full version of Code Composer Studio (due to cost constraints).  I do have the 120-day evaluation version, but when I open CCS 3.3 (eval), I have to specify what board I would like to use, and the DM6467 is not in the list.  Where do I obtain the files to allow CCS v3.3 to support DM6467?  Can the Eval version of CCS run the nand_flash_writer.out file?  I asked this question somewhere else on this forum, or perhaps by email, and didn't get an answer.

    If you're referring to the second set of instructions in 1.3.1.3 (If you already have a working u-boot running on the EVM, it can be upgrated to a newer version...), I can't follow these because I don't have U-boot at all on the bad board.

    I'd like to try the CCS method, if you know what Factory Board I should choose in Setup to work with the DM6467.

    Thanks

    EricR

     

     

  • Eric,

    When I look at the boards available in CCS setup, I don't see a ready-made DM6467 EVM configuration either.  I ended up going to "custom boards" -- on that tab, there is a "DAVINCI_HD_XDS510USB" option (defined by the file c:\CCStudio_v3.3.\drivers\import\DaVinciHD-XDS510USB.ccs).

    Not sure if the evaluation version has this.  My guess is that it would.  One important point is that it is critical to do all of the updates so you have the latest version of CCS.  Some of the more recent updates are relevant to being able to connect with the DaVinci HD board.  The version I'm using is 3.3.81.6.

    Hope this helps.  Good luck!

        -Robert

     

  • ubl_dm646x_297.bin  may not work

    I need to download ubl form: http://arago-project.org/files/releases/davinci-psp_3.2.0.0-beta/board-utilities/serial_flash/dm6467_297_ubl.bin

    and you can try a new version uboot: http://arago-project.org/files/releases/davinci-psp_3.2.0.0-beta/images/dm6467-evm/u-boot-dm6467-evm.bin

    there also sfh_DM646x.exe :http://arago-project.org/files/releases/davinci-psp_3.2.0.0-beta/board-utilities/serial_flash/sfh_DM646x.exe

    just run:

    sfh_DM646x.exe –nandflash dm6467_297_ubl.bin u-boot-1.2.0-dm6467.bin

    or

    sfh_DM646x.exe –nandflash dm6467_297_ubl.bin u-boot-dm6467-evm.bin

    I have the same problem and fixed.


  • Harl,

     

    Did you try on DM6467 EVM Rev. E or Rev. F? I have EVM Rev. E and it comes with 6467 Silicon version 1.0, which can not support NAND boot mode. Not so sure which silicon version is used in EVM Rev. F.

     

    Cheers,

     

    Lijun