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.

SK-TDA4VM: UNIFLASH Tool boot into u-boot: Cannot transfer tiboot3.bin

Part Number: SK-TDA4VM
Other Parts Discussed in Thread: UNIFLASH,

Tool/software:

Dear TI Support-Team,

I am following the TDA4 Flashing Techniques, specifically OSPI and eMMC Flasing via UNIFLASH Tool in Linux.

These are the steps that I am performing for OSPI flashing (4.1.1.3):

  1. Set SK-TDA4VM Boot mode to UART
  2. Run: sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/dev/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
  3. This successfully transfers the image to the SK-TDA4VM
  4. The next step, transfering the pre-built tiboot3.bin fails by not doing anything
    1. Run: sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f ~/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tiboot3.bin
    2. The process reports
      Fullscreen
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      dev@ubuntu:~/ti/uniflash_8.7.0$ sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/dev/j721e-evm/tiboot3.bin -d 3 -o 0
      Executing the following command:
      > ./ProcessorSDKSerialFlash -c /dev/ttyUSB1 -f /home/dev/j721e-evm/tiboot3.bin -d 3 -o 0
      For more details and examples, please refer to the UniFlash Quick Start guide.
      ----------------------------------------------------------------------------
      ProcessorSDKSerialFlash CLI Tool
      Copyright (C) 2017-2023 Texas Instruments Incorporated - http://www.ti.com/
      Version 1.10.0.0
      ----------------------------------------------------------------------------
      Transferring the Image to Flash Programmer..
      Opening Port Successful!
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      but never finishes
    3. The ProcessorSDKSerialFlash CLI Tool is stuck in the getMaxBaudRate() function
  5. Apparently the uart_j721e_evm_flash_programmer_release.tiimage does not start correctly

I am aware that I am not flashing the correct tiboot3.bin (as it is not the linux SDK prebuilt-image).

Can you tell me why the uart_j721e_evm_flash_programmer_release.tiimage does not correctly start up?
Is there anything wrong with my approach?

My main goal is to understand how the uart_j721e_evm_flash_programmer_release.tiimage behaves, because I want to adapt it for a custom eMMC Flashing usecase.

Best regards,

