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.

Can't write u-boot.bin to nor flash (TI816x-evm)

Dears,

I builed nor type u-boot.bin and put in sd card.

I power on ti816x-evm, the uart message as below:

U-Boot 2010.06 (May 29 2013 - 10:50:13)

DRAM: 2 GiB
MMC: OMAP SD/MMC: 0
Using default environment

Hit any key to stop autoboot: 0
TI8168_EVM#

Type

TI8168_EVM# mw.b 0x81000000 0xff 0x1c0000
TI8168_EVM# mmc rescan 0
TI8168_EVM# fatload mmc 0 0x81000000 u-boot.bin
TI8168_EVM# cp.w 0x81000000 0x08000000 0x1c0000

then the system crash, after type "cp.w 0x81000000 0x08000000 0x1c0000" and press return key;

  • Hello,

    Please, check again the entirety of this guide:

    http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_U-Boot

    http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_U-Boot#U-Boot_NOR_Support

    I can notice that some of the required lines are missing; something like:

    protect off 0x08000000 0x0803FFFF

    erase 0x08000000 0x0803FFFF

    Also I think this value "0x1c0000" is too big, please double check (refer to the NOR layout in the guide).

    Also note again that the NAND and the NOR are mutually exclusive; when using the NOR boot mode the NAND flash EVM switch should be off.

    http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_U-Boot#NOR_boot_mode

    Thank you.

    BR
    Vladimir

  • Hi Vladimir,

    I check with user guide, but there are some issues.

    I can't build code using

    $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_config_nand $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti

    make: *** No rule to make target `distclean'.  Stop.

    so, my build steps as

    vim Rules.make
        #DEFAULT_UBOOT_CONFIG=ti8168_evm_config <= mark
        DEFAULT_UBOOT_CONFIG=ti8168_evm_config_nor <= add

    #make clean
    #make u-boot

    Image Type: Texas Instruments ti81xx Boot Image
    Image Size: 157700 Bytes= 154.00 kB = 0.15 MB => the image sizes greater than { 0x08000000 (u-boot Start) Flash Start ~0x0803FFFF (u-boot End) }


    Load Address: 40400000
    Entry Point: 40400000

    -rwxr-xr-x 1 636132 2013-05-29 16:44 u-boot*
    -rwxr-xr-x 1 157700 2013-05-29 16:44 u-boot.bin*
    -rw-r--r-- 1 569 2013-05-29 16:44 u-boot.lds
    -rw-r--r-- 1 159517 2013-05-29 16:44 u-boot.map
    -rw-r--r-- 1 157708 2013-05-29 16:44 u-boot.noxip.bin

    I can't use protect off and erase command, such as

    TI8168_EVM#protect off
    Unknown command 'protect' - try 'help'
    TI8168_EVM#erase
    Unknown command 'erase' - try 'help'

    so, i skip them, i don't know what happened. (cmd_flash.o is exist after build u-boot)

    BR, Charles

  • Charles,

    Lin Charles said:

    I check with user guide, but there are some issues.

    I can't build code using

    $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_config_nand $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti

    make: *** No rule to make target `distclean'.  Stop.

    I think you could build the u-boot for NOR within EZSDK like this (if you are using different release try to use this as reference):

    1. On top of the clear, nonmodified EZSDK source code you should modify the u-boot config in <EZSDK_HOME>/Rules.make. Just change DEFAULT_UBOOT_CONFIG to be equal to ti8168_evm_config_nor

           2.  After that:


    $ cd <EZSDK_HOME>

    $ make u-boot_clean

    $ make u-boot

    And upon successful build, now <EZSDK_HOME>//board-support/u-boot-<version>/u-boot.bin should be the NOR u-boot image, I guess.

    Lin Charles said:

    I can't use protect off and erase command, such as

    TI8168_EVM#protect off
    Unknown command 'protect' - try 'help'
    TI8168_EVM#erase
    Unknown command 'erase' - try 'help'

    Please, check this note from the u-boot guide:

    "

    Important
    Please note that the U-Boot commands used in this section is applicable only from a U-Boot which is already running from NOR. Please refer to the Flashing Tools page for flashing the U-Boot image to NOR.

    "

    Here are some flashing tools guides:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_Flashing_Tools_Guide

    http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_Flashing_Tools_Guide

    http://processors.wiki.ti.com/index.php/TI816X_C6A816x_AM389x_PSP_Flashing_Tools_Guide

    Lin Charles said:
    Image Size: 157700 Bytes= 154.00 kB = 0.15 MB => the image sizes greater than { 0x08000000 (u-boot Start) Flash Start ~0x0803FFFF (u-boot End) }


    From: http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_U-Boot#Writing_to_NOR

    "

    To write len bytes of data from a memory buffer located at addr to the NOR block offset (here <len> is always in 16-bit word count and not bytes):

    TI8168_EVM# cp.w <src> <dest> <len>
    

    For example, to write 0x40000 bytes (i.e. 0x20000 16-bit words) from memory buffer at address 0x81000000 to NOR - starting at offset 0x0B660000:

    TI8168_EVM# cp.w 0x81000000 0x0B660000 0x20000
    

    "

    So <len> of 0x20000 is 0x40000 [hex] bytes or 262144 [dec] bytes.


    Thank you.

    BR
    Vladimir

  • PS: If you have further questions related to the CCS usage, please prefer the dedicated CCS forum. You could start a new thread there.

    Code Composer Forum

    http://e2e.ti.com/support/development_tools/code_composer_studio/default.aspx

    Many thanks.

    BR
    Vladimir

  • I solved this issues, 

    Thanks a lot.