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: IPC examples build errors

Part Number: TMDXIDK5718
Other Parts Discussed in Thread: AM5718

Hi TI.

I’m trying to get familiar with the IPC examples in http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_IPC.html.

I'm using IDK572 and SDK6.0.

It seems that doc hasn’t been updated for a while and there is a crash and build error.

 

1. Getting a build error when issuing “make ti-ipc-linux”

 

linux_devkit/environment-setup, line 24  sets “--sysroot=/home/chchlee/ti-processor-sdk-linux-rt-am57xx-evm-06.00.00.07/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi'”

But  configure (in ipc_3_50_03_05) expects “–with_sysroot” and therefor complains. (autoconf) version issue?

 

So temporarily set

export CC="${TOOLCHAIN_PREFIX}gcc --with-sysroot=$SDK_PATH_TARGET

 

Now I can at least build the example.

 

2. Boot issue

When the I make, install the DSP1 and DSP2 code for ex02_messageq Linux often freezes while booting….

 

[  OK  ] Found device /dev/ttyS2.

[    9.524350] remoteproc remoteproc2: powering up 40800000.dsp

[    9.540460] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4311468

[    9.584396] remoteproc remoteproc3: powering up 41000000.dsp

[    9.584416] remoteproc remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 4156096

[    9.584590] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0

[    9.584627] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0

[    9.618452] virtio

 IPC hang.txt

…or endlessly outputs console messages, see attached file.

 

About every 3rd times it boots properly and I can successfully run "./app_host DSP1" and output is as expected.

 

My best guess is that there a race condition: there is a FW running on arm which expects the original dra7-dsp1/2-fw.xe66 (dra7-dso1-fw.xe66.opencl-monitor ?)

 

 3. The “Multi-core demonstration are not anymore found in SDK6.0 matrix launcher

 4. The related documentation is somewhat confusing:

 There is s section “Build IPC Linux examples”: This builds the Arm part with Linux and DSP part with RTOS. Right?

There is s section “Build IPC RTOS examples”: This builds the Arm part with TI RTOS and DSP part with RTOS. Right?

 

Before these two section there is “Rebuilding the demo”: this seems to be doing the same “Build IPC Linux examples”?

6. Documentation:

Ok: this “IPC Linux Library” is built. But there is no info if it is statically linked to the demo apps, or how it can be installed after making it. It seems that the library is already part of the rootfs.

 

ldd app_host

        linux-vdso.so.1 (0xbee8c000)

        libpthread.so.0 => /lib/libpthread.so.0 (0xb6ea7000)

        libc.so.6 => /lib/libc.so.6 (0xb6d65000)

        librt.so.1 => /lib/librt.so.1 (0xb6d4e000)

        libtiipc.so.1 => /usr/lib/libtiipc.so.1 (0xb6d34000)

        libtiipcutils.so.1 => /usr/lib/libtiipcutils.so.1 (0xb6d20000)

        libtitransportrpmsg.so.1 => /usr/lib/libtitransportrpmsg.so.1 (0xb6d0a000)

        /lib/ld-linux-armhf.so.3 (0xb6ee4000)

7. Documentation

In section “Run IPC Linux examples”, after building “make ti-ipc-linux” and “make ti-ipc-linux-examples”

But I get:

 

chchlee@ubuntu:~/ti/ipc_3_50_03_05/examples$ ls -l

total 40

drwxr-xr-x 4 chchlee chchlee 4096 Jul 23 15:10 AM571X_bios_elf

drwxr-xr-x 4 chchlee chchlee 4096 Jul 23 15:10 AM572X_bios_elf

drwxr-xr-x 2 chchlee chchlee 4096 Jul 23 15:10 DRA7XX_android_elf

drwxr-xr-x 6 chchlee chchlee 4096 Jul 23 15:10 DRA7XX_bios_elf

drwxr-xr-x 6 chchlee chchlee 4096 Jul 23 15:10 DRA7XX_linux_elf

