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.

Linux/AM5728: Compiling the CMEM test application

Part Number: AM5728


Tool/software: Linux

We are trying to compile and execute a known working Linux-DSP-RTOS Multicore application where the Linux application and the DSP RTOS companion application both utilize the CMEM library to share large size buffers. We saw there is a GateMPApp, which seems to have companions for Linux and DSP RTOS, see below.

/home/user01/ti/ipc_3_44_00_00/linux/src/tests/GetMPApp.c - the Linux side application

/home/user01/ti/ipc_3_44_00_00/packages/ti/ipc/tests/gatempapp.c - the RTOS side application for the DSP

We are having trouble getting the GateMPApp to compile using the Linux RT processor SDK environment targeted for the AM572x IDK EVM. This includes compiling for the Linux GateMPApp.c and the RTOS associated gatempapp.c TI RTOS DSP programs. The issue seems to be the Makefile is not attempting to compile these source files. There appears to be some environment variables or compiler variables that need to be defined based on below excerpt from Makefile.am in /home/user01/ti/ipc_3_44_00_00/linux/src/tests, such as CMEM and DRA7XX,

if DRA7XX
# Add platform specific bin application's here
  bin_PROGRAMS +=
if CMEM
  bin_PROGRAMS += GateMPApp
endif
if KDIR
if DRM
  bin_PROGRAMS += mmrpc_test
endif
endif
else

... etc

The default apps compile fine, such as MessageQApp. How do we compile GateMPApp?

Also, are there other examples that compile more easily that show how to share large buffers between Linux and RTOS?

Thanks

  • The software team have been notified. They will respond here.
  • Hi netrover,

    You can follow the instructions here

    to update products.mak and build the GateMPApp.

    The thread () may help you create your own CMEM application as well.


    Regards,

    Garrett

  • Thanks Garrett,

    We are going through your post above.

    I am looking at the CMEM API embedded in the ti-processor-sdk-linux-rt-am57xx-evm-03.02.00.05 directory structure. In the directory,

    /opt/ti/ti-processor-sdk-linux-rt-am57xx-evm-03.02.00.05/board-support/extra-drivers/cmem-mod-4.12.00.00+gitAUTOINC+d6d3e84c84/

    It looks like the API library is not pre-compiled in the kit or in another location? I will try to compile it.
    Thanks
  • Netrover,

    You are right - CMEM is not pre-compiled in the kit.
    You can clone the CMEM from its repo here: http://git.ti.com/ipc/ludev, see processors.wiki.ti.com/.../CMEM_Overview

    Regards,
    Garrett
  • I tried the example in the thread. The app_host does a core dump after the following messages.

    -----------------------------------------------------------------------------------
    root@am57xx-evm:~/tests/cmemhost# ./app_host DSP1
    --> main:
    --> Main_main:
    --> App_create:
    CMEM_init success
    MessageQ_Params_init
    MessageQ_create
    app_host: ../../../hlos_common/src/utils/MultiProc.c:79: MultiProc_getName: Assertion `id < _MultiProc_cfg.numProcessors' failed.
    Aborted (core dumped)
    -----------------------------------------------------------------------------------

    Any ideas?
    Thanks
  • Ok,

    I fixed the MultiProc_getName error, which appears to be because I linked with the .a libraries instead of the .so libraries for tiipc, tiipcutils, and titransportrpmsg.

    The example posted, bitbucket.org/.../cmem.git, works when I replace the original 'ex02_messageq' with that and compile for only host and DSP1 at the moment. I used the top level make 'ti-ipc' in the 'ti-processor-sdk-linux-rt-am57xx-evm-03.02.00.05' to update the '.../ipc_3_44_00_00/examples' for 'ex02_messageq'.

    Now I have a running CMEM example that I can work with and learn how to use the cmemk.ko module to reserve memory or the device tree method.

    Thanks for the help!