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.

RTOS/TMDSEVM572X: Adding IPC to DSP application

Part Number: TMDSEVM572X
Other Parts Discussed in Thread: AM5728, SYSBIOS

Tool/software: TI-RTOS

Hi, 


I am working with AM5728 EVM. I running Linux on A15 and RTOS on DSP core. I am trying to follow instructions for adding IPC to an application on DSP as referenced in this link -
http://processors.wiki.ti.com/index.php/Linux_IPC_on_AM57xx#Adding_IPC_to_an_existing_TI_RTOS_application_on_the_DSP

I am getting link errors -

<Linking>
"configPkg/linker.cmd", line 231: error #10099-D: program will not fit into available memory. run placement with alignment fails for section ".fardata" size 0x4001e57 . Available memory ranges:
EXT_DATA size: 0x100000 unused: 0xfe2f2 max hole: 0xfe2b6
error #10010: errors encountered during linking; "DSP1.out" not built


I tried commenting out GPIO code and I still get this error. I also tried building Release configuration but that too has same issue.


The RTOS SDK and Linux SDK versions are 04.01.00.06. 

I have attached the project zip -

DSP1.zip

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Build console output -

**** Clean-only build of configuration Release for project DSP1 ****

/home/hmedev/ti_4_01/ccsv7/utils/bin/gmake -k -j 2 clean -O
rm -rf "DSP1.hex" "configPkg/linker.cmd" "configPkg/compiler.opt" "DSP1.out"
rm -rf "configPkg/"
rm -rf "MainDsp1.obj" "Server.obj" "main_led_blink.obj" "rsc_table_vayu_dsp.obj"
rm -rf "MainDsp1.d" "Server.d" "main_led_blink.d" "rsc_table_vayu_dsp.d"
Finished clean

**** Build Finished ****

**** Build of configuration Release for project DSP1 ****

