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.

Compiler/AM5728: DSP1 IPC MessageQ example Crashes

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI C/C++ Compiler

Linux SDK : ti-processor-sdk-linux-am57xx-evm-06.03.00.106
Processor SDK : processor_sdk_rtos_am57xx_6_03_00_106


I am trying to run the example ipc_3_50_04_08/examples/DRA7XX_linux_elf/ex02_messageq, on a phytec AM57xx evaluation board.
whenever we load the DSP1 via remoteproc like this

echo 40800000.dsp > /sys/bus/platform/drivers/omap-rproc/unbind
ln -sf /usr/bin/server_dsp1.xe66 /lib/firmware/dra7-dsp1-fw.xe66
echo 40800000.dsp > /sys/bus/platform/drivers/omap-rproc/bind


The DSP crashes with the following error message:

root@am57xx-phycore-kit:~/eddy/ipc_3_50_04_08_example cat /sys/kernel/debug/remoteproc/remoteproc0/trace0
[      0.000] Watchdog enabled: TimerBase = 0x48086000 Freq = 19200000
[      0.000] Watchdog_restore registered as a resume callback
[      0.000] 17 Resource entries at 0x95000000
[      0.000] [t=0x00053e0f] xdc.runtime.Main: --> main:
[      0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
[      0.000] [t=0x000a3f44] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
[      0.000] [t=0x000b15f2] ti.sysbios.knl.Semaphore: ERROR: line 202: assertion failure: A_badContext: bad calling context. Must be called from a Task.
[      0.000] ti.sysbios.knl.Semaphore: line 202: assertion failure: A_badContext: bad calling context. Must be called from a Task.
[      0.000] xdc.runtime.Error.raise: terminating execution


I am not sure where to start debugging this, Any inputs would be helpful.

  • This error usually comes when there is some setup issue with IPC memory (CMA) address. During startup in IPC, there is a call that will result in Semaphore_pend being called if it is unable to get a buffer from the vring. But at startup, all buffers should be available and it shouldn’t have to go into the Semaphore_pend. The IPC examples use the default resource table and expect the default memory map of SDK.

    Can you check that your CMA pool is present for DSP at the address that the IPC example is expecting for dsp1 @ 0x99000000?

    Please also confirm that you are reporting the issue occurs only after the unbind and bind, or it is present even from startup?