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.

compiling DVSDK 3 CE Examples with Linaro Toolchain fails

I can compile the CE Examples with the OpenEmbedded toolchain just fine, but when I switch to Linaro I get linker errors about undefined references for

  • __aeabi_uidivmod
  • atexit
  • __aeabi_uidiv

However, these references come from the DSP / C6000 / XDC compiled objects, not in my code. My code compiles and links fine, up to the point that it links in with the DSP code.

 

The only change in the two setups is in dvsdk_3_01_00_10/Rules.make and in my project's xdcpaths.mak

Rules.make with OpenEmbedded

CSTOOL_DIR=$(OVEROTOP)/tmp/sysroots/i686-linux/usr/armv7a
CSTOOL_PREFIX=$(CSTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-

xdcpaths.mak

CGTOOLS_V5T := $(OVEROTOP)/tmp/sysroots/i686-linux/usr/armv7a
CC_V5T := bin/arm-angstrom-linux-gnueabi-

 

Rules.make with Linaro

CSTOOL_DIR=/usr
CSTOOL_PREFIX=$(CSTOOL_DIR)/bin/arm-linux-gnueabi-

xdcpaths.mak

CGTOOLS_V5T := /usr
CC_V5T := bin/arm-linux-gnueabi-gcc

 

The problem seems to be an incompatibility between C6000CGT6.1.12/lib/libc.a and /usr/arm-linux-gnueabi/lib/libc.a when everything finally gets linked together.

  • A little tweak to linkcmd.xdt got me most of the way there.
    ~/ti/dvsdk/dvsdk_3_01_00_10/xdctools_3_16_01_27/packages/gnu/targets/arm/linkcmd.xdt

    INPUT(
       %for (var i = 0; i < $args.length; i++) {
       `$args[i]`
       %}

       /usr/lib/gcc/arm-linux-gnueabi/4.5.2/libgcc_eh.a

       /usr/lib/arm-linux-gnueabi/libc.a

       /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5/libgcc.a
    )

     

    Also:

    __aeabi_unwind_cpp_pr0 is part of the standard ARM exception

    handling code and helps in unwinding the stack frame when an exception
    occurs.

    __aeabi_unwind_cpp_pr0 is defined in libgcc_eh.a

     

  • Thanks for posting that info! Worked great!