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.

CCS/AM5728: setup a ccs project for DSP2

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

 I had get a CCS project compile for AM5728 dsp1 runs well now. I want to make the project run on DSP2 core too.

How can I set up a  new ccs project for DSP2(with SYSBIOS)? Can I just change some setting on the DSP1 project to get it run on DSP2?

It's thers some example project for dsp2 (and other IPU core too)?

For now ,the dps1 's platform is  "ti.platforms.evmDRA7XX:dsp1"

  • Hi,

    Please check: software-dl.ti.com/.../How_to_Guides.html This is the example for using DSP1 and DSP2 using SYSBIOS.

    We also have no-SYSBIOS multi-core boot example (including DSP1 and DSP2) under software-dl.ti.com/.../Foundational_Components.html section 4.6.3.2.6. Test Application

    Regards, Eric
  • I download the GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc CCS porject and make it change to dsp2

    what I do is :

    1)#define VAYU_DSP_2 in rsc_table_vayu_dsp.c

    2) edit platfarm to : ti.platforms.evmDRA7XX:dsp2

    3 ) chang the cfg file :Program.global.procName = "DSP2";

    and here isthe error message when load the fireware:

    [ 168.964031] remoteproc remoteproc3: Booting fw image dsp2.out, size 4238616
    [ 168.978341] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [ 168.984239] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
    [ 168.990208] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
    [ 169.000208] omap-rproc 41000000.dsp: failed to allocate dma memory: len 0x100000
    [ 169.007642] remoteproc remoteproc3: Failed to process resources: -12
    [ 169.014299] remoteproc remoteproc3: failed to unmap 4194304/0
    [ 169.028340] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
    [ 169.041319] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [ 169.047894] remoteproc remoteproc3: Boot failed: -12

    the memory map is not changed with my board .

    what had I missed?
  • Hi,

    Maybe my previous reply is a little bit confused, do you want to run Linux on ARM + DSP on DSP2 with IPC? Or your goal is simply changing an existing CCS project (e.g. GPIO blinking) from DSP1 to DSP2?

    Regards, Eric
  • Yes , I just want to change my DSP1project to  DSP2.  

    So I test  with the simple GPIO blinking project, but fail.

  • Hi,

    Thanks for the clarification! I tested GPIO_LedBlink_idkAM572x_c66xTestProject on DSP1, it worked. Then I tested it on DSP2, it failed.

    From the CCS project, the RTSC platform:
    platform: ti.platforms.idkAM572X
    target: ti.targets.elf.C66

    You don't need to change. The DSP1 and DSP2 can have the same platform unless you want to customize the memory layout.

    In debug, I saw GPIOTriggerPinInt() in the while loop is not called. Then I tried to poke registers on GPIO to simulate this function, I saw the AppGpioCallbackFxn() can be entered. So there is no issue for the GPIO interrupt mapping on DSP2. The issue came from the UART parts, there are two UART print in the main_led_blink.c
    //GPIO_log("\n GPIO Led Blink Application \n");
    //UART_printStatus("\n All tests have passed \n");

    I commented them out and DSP2 LED blinking worked as it is. You may comment out UART print as a workaround so far, while the UART used an interrupt "34" in UART_SOC.c, still need to debug why it worked on DSP1, but not DSP2.

    Regards, Eric
  • Thanks Iding.

      I do need to customize the memory layout,enlarge the memory in my real project.

    So, is dsp1 dsp2 must be add to the platform name? or just edit the resource table in the c file ?

    I will test you setting latter and let you konw the result. 

    Thans again.

  • It can' pass the compile after change the platform to ti.platforms.idkAM572X;

    And I had test with the old platform setting without dsp1 or dsp2 string,  the same error happend.
    here is the error message:

    **** Build of configuration Debug for project GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc ****

    "D:\\ti\\ccsv7\\utils\\bin\\gmake" -k all
    gmake[1]: Entering directory 'E:/AM5728/GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc/Debug'
    'Building file: ../gpio_test_evmAM572x.cfg'
    'Invoking: XDCtools'
    "D:/ti/xdctools_3_32_01_22_core/xs" --xdcpath="D:/ti/ipc_3_46_00_02/packages;D:/ti/bios_6_46_05_55/packages;D:/ti/pdk_am57xx_1_0_7/packages;D:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.idkAM572X -r debug -b "E:/AM5728/GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc/config.bld" -c "D:/ti/ti-cgt-c6000_8.1.3" "../gpio_test_evmAM572x.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring gpio_test_evmAM572x.xe66 from package/cfg/gpio_test_evmAM572x_pe66.cfg ...
    subdir_rules.mk:47: recipe for target 'build-526065039-inproc' failed
    error: ti.ipc.remoteproc.Resource: "D:/ti/ipc_3_46_00_02/packages/ti/ipc/remoteproc/Resource.xs", line 57: ti.ipc.remoteproc.Resource : IpcMemory.loadSegment not found
    js: "D:/ti/ipc_3_46_00_02/packages/ti/ipc/remoteproc/Resource.xs", line 59: TypeError: Cannot read property "base" from null (D:/ti/ipc_3_46_00_02/packages/ti/ipc/remoteproc/Resource.xs#59)
    gmake.exe: *** [package/cfg/gpio_test_evmAM572x_pe66.xdl] Error 1
    js: "D:/ti/xdctools_3_32_01_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake[1]: *** [build-526065039-inproc] Error 1
    gmake[1]: Leaving directory 'E:/AM5728/GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc/Debug'
    subdir_rules.mk:44: recipe for target 'build-526065039' failed
    gmake: *** [build-526065039] Error 2
    gmake: Target 'all' not remade because of errors.

  • Hi,

    The standalone GPIO LED blink on C66x has no issue to compile. As you are doing IPC and resource table, I added my colleague for help.

    Regards, Eric
  • Hello,

    Since you changed the platform to "ti.platforms.idkAM572X," in config.bld of your project, please change the platforms from "ti.platforms.DRA7XX" to "ti.platforms.idkAM572X"
  • I change all platform string form evmDRA7XX to  idkAM572X , but still get fail in compile:


    "D:\\ti\\ccsv7\\utils\\bin\\gmake" -k all
    gmake[1]: Entering directory 'E:/AM5728/GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc/Debug'
    'Building file: ../gpio_test_evmAM572x.cfg'
    'Invoking: XDCtools'
    "D:/ti/xdctools_3_32_01_22_core/xs" --xdcpath="D:/ti/ipc_3_46_00_02/packages;D:/ti/bios_6_46_05_55/packages;D:/ti/pdk_am57xx_1_0_7/packages;D:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.idkAM572X -r debug -b "E:/AM5728/GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc/config.bld" -c "D:/ti/ti-cgt-c6000_8.1.3" "../gpio_test_evmAM572x.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring gpio_test_evmAM572x.xe66 from package/cfg/gpio_test_evmAM572x_pe66.cfg ...
    subdir_rules.mk:47: recipe for target 'build-526065039-inproc' failed
    error: ti.ipc.remoteproc.Resource: "D:/ti/ipc_3_46_00_02/packages/ti/ipc/remoteproc/Resource.xs", line 57: ti.ipc.remoteproc.Resource : IpcMemory.loadSegment not found
    js: "D:/ti/ipc_3_46_00_02/packages/ti/ipc/remoteproc/Resource.xs", line 59: TypeError: Cannot read property "base" from null (D:/ti/ipc_3_46_00_02/packages/ti/ipc/remoteproc/Resource.xs#59)
    gmake.exe: *** [package/cfg/gpio_test_evmAM572x_pe66.xdl] Error 1
    js: "D:/ti/xdctools_3_32_01_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake[1]: *** [build-526065039-inproc] Error 1
    gmake: *** [build-526065039] Error 2
    gmake[1]: Leaving directory 'E:/AM5728/GPIO_LedBlink_evmAM572x_c66xExampleProject_with_ipc/Debug'
    subdir_rules.mk:44: recipe for target 'build-526065039' failed
    gmake: Target 'all' not remade because of errors.

  • Hello,

    There is still some mismatch in the platforms, or you are missing the following lines in the .cfg file.

    var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
    Resource.loadSegment = Program.platform.dataMemory;

    Let us start with a known working example and go from there. Please download the following project for DSP1.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/7723.GPIO_5F00_LedBlink_5F00_evmAM572x_5F00_c66xExampleProject_5F00_with_5F00_ipc.zip

    To get it running on DSP2, you will need to make the following modifications, at minimum. I have not tested this out yet, so there may be more changes we will need to make.

    1. Change the project's platform from :dsp1 to :dsp2.

    2. In the .cfg file, 

    Change,

    xdc.global.procName = "DSP1";
    

    to 

    xdc.global.procName = "DSP2";
    

    and change the line,

    TimerSupport.availMask = 0x0030;
    

    to the following, since DSP2 will use timers 7 and 8 instead of 5 and 6.

    TimerSupport.availMask = 0x00C0;
    

    3. In rsc_table_vayu_dsp.c, change 

    #define VAYU_DSP_1

    to 

    #define VAYU_DSP_2

    Please try this and let me know how it goes.