Andreas

  • Hi,

    I am aware that I am not flashing the correct tiboot3.bin (as it is not the linux SDK prebuilt-image).

    Can you tell me why the uart_j721e_evm_flash_programmer_release.tiimage does not correctly start up?
    Is there anything wrong with my approach?

    I'll check this internally and get back to you

    Regards,

    Karthik

  • Hi Andreas,

    The next step, transfering the pre-built tiboot3.bin fails by not doing anything

    I can able to run tiboot3.bin file, please refer the attached log.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    karthikeyansaravanan@LAP678U:~/ti/uniflash_8.7.0$ sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    [sudo] password for karthikeyansaravanan:
    Executing the following command:
    > ./ProcessorSDKSerialFlash -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    For more details and examples, please refer to the UniFlash Quick Start guide.
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2023 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.10.0.0
    ----------------------------------------------------------------------------
    Downloading Flash Programmer..
    Opening Port Successful!
    Transferring File of size 400177 bytes
    File Transfer complete!
    Enabling System firmware transfer!!!
    Header Transfer complete
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I am aware that I am not flashing the correct tiboot3.bin (as it is not the linux SDK prebuilt-image).

    Could you please confirm that you are using tiboot3.bin, which is located in the path below?

    Fullscreen
    1
    sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tiboot3.bin -d 3 -o 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    My main goal is to understand how the uart_j721e_evm_flash_programmer_release.tiimage behaves, because I want to adapt it for a custom eMMC Flashing usecase.

    Is this custom emmc?

    Regards,

    Karthik

  • Hi Karthik,

    thanks for looking into this.

    Could you please confirm that you are using tiboot3.bin, which is located in the path below?

    The uniflash command is correct, but nonetheless the transfer of the correct tiboot3.bin does not return anything:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    dev@ubuntu:~/ti/uniflash_8.7.0$ sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/dev/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    [sudo] password for dev:
    Executing the following command:
    > ./ProcessorSDKSerialFlash -c /dev/ttyUSB1 -f /home/dev/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    For more details and examples, please refer to the UniFlash Quick Start guide.
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2023 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.10.0.0
    ----------------------------------------------------------------------------
    Downloading Flash Programmer..
    Opening Port Successful!
    Transferring File of size 400177 bytes
    File Transfer complete!
    Enabling System firmware transfer!!!
    Header Transfer complete
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I stopped the flashing process of the tiboot3.bin after around 10 Minutes with no response. How long did it take on your side?

    After flashing the uart_j721e_evm_flash_programmer_release.tiimage the sx command also fails:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    dev@ubuntu:~$ sudo sx -kb ~/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tiboot3.bin < /dev/ttyUSB1 > /dev/ttyUSB1
    Sending /home/dev/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tiboot3.bin, 1824 blocks: Give your local XMODEM receive command now.
    Xmodem sectors/kbytes sent: 0/ 0kRetry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: NAK on sector
    Retry 0: Retry Count Exceeded
    Transfer incomplete
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Is this custom emmc?

    I want to build and run the flash_programmer tiimage myself so that I can adjust it to my needs. In the best case I am able to transfer and run the tiimage via JTAG and instead of uart-xmodem, similar to the OTP Keywriter application (but that is the topic of another ticket).

    I am looking forward to your reply!

    Best regards,

    Andreas

  • Hi Andreas,

    I want to build and run the flash_programmer tiimage myself so that I can adjust it to my needs. In the best case I am able to transfer and run the tiimage via JTAG and instead of uart-xmodem, similar to the OTP Keywriter application (but that is the topic of another ticket)

    Is this custom eMMC or TI EVM.

    Regards,

    Karthik 

  • Hi Karthik,

    I am currently testing on the TI J721E EVM, but want to use this in the future for a custom PCB where the J721S2 is connected to a Hynix SK H54G46BYYQX053 BGA H26Mx 8GB eMMC.

    edit: H26Mx eMMC instead of H54 DDR module

    Regards,

    Andreas

  • Hi Andreas,

    I am currently testing on the TI J721E EVM

    With TI J721E EVM are you able run this 4.1.1.3 RTOS Boot Binaries test ,

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    karthikeyansaravanan@LAP678U:~/ti/uniflash_8.7.0$ sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    [sudo] password for karthikeyansaravanan:
    Executing the following command:
    > ./ProcessorSDKSerialFlash -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    For more details and examples, please refer to the UniFlash Quick Start guide.
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2023 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.10.0.0
    ----------------------------------------------------------------------------
    Downloading Flash Programmer..
    Opening Port Successful!
    Transferring File of size 400177 bytes
    File Transfer complete!
    Enabling System firmware transfer!!!
    Header Transfer complete
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    U-Boot SPL 2019.01-g350f3927b8 (Jan 27 2020 - 11:26:43 +0000)
    SYSFW ABI: 2.9 (firmware rev 0x0013 '19.12.0-v2019.12 (Terrific Llam')
    Trying to boot from SPI
    Loading Environment from MMC... spl: unsupported mmc boot device.
    sdhci@4f80000 - probe failed: -19
    spl: unsupported mmc boot device.
    sdhci@4fb0000 - probe failed: -19
    *** Warning - No MMC card found, using default environment
    +-----------------------------+
    Loading rproc fw image from device 3 not supported! | |
    Loading rproc fw image from device 3 not supported! | Cannot open /dev/ttyUSB2! |
    Starting ATF on ARM64 core... | |
    +-----------------------------+
    NOTICE: BL31: v2.2(release):ti2019.04-447-ge516a38
    NOTICE: BL31: Built : 04:42:24, Jan 15 2020
    I/TC:
    I/TC: OP-TEE version: ti2019.04-190-g5208e5c-dev (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 Wed Jan 15 04:43:56 UTC 2020 aarch64
    I/TC: Initialized
    U-Boot SPL 2019.01-g350f3927b8 (Jan 15 2020 - 04:54:12 +0000)
    Detected: J7X-BASE-CPB rev E3
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    Karthik

  • Hi Karthik,

    I can transfer the uart_j721e_evm_flash_programmer_release.tiimage but the second step - transfering the tiboot3.bin image always fails. So therefore I cannot run the RTOS Boot Binaries Test.

    This step fails on my side: sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tiboot3.bin -d 3 -o 0

    The only difference is that I am using PSDK RTOS 10_00_00_05 / pdk_jacinto 10_00_00_27.
    My EVM device: J721EXSKG01EVM

    Regards,

    Andreas

  • Hi Andreas,

    This step fails on my side: sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tiboot3.bin -d 3 -o 0

    Here we are give -d 3 which means OSPI flashing , for flashing into eMMC we need to give -d 4 .

    Could please try the below procedure for flashing into eMMC, 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    # Send UART flash programmer
    sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    # Flash R5 SPL
    sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tiboot3.bin -d 4 -o 0
    # Flash A72 SPL
    sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/tispl.bin -d 4 -o 80000
    # Flash u-boot
    sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/u-boot.img -d 4 -o 280000
    # Flash sysfw.itb
    sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/sbl/tools/emmc_flash/bin/j721e-evm/sysfw.itb -d 4 -o 6C0000
    # Flash phy training data
    sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/karthikeyansaravanan/ti/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/flash/nor/ospi/nor_spi_patterns.bin -d 4 -o 3FE0000
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     once completed above step set your board into eMMC boot mode(sw8 :1000 0000 ,sw9:0100 0000) for log.

     

    Regards,

    Karthik

  • Hi Karthik,

    that's a good finding. However, this also failed at the second step:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    dev@ubuntu:~/ti/uniflash_8.7.0$ sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /home/dev/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    [sudo] password for dev:
    Executing the following command:
    > ./ProcessorSDKSerialFlash -c /dev/ttyUSB1 -f /home/dev/ti/uniflash_8.7.0/processors/FlashWriter/j721e_evm/uart_j721e_evm_flash_programmer_release.tiimage -i 0
    For more details and examples, please refer to the UniFlash Quick Start guide.
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2023 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.10.0.0
    ----------------------------------------------------------------------------
    Downloading Flash Programmer..
    Opening Port Successful!
    Transferring File of size 400177 bytes
    File Transfer complete!
    Enabling System firmware transfer!!!
    Header Transfer complete
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I also tested the return values of this program and despite reporting "File Transfer Complete" the dslite.sh return value is not equal to 0 and indicates an error. But this should not be the source of this error.

    Regards,

    Andreas

  • Hi Andreas,

    I also tested the return values of this program and despite reporting "File Transfer Complete" the dslite.sh return value is not equal to 0 and indicates an error.

    Could you confirm whether you're using an HS or GP device?

    Regards,

    Karthik

  • Hi Karthik,

    The J721EXSKG01EVM (SK-TDA4VM) is a GP device and the launch.js script for the device successfully completes. If required, I can send you the UART boot output tomorrow.

    Regards,

    Andreas

  • Hi Andreas,

    The J721EXSKG01EVM (SK-TDA4VM) is a GP device

    The SK-TDA4VM (Starter Kit) device does not have an eMMC. Please refer to the schematic.It seems like you are using the TDA4 Flashing Techniques document for the J721e_EVM device.

    Regards,

    Karthik

  • Hi Karthik,

    The SK-TDA4VM has no emmc, but the target PCB has one. In my case we also tested OSPI (which is available on the SK-TDA4VM) and it did not work.

    I found some helpful information about my guess that the SciServer testapp clashes with the MCU1_0:

    • SYSFW components are required to run on the MCU1_0 core of the MCU Subsystem instead of the DMSC core (this includes the SCISERVER)
    • The SYSFW libraries need to be properly linked into the MCU1_0 build

    I think for a productive baremetal app like UNIFLASH tool this should already be taken care of. However this section tells me that I need to disable the flag loadSciserverFlag in the launch.js script to be able to test this. That's what I meant in my last reply.

    uniflash test on SK-TDA4VM (J721E_EVM) with ti-processor-sdk-rtos-j721e-evm-07_03_00_07

    • Compile make board_utils_uart_flash_programmer BOARD=j721e_evm CORE=mcu1_0 PROFILE=debug
    • Launch Target configuration for J721E_EVM in CCS12.4
    • Executed launch.js script with loadSciserverFlag = 0
    • Load /home/dev/ti/ti-processor-sdk-rtos-j721e-evm-07_03_00_07/pdk_jacinto_07_03_00_29/packages/ti/board/utils/uniflash/target/bin/j721e_evm/uart_j721e_evm_flash_programmer_debug.xer5f to Cortex-R5 (MCU1_0)
    • The UART now consecutively sends 'C' characters
    • I can use the uniflash dslite command to connect to the xmodem, but the transfer fails at Byte 0
    • When I write a custom OSPI flashing function for the ELF, it fails at the OSPI initialization
      (UPF_flashFxnPtr[devType].UPF_fxnTablePtr->UFP_flashInit(); with devType 3 for OSPI returns -1)

    This was a small step forward, but it is very difficult for me to progress further. I really need professional help from someone who knows how to compile and run baremetal apps on MCU1_0 (UNIFLASH or Keywriter) for GP as well as HS-FS devices.

    Is it possible to involve someone from TI who can tell me the exact steps to compile the board_utils_uart_flash_programmer, so that it correctly initializes the Flash Drivers (especially OSPI & eMMC) and in the second step instead of using UART xmodem, just transfer the data via JTAG. This is needed for J721E and J721S2 HS. I also have exactly the same usecase for the keywriter_img.

    I hope that this is possible on your side.

    Best regards,

    Andreas

  • Hi Andreas,

    I hope that this is possible on your side.

    The relevant discussions is going on at this thread https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1420023/processor-sdk-j721s2-cannot-run-keywriter-via-jtag-xj721s25aalz-hs-fs-device  , Please follow the thread above for further support .

    Reagrds,

    Karthik