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.

CCS/AM5716: ARM15 load DSP1 but DSP doesn't run

Part Number: AM5716

Tool/software: Code Composer Studio

Hi,

I have a custom board with a AM5716. Linux runs on ARM15.

In the directory /lib/firmware there is a precompiled file dra7-dsp1-fw.xe66 with the IPC ping example and it works as expected.

During Linux boot I have the following log:

[    0.438135] iommu: Adding device 40800000.dsp to group 0
[   10.524042] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
         Starting TI MultiCore Tools Daemon...
[   10.631312] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
[   10.725816] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
[   10.854459] remoteproc remoteproc2: 40800000.dsp is available
[   11.449362] remoteproc remoteproc2: powering up 40800000.dsp
[   11.509401] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4298240
[   12.556180] remoteproc remoteproc2: remote processor 40800000.dsp is now up

At the end the remote processor 40800000.dsp is now up

In Code Composer Studio v8, I created a project with the source files taken from the IPC_MessageQ example. When I emulate the project, it works fine.

After this test, I take the compiled file (IPC_MessageQ.out) and I copy it in the folder /home/root/DSP_FW. Then I do the following:

root@am57xx-evm:~# cd /sys/bus/platform/drivers/omap-rproc/
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > unbind
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# rm /lib/firmware/dra7-dsp1-fw.xe66
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# ln -s /home/root/DSP_FW/IPC_MessageQ.out /lib/firmware/dra7-dsp1-fw.xe66
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > bind
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# reboot

The log after reboot is the following:

[    0.448124] iommu: Adding device 40800000.dsp to group 0
[   10.439068] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
Starting TI IPC Daemon...
[   10.637521] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
[   10.726312] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
[   10.909660] remoteproc remoteproc2: 40800000.dsp is available
[   11.478305] remoteproc remoteproc2: powering up 40800000.dsp
[   11.478317] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 3224804

At the end the remote processor 40800000.dsp is not now up. I tried both Debug and Release.

Do I have to set any options in CCS?

Do I have to allocate memory in some particolar way in linker.cmd file?

Best regards

