Hi champs
i went to the below site
i tried to do a search for like M4F and it did not find anything? very strange. I am trying to load the hello world into the M4 using Linux and not CCS? any help would be great.
Thanks
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.
Hi champs
i went to the below site
i tried to do a search for like M4F and it did not find anything? very strange. I am trying to load the hello world into the M4 using Linux and not CCS? any help would be great.
Thanks
Hi Moshen,
You can experiment to load M4 application from Linux in below steps:
1. Start with the LED blink example for M4. Build and run the project on M4 through CCS: mcu_plus_sdk_am64x_08_01_00_36__all\mcu_plus_sdk_am64x_08_01_00_36\examples\drivers\gpio\gpio_led_blink\am64x-evm\m4fss0-0_nortos\ti-arm-clang
If you haven't done already, please follow the MCU+ SDK getting started guide to setup the EVM and CCS.
2. Once you verify the LED blink example works fine through CCS, you can add IPC through syscfg tool so that the program can be loaded from Linux. Simply open example.syscfg of the CCS project and add IPC as below.
3. Rebuild the project and run this command below from the project debug folder to strip all symbols from the .out file:
C:\ti\ccs1100\ccs\tools\compiler\ti-cgt-armllvm_1.3.0.LTS\bin\tiarmstrip.exe -o=led_blink_m4.out gpio_led_blink_am64x-evm_m4fss0-0_nortos_ti-arm-clang.out
4. Copy the generated .out file from previous step to your Linux file system. Then set soft link /lib/firmware/am64-mcu-m4f0_0-fw to this .out file.
# assuming the .out file has already been copied to the EVM root@am64xx-evm:~# cp led_blink_m4.out /lib/firmware/pdk-ipc/ root@am64xx-evm:/lib/firmware# ln -sf /lib/firmware/pdk-ipc/led_blink_m4.out am64-mcu-m4f0_0-fw
5. Reboot your EVM and the LED blink program should be loaded to M4 and run from there. The program should run exactly the same as when loaded through CCS.
To observe the LED blink more easily, you could change the blink loop to infinite loop in C source file gpio_led_blink.c.
You can also use the following commands to load the program on the fly:
echo 'stop' > /sys/class/remoteproc/remoteproc0/state echo 'pdk-ipc/led_blink_m4.out' > /sys/class/remoteproc/remoteproc0/firmware echo 'start' > /sys/class/remoteproc/remoteproc0/state
Please note that in SDK 8.1 release, M4F is remoteproc0. You can verify that by:
root@am64xx-evm:/lib/firmware# head /sys/class/remoteproc/remoteproc*/name ==> /sys/class/remoteproc/remoteproc0/name <== 5000000.m4fss ==> /sys/class/remoteproc/remoteproc1/name <== 78000000.r5f
Please try this out and let me know if you have any questions.
Regards,
Jianzhong
Hi Moshen,
Please note that in order to be able to launch M4 application from Linux, you'll need to use the latest Linux SDK (8.1): https://www.ti.com/tool/PROCESSOR-SDK-AM64X.
Please refer to the release notes regarding the remoteproc driver support for loading M4F core.
Regards,
Jianzhong
Hello Moshen,
I've realized that it is unnecessary to remove UART and replace the linker command file in my original response. I edited the post and removed those two steps. I also added a procedure to load the M4F program on the fly through remoteproc.
Regards,
Jianzhong
Hi Jian
thanks for the info, as part of sdk 8.1 we have teh following image for M4 am64-mcu-m4f0_0-fw can you let me know what that does please?
I will try to build the LED blink and run it hopefully it should work. I will let you know.
one more for you my customer does not want to use CCS to setup the syscfg file. Can you point how to do this without CCS please?
Thanks
we have teh following image for M4 am64-mcu-m4f0_0-fw can you let me know what that does please?
It is a RPMessage echo example. Please refer to the MCU+ SDK documentation: https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/08_01_00_36/exports/docs/api_guide_am64x/EXAMPLES_DRIVERS_IPC_RPMESSAGE_LINUX_ECHO.html.
Can you point how to do this without CCS please?
Syscfg file can be opened from command line. Please refer to the MCU+ SDK documentation: https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/latest/exports/docs/api_guide_am64x/SYSCONFIG_INTRO_PAGE.html.
ok i think i got it to work. The only thing which you don't need to do is remove the symbols. You can just use the .out that gets created. remoteprog knows how to handle the symbols. Also you can use the sysconf stand alone to change the mode from non IPC to IPC. That way no need for ccs.
Thanks for the help
Thanks for confirmation. The benefit of stripping the symbols from the .out file is to reduce the file size.
HI
thanks for the answers, make sense. Its just the search does not work for the MCU SDK i enter a different e2e.
Thanks
No worries. Your question helps us understand our documentation gaps.
Thanks and best regards,
Jianzhong