public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] GCC toolchain with HW floating-point enabled
@ 2013-04-06 10:23 Davide Pippa
  2013-04-06 10:41 ` Ilija Kocho
  0 siblings, 1 reply; 6+ messages in thread
From: Davide Pippa @ 2013-04-06 10:23 UTC (permalink / raw)
  To: ecos-discuss

Hi!

I've recently updated my ecos CVS, and made a new rom using the new hw
floating point support (I'm compiling for TWR-K70F120M). The rom
builds fine, but the application I used to work with complains during
compilation:

make all
Building file: ../main.cpp
Invoking: ARM devkitPro Windows GCC C++ Compiler
arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/include"
-O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
-fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
-mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
"../main.cpp"
../main.cpp: In function ‘void cyg_user_start()’:
../main.cpp:33:30: warning: deprecated conversion from string constant
to ‘char*’ [-Wwrite-strings]
../main.cpp: In function ‘void main_thread_entry(cyg_addrword_t)’:
../main.cpp:80:87: warning: deprecated conversion from string constant
to ‘char*’ [-Wwrite-strings]
../main.cpp: In function ‘void udpecho_thread_entry(void*)’:
../main.cpp:107:20: warning: unused variable ‘port’ [-Wunused-variable]
../main.cpp:110:9: warning: variable ‘j’ set but not used
[-Wunused-but-set-variable]
Finished building: ../main.cpp

Building target: demo1.elf
Invoking: ARM devkitPro Windows GCC C++ Linker
arm-eabi-g++ -T"target.ld" -nostdlib
-LH:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/lib -Wl,-Map,demo1.map
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2
-o "demo1.elf"  ./main.o
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
error: demo1.elf uses VFP register arguments,
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
does not
makefile:59: recipe for target `demo1.elf' failed
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
failed to merge target specific data of file
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
error: demo1.elf uses VFP register arguments,
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
does not
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
failed to merge target specific data of file
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
error: demo1.elf uses VFP register arguments,
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
does not
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
failed to merge target specific data of file
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
collect2: ld returned 1 exit status
make: *** [demo1.elf] Error 1

The application is built with HW fpu enabled, but it seems that
libgcc.a is not floating-point aware (sort-of?)... is there any new
release of the 4.6.3 gcc toolchain built with floating point support?
Or is there any guide to rebuild the 4.6.3 gcc toolchain myself?

Thanks!

Pyper.

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] GCC toolchain with HW floating-point enabled
  2013-04-06 10:23 [ECOS] GCC toolchain with HW floating-point enabled Davide Pippa
@ 2013-04-06 10:41 ` Ilija Kocho
  2013-06-04 10:41   ` Davide Pippa
  0 siblings, 1 reply; 6+ messages in thread
From: Ilija Kocho @ 2013-04-06 10:41 UTC (permalink / raw)
  To: Davide Pippa; +Cc: ecos-discuss

Hi David.

We have a GCC (test) release with FPU support for Cortex-M4F in eCos
gnutools. You shall find information for download and installation here.
http://ecos.sourceware.org/ml/ecos-discuss/2012-06/msg00047.html

As this is still test release, your feedback will be appreciated.

Ilija

