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.

RTOS/AM5716: IPC pTable setting

Part Number: AM5716

Tool/software: TI-RTOS

Hi,

I am trying to rebuild DSP binary from the IPC example(ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09) using CCS 7.2.2 .  I found in the new Dsp_pe66.c, pTable is set at address 0x80000000 instead of 0x95000000 as in original build.

/*
* ======== ti.ipc.remoteproc.Resource INITIALIZERS ========
*/

/* Module__state__V */
#if defined (__ICCARM__)
#pragma location = ".data_ti_ipc_remoteproc_Resource_Module__state__V"
#endif
#if defined(__GNUC__) && !(defined(__MACH__) && defined(__APPLE__))
#ifndef __TI_COMPILER_VERSION__
ti_ipc_remoteproc_Resource_Module_State__ ti_ipc_remoteproc_Resource_Module__state__V __attribute__ ((section(".data_ti_ipc_remoteproc_Resource_Module__state__V")));
#endif
#endif
ti_ipc_remoteproc_Resource_Module_State__ ti_ipc_remoteproc_Resource_Module__state__V = {
((ti_ipc_remoteproc_Resource_RscTable*)(0x80000000)), /* pTable */
};

I used the same files including the dsp.cfg, but why the address for pTable is changed?   attached is my Dsp_pe66.c.

Thanks for your help!

