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.

AM5728: PRU firmware load from app

Part Number: AM5728

Hello,

I'm trying to find a way to load and start the PRU cores from C/C++ code instead of Linux. Purpose of the software is to load the firmware into the memory of the PRUs, start/stop the application, monitor the current status of the PRUs and read data from a PRU. At the moment the PRU application is started with a shell script using remoteproc and the data exchange using shared memory.

I already found prussdrv in ti-processor-sdk-linux-rt-am57xx-evm-06.00.00.07/board-support/extra-drivers/uio-module-drv-2.2.1.0+gitAUTOINC+bda9260f22/test/prussdrv_test. Theoretically all requirements would be covered with prussdrv, but it has been replaced by remoteproc years ago?  Are there any reason to not use it for this application?

 

https://www.kernel.org/doc/Documentation/remoteproc.txt  shows API examples for remoteproc, but I can't find a way to get a valid rproc handle / device tree phandle for the PRUs. Are there any examples for using remoteproc from C/C++ to start the PRUs?

Thanks a lot!

Kind regards,

Patrick Oetken

  • Hello Patrick,

    When you say C/C++, do you mean you have a Linux userspace application that needs to load and start the PRU cores? Or are you talking about something else?

    If you are trying to initialize PRU from a userspace application:

    In your RT Linux Processor SDK 6.0, go to example-applications/pru-icss-5.4.0/examples/am335x/PRU_ADC_onChip

    pru_adc_userspace.c has an example of using the sysfs interface to load and initialize PRU using RemoteProc.

    Regards,

    Nick