On 06.04.2013 12:23, Davide Pippa wrote:
> Hi!
>
> I've recently updated my ecos CVS, and made a new rom using the new hw
> floating point support (I'm compiling for TWR-K70F120M). The rom
> builds fine, but the application I used to work with complains during
> compilation:
>
> make all
> Building file: ../main.cpp
> Invoking: ARM devkitPro Windows GCC C++ Compiler
> arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/include"
> -O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
> -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
> -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
> "../main.cpp"
> ../main.cpp: In function ‘void cyg_user_start()’:
> ../main.cpp:33:30: warning: deprecated conversion from string constant
> to ‘char*’ [-Wwrite-strings]
> ../main.cpp: In function ‘void main_thread_entry(cyg_addrword_t)’:
> ../main.cpp:80:87: warning: deprecated conversion from string constant
> to ‘char*’ [-Wwrite-strings]
> ../main.cpp: In function ‘void udpecho_thread_entry(void*)’:
> ../main.cpp:107:20: warning: unused variable ‘port’ [-Wunused-variable]
> ../main.cpp:110:9: warning: variable ‘j’ set but not used
> [-Wunused-but-set-variable]
> Finished building: ../main.cpp
>
> Building target: demo1.elf
> Invoking: ARM devkitPro Windows GCC C++ Linker
> arm-eabi-g++ -T"target.ld" -nostdlib
> -LH:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/lib -Wl,-Map,demo1.map
> -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2
> -o "demo1.elf"  ./main.o
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> error: demo1.elf uses VFP register arguments,
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
> does not
> makefile:59: recipe for target `demo1.elf' failed
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> failed to merge target specific data of file
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> error: demo1.elf uses VFP register arguments,
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
> does not
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> failed to merge target specific data of file
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> error: demo1.elf uses VFP register arguments,
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
> does not
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> failed to merge target specific data of file
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
> collect2: ld returned 1 exit status
> make: *** [demo1.elf] Error 1
>
> The application is built with HW fpu enabled, but it seems that
> libgcc.a is not floating-point aware (sort-of?)... is there any new
> release of the 4.6.3 gcc toolchain built with floating point support?
> Or is there any guide to rebuild the 4.6.3 gcc toolchain myself?
>
> Thanks!
>
> Pyper.
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] GCC toolchain with HW floating-point enabled
  2013-04-06 10:41 ` Ilija Kocho
@ 2013-06-04 10:41   ` Davide Pippa
  2013-06-04 11:24     ` Ilija Kocho
  2013-06-04 11:35     ` Ilija Kocho
  0 siblings, 2 replies; 6+ messages in thread
From: Davide Pippa @ 2013-06-04 10:41 UTC (permalink / raw)
  To: ilijak; +Cc: ecos-discuss

Hi!

I tried to update ecos to latest cvs and rebuilding the whole rom, but
I still have that problem.
I was already using the GCC test release that you pointed me.
What it seems to me is that I'm linking to the wrong version of libgcc
anyway (a version not supporting hardware floating point), as the
problems arise in libgcc (linking log points to bpapi, _divdi3,
_udivdi3 functions):

/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
error: demo1.elf uses VFP register arguments,
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
does not
makefile:59: recipe for target `demo1.elf' failed
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
failed to merge target specific data of file
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
error: demo1.elf uses VFP register arguments,
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
does not
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
failed to merge target specific data of file
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
error: demo1.elf uses VFP register arguments,
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
does not
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
failed to merge target specific data of file
/cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)

demo1.elf only contains an object of mine (main.o), which is compiled
with hardware floating point, as flags indicate:

arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/04001_TWR-K70F120M/include"
-O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
-fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
-mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
"../main.cpp"

I've seen there is many libgcc versions in the toolchain directory
(gnuttols/arm-eabi/lib/gcc/), which should I pick?
Is there some compiler flags to indicate which version to pick, or
should I just copy files over the version that currently is being
linked?

Thanks!

Davide




