This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: GCC toolchain with HW floating-point enabled
- From: Davide Pippa <thepyper at gmail dot com>
- To: Ilija Kocho <ilijak at siva dot com dot mk>
- Cc: ecos-discuss at sourceware dot org
- Date: Tue, 4 Jun 2013 14:21:56 +0200
- Subject: Re: GCC toolchain with HW floating-point enabled
- References: <CAJuNW1Oo29REYCA_RX99yugAFojqT-ByLROBys3x1E8guq44aA at mail dot gmail dot com> <515FFBD2 dot 6060400 at siva dot com dot mk> <CAJuNW1OkMmtEM8gbHEqp1u67WTkfCxMZoG5DNzSu+pP+0WW4MQ at mail dot gmail dot com> <51ADCCC1 dot 3040208 at siva dot com dot mk>
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