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.

DRA750: The DSP CMA setting in 256MB ram size

Part Number: DRA750

Hi TIs:

The BSP version we used is Process SDK 03_02_00_03, due to customer requirement we need to test DSP function on DRA750 CPU and its ram size is 256MB. According to my understannding, the default cma setting of DSP is over 256MB memory space, as below

dsp1_cma_pool: dsp1_cma@99000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x99000000 0x0 0x4000000>;
reusable;
status = "disabled";
};

dsp2_cma_pool: dsp2_cma@9f000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x9f000000 0x0 0x800000>;
reusable;
status = "disabled";
};

So I change these setting to inside 256MB memory space, and keep the same size

dsp1_cma_pool: dsp1_cma@8a000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x8a000000 0x0 0x4000000>;
reusable;
status = "okay";
};

dsp2_cma_pool: dsp2_cma@8e000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x8e000000 0x0 0x800000>;
reusable;
status = "okay";
};

After load DSP firmware, run IPC examples(MessageQ), but it doesn't work

Do I need to modify the same cma setting in DSP firmware, and rebuild it ? 

If yes, how can i do ?

Thanks!

Kenny

  • Hi Kenny,

    Yes, to run the IPC examples after making a change to the location of the CMA pool, you will have to update the resource table for the remote core(s) which were changed. Detailed information about the resource table can be found here:

    Basically, you will need to create a custom resource table for your firmware, and update the DSP1 and DSP2 resource table entries for PHYS_MEM_IPC_VRING to match the new values in the dts file. You can find the default resource table used by many of the IPC examples in the IPC package here:

    packages/ti/ipc/remoteproc/rsc_table_vayu_dsp.h

    Thanks,

    Angela

  • Hi Angela:

    Thanks for your reply.

    I have more questions about how to build examples and dsp firmware after modify resource table if i just install ccs win64 version and proccessor-sdk-rtos-automotive windows version ?

    Sorry i ask a basic question, but i am not familiar with these package.

    Thank you! 

    Kenny

  • Hi Kenny,

    Can you confirm, are you using Processor SDK Linux Automotive or Processor SDK RTOS Automotive?

    Thanks,

    Angela

  • Hi Angela:

    I used Processor SDK RTOS Automotive + CCS

    If i just want to run a MessageQ example, is it correct ? 

    By the way, because i don't know how to build example under windows enviroment, so i install linux version of CCS and Processor SDK RTOS Automotive now

    Install is stll going...

    Kenny

  • Hi Kenny,

    Processor SDK Linux Automotive also comes with the associated IPC release which includes the Linux and SYSBIOS-side code. I would suggest starting by looking at the SW dev guide for Processor SDK Linux Automotive that is included with the release. For 3.02.00.03 that is here 

    http://processors.wiki.ti.com/index.php?title=Processor_SDK_Linux_Automotive_Software_Developers_Guide&oldid=225388

    Follow the instructions for setup and downloading the tools and sources. Then you can build the IPC tests either through Yocto recipe, or alternatively, you can build it standalone from the IPC source folder using the IPC build instructions here: 

    Thanks,

    Angela

  • Hi Angela:

    I have a little confused about what package do i really need to use

    My requirement is to run a MeesageQ application on A15, and communication with DSP 

    And I used Process SDK 03_02_00_03 to build Linux image used on A15

    My thinking is, used CCS + Processor SDK RTOS automotive to build MessageQ application and DSP firmware due to memory address reallocation

    Is it right?

    Kenny

  • Hi Angela:

    I have already built IPU, DSP firmware, but only APP host failed

    # Making bin/debug/app_host ...
    /opt/ti/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -L/opt/ti/ipc_3_47_01_00/linux/src/api/.libs/ -L/opt/ti/ipc_3_47_01_00/linux/src/utils/.libs -L/opt/ti/ipc_3_47_01_00/linux/src/transport/.libs -ggdb -Wall -Wl,-Map=bin/debug/app_host.map -o bin/debug/app_host bin/debug/obj/main_host.ov7A bin/debug/obj/App.ov7A -lpthread -lc -lrt -ltiipc -ltiipcutils -ltitransportrpmsg
    /opt/ti/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ltiipc
    /opt/ti/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ltiipcutils
    /opt/ti/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ltitransportrpmsg
    collect2: error: ld returned 1 exit status
    makefile:85: recipe for target 'bin/debug/app_host' failed
    make[3]: *** [bin/debug/app_host] Error 1
    make[3]: Leaving directory '/opt/ti/ipc_3_47_01_00/examples/DRA7XX_linux_elf/ex41_forwardmsg/host'
    makefile:59: recipe for target 'all' failed
    make[2]: *** [all] Error 2
    make[2]: Leaving directory '/opt/ti/ipc_3_47_01_00/examples/DRA7XX_linux_elf/ex41_forwardmsg/host'
    makefile:49: recipe for target 'host' failed
    make[1]: *** [host] Error 2
    make[1]: Leaving directory '/opt/ti/ipc_3_47_01_00/examples/DRA7XX_linux_elf/ex41_forwardmsg'
    makefile:98: recipe for target 'DRA7XX_linux_elf/ex41_forwardmsg/' failed
    make: *** [DRA7XX_linux_elf/ex41_forwardmsg/] Error 2
    kenny@kenny:/opt/ti/ipc_3_47_01_00/examples$

    I think the process of build app host will use lib ltiipcutils  ltiipc  ltitransportrpmsg, but they are dissapear

    How can I do to overcome this build failed?

    Kenny

  • Hi Kenny,

    For your question about which SDK to use, the following link gives details about each of the SDK packages available for DRA7XX.

    http://www.ti.com/tool/PROCESSOR-SDK-DRA7X

    Since your requirement is to use Linux on A15 and run the IPC MessageQ app, then Processor SDK Linux Automotive can be used for this. Processor SDK RTOS Automotive does not include Linux, which is needed for building the Linux host-side IPC libraries and tests/example apps.

    There are 2 parts to the Linux IPC MessageQ example: a host-side application that runs on Linux on A15, and a remotecore-side firmware that runs on RTOS on the remotecore (DSP, IPU).

    Your failure is when trying to build the host-side (Linux) application. It is failing to link with the IPC libraries (ltiipcutils, ltiipc, etc.). Before building the host-side of the examples, you should first build the IPC source package for Linux to generate the libraries. Have you already built the IPC for Linux and are still seeing this failure?

    Thanks,

    Angela

  • Hi Angela:

    No, I have not built IPC source package for linux, because this is the part i don't know before.

    I still have some questions as below:

    1. where to get IPC source pakage for linux?  Is this link http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/ ?

    2. I saw a document IPC Install Guide Linux on web, before build linux ipc you need to modify .mak file, just only fill linux cross compiler and can build linux  side example, i am confuesd that there is no ipc library need to build before example, this is different with your answer before, right? 

    3. If i build linux side host ap by using IPC source package, and build dsp firmware by using Processor SDK RTOS automotive, is it an another way to achieve my goal ?

    Kenny

  • Hi Kenny,

    user5018288 said:

    1. where to get IPC source pakage for linux?  Is this link http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/ ?

    IPC source package is part of Processor SDK Linux Automotive. When you are running setup.sh of the SDK, select yes when prompted to download tools and sources. This will download the IPC source. The source can then be found in the "component-sources" folder. The IPC source is a single package that contains the IPC code for all OSes (Linux and RTOS).

    user5018288 said:

    2. I saw a document IPC Install Guide Linux on web, before build linux ipc you need to modify .mak file, just only fill linux cross compiler and can build linux  side example, i am confuesd that there is no ipc library need to build before example, this is different with your answer before, right? 

    Can you please point me to which document you are referring? Is it the same one I linked earlier? If so, the build commands in that guide will build the Linux libraries. After modifying products.mak, run:

    make -f ipc-linux.mak

    make

    make install

    user5018288 said:

    3. If i build linux side host ap by using IPC source package, and build dsp firmware by using Processor SDK RTOS automotive, is it an another way to achieve my goal ?

    The main concern w.r.t. IPC is that the IPC release version should be the same on all cores. Each SDK release will have been validated with a particular IPC version, and the IPC version used by Linux app should match the version used by RTOS firmware.

    Is there a particular feature you are wanting from Processor SDK RTOS automotive or are you using it only for building IPC examples? If you are selecting it only for building the IPC examples, then you can instead use directly the IPC package available with Processor SDK Linux Automotive, because it contains all the needed source and tools to build IPC.

    Thanks,

    Angela

  • Hi Angela:

    Because we uesd Process SDK 03_02_00_03 to build the kernel image, and we used for a long time so we will not consider to change SDK version

    Is there IPC source package in this version? If yes, why don't I find any "component-sources" folder in this sdk ?  

    If this version have no IPC source package to ues, may I download a newer version SDK and use it to build IPC example & DSP firmware ?

    Thank you 

    Kenny

  • Hi Kenny,

    The IPC source package should be in that version. After installing the package, running the "setup.sh" will fetch the sources, if you choose "yes" when prompted for that option.

    Alternatively, it is possible to get the IPC package directly from the IPC git repo. The IPC version used in Processor SDK Linux Automotive 3.02.00.03 is IPC 3.45.00.00 (you can find the version in the release documentation for the SDK). You can clone the IPC git repo from 

    http://git.ti.com/ipc/ipcdev

    tag: 3.45.00.00

    Thanks,

    Angela

  • Hi  Angela:

    You are right ! When i re-download a new BSP Processor SDK Linux Automotive 03.02.00.03, and complete the installation, the folder "component_sources" is in the BSP folder. 

    I have no idea why ours the same version BSP has no this folder. 

    So, I will continue to build IPC example  by using this new BSP

    By the way, back to the original question, i remember you said just only modify two address in rsc_table_vayu_dsp.h file, and these two address should be the same with address in .dts file, right?

    But when I open this file, i saw others over 256MB address, like this:

    #define DSP_MEM_DATA 0x95100000
    #define DSP_MEM_HEAP 0x95200000

    #define DSP_MEM_IPC_VRING 0xA0000000
    #define DSP_MEM_RPMSG_VRING0 0xA0000000
    #define DSP_MEM_RPMSG_VRING1 0xA0004000
    #define DSP_MEM_VRING_BUFS0 0xA0040000
    #define DSP_MEM_VRING_BUFS1 0xA0080000

    #define PHYS_MEM_IOBUFS         0xBA300000

    Do i need to modify them inside 256MB address?

    Kenny

  • Hi Kenny,

    No, you do not need to modify them.

    All entries marked starting with "DSP_MEM_x" in the resource table are DSP virtual addresses. The physical addresses that correspond to them are allocated from the CMA pool during firmware loading through Linux remoteproc module.

    The exception is the PHYS_MEM_IOBUFS entry, which is a physical address. This entry is in the resource table as an example of how to define a region of DDR memory for use by the DSP, but it is not needed for the MessageQ example and can be either ignored or removed.

    Thanks,

    Angela

  • Hi Angela:

    After my hard working, MESSAGEQ test application and DSP1&2 firmware are finally built out, and can run on my platform, thanks a lot!