2013/4/6 Ilija Kocho <ilijak@siva.com.mk>:
> Hi David.
>
> We have a GCC (test) release with FPU support for Cortex-M4F in eCos
> gnutools. You shall find information for download and installation here.
> http://ecos.sourceware.org/ml/ecos-discuss/2012-06/msg00047.html
>
> As this is still test release, your feedback will be appreciated.
>
> Ilija
>
> On 06.04.2013 12:23, Davide Pippa wrote:
>> Hi!
>>
>> I've recently updated my ecos CVS, and made a new rom using the new hw
>> floating point support (I'm compiling for TWR-K70F120M). The rom
>> builds fine, but the application I used to work with complains during
>> compilation:
>>
>> make all
>> Building file: ../main.cpp
>> Invoking: ARM devkitPro Windows GCC C++ Compiler
>> arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/include"
>> -O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
>> -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
>> -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
>> "../main.cpp"
>> ../main.cpp: In function ‘void cyg_user_start()’:
>> ../main.cpp:33:30: warning: deprecated conversion from string constant
>> to ‘char*’ [-Wwrite-strings]
>> ../main.cpp: In function ‘void main_thread_entry(cyg_addrword_t)’:
>> ../main.cpp:80:87: warning: deprecated conversion from string constant
>> to ‘char*’ [-Wwrite-strings]
>> ../main.cpp: In function ‘void udpecho_thread_entry(void*)’:
>> ../main.cpp:107:20: warning: unused variable ‘port’ [-Wunused-variable]
>> ../main.cpp:110:9: warning: variable ‘j’ set but not used
>> [-Wunused-but-set-variable]
>> Finished building: ../main.cpp
>>
>> Building target: demo1.elf
>> Invoking: ARM devkitPro Windows GCC C++ Linker
>> arm-eabi-g++ -T"target.ld" -nostdlib
>> -LH:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/lib -Wl,-Map,demo1.map
>> -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2
>> -o "demo1.elf"  ./main.o
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>> error: demo1.elf uses VFP register arguments,
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
>> does not
>> makefile:59: recipe for target `demo1.elf' failed
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>> failed to merge target specific data of file
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>> error: demo1.elf uses VFP register arguments,
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
>> does not
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>> failed to merge target specific data of file
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>> error: demo1.elf uses VFP register arguments,
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
>> does not
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>> failed to merge target specific data of file
>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
>> collect2: ld returned 1 exit status
>> make: *** [demo1.elf] Error 1
>>
>> The application is built with HW fpu enabled, but it seems that
>> libgcc.a is not floating-point aware (sort-of?)... is there any new
>> release of the 4.6.3 gcc toolchain built with floating point support?
>> Or is there any guide to rebuild the 4.6.3 gcc toolchain myself?
>>
>> Thanks!
>>
>> Pyper.
>>
>

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] GCC toolchain with HW floating-point enabled
  2013-06-04 10:41   ` Davide Pippa
@ 2013-06-04 11:24     ` Ilija Kocho
  2013-06-04 11:35     ` Ilija Kocho
  1 sibling, 0 replies; 6+ messages in thread
From: Ilija Kocho @ 2013-06-04 11:24 UTC (permalink / raw)
  To: Davide Pippa; +Cc: ecos-discuss

Hi Davide

Probably you have some files compiled with -mfloat-abi-soft and some
with -mfloat-abi=hard. They are not compatible. Try to compile all files
with same floating point flags.

Ilija

On 04.06.2013 12:41, Davide Pippa wrote:
> Hi!
>
> I tried to update ecos to latest cvs and rebuilding the whole rom, but
> I still have that problem.
> I was already using the GCC test release that you pointed me.
> What it seems to me is that I'm linking to the wrong version of libgcc
> anyway (a version not supporting hardware floating point), as the
> problems arise in libgcc (linking log points to bpapi, _divdi3,
> _udivdi3 functions):
>
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> error: demo1.elf uses VFP register arguments,
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
> does not
> makefile:59: recipe for target `demo1.elf' failed
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> failed to merge target specific data of file
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> error: demo1.elf uses VFP register arguments,
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
> does not
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> failed to merge target specific data of file
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> error: demo1.elf uses VFP register arguments,
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
> does not
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
> failed to merge target specific data of file
> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
>
> demo1.elf only contains an object of mine (main.o), which is compiled
> with hardware floating point, as flags indicate:
>
> arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/04001_TWR-K70F120M/include"
> -O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
> -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
> -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
> "../main.cpp"
>
> I've seen there is many libgcc versions in the toolchain directory
> (gnuttols/arm-eabi/lib/gcc/), which should I pick?
> Is there some compiler flags to indicate which version to pick, or
> should I just copy files over the version that currently is being
> linked?
>
> Thanks!
>
> Davide
>
>
>
>
> 2013/4/6 Ilija Kocho <ilijak@siva.com.mk>:
>> Hi David.
>>
>> We have a GCC (test) release with FPU support for Cortex-M4F in eCos
>> gnutools. You shall find information for download and installation here.
>> http://ecos.sourceware.org/ml/ecos-discuss/2012-06/msg00047.html
>>
>> As this is still test release, your feedback will be appreciated.
>>
>> Ilija
>>
>> On 06.04.2013 12:23, Davide Pippa wrote:
>>> Hi!
>>>
>>> I've recently updated my ecos CVS, and made a new rom using the new hw
>>> floating point support (I'm compiling for TWR-K70F120M). The rom
>>> builds fine, but the application I used to work with complains during
>>> compilation:
>>>
>>> make all
>>> Building file: ../main.cpp
>>> Invoking: ARM devkitPro Windows GCC C++ Compiler
>>> arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/include"
>>> -O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
>>> -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
>>> -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
>>> "../main.cpp"
>>> ../main.cpp: In function ‘void cyg_user_start()’:
>>> ../main.cpp:33:30: warning: deprecated conversion from string constant
>>> to ‘char*’ [-Wwrite-strings]
>>> ../main.cpp: In function ‘void main_thread_entry(cyg_addrword_t)’:
>>> ../main.cpp:80:87: warning: deprecated conversion from string constant
>>> to ‘char*’ [-Wwrite-strings]
>>> ../main.cpp: In function ‘void udpecho_thread_entry(void*)’:
>>> ../main.cpp:107:20: warning: unused variable ‘port’ [-Wunused-variable]
>>> ../main.cpp:110:9: warning: variable ‘j’ set but not used
>>> [-Wunused-but-set-variable]
>>> Finished building: ../main.cpp
>>>
>>> Building target: demo1.elf
>>> Invoking: ARM devkitPro Windows GCC C++ Linker
>>> arm-eabi-g++ -T"target.ld" -nostdlib
>>> -LH:/Works/Arm/PyIde/roms/01009_TWR-K70F120M/lib -Wl,-Map,demo1.map
>>> -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2
>>> -o "demo1.elf"  ./main.o
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>>> error: demo1.elf uses VFP register arguments,
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
>>> does not
>>> makefile:59: recipe for target `demo1.elf' failed
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>>> failed to merge target specific data of file
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(bpabi.o)
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>>> error: demo1.elf uses VFP register arguments,
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
>>> does not
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>>> failed to merge target specific data of file
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_divdi3.o)
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>>> error: demo1.elf uses VFP register arguments,
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
>>> does not
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld:
>>> failed to merge target specific data of file
>>> /cygdrive/h/Works/Arm/PyIde/tools/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.6.3/libgcc.a(_udivdi3.o)
>>> collect2: ld returned 1 exit status
>>> make: *** [demo1.elf] Error 1
>>>
>>> The application is built with HW fpu enabled, but it seems that
>>> libgcc.a is not floating-point aware (sort-of?)... is there any new
>>> release of the 4.6.3 gcc toolchain built with floating point support?
>>> Or is there any guide to rebuild the 4.6.3 gcc toolchain myself?
>>>
>>> Thanks!
>>>
>>> Pyper.
>>>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] GCC toolchain with HW floating-point enabled
  2013-06-04 10:41   ` Davide Pippa
  2013-06-04 11:24     ` Ilija Kocho