Francesco

  • Hi Francesco,

    Did you create a new project, or import the codebase as a makefile project?  The IPC examples were designed to be build from the command line, will require some care to import and get working under CCS.

    You can still build from the command line, and use CCS to load your binary and step through code, if that's your goal.  You can basically import your code as a makefile project, create a target configuration, connect to the target, and when you start debugging, you will then point CCS to the path of your code.  This should work if you've built with debugging symbols enabled.

    If you are intent on building within CCS, you will need to create a linker command file that recreates the memory layout of the original project.  You can use the linker command file from the example project as a template.

    To see what is happening on the DSP, take a look at the trace buffer.  The output below is from my EVM running the default DSP1 firmware:

    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc2/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] DSP1 starting..
    [      0.000] register_MxServer: -->
    [      0.000] OMAPRPC: registered channel: rpc_example_4
    [      0.000] OMAPRPC: Returning Object @9514c618
    [      0.000] register_MxServer: <--, status=0
    [      0.000] copyTask sample1:50: Entered...:
    [      0.000] registering rpmsg-client-sample:sample1 service on 50 with HOST
    [      0.000] copyTask sample2:51: Entered...:
    [      0.000] registering rpmsg-client-sample:sample2 service on 51 with HOST
    [      0.001] OmxSrvMgr: started on port: 60
    [      0.001] registering rpmsg-omx:rpmsg-omx2 service on 60 with HOST
    [      0.001] OMAPRPC: connecting from local endpoint 101 to port 101
    [      0.001] registering rpmsg-rpc:rpc_example_4 service on 101 with HOST
    [      0.001] OMAPRPC: started channel rpc_example_4 on port: 101
    [     10.635] OMAPRPC: received msg type: 0 len: 8 from addr: 1024
    [     10.635] OMAPRPC: channel info query - name rpc_example_4 fxns 8
    [     10.635] OMAPRPC: Replying with msg type: 1 to addr: 1024  from: 101 len: 12
    [     10.635] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.636] OMAPRPC: function query of type 1
    [     10.636] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    [     10.636] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.636] OMAPRPC: function query of type 1
    [     10.636] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    [     10.637] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.637] OMAPRPC: function query of type 1
    [     10.637] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    [     10.637] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.637] OMAPRPC: function query of type 1
    [     10.637] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    [     10.638] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.638] OMAPRPC: function query of type 1
    [     10.638] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    [     10.639] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.639] OMAPRPC: function query of type 1
    [     10.639] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    [     10.639] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.640] OMAPRPC: function query of type 1
    [     10.640] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    [     10.640] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [     10.640] OMAPRPC: function query of type 1
    [     10.640] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 101 len: 216
    root@am57xx-evm:~# 
    

    Regards,
    Mike

  • Hi Mike,

    I've created a new project in CCS v10 and I configured the memory as in C:\ti\ipc_3_50_04_08\examples\DRA7XX_linux_elf\ex02_messageq\shared\config.bld file.

    This is the result from the linker.cmd file of my project:

    MEMORY
    {
        L2SRAM (RWX) : org = 0x800000, len = 0x28000
        OCMC_RAM1 (RWX) : org = 0x40300000, len = 0x80000
        EXT_CODE (RWX) : org = 0x95000000, len = 0x100000
        EXT_DATA (RW) : org = 0x95100000, len = 0x100000
        EXT_HEAP (RW) : org = 0x95200000, len = 0x300000
        TRACE_BUF (RW) : org = 0x9f000000, len = 0x60000
        PM_DATA (RWX) : org = 0x9f070000, len = 0x70000
    }
    

    In the Predefined Symbols of the project Properties I defined VAYU_DSP_1 so in the file rsc_table_vayu_dsp.h I have:

    #if defined (VAYU_DSP_1)
    #define PHYS_MEM_IPC_VRING      0x99000000
    [...]
    #endif

    I have copied Dsp1.cfg and ipc.cfg.xs in my app.cfg file but when I copy these four lines (below) in the app.cfg I can't compile:

    /* IPC Configuration */
    xdc.useModule('ti.ipc.ipcmgr.IpcMgr');
    BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
    
    /* Enable Memory Translation module that operates on the BIOS Resource Table */
    var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
    Resource.loadSegment = "EXT_CODE";

    Below the log from console with the failure at the end:

    **** Build of configuration Debug for project Test_IPC ****
    
    "C:\\ti\\ccs1010\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
     
            1 file(s) copied.
    making ../src/sysbios/sysbios.ae66 ...
    making ../src/ipc.ae66 ...
    making ../src/utils.ae66 ...
    Building file: "../app.cfg"
    gmake[1]: Nothing to be done for 'all'.
    gmake[1]: Nothing to be done for 'all'.
    Invoking: XDCtools
    "C:/ti/ccs1010/xdctools_3_61_02_27_core/xs" --xdcpath="C:/ti/bios_6_76_03_01/packages;C:/ti/ipc_3_50_04_08/packages;C:/Users/Francesco/ti/packages/;C:/ti/pdk_am57xx_1_0_17/packages;C:/ti/ipc_3_50_04_08/packages/ti/ipc/remoteproc;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p DRA7XX_linux -r debug -c "C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-c6000_8.3.7" --compileOptions "-g" "../app.cfg"
    gmake[1]: Nothing to be done for 'all'.
    configuring app.xe66 from package/cfg/app_pe66.cfg ...
    generating custom ti.sdo.utils library makefile ...
    generating custom ti.sysbios library makefile ... 
    generating custom ti.sdo.ipc library makefile ...
    Starting build of library sources ...
    making C:/Users/Francesco/workspace_v10/Test_IPC/src/ipc.ae66 ...
    cle66 C:/ti/ipc_3_50_04_08/packages/ti/sdo/utils/NameServer.c ...
    are66 Ipc.obj ...
    making C:/Users/Francesco/workspace_v10/Test_IPC/src/sysbios/sysbios.ae66 ...
    cle66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/BIOS.c ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/timers/dmtimer/Timer_asm.s64P ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/family/c66/vayu/Power_resume.s66 ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/family/c66/vayu/Power_standby.s66 ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/rts/ti/tls_get_tp.asm ...
    asme66 C:/ti/bios_6_76_03_01/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    are66 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj dmtimer_Timer_asm.obj vayu_Power_resume.obj vayu_Power_standby.obj ti_tls_get_tp.obj c62_TaskSupport_asm.obj ...
    making C:/Users/Francesco/workspace_v10/Test_IPC/src/utils.ae66 ...
    Build of libraries done.
    cle66 package/cfg/app_pe66.c ...
     
    >> Compilation failure
    subdir_rules.mk:12: recipe for target 'build-338253647-inproc' failed
    "C:/ti/ipc_3_50_04_08/packages/ti/ipc/remoteproc/rsc_table_vayu_dsp.h", line 262: error: identifier "PHYS_MEM_IPC_VRING" is undefined
    1 error detected in the compilation of "package/cfg/app_pe66.c".
    xdctools_3_61_02_27_core\gmake.exe: *** [package/cfg/app_pe66.mak:18: package/cfg/app_pe66.oe66] Error 1
    js: "C:/ti/ccs1010/xdctools_3_61_02_27_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake[1]: *** [build-338253647-inproc] Error 1
    gmake: *** [build-338253647] Error 2
    subdir_rules.mk:9: recipe for target 'build-338253647' failed
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****

    What am I doing wrong?

    Best regards

    Francesco

  • Francesco,

    Are you able to share the project?  I may be able to debug and provide a solution.

    Regards,
    Mike

  • Mike,

    I created the project in CCSv8 with "File->New->CCS Project" and then, from the project template I choose "SYS/BIOS->GNU Target Example-> Typical". In the file app.cfg I copied all the configuration from C:\ti\ipc_3_50_04_08\examples\DRA7XX_linux_elf\ex02_messageq\dsp1\Dsp1.cfg.

    Finally I copied in the project the file "rsc_table_vayu_dsp.h" and in this way I solved the problem.

    Let me know if you have any more suggestions, otherwise I can mark this issue as resolved.

    Thanks for your help.

    Best regards

    Francesco