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.

TMDS64EVM: Booting U-Boot from the console UART Can't Work

Part Number: TMDS64EVM
Other Parts Discussed in Thread: UNIFLASH, TDA4VM

Hi Team,

Customer feedback 3.1.1.8. UART — Processor SDK AM64X Documentation don't work. I try it on SDK9.0, also don't work.

Here is my commands and execution results: 

$ sudo sb --xmodem ./tiboot3.bin > /dev/ttyUSB1 < /dev/ttyUSB1
Sending ./tiboot3.bin, 4094 blocks: Give your local XMODEM receive command now.
Bytes Sent: 524160   BPS:7779                            

Transfer complete
$ sudo sb --ymodem ./tispl.bin > /dev/ttyUSB1 < /dev/ttyUSB1
Sending: tispl.bin
Bytes Sent: 868224   BPS:7547                            
Sending: 
Ymodem sectors/kbytes sent:   0/ 0k
Transfer complete
$ sudo sb --ymodem ./u-boot.img > /dev/ttyUSB1 < /dev/ttyUSB1
Retry 0: Timeout on pathname

Transfer incomplete

$ sudo sb --ymodem ./u-boot.img > /dev/ttyUSB1 < /dev/ttyUSB1
Sending: u-boot.img
Ymodem sectors/kbytes sent:   3/ 0kRetry 0: Cancelled

Transfer incomplete


I also refer the method that Judith mentioned using minicom in AM62A7: Booting u-boot from UART- TI E2E support forums.
This method is not feasible either.

