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.

dot.o uses VFP register arguments, dot.out does not

Other Parts Discussed in Thread: AM3359

Hello,

Using the Linaro toolchain in CCS6, I'm getting the subject error message.  I did not get this error message using another toolchain outside of CCS6.

I'm pretty sure I'm passing the correct flags to G++.  -mfloat-abi=hard and -mfpu=vfpv3-d16.  I'm also pretty sure I'm pointing to the correct lib @ "C:\ti\ccsv6\tools\compiler\gcc-arm-none-eabi-4_8-2014q3\arm-none-eabi\lib\armv7-ar\thumb\fpu"

I'm compiling with g++ on for a AM3359.

The only way I can get an executable is to link with softfp and not provide either of the flags above.

Any ideas on what's going on.

Thanks

  • Please post the full contents of the CCS Console (not Problems) view.  Use the Copy Build Log icon in the Console view to create the text file, then post it as an attachment in your next post.

    Thanks and regards,

    -George

  • see attached for build.log

    1731.build.log
    **** Build of configuration Debug for project MYAPP_APP ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" all 
    'Building file: ../main.cpp'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3"\bin\arm-none-eabi-g++ -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -mfpu=vfpv3-d16 -Dam3359 -I"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/include" -I"C:/Users/anicotra/workspace_v6_1/MYAPP_APP/MYAPP_X/Common/headers" -I"C:/Users/anicotra/workspace_v6_1/MYAPP_APP/MYAPP_X/Interfaces" -I"C:/Users/anicotra/workspace_v6_1/MYAPP_APP/MYAPP_X/Interfaces/libcas" -I"C:/Users/anicotra/workspace_v6_1/MYAPP_APP/MYAPP_X/Libraries/JSON" -I"C:/Users/anicotra/workspace_v6_1/MYAPP_APP/MYAPP_X/STM/headers" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d" -MT"main.d" -o"main.o"  "../main.cpp"
    'Finished building: ../main.cpp'
    ' '
    'Building target: MYAPP_APP.out'
    'Invoking: GNU Linker'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3"\bin\arm-none-eabi-g++ -mfloat-abi=hard -mfpu=vfpv3-d16 -Dam3359 -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"MYAPP_APP.map" -L"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu" -Wl,--defsym,STACKSIZE=0x400 -Wl,--defsym,HEAPSIZE=0x400 -Wl,--defsym,STACKSIZE=0x1C000 -o"MYAPP_APP.out" "./main.o" "./startup_ARMCA8.o" -Wl,-T"../AM335x.lds"  -Wl,--start-group -lg -lc -lnosys -lstdc++ -Wl,--end-group 
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: ./main.o uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ./main.o
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-exit.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-exit.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-impure.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-impure.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-init.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-init.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-memset.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-memset.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-__call_atexit.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-__call_atexit.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-atexit.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-atexit.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-fini.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-fini.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-__atexit.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libg.a(lib_a-__atexit.o)
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libnosys.a(_exit.o) uses VFP register arguments, MYAPP_APP.out does not
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/lib/armv7-ar/thumb/fpu\libnosys.a(_exit.o)
    collect2.exe: error: ld returned 1 exit status
    gmake: *** [MYAPP_APP.out] Error 1
    
    **** Build Finished ****
    

  • Anthony Nicotra said:
    I'm pretty sure I'm passing the correct flags to G++.  -mfloat-abi=hard and -mfpu=vfpv3-d16

    When I created a program for a AM3359 using the gcc-arm-none-eabi-4_8-2014q3 compiler with -mfloat-abi=hard and -mfpu=vfpv3-d16 I got similar errors:

    Invoking: GNU Linker
    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -mfloat-abi=hard -mfpu=vfpv3-d16 -Dam3359 -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"AM3359_GCC_floating_point.map" -Wl,--gc-sections -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 -o"AM3359_GCC_floating_point.out" "./main.o" "./startup_ARMCA8.o" -Wl,-T"../AM335x.lds"  -Wl,--start-group -l"gcc" -l"m" -l"rdimon" -l"c" -Wl,--end-group 
    /opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: error: ./main.o uses VFP register arguments, AM3359_GCC_floating_point.out does not
    /opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file ./main.o
    collect2: error: ld returned 1 exit status

    According to ARM Cortex-A Processors and GCC Command Lines the recommended -mfpu for a Cortex-A8 which only uses FP is vfpv3. When I changed the CCS project properties to set -mfpu=vfpv3 then the linker errors no longer occurred, and the sample program which calls sqrtf() operated correctly. I checked from the CCS disassembly view that hardware floating point instructions were being generated:

    80000254:   ED5B7A04            vldr       s15, [r11, #-0x10]
    80000258:   EEB78AE7            vcvt.f64.f32 d8, s15
    8000025c:   ED1B0A04            vldr       s0, [r11, #-0x10]
    80000260:   EB00000C            bl         sqrtf
    80000264:   EEF07A40            vmov.f32   s15, s0
    80000268:   EEF70AE7            vcvt.f64.f32 d16, s15
    8000026c:   EDCD0B00            vstr       d16, [sp]

  • Chester Gillon said:
    When I changed the CCS project properties to set -mfpu=vfpv3 then the linker errors no longer occurred

    On further investigation there is something strange about how CCS 6.1.2.00014 passes the -mfpu option to the GCC linker.

    1) If in the CCS project properties the -mfpu option is set to vfpv3, then -mfpu=vfpv3 is passed to the compiler, but not the linker and the link is successful:

    /opt/ti/ti_ccs6_1_1/ccsv6/utils/bin/gmake -k all 
    Building file: ../main.c
    Invoking: GNU Compiler
    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -mfpu=vfpv3 -Dam3359 -I"/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d" -MT"main.d" -o"main.o"  "../main.c"
    Finished building: ../main.c
     
    Building file: ../startup_ARMCA8.S
    Invoking: GNU Compiler
    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -mfpu=vfpv3 -Dam3359 -I"/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"startup_ARMCA8.d" -MT"startup_ARMCA8.d" -o"startup_ARMCA8.o"  "../startup_ARMCA8.S"
    Finished building: ../startup_ARMCA8.S
     
    Building target: AM3359_GCC_floating_point_new.out
    Invoking: GNU Linker
    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -mfloat-abi=hard -Dam3359 -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"AM3359_GCC_floating_point_new.map" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 -o"AM3359_GCC_floating_point_new.out" "./main.o" "./startup_ARMCA8.o" -Wl,-T"../AM335x.lds"  -Wl,--start-group -l"gcc" -l"m" -l"rdimon" -l"c" -Wl,--end-group 
    Finished building target: AM3359_GCC_floating_point_new.out
    

    2) If in the CCS project properties the -mfpu option is set to vfpv3-d16, then -mfpu=vfpv3-d16 is passed to the compiler and linker and the link fails:

    /opt/ti/ti_ccs6_1_1/ccsv6/utils/bin/gmake -k all 
    Building file: ../main.c
    Invoking: GNU Compiler
    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -mfpu=vfpv3-d16 -Dam3359 -I"/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d" -MT"main.d" -o"main.o"  "../main.c"
    Finished building: ../main.c
     
    Building file: ../startup_ARMCA8.S
    Invoking: GNU Compiler
    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -mfpu=vfpv3-d16 -Dam3359 -I"/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"startup_ARMCA8.d" -MT"startup_ARMCA8.d" -o"startup_ARMCA8.o"  "../startup_ARMCA8.S"
    Finished building: ../startup_ARMCA8.S
     
    Building target: AM3359_GCC_floating_point_new.out
    Invoking: GNU Linker
    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -mfloat-abi=hard -mfpu=vfpv3-d16 -Dam3359 -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"AM3359_GCC_floating_point_new.map" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 -o"AM3359_GCC_floating_point_new.out" "./main.o" "./startup_ARMCA8.o" -Wl,-T"../AM335x.lds"  -Wl,--start-group -l"gcc" -l"m" -l"rdimon" -l"c" -Wl,--end-group 
    /opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: error: ./main.o uses VFP register arguments, AM3359_GCC_floating_point_new.out does not
    /opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file ./main.o
    collect2: error: ld returned 1 exit status
    gmake: *** [AM3359_GCC_floating_point_new.out] Error 1
    gmake: Target `all' not remade because of errors.
    

    If I take the object files which were compiled with -mfpu=vfpv3-d16, and manually enter the linker command with the -mfpu option removed then the link is successful:

    "/opt/ti/ti_ccs6_1_1/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc" -mfloat-abi=hard -Dam3359 -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"AM3359_GCC_floating_point_new.map" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 -o"AM3359_GCC_floating_point_new.out" "./main.o" "./startup_ARMCA8.o" -Wl,-T"../AM335x.lds"  -Wl,--start-group -l"gcc" -l"m" -l"rdimon" -l"c" -Wl,--end-group
    

    The program created with this manually edited linker command can be successfully download and run.

    The compiler is taking note of the differences between  -mfpu=vfpv3-d16 and  -mfpu=vfpv3, in that with vfpv3-d16 have only seen floating point registers in the range 0-15 whereas with vfpv3 the compiler used floating point register d16.

    Not sure if the link failure when -mfpu=vfpv3-d16 is passed to the linker is an error in the linker, or in how CCS 6 generates the linker command line.

  • Chester,

    Thank you.  

    I was able to successfully compile and link by providing the manual link command, omitting -mfpu flag.  Although, I'm not sure what the difference is between using register 16 or 0-15 is..

  • I'm sorry, I'm not able to address your more general issues, but I can tell you vfpv3-d16 specifically means that only D0..D15 are used. You cannot use D16..D31 in this mode. This option is available because some devices only implement those registers and not D16..D31. vfpv3-d16 code will run on a vfpv3 device, but the reverse is not necessarily true.
  • Chester,

    I filed a bug today under the number SDSCM00052763. Please check its status in the link SDOWP in my signature below.

    I apologize for the inconvenience,
    Rafael