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.

Loading .out from CCS using MPM

Hi,

  I am using EVM2E,and the PDK demo works perfectly in CSS debug mode,

  The leds will blink according to   test_led().

  Path:

  \ti\pdk_keystone2_3_01_03_06\packages\ti\platform\evmk2e\platform_test0

  But when I copy .out file (elf)  from CCS,and load it using MPM in Linux :

  

  It's not working, I can't see the LEDs blinking.

  Any help on this will be appreciated!

Regards,

kevin

  • Hi Kevin,

    I suspect, this is due to resource conflict between ARM and DSP. When the platform application ran on CCS, only DSP was executed to get the result.

    I would recommend you to start with MPM example provided in MCSDK 3.x. The example path is given below,

    PATH: \ti\mcsdk_bios_3_01_03_06\examples\mpm\mpmsrv_keystone2_example

    Thank you.

  • Raja said:

    Hi Kevin,

    I suspect, this is due to resource conflict between ARM and DSP. When the platform application ran on CCS, only DSP was executed to get the result.

    I would recommend you to start with MPM example provided in MCSDK 3.x. The example path is given below,

    PATH: \ti\mcsdk_bios_3_01_03_06\examples\mpm\mpmsrv_keystone2_example

    Thank you.

    Hi Rajasekaran K,

     Thanks for replying!

      I try to load the mpmsrv example as you mentioned,it works perfectly:

      

      I think you are right, no problem with the MPM.

      Could you please give some advice on how to fix the resource conflict problem?

      Thanks you!

    Regards,

    kevin

  • Hi Kevin,

    That may due to resource conflict.

    The platform examples do not use BIOS and IPC(remoteproc).  Please find the "DSP image requirements" from below wiki,

    Thank you.

  • Also you can refer below e2e thread,
    https://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/451583

     

    Thank you.

  • Hi Rajasekaran K,

    Thanks for the update,
    As for the Image Requirements,the file is in ELF format, but I don't know what does 'PT_LOAD field' means.

    Does the DSP have to run BIOS and IPC so that .out can be loaded using MPM?
    Basically I just want the DSP to control the LEDs (GPIO), no need for tracing.
    Could you provide a better option on this?


    Regards,
    kevin
  • Hi Kevin,

    1. The DSP image should be in ELF format.

    [RAJA] No issue.

    2. The MPM ELF loader loads those segments to DSP memory, whose PT_LOAD field is set. In order to skip loading of a particular section, set the type toNOLOAD in the command/cfg file.

    /* Section not to be loaded by remoteproc loader */
    Program.sectMap[".noload_section"].type = "NOLOAD";

    [RAJA] No need to skip any segment. Please look into .map generated. It is something specic to ELF format. Please refer below link for more information.

    3. The default allowed memory ranges for DSP segments are as follows

    Start Address Length
    L2 Local 0x00800000 1MB
    L2 Global 0x[1-4]0800000 1MB
    MSMC 0x0C000000 6MB
    DDR3 0xA0000000 (512MB)


    The segment mapping can be changed using the mpm_config.json and Linux kernel device tree.

    [RAJA] Compare the memory segment used by the application by referring the .map generated. I think there is no issue with segments too.

    On LED, all the debug LED were connected between GPIO 12-15. By default, these GPIO's are controlled by Linux using sysfs. Please find the example below for usage.

    Example:

    root@keystone-evm:/sys/class/gpio# echo 10 > export 
    root@keystone-evm:/sys/class/gpio# cd gpio10/
    root@keystone-evm:/sys/class/gpio/gpio10# echo "in" > direction 
    root@keystone-evm:/sys/class/gpio/gpio10# 
    root@keystone-evm:/sys/class/gpio/gpio10# cat value 0
    root@keystone-evm:/sys/class/gpio/gpio10#

    You can remove GPIO support from Linux, re-build and use the built kernel image to run the platform example using MPM.

    How to remove GPIO support on Linux:

    Please find the gpio definition in dts file below. Just comment this section and re-build to remove gpio support on kernel.

    file: arch/arm/boot/dts/keystone.dtsi

    gpio0: gpio@260bf00 {
    compatible = "ti,keystone-gpio";
    reg = <0x0260bf00 0x38>;
    gpio-controller;
    #gpio-cells = <2>;
    /* HW Interrupts mapped to GPIO pins */
    interrupts = <0 120 0xf01>,
    <0 121 0xf01>,
    <0 122 0xf01>,
    <0 123 0xf01>,
    <0 124 0xf01>,
    <0 125 0xf01>,
    <0 126 0xf01>,
    <0 127 0xf01>,
    <0 128 0xf01>,
    <0 129 0xf01>,
    <0 130 0xf01>,
    <0 131 0xf01>,
    <0 132 0xf01>,
    <0 133 0xf01>,
    <0 134 0xf01>,
    <0 135 0xf01>,
    <0 136 0xf01>,
    <0 137 0xf01>,
    <0 138 0xf01>,
    <0 139 0xf01>,
    <0 140 0xf01>,
    <0 141 0xf01>,
    <0 142 0xf01>,
    <0 143 0xf01>,
    <0 144 0xf01>,
    <0 145 0xf01>,
    <0 146 0xf01>,
    <0 147 0xf01>,
    <0 148 0xf01>,
    <0 149 0xf01>,
    <0 150 0xf01>,
    <0 151 0xf01>;
    interrupt-controller;
    #interrupt-cells = <2>;
    clocks = <&clkgpio>;
    clock-names = "gpio";
    };

    Thank you.

  • Hi Rajasekaran K,

    Thanks a lot for your time,

    I read your answer carefully, but it seems focus more on the Linux side, but the DSP should be uesd to  control the hardware,Linux just load the .out file.

    I also double check the ELF and configs according to the information provided by you.

    Is it possible for you to test the platform_test while using mpm to load it? I hope it won't  bother you too much.

    I will verify your answer as soon as I can,Thank you.

    Regards,

    kevin

  • Hi Kevin,

    I read your answer carefully, but it seems focus more on the Linux side, but the DSP should be uesd to control the hardware,Linux just load the .out file.

    Please find my understanding below:
    As of now, the ARM ( Linux kernel) controls the GPIO lines. If we need to access the same resource(GPIO) using DSP then we should make sure that the ARM is not configuring/using it.

    Thank you.
  • Hi Rajasekaran K,

    Thanks a lot for your time and useful help!

    Regards,
    kevin
  • Hi Kevin,
    Thank you for the update.