Can you tell me how can I boot U-Boot using UART?
Our customers have only reserved three boot methods, UART, OSPI and eMMC.
Is there some simple way to download tiboot3.bin tispl.bin and u-boot.img to Flash or eMMC?
  • Hi Zane,

    I'm using the below script myself can you please try that and see what it does for you. If it fails please show the complete log. Also please confirm that you are running on an AM64 EVM from TI, using the original (unmodified) image files from the Linux SDK.

    $ cat ~/bin/boot-uart.sh
    #!/bin/sh
    
    # exit when any command fails
    set -e
    
    # set ports
    MAIN_DEV=/dev/ttyUSB0
    
    # set some defaults
    TIBOOT3_BIN=tiboot3.bin
    TISPL_BIN=tispl.bin
    U_BOOT_IMG=u-boot.img
    
    # echo commands
    set -x
    
    # configure serial port(s)
    stty -F $MAIN_DEV 115200 cs8 -cstopb -parenb
    
    # ROM can only do X-Modem. U-Boot [SPL] can do both.
    sb -vv --xmodem --disable-timeouts $TIBOOT3_BIN > $MAIN_DEV < $MAIN_DEV
    sb -vv --ymodem $TISPL_BIN > $MAIN_DEV < $MAIN_DEV
    sleep 2
    sb -vv --ymodem $U_BOOT_IMG > $MAIN_DEV < $MAIN_DEV

    Regards, Andreas

  • Hi, Andreas

    Well done! Thanks for your help. But after I download these three files using UART, what mode should I set to start the board? I try UART, OSPI and eMMC boot, Using UART boot only output "C", eMMC no output via serial port.

    OSPI Boot output via serial port:

    (It may be that the SBL program I downloaded to OSPI before is being executed.)

    Starting NULL Bootloader ...

    DMSC Firmware Version 8.6.4--v08.06.04 (Chill Capybar
    DMSC Firmware revision 0x8
    DMSC ABI revision 3.1

    INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU r5f1-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...

    By the way, in the absence of USB interface and network port, 
    is there a faster way to burn these files to Flash or eMMC?
    For example, how to use JTAG? The serial port is a bit slow.

    Regards, Zane

  • Well done! Thanks for your help. But after I download these three files using UART, what mode should I set to start the board? I try UART, OSPI and eMMC boot, Using UART boot only output "C", eMMC no output via serial port.

    What are you trying to do? What is your goal? Are you trying to use U-Boot as a programming tool for OSPI?

    OSPI Boot output via serial port:

    (It may be that the SBL program I downloaded to OSPI before is being executed.)

    Starting NULL Bootloader ...

    DMSC Firmware Version 8.6.4--v08.06.04 (Chill Capybar
    DMSC Firmware revision 0x8
    DMSC ABI revision 3.1

    INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU r5f1-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...

    Yes this looks like the output of SBL, from the "MCU+ SDK"

    By the way, in the absence of USB interface and network port,
    is there a faster way to burn these files to Flash or eMMC?
    For example, how to use JTAG? The serial port is a bit slow.

    USB is a great way to program empty/blank boards, fast and efficiently. You should consider adding this if you can, even if it is just for programming purposes (perhaps via temporary connector or test points).

    You could use JTAG on AM64 to program the OSPI via the "JTAG Uniflash" tool part of MCU+ SDK, see https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/09_00_00_35/exports/docs/api_guide_am64x/TOOLS_FLASH.html#TOOLS_FLASH_JTAG_UNIFLASH

    If you have any questions specifically regarding those programming approaches and/or around MCU+ SDK, please open a new E2E ticket, as this will need to be a separate case tracked/handled by a different domain expert.

    Regards, Andreas

  • Hi, Andreas

    Thanks for your prompt reply.

    What are you trying to do? What is your goal? Are you trying to use U-Boot as a programming tool for OSPI?

    Our customer want to use u-boot to load Vxworks instead of Linux. The fisrt step is to download some files to boot u-boot on board, and then use u-boot to load Vxworks. Now they're stuck at step one.

    You could use JTAG on AM64 to program the OSPI via the "JTAG Uniflash" tool part of MCU+ SDK, see https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/09_00_00_35/exports/docs/api_guide_am64x/TOOLS_FLASH.html#TOOLS_FLASH_JTAG_UNIFLASH

    Yes, I have tried this approach. But it doesn't seem to work. Maybe I haven't really figured out how to use jtag_uniflash. I open a new E2E ticket that is about jtag_uniflash TMDS64EVM: How to start U-boot with SBL_JTAG_UNIFLASH? - Processors forum - Processors - TI E2E support forums

    Best Regards,

    Zane

  • Our customer want to use u-boot to load Vxworks instead of Linux. The fisrt step is to download some files to boot u-boot on board, and then use u-boot to load Vxworks. Now they're stuck at step one.

    Ah ok. So my understanding is U-Boot is fully up then (at prompt). If so, what you can do is to load an OSPI image (like your VxWorks image) using the Y-Modem protocol, like this:

    Hit any key to stop autoboot:  0
    => loady
    ## Ready for binary (ymodem) download to 0x82000000 at 115200 bps...

    This will load an external file to the address defined via ${loadaddr} U-Boot env variable, which typically is 0x82000000 on our AM6x devices.

    Then, once loaded, you can program that image to OSPI flash like this:

    => sf probe
    SF: Detected mt35xu512g with page size 256 Bytes, erase size 128 KiB, total 64 MiB
    => sf update ${loadaddr} 0x0 ${filesize}
    device 0 offset 0x0, size 0x7f08e2
    8325346 bytes written, 0 bytes skipped in 13.868s, speed 640411 B/s

    If you have any questions regarding this, the Linux SDK User's Guide should have additional detail/information.

    I open a new E2E ticket that is about jtag_uniflash

    Yes that is the correct way to do it.

    Regards, Andreas

  • Hi, Andreas

    Thanks for your help. Now I solve it problem by add a command behind the script:

    minicom -D /dev/ttyUSB1 -b 115200 -8 -w

    Best Regards,

    Zane

  • Hi, Andreas

    Does the above script support TDA4WM UART U-Boot? I test on TDA4VM, 
    and it always transfer incomplete on u-boot.img.
    By the way, transmission failures often occur on AM64, but you will succeed after trying a few more times.

    Best Regards,
    Zane
  • Does the above script support TDA4WM UART U-Boot? I test on TDA4VM,
    and it always transfer incomplete on u-boot.img.

    I don't know, I don't work/test with those devices. You could debug this by hooking up a logic analyzer to the serial interface (or use a SW driver to monitor the interface) to see where the hiccup is,

    By the way, transmission failures often occur on AM64, but you will succeed after trying a few more times.

    You could try different PCs/Linux Setups to see if there is some dependency. For me, that script always worked. So it's hard to say what's going wrong in your case without seeing what the transfers/logs look like.

    Regards, Andreas