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.

Problem linking rebuild EDMA library

Other Parts Discussed in Thread: OMAP-L138, SYSBIOS, OMAPL138

I have been using the prebuilt edma3_lld_02_11_04_01 library successfully for the C6748 core of an OMAP-L138, but recently I wanted to use it for my same SysBIOS (bios_6_33_03_33) on the ARM9 core.

I found that the EDMA libraries were not pre-built for the ARM9 core, so I figured out how to modify makerules/env.mk to point to all the right tools and packages/component.mk to just build the OMAP-L138 targets, and successfully built (as far as I can tell) for both the ARM9 and C674x targets.

My first problem is that now my C6748 projects no longer build, complaining about such items as EDMA3_DRV_close.

The odd thing is that when I use nm, I can see that EDMA3_DRV_close is defined, i.e.,

bash-4.1$ c:/ti/ccsv5/tools/compiler/c6000/bin/nm6x.exe  "C:\ti\edma3_lld_02_11_04_01\packages\ti\sdo\edma3\drv\lib\674\debug\edma3_lld_drv.ae674"| grep EDMA3_DRV_close
00000000 t .text:_EDMA3_DRV_close
00000000 T _EDMA3_DRV_close

Yet even when I stick this very library manually on the end of the link line, it still doesn't find it, i.e., the error cut and paste from CCS5 is,

C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" --cmd_file="C:\Workdir\Vision\Software\ST4\DSP\DSP_lib\ST4_DSP_project.opt"  -mv6740 -g --define=ST_DO_TRACE --define=cmNoCodeTrace --display_error_number --diag_warning=225 --abi=eabi -z -m"ST4_DSP_app.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c6000/lib" --reread_libs --rom_model -o "ST4_DSP_app.out" ./version.obj -l"./configPkg/linker.cmd"  "./main.obj" -l"C:\Workdir\Vision\Generated\ST4\DSP\Release\DSP_alg.lib" -l"C:\Workdir\Vision\Software\ST4\DSP\DSP_lib\ST4_DSP_project_debug.cmd" -l"libc.a" -lc:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/drv/lib/674/release/edma3_lld_drv.ae674
<Linking>

 undefined                       first referenced                                                                                
  symbol                             in file                                                                                     
 ---------                       ----------------                                                                                
 EDMA3_DRV_close                 c:\Workdir\Vision\Software\ST4\DSP\DSP_lib\Debug\DSP_lib.lib<uart_drv.obj>                     

I'm not even sure how this is possible:   I can see the EDMA3_DRV_close symbol in the library, I see I am referencing the library (both explicitly here and the same library is in the generated linker.cmd file), but the symbol is not found.    The EDMA library was built as ELF (--abi=eabi), and uart_drv.obj was built with ELF (--abi=eabi), so I just can't tell what could be going wrong.

I'm fairly certain I am doing something wrong, but any pointers on what would be greatly appreciated.  

  • I think I worked around my problem.

    Instead of the "gmake libs FORMAT=ELF" that the documentation suggests, I took a look at the makefile, and decided to try "gmake all FORMAT=elf", and I saw EXACTLY the same linking problem.

    I then tried "gmake clean FORMAT=ELF" followed by "gmake all FORMAT=ELF", and lo and behold the DSP code linked just fine (both the example code and my existing SYSBIOS code), so something I did required the all target instead of the libs target.

    I did get a failure in building the ARM9 examples,

    C:/ti/ccsv5/tools/compiler/tms470/bin/cl470  -ppd=obj/omapl138-evm/arm9/debug/.deps/common.P -c -qq -pdsw225 -me -mv5e --abi=eabi -eo.oe9 -ea.se9   -g --symdebug:dwarf -Dxdc_target_name__=Arm9 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_4_6_1 -D_DEBUG_=1  -Dxdc_cfg__header__='obj/omapl138-evm/arm9/debug/edma3_drv_arm_omapl138_sample_configuro/package/cfg/edma3_drv_bios6_arm_omapl138_st_sample_xem3.h' --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile              -IC:/ti/ccsv5/tools/compiler/tms470/include -I../src -IC:/ti/bios_6_33_03_33/packages -IC:/ti/xdctools_3_23_01_43/packages -IC:/ti/edma3_lld_02_11_04_01/packages -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/rm -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/rm/src -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/drv -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/drv/src -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/rm/sample -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/rm/sample/src -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/drv/sample -IC:/ti/edma3_lld_02_11_04_01/packages/ti/sdo/edma3/drv/sample/src -fr=obj/omapl138-evm/arm9/debug -fs=obj/omapl138-evm/arm9/debug -fc ../src/common.c
    Command-line error: cannot open preprocessor output file obj\omapl138-evm\arm9\debug\.deps\common.P - No such file or directory
    1 fatal error detected in the compilation of "../src/common.c".
    Compilation terminated.

    but I was able to work around this by manually creating the directories edma3_lld_02_11_04_01/examples/edma3_driver/evmOMAPL138_ARM/obj/omapl138-evm/arm9/debug/.deps and edma3_lld_02_11_04_01/examples/edma3_driver/evmOMAPL138_ARM/obj/omapl138-evm/arm9/release/.deps

    With that in place (and my component.mk restricted to just build for the DSP and ARM cores of the OMAPL138), gmake all FORMAT=ELF worked, and my existing DSP code seems to link.

    So, to summarize

    • You need to fix the EDMA building instructions to specify "gmake clean FORMAT=ELF; gmake all FORMAT=ELF", or figure out why just "gmake libs FORMAT=ELF" doesn't build things that link properly
    • You need to fix your makefiles to automatically create the .deps directories for the examples.

     

     

  • Glad to see this was resolved