Last night I was working on an automation routine for the green version and saw all the remoteproc stuff was in place, so I decided to move towards the remoteproc method of interacting with the PRU.
I was able to get the TI PRU Sample code compiled and the CGT clpru installed and run it the firmware build. However I need to reboot the board everytime for it to load the firmware file. I need to be able to make code changes, compile, and reload like I did with uio_pruss.
The searching I have read states that a simple removal and loading of the remoteproc module does the loading process as well from /lib/firmware.
I am receiving the message FATAL module is in use.
I tried unloading other “in use” other modules but still got the same message.
Any ideas why or what locks a module from being reloaded or removed?
The above commands remove the remote proc kernel module, and then reinserts it.
Your revised firmware should be loaded after executing the modprobe command.
You will need root access or sudo prefix to the above commands.
What distribution are you using?
Interesting. On more recent distributions I did not have to use the -f option.
In some earlier TI documentation, rmmod -f was the recommended method to remote the PRU RemoteProc module.
But there have been changes since then and the PRU RemoteProc framework has continued to mature.
Please see the documentation in this project for another method to control RemoteProc from sysfs in user-space:
Follow the link to the github repository. The documentation is in the doc directory. Look for the PDF file.
Also there is a link to ZeekHuge’s github repository where you can find more information.