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.

[FAQ] TDA4VM: How can I load remote core firmware from OSPI

Part Number: TDA4VM

I want to load a remote core firmware from OSPI. I see that in the SDK 7.0 the firmwares are picked up from the SD card by default.

I have also seen the FAQ - https://e2e.ti.com/support/processors/f/791/t/944099 to modify the R5F SPL to load firmware from file system in eMMC. Now I want to load the same from OSPI.

I have also seen - https://e2e.ti.com/support/processors/f/791/t/915474 and know that there are multiple ways to load the firmware i.e. from:

  1. R5 SPL
  2. u-boot
  3. Kernel

Any of the above works for my use-case.

  • The R5F core loading is based on the below table:

    Core loading table:

    Core By default loaded by
    R5FSS0_CORE0 / MCU R5F0_0 / MCU1_0 R5 SPL
    R5FSS1_CORE0 / MAIN R5F0_0 / MCU2_0 R5 SPL
    R5FSS0_CORE1 / MCU R5F0_1 / MCU1_1 A72 u-boot
    R5FSS1_CORE1 / MAIN R5F0_1 / MCU2_1 A72 u-boot

    Based on the above table, if you are looking to load the CORE0 for the R5FSS then it will be loaded by R5 SPL and if it is CORE1 then it will be loaded by A72 u-boot.

    But with the SDK7.0, R5 SPL doesn't support loading the R5F firmware from OSPI.

    But we can load the firmware from u-boot. For this we need to do 2 things:

    1. Disable loading of the CORE0 firmware from R5 SPL (if it is mcu1_0 or mcu2_0)

    For this the only thing that is needed is to rename the firmware in the root file system.

    The R5 SPL looks for the matching string and hence if there is no firmware with the default name (for ex - j7-mcu-r5f0_0-fw for mcu1_0 and j7-main-r5f0_0-fw for mcu2_0) then it will just skip loading that core.

    2. Load the firmware from A72 u-boot

    First step is always loading the binary into RAM, and that’s where the commands would vary depending on the media, whether it is tftp or nfs or mmc or sf or something else. 

    For OSPI we use sf to commands to bring the firmware from OSPI flash to RAM. And then we load the firmware from the RAM on to the core using remote proc.(see http://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/latest/exports/docs/linux/Foundational_Components_U-Boot.html#remoteproc )

    sf probe 0
    sf read <address_in_ram> <offset_in_flash> <length_in_bytes_to_be_copied>
     
    rproc init
    rproc load <core_id> 0x90000000 0x${length_in_bytes_to_be_copied}
    rproc start <core_id>

    NOTE As ATCM is disabled in R5 SPL hence the default R5F firmwares for MCU1_0 do not use ATCM. But in u-boot we need to boot from ATCM (as it is enabled in u-boot) hence in case you want to load the MCU1_0 and MCU2_0 firmwares from u-boot memory map for the mcu1_0 and mcu2_0 will need to change a little to use ATCM (see https://e2e.ti.com/support/processors/f/791/t/915474 )

    Once you are able to manually load using the u-boot commands as mentioned then one can easily automate these steps from using u-boot environment variables.

    Regards,

    Karan

  • This FAQ is for SDK7.0 and before. We will update this for SDK7.1 and later SDKs.