@ 2013-06-04 11:35     ` Ilija Kocho
  2013-06-04 12:22       ` Davide Pippa
  1 sibling, 1 reply; 6+ messages in thread
From: Ilija Kocho @ 2013-06-04 11:35 UTC (permalink / raw)
  To: Davide Pippa; +Cc: ecos-discuss

On 04.06.2013 12:41, Davide Pippa wrote:
> Hi!

[SNIP]


> arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/04001_TWR-K70F120M/include"
> -O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
> -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
> -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
> "../main.cpp"
>
> I've seen there is many libgcc versions in the toolchain directory
> (gnuttols/arm-eabi/lib/gcc/), which should I pick?
> Is there some compiler flags to indicate which version to pick, or
> should I just copy files over the version that currently is being
> linked?
>

GCC will select correct libraries on a base of floating point flags.
Therefore you need to provide same floating point flags for compilation
and linking.

HTH

Ilija


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] GCC toolchain with HW floating-point enabled
  2013-06-04 11:35     ` Ilija Kocho
@ 2013-06-04 12:22       ` Davide Pippa
  0 siblings, 0 replies; 6+ messages in thread
From: Davide Pippa @ 2013-06-04 12:22 UTC (permalink / raw)
  To: Ilija Kocho; +Cc: ecos-discuss

I had passed the flags "-mcpu=cortex-m4 -mthumb -mfloat-abi=hard
-mfpu=vfpv4-d16" to both compiler and linker (which both are
arm-eabi-g++"), but problem was still there.

I got things compiled this way:
I had to copy all the libraries located in:
gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/thumb/thumb2/fpu/fpv4spd16
into the directory:
gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/
where the libraries that are linked by gcc are located.

I don't know exactly if it is the same issue, but googling I found
that there is some issue with gcc linker in the selection of the
libraries, suggesting various workarounds...






2013/6/4 Ilija Kocho <ilijak@siva.com.mk>:
> On 04.06.2013 12:41, Davide Pippa wrote:
>> Hi!
>
> [SNIP]
>
>
>> arm-eabi-g++ -I"H:/Works/Arm/PyIde/roms/04001_TWR-K70F120M/include"
>> -O0 -Wall -Wa,-adhlns="main.o.lst" -fno-exceptions -fno-rtti -c
>> -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m4
>> -mthumb -mfloat-abi=hard -mfpu=vfpv4-d16 -g3 -gdwarf-2 -o "main.o"
>> "../main.cpp"
>>
>> I've seen there is many libgcc versions in the toolchain directory
>> (gnuttols/arm-eabi/lib/gcc/), which should I pick?
>> Is there some compiler flags to indicate which version to pick, or
>> should I just copy files over the version that currently is being
>> linked?
>>
>
> GCC will select correct libraries on a base of floating point flags.
> Therefore you need to provide same floating point flags for compilation
> and linking.
>
> HTH
>
> Ilija
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-04 12:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-06 10:23 [ECOS] GCC toolchain with HW floating-point enabled Davide Pippa
2013-04-06 10:41 ` Ilija Kocho
2013-06-04 10:41   ` Davide Pippa
2013-06-04 11:24     ` Ilija Kocho
2013-06-04 11:35     ` Ilija Kocho
2013-06-04 12:22       ` Davide Pippa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).