RonDsp_pe66.c

  • Hi, Rong,

    Which example do you try to build?

    Rex

  • Hi, Rong,

    I think you meant the IPC big-data example. I don't see pTable gets set to 0x80000000.

    user@udb:~/work/ti-processor-sdk-linux-am57xx-evm-04.02.00.09/example-applications/big-data-ipc-demo-linux-01.01.00.00/host_linux/simple_buffer_example$ la -l dsp/bin/DRA7XX/release/

    total 4524

    drwxr-xr-x 3 user cleartnp    4096 May 17 11:11 configuro

    drwxr-xr-x 2 user cleartnp    4096 May 17 11:11 obj

    -rw-r--r-- 1 user cleartnp 4624336 May 17 11:11 server_dsp.xe66

    user@udb1:~/work/ti-processor-sdk-linux-am57xx-evm-04.02.00.09/example-applications/big-data-ipc-demo-linux-01.01.00.00/host_linux/simple_buffer_example$ la

    dsp  host  makefile  products.mak  readme.txt  shared

    user@udb1:~/work/ti-processor-sdk-linux-am57xx-evm-04.02.00.09/example-applications/big-data-ipc-demo-linux-01.01.00.00/host_linux/simple_buffer_example$ grep -r pTable *

    Binary file dsp/bin/DRA7XX/release/configuro/package/cfg/Dsp_pe66.src/ipc/ipc.ae66 matches

    Binary file dsp/bin/DRA7XX/release/configuro/package/cfg/Dsp_pe66.src/ipc/Ipc.obj matches

    dsp/bin/DRA7XX/release/configuro/package/cfg/Dsp_pe66.c:    ti_ipc_remoteproc_Resource_RscTable *pTable;

    dsp/bin/DRA7XX/release/configuro/package/cfg/Dsp_pe66.c:    struct resource_table *pTable =

    dsp/bin/DRA7XX/release/configuro/package/cfg/Dsp_pe66.c:            pTable->num, pTable);

    dsp/bin/DRA7XX/release/configuro/package/cfg/Dsp_pe66.c:    ((ti_ipc_remoteproc_Resource_RscTable*)(0x95000000)),  /* pTable */

    user@udb1:~/work/ti-processor-sdk-linux-am57xx-evm-04.02.00.09/example-applications/big-data-ipc-demo-linux-01.01.00.00/host_linux/simple_buffer_example$ la -l dsp/bin/DRA7XX/release/configuro/package/cfg/

    total 9404

    -rw-r--r-- 1 user cleartnp 1804519 May 17 11:09 Dsp_pe66.c

    -rw-r--r-- 1 user cleartnp   10442 May 17 11:09 Dsp_pe66.cfg

    -rw-r--r-- 1 user cleartnp   46679 May 17 11:09 Dsp_pe66.cfg.dot

    -rw-r--r-- 1 user cleartnp     245 May 17 11:09 Dsp_pe66.cfg.mak

    My Dsp_pe66.c shows and is attached. I am not sure why you are getting 0x80000000. I can't reproduce your issue.

    #ifndef __TI_COMPILER_VERSION__

    ti_ipc_remoteproc_Resource_Module_State__ ti_ipc_remoteproc_Resource_Module__state__V __attribute__ ((section(".data_ti_ipc_remoteproc_Resource_Module__state__V")));

    #endif

    #endif

    ti_ipc_remoteproc_Resource_Module_State__ ti_ipc_remoteproc_Resource_Module__state__V = {

       ((ti_ipc_remoteproc_Resource_RscTable*)(0x95000000)),  /* pTable */

    };

    Rex

    8535.Dsp_pe66.c

  • Hi Rex,

    I was trying to rebuild DSP from simple_buffer_example using CCS 7.2.2 instead of from linux. I have found the reason that ((ti_ipc_remoteproc_Resource_RscTable*)(0x80000000)),  /* pTable */ is due to my EXT_CODE is define as 0x80000000. after I correct this error I got the ((ti_ipc_remoteproc_Resource_RscTable*)(0x95000000)),  /* pTable */, the same as build from linux. And I also found it is this issue which cause DSP crashed. now DSP is running(see message below), however, both DSP and host were unable to open Message Q created by DSP/Host. what should I look at for investigating this issue?

    -------------- DSP message-----------------------------

    root@am57xx-evm:~# ./dsplog
    [ 0.000] 19 Resource entries at 0x95000000
    [ 0.000] [t=0x00021233] xdc.runtime.Main: --> main **************************:
    [ 0.000] [t=0x000319d2] xdc.runtime.Main: Creating queues
    [ 0.000] [t=0x0003f76f] xdc.runtime.Main: Allocating memory for queue messages
    [ 0.000] [t=0x000548cb] xdc.runtime.Main: Initializing semaphores
    [ 0.000] [t=0x00066b02] xdc.runtime.Main: Creating TxThread
    [ 0.000] [t=0x00075f46] xdc.runtime.Main: Creating smain thread
    [ 0.000] [t=0x00085054] xdc.runtime.Main: Creating LineThread
    [ 0.000] [t=0x00093c88] xdc.runtime.Main: Creating AudioThread
    [ 0.000] [t=0x000a21e4] xdc.runtime.Main: Starting BIOS
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x000c7afd] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] [t=0x000dfce1] xdc.runtime.Main: DSP: TxThread started waiting start
    [ 0.000] [t=0x000f0aea] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x001059e1] Server: Server_create: server is ready
    [ 0.000] [t=0x001120b1] Server: <-- Server_create: 0
    [ 0.000] [t=0x0011c477] Server: Resource_physToVirt =0x94400000
    [ 0.000] [t=0x00128918] Server: --> Server_exec:
    [ 0.000] [t=0x0014214a] xdc.runtime.Main: DSP: LineThread started waiting start
    [ 0.000] [t=0x0015317e] xdc.runtime.Main: DSP: AudioThread started waiting start
    root@am57xx-evm:~#

    -------------- Host message ------------------------------

    Wait on psemApplication
    Getting engine initialization result

    InternalRemoteIpcConnect: Failed opening MessageQ
    App_create failed

    Thank you for your help!

    Ron

  • Hi, Ron,

    Again, I can't reproduce the issue. I am building from high level. That is, in Linux proc SDK, I do "make big-data-ipc-demo". If you plan to do the build from high level, do follow the instruction in IPC Quick Start Guide in software-dl.ti.com/.../Foundational_Components.html

    Please see my logs below:

    root@am57xx-evm:/lib/firmware# ls -l dra7-dsp*-fw*
    lrwxrwxrwx 1 root root 17 Dec 23 13:48 dra7-dsp1-fw.xe66 -> sam/dsp1-fix.xe66
    -rw-r--r-- 1 root root 19467560 Dec 23 2017 dra7-dsp1-fw.xe66.opencl-monitor
    -rw-r--r-- 1 root root 8970568 Dec 23 2017 dra7-dsp1-fw.xe66.openvx
    lrwxrwxrwx 1 root root 58 Dec 23 14:00 dra7-dsp2-fw.xe66 -> /usr/bin/ipc/examples/ex02_messageq/debug/server_dsp2.xe66
    -rw-r--r-- 1 root root 19467560 Dec 23 2017 dra7-dsp2-fw.xe66.opencl-monitor
    -rw-r--r-- 1 root root 8970536 Dec 23 2017 dra7-dsp2-fw.xe66.openvx
    root@am57xx-evm:/lib/firmware# ls ~
    big-data-app_host
    big-data-dsp.xe66
    dmesg.txt
    doc
    include.tar
    root@am57xx-evm:/lib/firmware# ln -sf ~/big-data-dsp.xe66 dra7-dsp1-fw.xe66
    root@am57xx-evm:/lib/firmware# rm dra7-dsp2-fw.xe66
    root@am57xx-evm:/lib/firmware# ls -l dra7-dsp*-fw.xe66
    lrwxrwxrwx 1 root root 28 Dec 23 13:50 dra7-dsp1-fw.xe66 -> /home/root/big-data-dsp.xe66
    root@am57xx-evm:/lib/firmware# reboot -f now
    Rebooting with argument 'now'.
    [ 301.120290] reboot: Restarting system with command 'now'

    U-Boot SPL 2017.01-g340fb36f04 (Dec 23 2017 - 11:25:49)
    :::::::::::::
    [ OK ] Reached target System Initialization.
    [ 9.431606] omap_rtc 48838000.rtc: rtc core: registered 48838000.rtc as rtc2
    [ OK ] Listening on dropbear.socket.
    [ 9.494767] remoteproc remoteproc2: powering up 40800000.dsp
    [[ 9.501163] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4624336
    OK ] Listening on RPCbind Server Activation Socket[ 9.516191] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [ 9.522073] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    .
    [ 9.528008] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [ 9.546129] virtio_rpmsg_bus virtio2: rpmsg host is online
    [ 9.552212] remoteproc remoteproc2: registered virtio2 (type 7)
    [ 9.558736] remoteproc remoteproc2: remote processor 40800000.dsp is now up
    [ 9.566766] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x3d
    [ OK ] Started Daily Cleanup of Temporary Directories.
    [ OK ] Reached target Timers.
    ::::::::::::::::::

    root@am57xx-evm:~# ./big-data-app_host DSP1
    --> main:
    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    CMEM_init success
    CMEM_getPool success
    CMEM_allocPool success: Allocated buffer 0xaa63b000
    SharedRegion_setup success
    App_taskFxn: SR_1, base 0xaa63b000, len=1000000
    HeapMem_setup success
    HeapMem_create success
    App_taskFxn: SR_1 heap, totalSize=16777216,totalFreeSize=16777216,largestFreeSize=16777216
    App_taskFxn: SR_1 heap, buf=0x0xaa63b080,size=16777216
    App_exec: sending message 1
    Shared memory phys Addr ffffffffa0000000
    App_exec: sending message 2
    App_exec: sending message 3
    App_exec: message received 1
    App_exec: Preparing message 4
    App_exec: Sending message 4
    App_exec: message received 2
    App_exec: Preparing message 5
    App_exec: Sending message 5
    App_exec: message received 3
    App_exec: Preparing message 6
    App_exec: Sending message 6
    App_exec: message received 4
    App_exec: Preparing message 7
    App_exec: Sending message 7
    App_exec: message received 5
    App_exec: Preparing message 8
    App_exec: Sending message 8
    App_exec: message received 6
    App_exec: Preparing message 9
    App_exec: Sending message 9
    App_exec: message received 7
    App_exec: Preparing message 10
    App_exec: Sending message 10
    App_exec: message received 8
    App_exec: Preparing message 11
    App_exec: Sending message 11
    App_exec: message received 9
    App_exec: Preparing message 12
    App_exec: Sending message 12
    App_exec: message received 10
    App_exec: Preparing message 13
    App_exec: Sending message 13
    App_exec: message received 11
    App_exec: Preparing message 14
    App_exec: Sending message 14
    App_exec: message received 12
    App_exec: Preparing message 15
    App_exec: Sending message 15
    App_exec: message received 13
    App_exec: Preparing message 16
    App_exec: Sending message 16
    App_exec: message received: 14
    App_exec: message received: 15
    App_exec: message received: 16
    App_exec: Data check clean
    <-- App_exec: 0
    --> App_delete:
    <-- App_delete:
    <-- Main_main:

    Host: Test Passed
    <-- main:
    root@am57xx-evm:~#
    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc2/name
    40800000.dsp
    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
    [ 0.000] 18 Resource entries at 0x95000000
    [ 0.000] [t=0x000226ce] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x000437af] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] [t=0x000528ae] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x00068337] Server: Server_create: server is ready
    [ 0.000] [t=0x0006c138] Server: <-- Server_create: 0
    [ 0.000] [t=0x0006efd5] Server: --> Server_exec:
    [ 86.254] [t=0x0000000e:75a51e9a] Server: Message received...1
    [ 86.254] [t=0x0000000e:75a5b44c] Server: Shared region entry configured...
    [ 86.254] [t=0x0000000e:75a61490] Server: Server_exec: processed id 1, cmd=0x1
    [ 86.254] [t=0x0000000e:75a6a8fb] Server: Message received...2
    [ 86.254] [t=0x0000000e:75a6ff87] Server: Server_exec: processed id 2, cmd=0x0
    [ 86.254] [t=0x0000000e:75a77dfe] Server: Message received...3
    [ 86.254] [t=0x0000000e:75a7d609] Server: Server_exec: processed id 3, cmd=0x0
    [ 86.254] [t=0x0000000e:75aac83d] Server: Message received...4
    [ 86.255] [t=0x0000000e:75b96942] Server: Server_exec: processed id 4, cmd=0x2
    [ 86.256] [t=0x0000000e:75ba1438] Server: Message received...5
    [ 86.257] [t=0x0000000e:75c8510b] Server: Server_exec: processed id 5, cmd=0x2
    [ 86.257] [t=0x0000000e:75c8f6d7] Server: Message received...6
    [ 86.258] [t=0x0000000e:75d72411] Server: Server_exec: processed id 6, cmd=0x2
    [ 86.258] [t=0x0000000e:75d7c635] Server: Message received...7
    [ 86.260] [t=0x0000000e:75e5da93] Server: Server_exec: processed id 7, cmd=0x2
    [ 86.260] [t=0x0000000e:75e67c52] Server: Message received...8
    [ 86.261] [t=0x0000000e:75f4aaab] Server: Server_exec: processed id 8, cmd=0x2
    [ 86.261] [t=0x0000000e:75f54f6e] Server: Message received...9
    [ 86.262] [t=0x0000000e:7603803a] Server: Server_exec: processed id 9, cmd=0x2
    [ 86.262] [t=0x0000000e:760423e5] Server: Message received...10
    [ 86.264] [t=0x0000000e:76125efe] Server: Server_exec: processed id 10, cmd=0x2
    [ 86.264] [t=0x0000000e:761307be] Server: Message received...11
    [ 86.265] [t=0x0000000e:76213e39] Server: Server_exec: processed id 11, cmd=0x2
    [ 86.265] [t=0x0000000e:7621e022] Server: Message received...12
    [ 86.266] [t=0x0000000e:7630138f] Server: Server_exec: processed id 12, cmd=0x2
    [ 86.266] [t=0x0000000e:7630b883] Server: Message received...13
    [ 86.268] [t=0x0000000e:763ef2d7] Server: Server_exec: processed id 13, cmd=0x2
    [ 86.268] [t=0x0000000e:763f9750] Server: Message received...14
    [ 86.268] [t=0x0000000e:763fee90] Server: Server_exec: processed id 14, cmd=0x0
    [ 86.268] [t=0x0000000e:76406df3] Server: Message received...15
    [ 86.268] [t=0x0000000e:7640c528] Server: Server_exec: processed id 15, cmd=0x0
    [ 86.268] [t=0x0000000e:7641a1ff] Server: Message received...16
    [ 86.268] [t=0x0000000e:76420b9f] Server: Server_exec: processed id 16, cmd=0x2000000
    [ 86.268] [t=0x0000000e:764297d5] Server: Server_exec: Data check clean
    [ 86.268] [t=0x0000000e:7642f629] Server: <-- Server_exec: 0
    [ 86.268] [t=0x0000000e:76434948] xdc.runtime.Main: DSP: Test Passed
    [ 86.268] [t=0x0000000e:7643a8af] Server: --> Server_delete:
    [ 86.268] [t=0x0000000e:76445243] Server: <-- Server_delete: 0
    [ 86.268] [t=0x0000000e:76458aea] Server: Server_create: server is ready
    [ 86.268] [t=0x0000000e:7645f576] Server: <-- Server_create: 0
    [ 86.268] [t=0x0000000e:76464b04] Server: --> Server_exec:
    root@am57xx-evm:~#
  • Hi Rex,

    if we make build at higher level using make file it is working. what I tried to do is to build dsp using CCS instead of using command, then I got this issue. I knew I missed something in DSP build configuration. To narrow down the issue, I try to understand what could make failure to open messageQ. I had verified the proc name, ID, heap ID are correct. I wonder what else could cause this failure? Is there any system trace I can look at to find root cause or what I should check?

    regards,

    Ron
  • Hi, Ron,

    I'll have DSP engineer to try it and to work with you on CCS build.

    Rex
  • Hi, Ron,

    Just talked to the developer that we only have makefile to build big data example and don't have CCS project created for it. When you use CCS to build, you need to be sure all in makefile being translated correctly to the CCS project, and also the set up CCS correctly. I am not sure in this case if the DSP engineer whom I mentioned in my previous post can help you.

    If you don't have any other question, please click "resolved". If you have other issues, please submit a new thread.

    Rex
  • Hi Rex,

    It is working now after Import everything from make file to CCS project. 

    Thank you so much for your help!

    Ron