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.

TMDXIDK5718: How to start DSP program from A15

Part Number: TMDXIDK5718

Hi,

Some backgrounds to what we want to achieve.

1. We are developing two programs, one will be allocated to A15 and one will be allocated to DSP core.

2. A15 is running on Linux, and the DSP is running on TI RTOS. Both programs will interact with each other using IPC.

3. We want to start both programs running automatically upon boot-up.

What we achieve so far:

1. We are able to run the program in Linux (A15 core) upon boot-up by using systemd. Upon boot-up, the service will call a script (.sh) in my home directory, and in turn call the application. It has been running well.

2. We are able to run the DSP application using CCS in the emulation environment.

However, we can't seem to find information on how to run the DSP program from boot. In fact, we don't understand how the DSP binaries can be loaded and start running (not using emulator).

Can you point us a way as to:

1. Where should we put the DSP binaries?

2. How to load the DSP binaries to DSP core?

3. How to start the DSP application running upon boot-up.

Thank you so much. Appreciate it.

CB

  • Hi,

    We have many training materials covering this topic. When A15 is running Linux, you need IPC to start and run DSP binary.

    Could you go thru them first?

    https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Foundational_Components_IPC.html#ipc-for-am57xx

    https://training.ti.com/intro-to-ipc-for-keystone-and-sitara?context=519268-1138818-1004521

    Regards,
    Stanley

  • Hi Stanley,

    Thank you so much for your references. We will go through it first.

    CB

  • Hi Stanley,

    First of all, I would like to thank you for your links. I read through them and it helps me a lot.

    I followed the instructions in the links. However, the DSP application did not seem to be running. Below are the steps:

    I moved the DSP application (AM5716Nav.out) to the directory /lib/firmware/ and created a symbolic link. See below:

    root@am57xx-evm:/lib/firmware# ls -l
    -rw-r--r--    1 root     root          2046 Apr 19 02:20 LICENCE.iwlwifi_firmware
    lrwxrwxrwx    1 root     root            49 Apr 19 02:20 am57xx-pru1_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_0.out
    lrwxrwxrwx    1 root     root            49 Apr 19 02:20 am57xx-pru1_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_1.out
    lrwxrwxrwx    1 root     root            49 Apr 19 02:20 am57xx-pru2_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_0.out
    lrwxrwxrwx    1 root     root            49 Apr 19 02:20 am57xx-pru2_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_1.out
    lrwxrwxrwx    1 root     root            24 Apr 19 02:23 dra7-dsp1-fw.xe66 -> /home/root/AM5716Nav.out
    -rw-r--r--    1 root     root      20482288 Apr 19 02:20 dra7-dsp1-fw.xe66.opencl-monitor
    -rw-r--r--    1 root     root       8953696 Apr 19 02:20 dra7-dsp1-fw.xe66.openvx
    lrwxrwxrwx    1 root     root            46 Apr 19 02:20 dra7-dsp2-fw.xe66 -> /lib/firmware/dra7-dsp2-fw.xe66.opencl-monitor
    -rw-r--r--    1 root     root      20482288 Apr 19 02:20 dra7-dsp2-fw.xe66.opencl-monitor
    -rw-r--r--    1 root     root       8953696 Apr 19 02:20 dra7-dsp2-fw.xe66.openvx
    lrwxrwxrwx    1 root     root            46 Apr 19 02:20 dra7-ipu1-fw.xem4 -> /lib/firmware/dra7-ipu1-fw.xem4.opencl-monitor
    -rw-r--r--    1 root     root       6887428 Apr 19 02:20 dra7-ipu1-fw.xem4.opencl-monitor
    lrwxrwxrwx    1 root     root            40 Apr 19 02:20 dra7-ipu2-fw.xem4 -> /lib/firmware/dra7-ipu2-fw.xem4.ipumm-fw
    -rw-r--r--    1 root     root       3747220 Apr 19 02:20 dra7-ipu2-fw.xem4.ipumm-fw
    -rw-r--r--    1 root     root        581349 Apr 19 02:20 dra7-ipu2-fw.xem4.map

    Next, I reload the DSP1 as follow:

    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > unbind                                                              
    [ 3446.482125] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    [ 3446.488022] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    [ 3446.506668] remoteproc remoteproc2: stopped remote processor 40800000.dsp
    [ 3446.516627] remoteproc remoteproc2: releasing 40800000.dsp
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > bind
    [ 3450.792039] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
    [ 3450.800236] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
    [ 3450.810114] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
    [ 3450.820938] remoteproc remoteproc2: 40800000.dsp is available
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# [ 3451.058893] remoteproc remoteproc2: powering up 40800000.dsp
    [ 3451.064671] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4842680
    [ 3451.074271] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    [ 3451.080170] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0

    The app in DSP did not seem to be running after that, even after reboot. I suppose when reboot, the DSP will run its application after Linux Kernel started. For your information, I am testing out on TMDXIDK5718. The DSP application just blinks the on-board LED periodically. The LED is not blinking thus I assume the binary is not executed.

    In the instructions provided in the link, it is grouped until the topic of IPC. Is IPC codes must be included the DSP application in order for it to work properly? I have not included any IPC codes yet. To keep things simple, just blink a LED.

    Thanks.

    CB

  • Hi CB,

    From the kernel dmesg logs it looks like dsp image is loaded and powered up successfully.

    Here are the typical areas you can check if the binary was working in standalone CCS loading but not in Linux loading:

    1. Memory map of the DSP binary to make sure there is no conflicts with Linux side memory map

    2. Resources (eg: I2C, GPIO, Timers etc) used from your DSP binary are not conflicting with those from Linux.

    When you see that LED is not blinking, can you attach to DSP via CCS and step through your code to see the status of code execution and LED programming.

    Please check the status and provide details on what you see on the CCS window.

    Thanks & Regards,

    Sunita.