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.

PRU-CGT: Sample PRU code not booting.

Part Number: PRU-CGT
Other Parts Discussed in Thread: BEAGLEBOARD-X15

Hi 

I'm using Beagleboard-X15 to experiment the PRU feature. At staring i tried the sample code but it was not booting.

1. CCS Build

In Windows 10 Pro, I build the project "PRU_RPMsg_LED0" copied from ti linux sdk "ti-processor-sdk-linux-am57xx-evm-08_02_01_00" and include files from "pru-icss-6.0.1".

Then followed the section "Create & Build the PRU Project" and code builds successfully.  I made the main simple as below

void main(void)
{
    __halt();
}

The software details are

IDE: CCS v12.3.0.00005 

Compiler version: ti_cgt_pru_2.3.3

2. Loading in Remoteproc

I load the firmware("PRU_RPMsg_LED0.out") in path "/lib/firmware/pru" and ran using the below command

echo 'pru/PRU_RPMsg_LED0.out' > /sys/class/remoteproc/remoteproc1/firmware

echo 'start' > /sys/class/remoteproc/remoteproc1/state

But it shows the error 

ubuntu@beagleboard:~$ echo 'start' > /sys/class/remoteproc/remoteproc1/state

[   72.286275] remoteproc remoteproc1: Boot failed: -22

-bash: echo: write error: Invalid argument

The beagleboard-x15 kernel has remoteproc enabled and its version is "Linux  v4.19.94  SMP PREEMPT "

Let me know the suggestion.

  • Hi,

    Please ensure that you are loading the firmware to the correct remoteproc. AM57xx also has IPUs (Cortex-M Cores) and DSP processors.

    Please also check that the remoteproc is in stopped state first.

    cat  /sys/class/remoteproc/remoteproc1/name

    cat  /sys/class/remoteproc/remoteproc1/state

    regards

    Suman

  • Hi Suman

    Thanks for the response,

    Im loading the firmware to the correct remote processor as 'remoteproc1' for PRU1 core.

    it gives the error message when i try to stop. 

    root@am57xx-evm:/lib/firmware/pru# echo 'stop' > /sys/class/remoteproc/remoteproc1/state
    -sh: echo: write error: Invalid argument
    root@am57xx-evm:/lib/firmware/pru# cat /sys/class/remoteproc/remoteproc1/firmware
    pru/PRU_RPMsg_LED0.out
    root@am57xx-evm:/lib/firmware/pru# cat /sys/class/remoteproc/remoteproc1/state
    offline

    Let me know if I need to do any setting before loading the firmware.

  • Hi,

    root@am57xx-evm:/lib/firmware/pru# cat /sys/class/remoteproc/remoteproc1/state
    offline

    The processor is already in Stopped state as reflected by offline, so issuing a 'stop' will return a failure.

    Are you using 4.19 kernel or the latest 5.10 kernel?

    There are kernel dependent changes in the firmwares, so you cannot pick the latest firmware from PRU-ICSS 6.0.1 and use it with 4.19 kernel. 

    Please look through the Release Notes for compatibility information.

    https://git.ti.com/cgit/pru-software-support-package/pru-software-support-package/tree/Release_Notes.txt

    regards

    Suman