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.

Compiler/TDA2EX17EVM: [Build Issue] errors encountered during linking

Part Number: TDA2EX17EVM

Tool/software: TI C/C++ Compiler

Hi TI Team

I modify usecase framecopy (vision_sdk\apps\src\rtos\alg_plugins\framecopy) to be my algorithm link and add a API in "Alg_FrameCopyProcess"(frameCopyAlgoLocalDma.c).But I build SDK fail and have the errors as below:

...

...

"E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/binaries/apps/tda2ex_evm_bios_all/obj/vision_sdk/tda2ex-evm/c66xdsp_1/release/vision_sdk_configuro/linker_mod.cmd", line 202: error:
program will not fit into available memory. placement with alignment fails
for section ".cinit" size 0x35c8be . Available memory ranges:
DSP1_DATA_MEM size: 0xd00000 unused: 0x2db2b2 max hole: 0x2db2a4
error: errors encountered during linking;
"E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/binaries/apps/tda2
ex_evm_bios_all/vision_sdk/bin/tda2ex-evm/vision_sdk_c66xdsp_1_release.xe66"
not built
gmake[7]: *** [E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/binaries/apps/tda2ex_evm_bios_all/vision_sdk/bin/tda2ex-evm/vision_sdk_c66xdsp_1_release.xe66] Error 1
gmake[7]: Leaving directory `E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/links_fw/src/rtos/bios_app_common/tda2ex/dsp1'
gmake[6]: *** [c66xdsp_1] Error 2
gmake[6]: Leaving directory `E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/links_fw/src/rtos/bios_app_common/tda2ex/dsp1'
gmake[5]: *** [apps_dsp1] Error 2
gmake[5]: Leaving directory `E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/links_fw/src/rtos'
gmake[4]: *** [apps] Error 2
gmake[4]: Leaving directory `E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/links_fw/src/rtos'
gmake[3]: *** [apps] Error 2
gmake[3]: Leaving directory `E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/apps'
gmake[2]: *** [apps_exe] Error 2
gmake[2]: Leaving directory `E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/build'
gmake[1]: *** [apps] Error 2
gmake[1]: Leaving directory `E:/jacob_adb/PROCESSOR_SDK_VISION_03_07_00_00/vision_sdk/build'
gmake: *** [vision_sdk] Error 2

I add the same API in "Alg_FrameCopyProcess"(frameCopyAlgoCpu.c) and it's OK.Could you give me some suggestions for the issue? Thanks so much.

Best Regards,

Jacob Lin

  • Hi,

    Its better that you increase your DSP data memory in memory map file by reducing any unwanted section size.

    please refer below doc

    vision_sdk\docs\FeatureSpecificUserGuides\VisionSDK_UserGuide_MemoryMap.pdf

    Regards,

    Anuj

  • Hi Anuj

    I refer the document to modify the DSP1_DATA_MEM and get another error as below:

    ...

    ...

    [IPU1-1] 13.359330 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [IPU1-1] 13.359482 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 254984 B (249 KB)
    [HOST ] 13.359940 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [HOST ] 13.359940 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 6291456 B (6144 KB), Free size = 6250736 B (6104 KB)
    [DSP1 ] 11.861038 s: IPC_IN_0 : Create in progress !!!
    [DSP1 ] 11.861465 s: IPC_IN_0 : Create Done !!!
    [DSP1 ] 11.861648 s: ALGORITHM: Create in progress (algId = 0) !!!
    [DSP1 ] 11.861739 s: ALG_FRAMECOPY: DMA: Allocated CH (TCC) = 0 (0)
    [DSP1 ] 11.873574 s: ALGORITHM: Create Done (algId = 0) !!!
    [DSP1 ] 11.873726 s: IPC_OUT_0 : Create in progress !!!
    [DSP1 ] 11.873787 s: IPC_OUT_0 : Create Done !!!
    [DSP1 ] 13.360184 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [DSP1 ] 13.360214 s: SYSTEM: Heap = LOCAL_L2 @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
    [DSP1 ] 13.360245 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 524288 B (512 KB), Free size = 504528 B (492 KB)
    [IPU2 ] 13.360733 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [IPU2 ] 13.360855 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 254936 B (248 KB)
    [DSP1 ] 13.859177 s:
    [DSP1 ] 13.859208 s: ### XDC ASSERT - ERROR CALLBACK START ###
    [DSP1 ] 13.859238 s:
    [DSP1 ] 13.859299 s: out of memory: handle=0x83d8b9b0, size=3686408
    [DSP1 ] 13.859330 s:
    [DSP1 ] 13.859330 s: ### XDC ASSERT - ERROR CALLBACK END ###
    [DSP1 ] 13.859360 s:
    [DSP1 ] 13.859482 s: ti.sysbios.heaps.HeapMem: line 221: ti.sysbios.heaps.HeapMem: line 221: out of memory: handle=0x83d8b9b0, size=3686408

    ...

    ...

    Do you give me suggestion again? Thanks a lot.

    Best Regards,

    Jacob Lin

  • Hi,

    Why are you allocating 3 MB of data from DSP1 local heap.

    We allocate only very small data from local heap.

    If the data size is large then please use Ulits_memAlloc() ang provide heapId as SR1.

    Regards,

    Anuj

  • Hi Anuj

    OK and I have resolved the issue.Thanks.

    Best Regards,

    Jacob Lin