I’d like to use the M4F on the PB2, sorta like one of the PRUs. No OS. Hopefully i can simply create a .c file and compile on the PB2. Then move it to /lib/firmware and echo ‘start’ to /sys/class/remoteproc0/state
Are there any examples of how to program these to do something such toggle an LED?
Anything like pru-software-support-package/pru-software-support-package - The PRU Software Support Package for the M4F?
Well, for baremetal stuff on m4f, you can look at TI docs for nortos examples: https://dev.ti.com/tirex/explore/node?isTheia=false&node=A__AceF5qvEeKPYS37KLv9E-Q__AM62-ACADEMY__uiYMDcq__LATEST.
But they do assume you are using CCS. It is possible to not need CCS, but well, you would need to be familiar enough with openamp and linker configs.
Yes I read the trm. My guess is as it’s a second processor it needs less bringing up than many. Think much of my m0 code was just bringing up the cpu …
OK found my mspm0 code, its different from the embedded M4, and there was a TI library for my device that I used. The code was still in development, until other things in life took over - so IIRC it is non functional. Still it will show how you have to think about how you bring up the CPU in bare metal - so there is a lot of configuring clocks etc
pwm_led_driver.c (5.5 KB)
Thanks for directing me to that. I’ve now got the .out file generated in CCS.
However, when i copy this to the PB2 and try and start the M4F, I get a
boot failed: -22
debian@BeagleBone:~$ sudo cp hello_world_am62x-sk_m4fss0-0_nortos_ti-arm-clang.out /lib/firmware/am62-mcu-m4f0_0-fw
debian@BeagleBone:~$ cat /sys/class/remoteproc/remoteproc0/firmware
am62-mcu-m4f0_0-fw
debian@BeagleBone:~$ echo 'stop' | sudo tee /sys/class/remoteproc/remoteproc0/state
stop
tee: /sys/class/remoteproc/remoteproc0/state: Invalid argument
debian@BeagleBone:~$ echo 'start' | sudo tee /sys/class/remoteproc/remoteproc0/state
start
tee: /sys/class/remoteproc/remoteproc0/state: Invalid argument
debian@BeagleBone:~$ sudo dmesg | tail -n 3
[ 169.436900] remoteproc remoteproc0: powering up 5000000.m4fss
[ 169.438527] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 302860
[ 169.439290] remoteproc remoteproc0: Boot failed: -22
debian@BeagleBone:~$