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.

[TDA4M] OSPI download guide

Other Parts Discussed in Thread: UNIFLASH

Hi~

I would like to download OSPI in TDA4 at RTOS-linux version(v 0.9).

I think there are three ways to download.

1. UART download for using uniflash tool.

I don't find offset address in Linux version.

Below is the uniflash tool for downloading. tiboot3.bin downloaded in the following command.

--> dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0

but, i don't find the offset adress(sysfw.itb, tispl.bin,u-boot.img, Image(kernel) etc )

Please give me the offset address.

2. USB download(DFU) --> linux version

I did not find a TDA4 usb download guide at linux.(DFU)

3. JTAG download

I want to get the download tool guide for linux version, not RTOS version.

Thanks.

  • Hi,

    If you want to flash the OSPI on the EVM with the images you mentioned (in order to get to U-boot to boot from OSPI), then you can use the same basic instructions as for the AM65x EVM here:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/06_00_00_07/linux/Foundational_Components_U-Boot.html?highlight=ospi#u-boot-for-am65x-family-of-socs

    Specifically, you will use the commands in section 3.1.1.13.4.  Of course the bootmode switch settings on this EVM will be somewhat different than on the AM65x EVM.  However, all the other instructions still apply.

    1. The image offsets in the flash are the same as those in the diagram entitled "Flash Layout for OSPI" at the link above.  However, I'll have to check with someone else to see if anyone is already using the Uniflash tool with the Linux release for this EVM.  Usually, we just use the command sequence similar to those in the link above.

    2. USB DFU is not yet supported in this release.  You will need to wait until the next major release for USB DFU support.

    3. Refer to the JTAG download guide for the RTOS version.  There is not yet a JTAG download guide for the linux version at this point.

     

    Regards,

    Jonathan

  • Hi,

    1. The image offsets in the flash are the same as those in the diagram entitled "Flash Layout for OSPI" at the link above.  However, I'll have to check with someone else to see if anyone is already using the Uniflash tool with the Linux release for this EVM.  Usually, we just use the command sequence similar to those in the link above.

    -->

    I downloaded according to the guide. However, an error occurs as shown below.
    ------------------------------------------------------------------------------------------------------------------

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0
    Executing the following command:
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -f c:\ti\uniflash_5.0.0\image\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-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Flashing Image to Flash Writer..

    Transferring Header information..
    NAK: Transmit of header Failed

    C:\ti\uniflash_5.0.0>

    ------------------------------------------------------------------------------------------------------------------

    So I added -i option and it was downloaded.
    The download command is shown below.
    dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0
    dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tispl.bin -d 3 -o 80000 -i 0
    dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\u-boot.img -d 3 -o 280000 -i 0
    dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\sysfw.itb -d 3 -o 6C0000 -i 0
    After completing the download, I tried booting with OSPI, but I cannot boot.
    Boot up your advice for OSPI booting.
    SW8 : 00000000
    SW9 : 01000000
    please, Boot up your advice for OSPI booting.

    Regards,

    kyungtae

  • Kyungtae,

    Could you copy paste the logs you see in the command prompt when the download completes?

    Regards,

    Madan

  • Hi~

    Could you copy paste the logs you see in the command prompt when the download completes?

    --> this is logs.

    How to download is as follows.
    1. After downloading tiboot3.bin, download tispl.bin.
    2. Turn off the power and turn it on again.
    3. After downloading tiboot3.bin, download sysfw.itb.
    4. Turn off the power and turn it on again.
    5. After downloading tiboot3.bin, download boot.img.
    The reason for this is that after downloading two images, download fails. Also, after downloading tiboot3.bin, another image will be downloaded.


    ------------------------------------------------------------------------------------------------------------------

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0
    Executing the following command:
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Flashing Flash Writer to RBL..

    Transferring File of size 181977 bytes
    File Transfer complete!

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tispl.bin -d 3 -o 80000 -i 0
    Executing the following command:
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -f c:\ti\uniflash_5.0.0\image\tispl.bin -d 3 -o 80000 -i 0

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Flashing Flash Writer to RBL..

    Transferring File of size 494572 bytes
    File Transfer complete!

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0
    Executing the following command:
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Flashing Flash Writer to RBL..

    Transferring File of size 181977 bytes
    File Transfer complete!

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\sysfw.itb -d 3 -o 6C0000 -i 0
    Executing the following command:
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -f c:\ti\uniflash_5.0.0\image\sysfw.itb -d 3 -o 6C0000 -i 0

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Flashing Flash Writer to RBL..

    Transferring File of size 267554 bytes
    File Transfer complete!

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0
    Executing the following command:
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -f c:\ti\uniflash_5.0.0\image\tiboot3.bin -d 3 -o 0 -i 0

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Flashing Flash Writer to RBL..

    Transferring File of size 181977 bytes
    File Transfer complete!

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM9 -f c:\ti\uniflash_5.0.0\image\u-boot.img -d 3 -o 280000 -i 0
    Executing the following command:
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -f c:\ti\uniflash_5.0.0\image\u-boot.img -d 3 -o 280000 -i 0

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Flashing Flash Writer to RBL..

    Transferring File of size 807504 bytes
    File Transfer complete!

    C:\ti\uniflash_5.0.0>

    ------------------------------------------------------------------------------------------------------------------

    Regards,

    kyungtae

  • Kyungtae,

    Could you please double-check a couple of things for us:

    1) SW3 dip switch: SW3.1 should be 0 (OFF) on your board, in order to select OSPI flash (instead of the Hyperflash).

    2) Also, you need to be using a new version of UNIFLASH - ver 5.1.  Please ensure you downloaded the latest version from here, if you haven't already done so:

    http://www.ti.com/tool/download/UNIFLASH

    Then, you will need to use the FlashWriter image out of the 'processors/FlashWriter/j721e_evm' folder.  NOTE: this FlashWriter is supported from the Cortex-R5 core (not the Cortex-A core).  So, this will be somewhat different than for the AM65x.

    Another flashing option: Flash OSPI from U-boot (first do SD card boot with PSDKLA images, then flash OSPI, then change boot mode and reboot):

    To me, this is much simpler.  Just follow similar directions as in the U-boot source code readme for am65x at: ti-u-boot/board/ti/am65x/README .

    This set of directions works (with files in 'boot' partition of SD card; note, you can also do a similar set of commands from a NFS):

    1) Load images up on SD card (for normal U-boot/Linux boot) and boot with the SW8 and SW9 dip switches set appropriately for SD card boot.

    2) Stop U-boot on the Cortex-A core and go through the following command sequence:

    => sf probe
    SF: Detected mt35xu512aba with page size 256 Bytes, erase size 128 KiB, total 64 MiB

    => echo $loadaddr
    0x80080000

    => fatload mmc 1 ${loadaddr} tiboot3.bin
    200152 bytes read in 11 ms (17.4 MiB/s)

    => sf update $loadaddr 0x0 $filesize
    device 0 offset 0x0, size 0x30dd8
    200152 bytes written, 0 bytes skipped in 0.216s, speed 935870 B/s

    => fatload mmc 1 ${loadaddr} tispl.bin
    544428 bytes read in 28 ms (18.5 MiB/s)

    => sf update $loadaddr 0x80000 $filesize
    device 0 offset 0x80000, size 0x84eac
    544428 bytes written, 0 bytes skipped in 0.737s, speed 753370 B/s

    => fatload mmc 1 ${loadaddr} u-boot.img
    876248 bytes read in 41 ms (20.4 MiB/s)

    => sf update $loadaddr 0x280000 $filesize
    device 0 offset 0x280000, size 0xd5ed8
    876248 bytes written, 0 bytes skipped in 0.885s, speed 1010448 B/s

    => fatload mmc 1 ${loadaddr} sysfw.itb
    267594 bytes read in 16 ms (15.9 MiB/s)

    => sf update $loadaddr 0x6C0000 $filesize
    device 0 offset 0x6c0000, size 0x4154a
    267594 bytes written, 0 bytes skipped in 0.339s, speed 801217 B/s

    3) Now, you can power-down the EVM, then change the SW8 & SW9 dip switches for OSPI boot mode, and then power back on and boot to the U-boot prompt (and then you can do whatever else you want from there -- boot to filesystem on eMMC or SD card, etc.).

    Regards,

    Jonathan

  • Hi Jonathan

    1. Uniflash download does not seem to work properly.
    2. The OSPI download method, which is mentioned as another method, is normally downloaded and booted. This confirmed OSPI booting, and there was no problem with boot configuration or OSPI boot.

    But I want to download via UART, JTAG, USB without using mmc.
    As you mentioned earlier, JTAG and USB will be available later.
    I hope you can let me know if you have any problems with Uniflash download.

    Could you please double-check a couple of things for us:

    1) SW3 dip switch: SW3.1 should be 0 (OFF) on your board, in order to select OSPI flash (instead of the Hyperflash).

    --> yes, SW3.1 is 0 (OFF) --> I think it is set normally. The reason is to boot in the second way you mentioned.

    2) Also, you need to be using a new version of UNIFLASH - ver 5.1.  Please ensure you downloaded the latest version from here, if you haven't already done so:

    --> I was using uniflash 5.0.0. Even if you install 5.1.0 that you recommend, you won't be able to boot after OSPI download.

    I have a question. You have mentioned this.

    --> Then, you will need to use the FlashWriter image out of the 'processors / FlashWriter / j721e_evm' folder
    There are only 2 files in this folder (sysfw.bin and uart_j721e_evm_flash_programmer_release.xer5f).
    I think tiboot3.bin, tispl.bin, u-boot.img and sysfw.itb files are required for booting.
    I think I'm not using the uniflash tool properly.
    OSPI deletion is also not working properly.


    C:\ti\uniflash_5.1.0>dslite.bat --mode processors -c COM9 -e 10000 -d 3 -o 0
    Executing the following command:
    > C:\ti\uniflash_5.1.0\processors\ProcessorSDKSerialFlash.exe -c COM9 -e 10000 -d 3 -o 0

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.1.0.0
    ----------------------------------------------------------------------------
    Erasing Flash....

    Transferring Header information..
    NAK: Transmit of header Failed

    C:\ti\uniflash_5.1.0>

    Regards,

    kyungtae

  • Hi kyungtae,

    Can you follow below steps and check if you can flash the OSPI using Uniflash

    Board Setup for Flashing OSPI:
    ---------------------------------------------
    - Configure SW3 on CP board for below values
    1-OFF, 2-ON, 3-ON, 4-ON, 5-OFF, 6-OFF, 7-ON, 8-OFF, 9-ON, 10-OFF
    - Configure Boot switches to 'No Boot' mode
    SW8: 1-ON, 2-OFF, 3-OFF, 4-OFF, 5-ON, 6-OFF, 7-OFF, 8-OFF
    SW9: 1-OFF, 2-ON, 3-ON, 4-ON, 5-OFF, 6-OFF, 7-OFF, 8-OFF
    - Connect micro USB cable to XDS110 JTAG port (J3) and host PC
    -- Use JTAG MIPI port (J16) to connect external emulator instead of onboard XDS110
    - Connect micro USB cable to MCU UART port (J43) and host PC
    -- Confgure serial console application on host PC to use MCU UART port with '115200 8N1' configuration

    Procedure for Flashing OSPI:
    ------------------------------
    - Open CCS and Launch target config file for TDA4M which should connect to R5 core on successful Launch script execution.

      -- Make sure target configuration is setup to load system firmware
    - Load the flash writer binary uart_j721e_evm_flash_programmer_release.xer5f to R5 core and run
    -- Flash programmer is available as part of Uniflash at - uniflash_5.1.0\processors\FlashWriter\j721e_evm
    - Make sure the character 'C' is getting displayed on the serial console. Make a note of the COM port number.
    - Close all the serial console applications on host PC, disconnect and reconnect micro USB cable connected to MCU UART port (J43).
    -- Make sure flash programmer on CCS keeps running
    - Go to Uniflash root folder and run the below command to flash the images to OSPI flash
    dslite.bat --mode processors -c <COM Port#> -f <Image File> -d 3 -o <offset>
    -- COM port#: COM port number on which TDA4M EVM MCU UART serial port is connected
    -- Image File: Image file name with full path.
    -- offset: Offset at which image needs to be flashed.

    - Pratap.

  • Kyungtae,

    Also, just before you follow Pratap's instructions in the previous post, please be sure to update your CCS v9 setup using the instructions in the "CCS Setup" section of the "Processor SDK RTOS Automotive User Guide" that comes with the docs for the PSDKRA 6.0 (RTOS) release.

    It is important to have the updated emulation packs, CSP, GEL files, and updated target configuration for your J7 EVM before continuing.

    Regards,

    Jonathan

  • Hi! Pratap, Jonathan

    I looked at the "Processor SDK RTOS Automotive User Guide" and connected the emulator to test it.
    Procedure for Flashing OSPI:
    ------------------------------
    - Open CCS and Launch target config file for TDA4M which should connect to R5 core on successful Launch script execution.
    --> There was a problem here.
    test connection was work. so, I use "js:> load (" C: //ti//launch.js ");" Executed.
    I use "js:> load (" C: //ti//launch.js ");" Executed.
    js:> load("C://ti//launch.js");
    Connecting to DMSC_Cortex_M3_0!
    Loading DMSC Firmware ... C:\ti\uniflash_5.1.0\processors\FlashWriter\j721e_evm\ti-sci-firmware-j721e-gp.bin
    DMSC Firmware Load Done...
    DMSC Firmware run starting now...
    Connecting to MCU Cortex_R5_0!
    Running the board configuration initialization from R5!
    Stop here.
    So I put log and it stops.

    print("Running the board configuration initialization from R5!");
        // Load the board configuration init file.
        dsMCU1_0.memory.loadProgram(ccs_init_elf_file);
     print("Running the board configuration initialization from R5!1");
        // Halt the R5F and re-run.
        dsMCU1_0.target.halt();
     print("Running the board configuration initialization from R5!2");
        // Run Synchronously for the executable to finish
        dsMCU1_0.target.run(); <----------------------------------------------------------here!!!
     print("Running the board configuration initialization from R5!3");

    The MCU R5 core does not seem to run normally. Can you tell me what the problem is?

    Regards,

    kyungtae

  • Hi Kyungtae,

    There may also be one extra step that you need to do in CCS, before you run the 'launch.js' script.

    Assuming you have already modified the paths in launch.js for the "pdkPath", "ccs_init_elf_file", and "sysfw_bin" to make sure the script can find the locations of the required ELF and BIN files to be loaded ("sciclient_ccs_init_mcu1_0_release.xer5f", and "ti-sci-firmware-j721e-gp.bin"), then it is also looking for the GEL scripts to have already been loaded for the DMSC before the script was launched.

    To load the GEL files in CCS beforehand, launch the debug configuration, but don't immediately run the 'launch.js' script.  First, scroll down the list of CPUs and click on the DMSC, named "DMSC_Cortex_M3_0".  Open the GEL files window using the 'Tools -> GEL Files' menu option in CCS.  Right-click in the blank GEL files window that opens and use the "Load GEL..." option to load the top-level GEL file for J721E, called "J721E_EVM.gel".  This file should be in your CCS dir tree under: <CCS_INSTALL_PATH>\ccs\ccs_base\emulation\boards\dra8x\gel, if you already loaded the new emu packs and GEL files recommended earlier.

    This will load all the other GEL files required for use on the DMSC Cortex-M3 as well.

    After this, you can go back to the Scripting Console and then run the 'launch.js' script.  After everything has been run, you should end up with these last couple of lines printed out in the main Console window:

    DMSC_Cortex_M3_0: GEL Output: --->>> Frequency Change request handshake is completed... <<<---
    DMSC_Cortex_M3_0: GEL Output: --->>> LPDDR4 4266MHz Initialization is DONE! <<<---

    And, you should have messages similar to this printed out in the 'Scripting Console' window:

    Connecting to DMSC_Cortex_M3_0!
    Loading DMSC Firmware ... C:\ti\j721e\ti-sci-firmware-j721e-gp.bin
    DMSC Firmware Load Done...
    DMSC Firmware run starting now...
    Connecting to MCU Cortex_R5_0!
    Running the board configuration initialization from R5!
    Running the DDR configuration... Wait till it completes!
    Okay you are good to go.. Happy Debugging!

    Now, you should be able to proceed with the rest of the Uniflash flashing instructions, as given earlier.

    Regards,

    Jonathan

  • Hi~, Jonathan,Pratap

    You have completed the OSPI uniflash download in the same way as you indicated. Thank you.
    The problem with the emulator is that an error occurred because of the missing GEL file settings reported by Jonathan.
    In the way Pratap told me, Uniflash completed the download. In particular, the capital letter C was not coming out.

    Thank you.
    Regards,
    kyungtae