drwxr-xr-x 2 chchlee chchlee 4096 Jul 23 15:10 DRA7XX_qnx_elf

 

So the Linux examples are found under DRA7XX_linux_elf, not AM57…

  

Best regards, Chris

  • Hi, Chris,

    Some of your questions, I need to try it first before answering them. 

    1) High level build should work.  I usually build ti-ipc-linux from Linux SDK, ipc-bios on RTOS, then ipc-example in Linux in that sequence. There may be some RTOS side environment variables need to set. Let me try without building ipc-bios. Also, I haven't tried with 6.0 release. The build shouldn't be a problem. Otherwise, it would have caught in the nightly build.

    2) Are you using prebuilt ex02 images in the filesystem? if not, please try with the prebuilt images. They are under /usr/bin/ipc/examples/ex02_messageq directory.

    3) The multicore demo  may not be included in AM57x family matrix launcher, but you can still run the same demo in the filesystem.

         The DSP images are in /lib/firmware/ipc/ti_platforms_evmDRA7XX_dspX/messageq_single.xe66

         The ARM app is /usr/bin/MessageQBench

    4) you are correct. Linux examples are for Linux/ARM and RTOS/DSP setup, and RTOS examples are for RTOS/ARM and RTOS/DSP. They show up in the  RTOS SDK IPC package in corresponding examples/DRA7xx_linux_elf and examples/DRA7xx_bios_elf directories.

    There isn't 5), but I think you meant to ask about the rebuilding the demo. Rebuilding the demo meant to rebuild MessageQBench and messageq_single.out (.xe66) of the demo described in matrix launcher. Building linux examples is to build both host and dsp binaries in rtos/ipc/examples/exXX_<example>.

    6) IPC linux library is only needed when cross-compiling on the Ubuntu to build host side IPC examples. It doesn't need to install on the EVM filesystem.

    7) True. Host binary (linux application) is common across all AM57x platforms (DRA7x family). Hence it is under DRA7xx_linux_elf directory. In RTOS setup, it ties up with hardware, so AM571x_bios and AM572x_bios.

    Rex

  • Hi, Chris,

    It is indeed that the high level build is broken in the latest release 6.0. As you mentioned, the sysroot path is wrong. We'll track down the cause and fix it in the next release. Since you have a workaround, I'll close this thread for now. If you new issue, please submit a new thread for it.

    Thanks!

    Rex

  • Hi Rex,

    regarding the crash: I built the host and DSP image according to the instruction and installed it.

    IF THE KERNEL manages to boot, it always works. So it cannot be a build issue.

    am57xx-evm login: root
    root@am57xx-evm:~# ./app_host DSP1
    --> main:
    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    App_exec: sending message 1
    App_exec: sending message 2
    App_exec: sending message 3
    App_exec: message received, sending message 4
    App_exec: message received, sending message 5
    App_exec: message received, sending message 6
    App_exec: message received, sending message 7
    App_exec: message received, sending message 8
    App_exec: message received, sending message 9
    App_exec: message received, sending message 10
    App_exec: message received, sending message 11
    App_exec: message received, sending message 12
    App_exec: message received, sending message 13
    App_exec: message received, sending message 14
    App_exec: message received, sending message 15
    App_exec: message received
    App_exec: message received
    App_exec: message received
    <-- App_exec: 0
    --> App_delete:
    <-- App_delete:
    <-- Main_main:
    <-- main:

    As mentioned, the problem that is that in 2 out of 3 cases the Kernel does not boot (stalls) or I get the endless console messages and login prompt does not show.

    If there some host app started in SDK60 that expects default DSP app to be running?

    If I remember right,  dra7-dsp1-fw.xe66 was originally linked to dra7-dsp1-fw.xe66.opencl-monitor. So if there is a host app expecting this very DSP app this might explain the Kernel boot issue.

    BR, Chris

  • Hi, Chris,

    The opencl-monitor files are for out-of-box OpenCL demo and there isn't any host app using them other than the demo. We'll need to reproduce the boot issue first. If it is reproduced, then we'll investigate the cause.

    Rex

  • Hello Chris,

    I am sorry for the delayed response. I will have a bit more information tomorrow, but I might not have a "full response" until next week.

    Regards,

    Nick

  • Hello Chris,

    Again, apologies for the delay. I will run tests tomorrow.

    To help me replicate your setup, is all of this correct?

    AM572x IDK

    RTOS and Linux SDK 6.0 - no modifications other than makefile change.

    Build ex02 by following steps:

    export PATH=<sdk path>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    export TI_RTOS_PATH=<RTOS_SDK_INSTALL_DIR>
    export IPC_INSTALL_PATH=<RTOS_SDK_IPC_DIR>
    $ cd <TI_LINUX_PROC_SDK_INSTALL_DIR>
    $ make ti-ipc-linux
    
    2. If RTOS Proc SDK and tools are not installed at its default
    location, then the environment variables, SDK_INSTALL_PATH and TOOLS_INSTALL_PATH need to be exported with their installed locations.
    export SDK_INSTALL_PATH=<RTOS_SDK_INSTALL_DIR>
    export TOOLS_INSTALL_PATH=<RTOS_SDK_INSTALL_DIR>
    
    $ cd <RTOS_SDK_INSTALL_DIR>/processor_sdk_rtos_<platform>_x_xx_xx_xx
    $ source ./setupenv.sh
    $ make ipc_bios
    
    $ cd <TI_LINUX_PROC_SDK_INSTALL_DIR>
    $ make ti-ipc-linux
    $ make ti-ipc-linux-examples

    no modifications were made to the filesystem other than modifying the symbolic link in /lib/firmware to point to the new firmware

    Regards,

    Nick

  • Hi Nick,

    this is exactly right. And no modifcations.

    Regards, Chris

  • Hello Chris,

    I am not able to replicate your boot issue on AM5718 IDK. I can test on AM572x IDK later this week.

    Here are my steps (in addition to those in the previous post):

    1) I used a nfs setup. I installed the examples in my nfs directory using "make ti-ipc-linux-examples_install" (which I ran after creating nfs directory with top level setup.sh). That installed the ex02 example in my nfs directory under 

    /home/root/am57xx-evm/ex02_messageq

    2) I reset the symbolic links in /lib/firmware with

    ln -sf /home/root/am57xx-evm/ex02_messageq/release/server_dsp1.xe66 dra7-dsp1-fw.xe66

    ln -sf /home/root/am57xx-evm/ex02_messageq/release/server_dsp2.xe66 dra7-dsp2-fw.xe66

    Regards,

    Nick

  • Hello Chris,

    I can replicate your results on AM572x IDK, but not AM571x IDK.

    I am observing both the freeze and the endlessly repeating L3 Custom Error output.

    No further updates yet.

    Regards,

    Nick

  • Hello Chris,

    I think the boot issues are related to incorrect timer settings in Dsp.cfg in ex02. I made some changes, and 10 of 10 boots on AM572x IDK successfully completed. For future readers, the next SDK release (SDK 6.1) should have timers fixed in Dsp.cfg.

    I made the following changes in ipc_3_50_03_05/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/Dsp1.cfg

    /* Change{ */
    /* Configure BIOS clock source as GPTimer5 */
    Clock.timerId = 4;
    
    Timer.create(Clock.timerId, Clock.doTick, timerParams);
    
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    var Deh = xdc.useModule('ti.deh.Deh');
    
    /* Must be placed before pwr mgmt */
    Idle.addFunc('&ti_deh_Deh_idleBegin');
    
    /* }Change */

    And the following changes in ipc_3_50_03_05/examples/DRA7XX_linux_elf/ex02_messageq/dsp2/Dsp2.cfg:

    /* Change{ */
    
    /* Configure BIOS clock source as GPTimer6 */
    Clock.timerId = 5;
    
    Timer.create(Clock.timerId, Clock.doTick, timerParams);
    /* }Change */
    

    Regards,

    Nick