/home/hmedev/ti_4_01/ccsv7/utils/bin/gmake -k -j 2 all -O
gmake[1]: Entering directory '/home/hmedev/projects/DSP1/Release'
Building file: ../DSP1.cfg
Invoking: XDCtools
"/home/hmedev/ti_4_01/xdctools_3_32_02_25_core/xs" --xdcpath="/home/hmedev/ti_4_01/bios_6_46_05_55/packages;/home/hmedev/ti_4_01/pdk_am57xx_1_0_8/packages;/home/hmedev/ti_4_01/edma3_lld_2_12_05_29/packages;/home/hmedev/ti_4_01/ipc_3_46_02_04/packages;/home/hmedev/ti_4_01/ndk_2_25_01_11/packages;/home/hmedev/ti_4_01/uia_2_00_06_52/packages;/home/hmedev/ti_4_01/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.evmDRA7XX:dsp1 -r release -b "/home/hmedev/projects/DSP1/config.bld" -c "/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3" "../DSP1.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring DSP1.xe66 from package/cfg/DSP1_pe66.cfg ...
generating custom ti.sysbios library makefile ...
generating custom ti.sdo.utils library makefile ...
generating custom ti.sdo.ipc library makefile ...
Linking with library ti.board:./lib/evmAM572x/c66/release/ti.board.ae66
Linking with library ti.drv.i2c:./lib/c66/release/ti.drv.i2c.ae66
Linking with library ti.utils.profiling:./lib/c66/release/ti.utils.profiling.ae66
Linking with library ti.csl:./lib/am572x/c66/release/ti.csl.ae66
Linking with library ti.osal:./lib/tirtos/c66/release/ti.osal.ae66
Starting build of library sources ...
making /home/hmedev/projects/DSP1/src/ipc.ae66 ...
gmake[1]: Entering directory `/home/hmedev/projects/DSP1/src/ipc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/home/hmedev/projects/DSP1/src/ipc'
making /home/hmedev/projects/DSP1/src/utils.ae66 ...
gmake[1]: Entering directory `/home/hmedev/projects/DSP1/src/utils'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/home/hmedev/projects/DSP1/src/utils'
making /home/hmedev/projects/DSP1/src/sysbios/sysbios.ae66 ...
gmake[1]: Entering directory `/home/hmedev/projects/DSP1/src/sysbios'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/home/hmedev/projects/DSP1/src/sysbios'
Build of libraries done.
cle66 package/cfg/DSP1_pe66.c ...
Finished building: ../DSP1.cfg

gmake[1]: Leaving directory '/home/hmedev/projects/DSP1/Release'
Building file: ../MainDsp1.c
Invoking: C6000 Compiler
"/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6600 -O2 --include_path="/home/hmedev/projects/DSP1" --include_path="/home/hmedev/ti/drv/gpio" --include_path="/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/include" -g --define=SOC_AM572x --define=evmAM572x --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_wrap=off --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --exit_hook=ti_utils_exit --exit_parm=address --entry_parm=address --entry_hook=ti_utils_entry --preproc_with_compile --preproc_dependency="MainDsp1.d" --cmd_file="configPkg/compiler.opt" "../MainDsp1.c"
Finished building: ../MainDsp1.c

Building file: ../Server.c
Invoking: C6000 Compiler
"/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6600 -O2 --include_path="/home/hmedev/projects/DSP1" --include_path="/home/hmedev/ti/drv/gpio" --include_path="/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/include" -g --define=SOC_AM572x --define=evmAM572x --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_wrap=off --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --exit_hook=ti_utils_exit --exit_parm=address --entry_parm=address --entry_hook=ti_utils_entry --preproc_with_compile --preproc_dependency="Server.d" --cmd_file="configPkg/compiler.opt" "../Server.c"
"../Server.c", line 105: warning #227-D: the format string ends before this argument
Finished building: ../Server.c

Building file: ../rsc_table_vayu_dsp.c
Invoking: C6000 Compiler
"/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6600 -O2 --include_path="/home/hmedev/projects/DSP1" --include_path="/home/hmedev/ti/drv/gpio" --include_path="/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/include" -g --define=SOC_AM572x --define=evmAM572x --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_wrap=off --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --exit_hook=ti_utils_exit --exit_parm=address --entry_parm=address --entry_hook=ti_utils_entry --preproc_with_compile --preproc_dependency="rsc_table_vayu_dsp.d" --cmd_file="configPkg/compiler.opt" "../rsc_table_vayu_dsp.c"
Finished building: ../rsc_table_vayu_dsp.c

Building file: ../main_led_blink.c
Invoking: C6000 Compiler
"/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6600 -O2 --include_path="/home/hmedev/projects/DSP1" --include_path="/home/hmedev/ti/drv/gpio" --include_path="/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/include" -g --define=SOC_AM572x --define=evmAM572x --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_wrap=off --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --exit_hook=ti_utils_exit --exit_parm=address --entry_parm=address --entry_hook=ti_utils_entry --preproc_with_compile --preproc_dependency="main_led_blink.d" --cmd_file="configPkg/compiler.opt" "../main_led_blink.c"
Finished building: ../main_led_blink.c

Building target: DSP1.out
Invoking: C6000 Linker
"/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6600 -O2 -g --define=SOC_AM572x --define=evmAM572x --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_wrap=off --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --exit_hook=ti_utils_exit --exit_parm=address --entry_parm=address --entry_hook=ti_utils_entry -z -m"DSP1.map" -i"/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/lib" -i"/home/hmedev/ti_4_01/ti-cgt-c6000_8.1.3/include" --reread_libs --diag_wrap=off --warn_sections --display_error_number --xml_link_info="DSP1_linkInfo.xml" --rom_model -o "DSP1.out" "./MainDsp1.obj" "./Server.obj" "./main_led_blink.obj" "./rsc_table_vayu_dsp.obj" -l"configPkg/linker.cmd" -llibc.a -llibc.a
<Linking>
"configPkg/linker.cmd", line 231: error #10099-D: program will not fit into available memory. run placement with alignment fails for section ".fardata" size 0x4001e57 . Available memory ranges:
EXT_DATA size: 0x100000 unused: 0xfe2f2 max hole: 0xfe2b6
error #10010: errors encountered during linking; "DSP1.out" not built

>> Compilation failure
makefile:142: recipe for target 'DSP1.out' failed
gmake[1]: *** [DSP1.out] Error 1
makefile:138: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

  • This issue seems to be similar to the issue discussed here:

    You can try to build this in release mode and reduce the heap mem and additional memory requirements to see if this resolves the issue.  

    It appears the memory requirements of components have increased since the time of creation of the article which is causing this issue.  Once such issue that we noticed was with OSAL layer seems to be statically allocating memory pools assuming certain number of semaphores and HWIs. Check for the following code in OSAL.

    Locate following code in pdk_am57xx_1_0_9\packages\ti\osal\src\tirtos

    /* global pool of statically allocated semaphore pools */
    static SemaphoreP_tiRtos gOsalSemPTiRtosPool[OSAL_TIRTOS_CONFIGNUM_SEMAPHORE] = {{0}};

    /* global pool of statically allocated semaphore pools */
    static HwiP_tiRtos gOsalHwiPTiRtosPool[OSAL_TIRTOS_CONFIGNUM_HWI] = {{0}};

    Looking at osal.h, the macros OSAL_TIRTOS_CONFIGNUM_SEMAPHORE and OSAL_TIRTOS_CONFIGNUM_HWI default to 100U if not defined by the application. Can you try to override these using smaller numbers to see if this helps reduce the statically allocated pool sizes without impacting functionality.

    Regards,

    Rahul

  • Hi Rahul,

    Thanks for the prompt reply. I tried building this in release mode - that didn't work for me.

    I have pdk v1.0.8, and I couldn't find the code you referred above in pdk_am57xx_1_0_8\packages\ti\osal\src\tirtos directory.

    I am using xdc tools version 3.32.2.25_core. ( I also tried out 3.32.1.22_core) - both didnt work.

    Regards,
    Jimit
  • Jimit,

    If this didn`t work for you then the only option that I see is to increase the DSP CARVEOUT in Linux and then update the Resource Table
    processors.wiki.ti.com/.../Linux_IPC_on_AM57xx

    HEre is an App note that describes the same for IPU:
    www.ti.com/.../sprac08a.pdf

    Regards,
    Rahul