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.

Linux: How to load and run DSP application from Linux using remoteproc?

Other Parts Discussed in Thread: OMAP-L138

Tool/software: Linux

Hi there, I have installed SDK 4.0.0.4 for OMAP L138 device and am able to load and run some default rproc-dsp-fw application but would like to load and run LED flashing non OS application on DSP core.

Is this possible? 

After booting Linux, I did the following steps;

* echo 'stop' > /sys/class/remoteproc/remoteproc0/state 

* echo 'start' > /sys/class/remoteproc/remoteproc0/state 

Got following error: 

unable to find resource table 

remoteproc: boot failed -22

Please, let me know if using remoteproc it's possible to boot any custom DSP application from Linux. Thanks.

  • Error Log:
    root@omapl138-lcdk:~# echo 'stop' > /sys/class/remoteproc/remoteproc0/state
    remoteproc remoteproc0: stopped remote processor dsp
    root@omapl138-lcdk:~# echo 'NewMotion_LED.out' > /sys/class/remoteproc/remotepro
    c0/firmware
    root@omapl138-lcdk:~# echo 'start' > /sys/class/remoteproc/remoteproc0/state
    remoteproc remoteproc0: powering up dsp
    remoteproc remoteproc0: Booting fw image NewMotion_LED.out, size 65460
    remoteproc remoteproc0: Failed to find resource table
    remoteproc remoteproc0: Boot failed: -22
    -sh: echo: write error: Invalid argument
    root@omapl138-lcdk:~#
  • We're looking into this. Feedback will be posted here.

    Best Regards,
    Yordan
  • Mitesh,

    Remoteproc uses default fw file name to load the DSP. For OMAP-L138, it is rproc-dsp-fw in /lib/firmware. It doesn't take dynamic file name to load the DSP. So, rename whatever DSP image you want to run to rproc-dsp-fw.

    To trigger the reload, you need to bind / unbind the device with the following commands:

    root@omapl138-lcdk:~# cd /sys/bus/platform/drivers/davinci-rproc/
    root@omapl138-lcdk:/sys/bus/platform/drivers/davinci-rproc# ls
    bind module unbind
    davinci-rproc.0 uevent

    root@omapl138-lcdk:/sys/bus/platform/drivers/davinci-rproc# echo davinci-rproc.0 > unbind
    remoteproc remoteproc0: stopped remote processor dsp
    remoteproc remoteproc0: releasing dsp

    root@omapl138-lcdk:/sys/bus/platform/drivers/davinci-rproc# echo davinci-rproc.0 > bind
    davinci-rproc davinci-rproc.0: assigned reserved memory node dsp_cma@c3000000
    remoteproc remoteproc0: dsp is available
    root@omapl138-lcdk:/sys/bus/platform/drivers/davinci-rproc# remoteproc remoteproc0: powering up dsp
    remoteproc remoteproc0: Booting fw image rproc-dsp-fw, size 4216832
    virtio_rpmsg_bus virtio0: rpmsg host is online
    virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
    remoteproc remoteproc0: registered virtio0 (type 7)
    remoteproc remoteproc0: remote processor dsp is now up

    Rex
  • Hello again,

    I tried the steps you listed and still got the same error:
    root@omapl138-lcdk:/sys/bus/platform/drivers/davinci-rproc# echo davinci-rproc.0
    > bind
    davinci-rproc davinci-rproc.0: assigned reserved memory node dsp_cma@c3000000
    remoteproc remoteproc0: dsp is available
    remoteproc remoteproc0: powering up dsp
    root@omapl138-lcdk:/sys/bus/platform/drivers/davinci-rproc# remoteproc remotepro
    c0: Booting fw image rproc-dsp-fw, size 65460
    remoteproc remoteproc0: Failed to find resource table

    root@omapl138-lcdk:/sys/bus/platform/drivers/davinci-rproc#

    I did rename the LED_Flash.out to rproc-dsp-fw , I hope this is right?
  • Did you build the LED_Flash.out or it comes in RTOS package? It sounds to me is the image wan't built with resource table. Have you tried to run the binary on DSP using CCS?
  • Hi Rex,
    The design is written and build in CCS. This is without SYS/BIOS OS. Just using Timer Interrupt to flash LED. I have not used any resource table. But when I load the design from CCS using JTAG. It does work.
  • Mitesh,

    I will need you to submit another thread regarding the resource table in RTOS image which I am on Linux side and not familiar with it. I know the remoteproc will check the resource table built in DSP image and redo the configuration.

    Rex
  • Okay, Rex. will do that. But in general. any DSP application can be loaded and run using the remoteproc provided there is some resource table?

    I will post this in RTOS forum. Thanks.
  • Mitesh,

    Yes, it should be. My understanding of the resource table is that it will be used by remoteproc to reprogram the MMU. As far as how resource table gets building the DSP image and what needs to be included in resource table, I am not familiar with. I'll make sure your new post gets to the right person.

    Rex
  • Great. Thanks a lot Rex.
    Cheers.