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.

problem booting from flash NAND in a new EVM6446

Hello, we just bought an EVM6446 rev. F.
We can boot it from FLASH NOR and run the demos standalone or from the command line. However, we cannot manage to boot it from FLASH NAND. I am using the following configuration: S3 switch set to 00001 11111 (1=ON, 0=OFF) and J4 jumper selecting NAND. When I turn on the board, it only write endlessly in the terminal: "BOOTME BOOTME BOOTME BOOTME ...". 
Is it possible that the FLASH NAND came non-initialized out of the box? If it is the case, can somebody suggest me how to initialize it? ( I do not have at the moment a working jtag emulator.)
On the other hand, when I boot from NOR FLASH (S3 switch set to 10101 11111 and J4 jumper selecting FLASH) it works fine (I copy the first lines from my terminal at the end of the message).
Thanks a lot for your help, Sara
------
U-Boot 1.1.3 (Dec  4 2006 - 12:05:38)
U-Boot code: 81080000 -> 81097628  BSS: -> 810A0018
RAM Configuration:
Bank #0: 80000000 256 MB
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial
ARM Clock :- 297MHz
DDR Clock :- 162MHz
Hit any key to stop autoboot:  0
## Booting image at 02050000 ...
   Image Name:   Linux-2.6.10_mvl401-davinci_evm
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1333196 Bytes =  1.3 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK
Starting kernel ...
-----

  • You are correct, this likely means that the RBL could not find a useful UBL/ u-boot in NAND flash, so it reverted to UART boot mode.

    You can use the following utility to flash your nand with a valid ubl/uboot (FYI, you should habe prebuilt ubl and u-boot in DVSDK under PSP_xx_xx_xx_xxx/bin/dm6446 )

    http://wiki.davincidsp.com/index.php/Serial_Boot_and_Flash_Loading_Utility

    Actually, I believe the flashing utilities may even come as part of DVSDK now (see PSP_xx_xx_xx_xxx/board_utilities )

  •  

    Hello Juan, thanks for your help. I could Flash the most recent UBL/u-boot and linux kernel into the FLASH NAND via the serial port. Bellow I try to summarize the procedure and location of the tools and instructions, in the hope it can be useful to others. Best regards, Sara.

    ---

    To Flash the UBL/u-boot in NAND

    - Files needed:

    1) sfh_DM644x.exe : serial flasher found in directory \DM644x\GNU\ of the compressed file /home/user/dvsdk_2_00_00_22/PSP_02_00_00_140/board_utilities/dm644x/DM644x_FlashAndBootUtils_1_50.tar.gz

    2) ubl_DM644x_nand.bin : primary bootloader for NAND found in directory

    \DM644x\GNU\ubl of the compressed file /home/user/dvsdk_2_00_00_22/PSP_02_00_00_140/board_utilities/dm644x/DM644x_FlashAndBootUtils_1_50.tar.gz

    3) u-boot-1.2.0-davinci-nand.bin : secondary bootloader (U-Boot) for NAND flash found in /home/user/dvsdk_2_00_00_22/PSP_02_00_00_140/bin/dm6446/

    - Procedure:

    1) In a Windows PC, put the 3 needed files (sfh_DM644x.exe, ubl_DM644x_nand.bin, u-boot-1.2.0-davinci-nand.bin) in the same directory.

    2) Set the board J4 jumper to “NAND”, set S3 boot switch to S3[1..4]=1100 (UART boot mode and the right bus width for NAND).

    3) Open a command window, and go to the directory where the needed files are. Erase and flash the nand with the following commands:

    sfh_DM646x -nanderase

    sfh_DM646x -nandflash ubl_DM644x_nand.bin u-boot-1.2.0-davinci-nand.bin

    4) After flashing is complete set S3[1..4]=0000 to boot from FLASH NAND

    5) Power off and on the board, and stop the autoboot by pressing a key. You have the prompt :

    DaVinci EVM #

     

    ---

    To Write the kernel to FLASH NAND following instructions in http://wiki.davincidsp.com/index.php/Writing_Kernel_Image_to_NAND_Flash

     

    - Files needed:

    1) uImage-dm6446: Linux kernel found in /home/user/dvsdk_2_00_00_22/PSP_02_00_00_140/bin/dm6446/

     - Procedure:

    1) In the Linux (possibly virtual) machine, Set up a tftp server as indicated in the “Getting Started Guide” (sprue66f.pdf).  Put the kernel file (uImage-dm6446) in the TFTP boot directory (e.g.  /tftpboot).

    2) In the DaVinci EVM prompt type :

    setenv serverip <tftp server ip address>

    setenv bootfile uImage-dm6446

    dhcp

    3) Observe the result in the screen:

    Filename 'uImage-dm6446'.

    Load address: 0x80700000

    Loading: #################################################################

                 ...

             #####

    done

    Bytes transferred = 2018344 (1ecc28 hex)

     

    4) Calculate the number of pages to be erased and written by rounding the kernel image size up to next page:

        Kernel size = 0x1ecc28

        Number of pages = 0x1ecc28/0x200 = 0xf66.14 rounded up = 0xf67

        Rounded size = <number of pages> * <page size> = 0xf67 * 0x200 = 0x1ece00

     

    5) In the DaVinci EVM prompt type:

    nand erase 0x2060000 0x1ece00

    nand write 0x80700000 0x2060000 0x1ece00

    ---

  • Hi All,

    Where can I find a desctiption of the boot image format? How to recreate it using TMS470 code gen tools?

    Thanks,

    Andrew