Hi TI,
I want to load a custom FreeRTOS application on MCU1_0 alongside with Linux. I am using PSDK v08.02 for both Linux and RTOS and I am using the standard TI dev board. I was following this thread (https://e2e.ti.com/support/processors-group/processors/f/processors-forum/915474/faq-tda4vm-different-ways-to-load-an-rtos-or-baremetal-application-along-with-linux) to test out loading via R5 SPL and loading via U-Boot.
Since loading via R5 SPL has the following restrictions:
- TCMA is disabled
- 1 MB SRAM loacted at MCU Interconnect (starting at address 0x41C0 0000) can not be used
I wanted to switch to loading via U-Boot. My assumption is, that at least 1 MB SRAM (0x41C0 0000) is not reserved anymore (https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/psdk_rtos/docs/user_guide/developer_notes_mcu1_0_sysfw.html , section 8.3.2.3).
Q1: Is this assumption correct? What about TCMA? Can it be used for custom app?
The before mentioned FAQ, mentions that "Skipping MCU1_0 load from R5F SPL and then loading from u-boot is not possible". This is related to the architectural change from SDK v07.01, where MCU1_0 is now a part of the boot process.
Q2: I am still not sure how to interpret this sentence. Is it generally not possible to load a custom application to MCU1_0 via U-Boot from SDK v07.01 and onwards?
Assuming, that it is possible to load MCU1_0 app via U-Boot, "some" MCU1_0 app still needs to be loaded via R5 SPL, to meet the boot requirements and being able to boot to U-Boot. I placed my custom app in an NFS directory at /lib/firmware/j7-mcu-r5f0_0-fw and booted to U-Boot. To load the app, I did all the changes provided by vision apps user guide to load apps via NFS boot (https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/08_02_00_05/exports/docs/vision_apps/docs/user_guide/RUN_INSTRUCTIONS.html#run_steps_linux_nfs). I additionally modified rproc_fw_binaries to
rproc_fw_binaries=0 /lib/firmware/j7-mcu-r5f0_0-fw
so that only MCU1_0 gets loaded and started. The image I want to load is identical to the one loaded by R5 SPL. This is the log I get from U-Boot doing the steps I mentioned before:
link up on port 1, speed 1000, full duplex BOOTP broadcast 1 DHCP client bound to address 172.16.1.158 (4 ms) link up on port 1, speed 1000, full duplex BOOTP broadcast 1 DHCP client bound to address 172.16.1.158 (3 ms) link up on port 1, speed 1000, full duplex Using ethernet@46000000 device File transfer via NFS from server 172.16.1.147; our IP address is 172.16.1.158 Filename '/home/felix/ti-processor-sdk-linux-j7-evm-08_00_00_08/targetNFS-test//lib/firmware/j7-mcu-r5f0_0-fw'. Load address: 0x82000000 Loading: ########################################### done Bytes transferred = 217356 (3510c hex) Invalid op: Trying to load/start on already running core 1
So it seems that MCU1_1 is already running. This can be explained, since MCU1_0 and MCU1_1 are started in lockstep mode. I am trying to avoid this error by manually stopping both MCU1_0 and MCU1_1 via following U-Boot commands:
=> rproc init => rproc stop 0 => rproc stop 1 Invalid op: Trying to stop secondary core in lockstep mode Operation Failed with error (-22) =>
After booting the board, I get the following output:
=> boot switch to partitions #0, OK mmc1 is current device SD/MMC found on device 1 0 bytes read in 0 ms Loaded env from uEnv.txt Importing environment from mmc1 ... link up on port 1, speed 1000, full duplex BOOTP broadcast 1 DHCP client bound to address 172.16.1.158 (4 ms) link up on port 1, speed 1000, full duplex BOOTP broadcast 1 DHCP client bound to address 172.16.1.158 (3 ms) Remote Processors are already initialized link up on port 1, speed 1000, full duplex Using ethernet@46000000 device File transfer via NFS from server 172.16.1.147; our IP address is 172.16.1.158 Filename '/home/felix/ti-processor-sdk-linux-j7-evm-08_00_00_08/targetNFS-test//lib/firmware/j7-mcu-r5f0_0-fw'. Load address: 0x82000000 Loading: ########################################### done Bytes transferred = 217356 (3510c hex) ti_sci_get_response: Message receive failed. ret = -110 Mbox send fail -110 ti-sci processor set_config failed: -110 ti_sci_get_response: Message receive failed. ret = -110 Mbox send fail -110 ti-sci processor release failed: -110 ti_sci_get_response: Message receive failed. ret = -110 Mbox send fail -110 ti-sci processor release failed: -110 Load Remote Processor 0 with data@addr=0x82000000 217356 bytes: Failed!
So somehow, the Sciserver is not correctly started.
Q3: Since the app I wanted to load via U-Boot is the same, which I previously loaded via R5 SPL, I do not understand why I get this error. Can you please explain this bevaviour?
Q4: Is starting MCU1_0 and MCU1_1 in split mode recommended? I found the following thread (https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1003532/tda4vm-tda4vm---enable-mcu_r5f-lockstep-or-split-using-u-boot) but the solution provided seems not very "official"?
Thanks for your help and best regards,
Felix