Hi Chuck,
I think I have solved it.
I had to add the $(FP_FLAGS) to the linking flags as well as the compile
ones .... didn't think of that ;-)
Thanks for the help,
Bernie
On Sat, Jul 11, 2015 at 6:29 PM, Bernard Mentink <bment...@gmail.com> wrote:
> Hi Chuck,
>
> By transcript you mean the output of the linking stage?
> I am using gcc as a frontend to do the linking.
>
> All my libs are compiled with the same float flags, it is the tools lib
> that doesn't seem to support hard float ....
>
> Here is the output from the linker stage ..
>
> ----------------------------------------------------------------------------------------------------------------------------
>
> /usr/bin/arm-none-eabi-g++ -Tnoddy.ld -nostartfiles
> -Wl,--gc-sections,-Map=dbg/noddy.map,-cref -mthumb -march=armv7-m
> -L/home/bmentink/opt/qpcpp/ports/arm-cm/qk/gnu/dbg -L../libopencm3/lib -o
> dbg/noddy.elf dbg/adc.o dbg/glue.o dbg/STM32_interface.o dbg/bsp.o
> dbg/pwm.o dbg/scan.o dbg/main.o dbg/modulation.o dbg/led.o
> -lqk_cortex-m4_dk -lqf_cortex-m4_dk -lqep_cortex-m4_dk -lopencm3_stm32f4
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_sin.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_sin.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-e_rem_pio2.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-e_rem_pio2.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-k_cos.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-k_cos.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-k_rem_pio2.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-k_rem_pio2.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-k_sin.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-k_sin.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_fabs.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_fabs.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_floor.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_floor.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_scalbn.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_scalbn.o)
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_copysign.o)
> does not
>
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
> failed to merge target specific data of file
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_copysign.o)
>
> collect2: error: ld returned 1 exit status
>
> Makefile:181: recipe for target 'dbg/noddy.elf' failed
>
> make: *** [dbg/noddy.elf] Error 1
>
>
> On Sat, Jul 11, 2015 at 6:08 PM, Chuck McManis <chuck.mcma...@gmail.com>
> wrote:
>
>> Well your next step here is to capture the entire link transcript with
>> nothing suppress and show it to us. Basically what that error is telling
>> you is that the linker is linking differently than your compiler is
>> compiling. You see it called out that your 'noddy.elf' file was compiled
>> with hard floats and you're not linking it to libraries with them. One of
>> the differences in the libopencm3 makefile.rules file is that it uses the
>> gcc frontend to link things as well. you could try that (just prefix your
>> link specific flags with -wl, ) It does work, I compile that way all the
>> time, you might grab the libopencm3-examples repo from github and have a
>> look for that.
>>
>> --Chuck
>>
>>
>> On Fri, Jul 10, 2015 at 10:58 PM, Bernard Mentink <bment...@gmail.com>
>> wrote:
>>
>>> Yes, I did.
>>>
>>> On Sat, Jul 11, 2015 at 5:53 PM, Chuck McManis <chuck.mcma...@gmail.com>
>>> wrote:
>>>
>>>> Just checking but you put your FP_FLAGS on that link line as well right?
>>>> --Chuck
>>>>
>>>>
>>>> On Fri, Jul 10, 2015 at 10:14 PM, Bernard Mentink <bment...@gmail.com>
>>>> wrote:
>>>>
>>>>> Nope, that still did not work .. same error.
>>>>>
>>>>> On Sat, Jul 11, 2015 at 4:57 PM, Chuck McManis <
>>>>> chuck.mcma...@gmail.com> wrote:
>>>>>
>>>>>> Nope, your ARCH is wrong, use the same -mcpu and it will grab the
>>>>>> correct architecture.
>>>>>> --Chuck
>>>>>>
>>>>>>
>>>>>> On Fri, Jul 10, 2015 at 9:55 PM, Bernard Mentink <bment...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Chuck,
>>>>>>>
>>>>>>> Thanks for the quick reply. My link flags are:
>>>>>>>
>>>>>>> LINKFLAGS = -T$(LD_SCRIPT) -nostartfiles \
>>>>>>> -Wl,--gc-sections,-Map=$(BIN_DIR)/$(OUTPUT).map \
>>>>>>> -mthumb -march=armv7-m -L$(QP_PORT_DIR)/$(BIN_DIR)
>>>>>>> -L$(OPENCM3_DIR)/lib
>>>>>>>
>>>>>>> I wonder if my -march is correct?
>>>>>>>
>>>>>>> Bernie
>>>>>>>
>>>>>>> On Sat, Jul 11, 2015 at 4:41 PM, Chuck McManis <
>>>>>>> chuck.mcma...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Well reading your error again I can see that you're error occurs
>>>>>>>> when linking not compiling, how do you link the final result?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Jul 10, 2015 at 9:39 PM, Bernard Mentink <
>>>>>>>> bment...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Chuck,
>>>>>>>>>
>>>>>>>>> Yes, I only showed you the floating point related flags, my total
>>>>>>>>> flags are:
>>>>>>>>>
>>>>>>>>> FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
>>>>>>>>>
>>>>>>>>> CPPFLAGS = -mcpu=cortex-m4 -mthumb -Wall \
>>>>>>>>> -fno-rtti -fno-exceptions \
>>>>>>>>> -Os $(INCLUDES) $(DEFINES) -DNDEBUG -fno-common \
>>>>>>>>> -Wall -Wextra \
>>>>>>>>> -Wredundant-decls \
>>>>>>>>> -Wundef -Wshadow $(FP_FLAGS) -ffunction-sections -fdata-sections
>>>>>>>>> -MD
>>>>>>>>>
>>>>>>>>> So still not sure what gives ..
>>>>>>>>>
>>>>>>>>> Bernie
>>>>>>>>>
>>>>>>>>> On Sat, Jul 11, 2015 at 4:24 PM, Chuck McManis <
>>>>>>>>> chuck.mcma...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> You should also define the CPU type in your c-flags (not all
>>>>>>>>>> Cortex CPUs *have* floating point. My flags look like this:
>>>>>>>>>>
>>>>>>>>>> $ make print-ARCH_FLAGS
>>>>>>>>>> ARCH_FLAGS=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard
>>>>>>>>>> -mfpu=fpv4-sp-d16
>>>>>>>>>> $
>>>>>>>>>>
>>>>>>>>>> And if you are wondering, I've got this in my Makefile.rules file
>>>>>>>>>> ...
>>>>>>>>>>
>>>>>>>>>> print-%:
>>>>>>>>>> @echo $*=$($*)
>>>>>>>>>>
>>>>>>>>>> Which lets you type 'make print-<target-name>' and it will print
>>>>>>>>>> out what that name is defined to be.
>>>>>>>>>>
>>>>>>>>>> --Chuck
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Fri, Jul 10, 2015 at 7:59 PM, Bernard Mentink <
>>>>>>>>>> bment...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Guys,
>>>>>>>>>>>
>>>>>>>>>>> I have the following error when trying to link my project after
>>>>>>>>>>> including some files using floats.
>>>>>>>>>>>
>>>>>>>>>>> arm-none-eabi/bin/ld: error: dbg/noddy.elf uses VFP register
>>>>>>>>>>> arguments,
>>>>>>>>>>> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_sin.o)
>>>>>>>>>>> does not
>>>>>>>>>>>
>>>>>>>>>>> My projects use the following FP compile flags:
>>>>>>>>>>> FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
>>>>>>>>>>>
>>>>>>>>>>> I am compiling for the STM32F4 target and want to use hardware
>>>>>>>>>>> float.
>>>>>>>>>>> It seems the tools won't allow that for some reason ..
>>>>>>>>>>>
>>>>>>>>>>> Any idea's anyone?
>>>>>>>>>>>
>>>>>>>>>>> Cheers,
>>>>>>>>>>> Bernie
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> -----------------------------------------------------------------------------------------------------------------------------------------
>>>>>>>>>>>
>>>>>>>>>>> *People born in the 50's have lived *
>>>>>>>>>>> *in seven decades.*
>>>>>>>>>>> *two centuries,*
>>>>>>>>>>> *and two millenniums.*
>>>>>>>>>>> *We had the best music, fastest cars, drive-in theaters, soda
>>>>>>>>>>> fountains, and happy days.*
>>>>>>>>>>> *And we are not even that old yet.*
>>>>>>>>>>> *We're just that cool.*
>>>>>>>>>>>
>>>>>>>>>>> ----------------------------------------------------------------------------------------------------------------------------------------
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Don't Limit Your Business. Reach for the Cloud.
>>>>>>>>>>> GigeNET's Cloud Solutions provide you with the tools and support
>>>>>>>>>>> that
>>>>>>>>>>> you need to offload your IT needs and focus on growing your
>>>>>>>>>>> business.
>>>>>>>>>>> Configured For All Businesses. Start Your Cloud Today.
>>>>>>>>>>> https://www.gigenetcloud.com/
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> libopencm3-devel mailing list
>>>>>>>>>>> libopencm3-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> -----------------------------------------------------------------------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> *People born in the 50's have lived *
>>>>>>>>> *in seven decades.*
>>>>>>>>> *two centuries,*
>>>>>>>>> *and two millenniums.*
>>>>>>>>> *We had the best music, fastest cars, drive-in theaters, soda
>>>>>>>>> fountains, and happy days.*
>>>>>>>>> *And we are not even that old yet.*
>>>>>>>>> *We're just that cool.*
>>>>>>>>>
>>>>>>>>> ----------------------------------------------------------------------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> -----------------------------------------------------------------------------------------------------------------------------------------
>>>>>>>
>>>>>>> *People born in the 50's have lived *
>>>>>>> *in seven decades.*
>>>>>>> *two centuries,*
>>>>>>> *and two millenniums.*
>>>>>>> *We had the best music, fastest cars, drive-in theaters, soda
>>>>>>> fountains, and happy days.*
>>>>>>> *And we are not even that old yet.*
>>>>>>> *We're just that cool.*
>>>>>>>
>>>>>>> ----------------------------------------------------------------------------------------------------------------------------------------
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> -----------------------------------------------------------------------------------------------------------------------------------------
>>>>>
>>>>> *People born in the 50's have lived *
>>>>> *in seven decades.*
>>>>> *two centuries,*
>>>>> *and two millenniums.*
>>>>> *We had the best music, fastest cars, drive-in theaters, soda
>>>>> fountains, and happy days.*
>>>>> *And we are not even that old yet.*
>>>>> *We're just that cool.*
>>>>>
>>>>> ----------------------------------------------------------------------------------------------------------------------------------------
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> -----------------------------------------------------------------------------------------------------------------------------------------
>>>
>>> *People born in the 50's have lived *
>>> *in seven decades.*
>>> *two centuries,*
>>> *and two millenniums.*
>>> *We had the best music, fastest cars, drive-in theaters, soda fountains,
>>> and happy days.*
>>> *And we are not even that old yet.*
>>> *We're just that cool.*
>>>
>>> ----------------------------------------------------------------------------------------------------------------------------------------
>>>
>>
>>
>
>
> --
>
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> *People born in the 50's have lived *
> *in seven decades.*
> *two centuries,*
> *and two millenniums.*
> *We had the best music, fastest cars, drive-in theaters, soda fountains,
> and happy days.*
> *And we are not even that old yet.*
> *We're just that cool.*
>
> ----------------------------------------------------------------------------------------------------------------------------------------
>
--
-----------------------------------------------------------------------------------------------------------------------------------------
*People born in the 50's have lived *
*in seven decades.*
*two centuries,*
*and two millenniums.*
*We had the best music, fastest cars, drive-in theaters, soda fountains,
and happy days.*
*And we are not even that old yet.*
*We're just that cool.*
----------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
libopencm3-devel mailing list
libopencm3-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel