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/TMS320C6727: Trying to link c67pfastMath library in CCS5.5

Part Number: TMS320C6727
Other Parts Discussed in Thread: MATHLIB

Tool/software: Code Composer Studio

Currently trying to implement the fastMath library onto my c6727 device.

I was at first trying to use c67xfastMath.lib, however I saw in another post on the forum that c67pfastMath.lib is better for c6727 devices.  I receive the same error regardless.

When trying to link, I receive the following error:

error #10056: symbol "_atandp" redefined: first defined in
"C:\ti\c67xmathlib_2_01_00_00\lib\c67pfastMath.lib<atandp.obj>"; redefined
in "C:\ti\c67xmathlib_2_01_00_00\lib\c67pfastMath.lib<atan2dp.obj>"

So it seems that _atandp is being defined in both atandp.obj and atand2dp.obj, however I haven't altered the library in any way.

 I have the most recent version of the MATHLIB library from http://www.ti.com/tool/MATHLIB

  • Hi,

    I couldn't hit the same problem as you. I was able to build the attached project in CCSv5.5 using compiler 7.4.4.

    However, if I tried to use the ELF binary format (the binary format better supported in more modern debuggers) I hit the issue below: 

    Console said:

    'Invoking: C6000 Linker'
    "C:/CCSv5_5_0/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv67p --abi=eabi -g --define=c6727 --display_error_number --diag_warning=225 --diag_wrap=off -z --stack_size=0x800 -m"Sinewave_C67p.map" --heap_size=0x800 -i"C:/CCSv5_5_0/ccsv5/tools/compiler/c6000_7.4.4/lib" -i"C:/CCSv5_5_0/ccsv5/tools/compiler/c6000_7.4.4/include" -i"C:/ti/c67xmathlib_2_01_00_00/lib" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="Sinewave_C67p_linkInfo.xml" --rom_model -o "Sinewave_C67p.out" "./sine.obj" "../C6727.cmd" -l"libc.a" -lc67pfastMath_elf.lib
    <Linking>
    error #16030-D: file "C:/ti/c67xmathlib_2_01_00_00/lib/c67pfastMath_elf.lib<atandp_v.obj>" expects 8-byte alignment of arrays, but previous files align arrays to 4 bytes
    error #16030-D: file "C:/ti/c67xmathlib_2_01_00_00/lib/c67pfastMath_elf.lib<sinsp_v.obj>" expects 8-byte alignment of arrays, but previous files align arrays to 4 bytes
    error #10010: errors encountered during linking; "Sinewave_C67p.out" not built

    >> Compilation failure
    gmake: *** [Sinewave_C67p.out] Error 1
    gmake: Target `all' not remade because of errors.

    In order to build the project I had to change the option from-mv=67p to -mv=6740. In this case, the source of the error is that the library <c67pfastMath_elf.lib> seems to have been originally built using this option set to C6740, which I suspect will generate incompatible code for the C6727. 

    To build for ELF I had to rebuild the library. I then imported the library project (instructions in the Readme.txt file), changed its Build Configuration to c67p (menu Project --> Build Configurations --> Set Active --> c67p_elf) then went to the project properties (menu Project --> Properties) and changed its settings in two places:

    Build --> C6000 Compiler --> Processor Options and change Target processor version to 67p

    Build --> C6000 Compiler --> Optimization --> Optimization level to 3

    I then rebuilt the library (menu Project --> Rebuild Project) and pointed to it in my project. 

    Both projects (my sample project with two build configurations for COFF and ELF) and the corrected library project follow attached. 

    Hope this helps,

    Rafael

    Sinewave_C67p.zip

    c67fastMath.zip

  • The project(s) I'm working on uses the COFF format so the using the ELF library wouldn't be an option. You were right about the fastMath library being built for c674x devices, so I rebuilt it for c67p. I received the same redefinition errors, but since I wasn't using atandp or atan2dp in my program, I just rebuilt the library without those files and my program was able to compile.

    Thanks,
    Josh