EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: Torrentula on March 22, 2012, 04:40:09 pm

Title: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Torrentula on March 22, 2012, 04:40:09 pm
Hey guys!

I'm trying to compile an example program for the STM32F4 Discovery with the arm-none-eabi-gcc on Ubuntu. I'm using this (http://github.com/nabilt/STM32F4-Discovery-Firmware) as my working directory, but a simple "make all" doesn't work, the compiler says there are errors in some include files.

Does anybody have a working directory or Makefile he or she could spare, so I can be confident, that it's not a problem with the Makefile or the include files?

Thanks,

Torrentula
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Bored@Work on March 22, 2012, 04:46:16 pm
but a simple "make all" doesn't work, the compiler says there are errors in some include files.

Show us the error messages.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Torrentula on March 22, 2012, 05:02:06 pm
Ok here is the complete output of "make all"

Quote
torrentula@X7BSV:~/Documents/STM32F4/Project/IO_Toggle$ make all
arm-none-eabi-gcc -E  startup_stm32f4xx.S > startup_stm32f4xx.s
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork  -Os  -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DMANGUSTA_DISCOVERY -DUSE_USB_OTG_FS -DHSE_VALUE=8000000 -I./ -I./ -I../../Utilities/STM32F4-Discovery -I../../Libraries/CMSIS/ST/STM32F4xx/Include/ -I../../Libraries/CMSIS/Include/ -I../../Libraries/STM32F4xx_StdPeriph_Driver/inc/ -I../../Libraries/STM32_USB_Device_Library/Class/hid/inc -I../../Libraries/STM32_USB_Device_Library/Core/inc/ -I../../Libraries/STM32_USB_OTG_Driver/inc/  -Wl,-T,stm32_flash.ld main.c stm32f4xx_it.c system_stm32f4xx.c ../../Utilities/STM32F4-Discovery/stm32f4_discovery.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c startup_stm32f4xx.s -o demo.elf
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/ccOboFfA.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/ccOboFfA.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/ccqUUd6i.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/ccqUUd6i.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/ccCfonl7.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/ccCfonl7.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/ccI7jsFa.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/ccI7jsFa.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/ccKTjk5g.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/ccKTjk5g.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/ccX19iFq.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/ccX19iFq.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/cc06IMNR.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/cc06IMNR.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/ccZhw9Bv.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/ccZhw9Bv.o
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: error: /tmp/cco2iWWf.o uses VFP register arguments, demo.elf does not
/opt/CodeSourcery/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /tmp/cco2iWWf.o
collect2: ld returned 1 exit status
make: *** [demo.elf] Error 1

Do you think I should try a newer version of the CodeSourcery toolchain?
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Bored@Work on March 22, 2012, 06:00:52 pm
The floating point compilation options don't match. I don't remember from memory what the right ones for the STM32F4's are, but you try to build something with different floating point options.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: T4P on March 22, 2012, 06:02:17 pm
 demo.elf does not ... Does not what ?
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: alm on March 22, 2012, 06:46:42 pm
use VFP register arguments
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Torrentula on March 22, 2012, 08:00:24 pm
Quote
The floating point compilation options don't match.

Okay so now it seems to work I've changed the line 17 of the Makefile from -mfloat-abi=hard to -mfloat-abi=soft and now it doesn't complain at all. Strange.

I'll have to see if that really does the job or if the compiled file is a complete mess.

Thanks for now!

Torrentula
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: McMonster on March 22, 2012, 08:31:29 pm
Does this toolchain even support hardware floating point? I haven't got the time to play with my Discovery board yet, but I've read about some serious problems with floating point. Try this command:

Code: [Select]
arm-none-eabi-gcc --print-multi-lib
There's Linaro toolchain (backed by all the big ARM brands) that does support this, but I can't confirm that now and all the possibly interesting resources I have on this matter are exclusively in Polish so there's no point linking (forget Google Translate to be useful in this case). You'd have to research this on your own.

I'd start by trying compiling without hardware floating point.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: T4P on March 22, 2012, 10:01:49 pm
@MonstARRRR  ;D
I'm using IAR EWARM for my discovery board (SHHHHHHH!!)
and have no problems with HWFP .
Ronetix toolchains for converting to hex because when you use Atollic TrueStudio ( the liteeee one or the non limited free version WOW ! ) you get ELF .
http://download.ronetix.info/toolchains/arm/ (http://download.ronetix.info/toolchains/arm/)
Hmm ... something makes me scratch my head , why are Atollic's prices so exorbitant for a still-eclipse environment ?
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: McMonster on March 22, 2012, 10:17:24 pm
Because almost everything regarding professionall embedded electronics is expensive? :P

It's not the IDE that matters here but rather customized toolchain with extensive library, debugging interface supporting many JTAG probes and simple wizards for creating the project. Ironically you can get comparable results fully open source and those are heavily based on open source tools, but the fact alone it's all nicely put together matters. Setting up programming environment from scratch can be a pain in the ass.

What's interesting in Atollic is the licensing. There's only one limitation stated in docs, you have to put a notice in accompanying documentation that you used Atollic's toolchain/IDE. That's all, including this you can even use it commercially I think.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Torrentula on March 23, 2012, 05:49:02 am
Code: [Select]
arm-none-eabi-gcc --print-multi-lib
Returns:
Code: [Select]
arm-none-eabi-gcc -print-multi-lib
.;
thumb;@mthumb
armv6-m;@mthumb@march=armv6-m
thumb2;@mthumb@march=armv7@mfix-cortex-m3-ldrd

probably I'll compile my own toolchain from scratch of there's no easy solution...

Torrentula
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: T4P on March 23, 2012, 06:11:02 am
Because almost everything regarding professionall embedded electronics is expensive? :P

It's not the IDE that matters here but rather customized toolchain with extensive library, debugging interface supporting many JTAG probes and simple wizards for creating the project. Ironically you can get comparable results fully open source and those are heavily based on open source tools, but the fact alone it's all nicely put together matters. Setting up programming environment from scratch can be a pain in the ass.

What's interesting in Atollic is the licensing. There's only one limitation stated in docs, you have to put a notice in accompanying documentation that you used Atollic's toolchain/IDE. That's all, including this you can even use it commercially I think.
Damn right about the development thing  :D
Atollic is cool , but it compiles as a elf instead of a hex , which the ronetix toolchain can handle the conversion .
But yeah , every product has its own benefits and it's atollic who will see more customers .
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: McMonster on March 23, 2012, 08:32:38 am
Code: [Select]
arm-none-eabi-gcc --print-multi-lib
Returns:
Code: [Select]
arm-none-eabi-gcc -print-multi-lib
.;
thumb;@mthumb
armv6-m;@mthumb@march=armv6-m
thumb2;@mthumb@march=armv7@mfix-cortex-m3-ldrd

probably I'll compile my own toolchain from scratch of there's no easy solution...

Torrentula

Apparently there is, try Linaro toolchain first. It's also open source and available as precompiled packages.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Torrentula on March 23, 2012, 05:04:09 pm
Okay I have installed the Linaro toolchain but I'm still getting an error message. It seems, that there is something wrong with one of the files included by the arm-none-eabi-gcc compiler that was shipped with Linaro:

Code: [Select]
make all
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork  -Os  -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DMANGUSTA_DISCOVERY -DUSE_USB_OTG_FS -DHSE_VALUE=8000000 -I./ -I./ -I../../Utilities/STM32F4-Discovery -I../../Libraries/CMSIS/ST/STM32F4xx/Include/ -I../../Libraries/CMSIS/Include/ -I../../Libraries/STM32F4xx_StdPeriph_Driver/inc/ -I../../Libraries/STM32_USB_Device_Library/Class/hid/inc -I../../Libraries/STM32_USB_Device_Library/Core/inc/ -I../../Libraries/STM32_USB_OTG_Driver/inc/  -Wl,-T,stm32_flash.ld main.c stm32f4xx_it.c system_stm32f4xx.c ../../Utilities/STM32F4-Discovery/stm32f4_discovery.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c startup_stm32f4xx.S -o demo.elf
/opt/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text+0x16): undefined reference to `_exit'
collect2: ld returned 1 exit status
make: *** [demo.elf] Error 1

According to arm-none-eabi-gcc this version does support HWFP. 

Thanks for the tip with Linaro though!
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: TerminalJack505 on March 23, 2012, 05:14:13 pm
Did you do a 'make clean' first?  It didn't compile anything and skipped straight to the linking step.  Is it trying to link the object files created by the other compiler?

Edit: You probably want to do a 'make clean clobber'.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Torrentula on March 23, 2012, 05:22:28 pm
I have completely removed the other compiler and I'm using a "fresh" working directory, so a "make clean" wasn't necessary.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: TerminalJack505 on March 23, 2012, 05:57:33 pm
Well, the linker's obviously not finding something it needs.  Did you exit out of the shell you were in and start a new shell after installing?  Maybe there was a change to environment.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Torrentula on March 24, 2012, 08:35:48 am
This compiler is driving me crazy!

Ok I think I'll stop trying to get HWFP working and be fine with SWFP and use the compiler I used in the beginning.

Thanks anyway...
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: bingo600 on March 26, 2012, 04:33:42 pm
Here's som info i have picked up on the net.

***************** Snip **********************************************

Some infos to get the F4 FPU running:

- the CodeSourcery arm-none-eabi-gcc-4.5.2 works fine
- to be able to use the fpu use the compiler options -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
- make sure you do NOT use -fpack-struct, as the fpu load and save instructions need word aligned addresses. Otherwise the code throws an exception using unaligned addresses.
- the fpu needs to be enabled in the startup code somewhere. Currently I use

ldr     r0, =0xe000ed88           //; enable cp10,cp11
    ldr     r1,[r0]
    ldr     r2, =0xf00000
    orr     r1,r1,r2
    str     r1,[r0]

in start.S, but it might be better to add

SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2));  /* set CP10 and CP11 Full Access */

somewhere.

***************** Snip **********************************************

And a bit more (In your native tounge)
http://www.mikrocontroller.net/topic/252696#new (http://www.mikrocontroller.net/topic/252696#new)

http://forum.chibios.org/phpbb/viewtopic.php?f=2&t=337&start=10 (http://forum.chibios.org/phpbb/viewtopic.php?f=2&t=337&start=10)

/Bingo
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: poorchava on May 16, 2012, 02:32:53 pm
This is probably a bit onan off-topic, but what kind of hardware interfaces does Atollic support? Are these only proprietary, expensive adapters, or does it support low cost DIY/el-cheapo/community devices like Wiggler clones and FTDI-based usb interfaces (e.g. Turtelizer)
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: free_electron on May 16, 2012, 04:38:52 pm
STlink is 21 $ ... if you want it in a nice box..
http://www.mouser.com/ProductDetail/STMicroelectronics/ST-LINK-V2/?qs=H4BOwPtf9MBsjewuXBjppc0jFzW2ADTE (http://www.mouser.com/ProductDetail/STMicroelectronics/ST-LINK-V2/?qs=H4BOwPtf9MBsjewuXBjppc0jFzW2ADTE)

if you buy the discovery board for 9$ it comes with an STlink ( bare board version without fancypants box)
http://www.mouser.com/ProductDetail/STMicroelectronics/STM32VLDISCOVERY/?qs=Sq9754QpLBhJmpcZpgSDlE7q%252brd0KnO8 (http://www.mouser.com/ProductDetail/STMicroelectronics/STM32VLDISCOVERY/?qs=Sq9754QpLBhJmpcZpgSDlE7q%252brd0KnO8)

Try beating that with an FTDI based homebrew ... By the time you got the ftdi chip and associated parts you are over 9$ .. and you don't even have a pcb yet.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: T4P on May 16, 2012, 05:15:28 pm
STlink is 21 $ ... if you want it in a nice box..
http://www.mouser.com/ProductDetail/STMicroelectronics/ST-LINK-V2/?qs=H4BOwPtf9MBsjewuXBjppc0jFzW2ADTE (http://www.mouser.com/ProductDetail/STMicroelectronics/ST-LINK-V2/?qs=H4BOwPtf9MBsjewuXBjppc0jFzW2ADTE)

if you buy the discovery board for 9$ it comes with an STlink ( bare board version without fancypants box)
http://www.mouser.com/ProductDetail/STMicroelectronics/STM32VLDISCOVERY/?qs=Sq9754QpLBhJmpcZpgSDlE7q%252brd0KnO8 (http://www.mouser.com/ProductDetail/STMicroelectronics/STM32VLDISCOVERY/?qs=Sq9754QpLBhJmpcZpgSDlE7q%252brd0KnO8)

Try beating that with an FTDI based homebrew ... By the time you got the ftdi chip and associated parts you are over 9$ .. and you don't even have a pcb yet.

I always turn to ST for Cortex cores ... fast and cheap.
Much better deal is the STM32F4Disco ... CHOCK FULL OF I/O ! but yeah i get your point
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: poorchava on May 17, 2012, 10:01:49 am
I actually have STM32Discovery with Cortex-M3, and there are numerous problems with connecting this to IAR or Keil (as a matter of fact I didn't try Atollic IDE). I generally also thought that STLink is only for SWD interface, not classic JTAG, maybe I'll have to double-check that.

What I actually want is universal JTAG to use with ARMs from ST, NXP, Texas, EnergyMicro and others as well as Altera, Xilinx and Lattice programmable logic devices. currently I'm kind of eager to try Cortex-M0's from NXP (LPC1111 in QFN package costs about the same as low-range ATMega - LOL@that). For hacking with FPGAs, CPLDs and so on I'll probably have to use some twisted OOCD/GDB/CDT/Eclipse voodoo, but it would be nice if i could develop with ARM MCUs using Atollic, which is much more convenient to use.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: nctnico on May 17, 2012, 01:55:07 pm
I like NXP's controllers because they can be programmed with a simple TTL level serial port. I've put a simple USB to serial converter for this purpose. Its also easy for customers. They can field update their devices with minimum hassle and hardware. I never use JTAG.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: free_electron on May 17, 2012, 02:31:16 pm
I actually have STM32Discovery with Cortex-M3, and there are numerous problems with connecting this to IAR or Keil

For iar jpyou need a j-link. There are devkits for 99$ that include the j-link.
Keil is keil and the have their own ulink.

The 21$ ulink-2 has both swd and jtag...


Quote
What I actually want is universal JTAG

you are not going to find that... Download yes, limited debug .. Maybe .. Full blown Capabilities? Forget it..  Full blown means breakpoint , tracing , probing inside the fpga ..
There are custom things going on, that use jtag as transport, but are kept secret. The control software is made to work only with one type of dongle... No way to port that.

Besides, the dongles are not expensive. A xilinx or altera downloader can be found for 10$ on ebay. And they work perfectly fine.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: McMonster on May 17, 2012, 10:55:51 pm
I actually have STM32Discovery with Cortex-M3, and there are numerous problems with connecting this to IAR or Keil (as a matter of fact I didn't try Atollic IDE). I generally also thought that STLink is only for SWD interface, not classic JTAG, maybe I'll have to double-check that.

I've used this board with Atollic, worked flawlessly. And the built-in STLink is limited to SWD only on those boards, the full one can also do JTAG and SWIM (for 8-bit ST8 micros).

And I don't know about other ARM brands, but STM32s also have serial port bootloader built-in.
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: Quiggers on June 24, 2012, 04:04:34 pm
I just ordered one of these, a silly amount of number crunching for €14, I'm gonna try using eclipse but it's my first step into this, i've used keil for assembly and some ARM at uni but didnt get on with Keil's software so i'm looking for alternatives. XDA dev had an article about using eclipse with the STM32F0Discovery, hopefully that all applies to the F4 and i'm badgering the guy to doing more vids on the subject
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: wireless on December 17, 2012, 01:40:11 am
Okay I have installed the Linaro toolchain but I'm still getting an error message. It seems, that there is something wrong with one of the files included by the arm-none-eabi-gcc compiler that was shipped with Linaro:

Code: [Select]
make all
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork  -Os  -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DMANGUSTA_DISCOVERY -DUSE_USB_OTG_FS -DHSE_VALUE=8000000 -I./ -I./ -I../../Utilities/STM32F4-Discovery -I../../Libraries/CMSIS/ST/STM32F4xx/Include/ -I../../Libraries/CMSIS/Include/ -I../../Libraries/STM32F4xx_StdPeriph_Driver/inc/ -I../../Libraries/STM32_USB_Device_Library/Class/hid/inc -I../../Libraries/STM32_USB_Device_Library/Core/inc/ -I../../Libraries/STM32_USB_OTG_Driver/inc/  -Wl,-T,stm32_flash.ld main.c stm32f4xx_it.c system_stm32f4xx.c ../../Utilities/STM32F4-Discovery/stm32f4_discovery.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c startup_stm32f4xx.S -o demo.elf
/opt/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text+0x16): undefined reference to `_exit'
collect2: ld returned 1 exit status
make: *** [demo.elf] Error 1

According to arm-none-eabi-gcc this version does support HWFP. 

Thanks for the tip with Linaro though!

If you are using an stm32_flash.ld file as your load file, and you are using a .text section that looks like the one below, then this problem can most likely be resolved by adding an _exit line to the .text section (see the example below).
    _exit = .;



 /* The program code and other data goes into FLASH */
  .text :
  {
    . = ALIGN(4);
    *(.text)           /* .text sections (code) */
    *(.text*)          /* .text* sections (code) */
    *(.rodata)         /* .rodata sections (constants, strings, etc.) */
    *(.rodata*)        /* .rodata* sections (constants, strings, etc.) */
    *(.glue_7)         /* glue arm to thumb code */
    *(.glue_7t)        /* glue thumb to arm code */
   *(.eh_frame)

    KEEP (*(.init))
    KEEP (*(.fini))

    . = ALIGN(4);
    _etext = .;        /* define a global symbols at end of code */
    _exit = .;
  } >FLASH
Title: Re: STM32F4 Discovery and arm-none-eabi-gcc
Post by: PeeweePete on December 21, 2012, 09:30:22 am
This may help, it is basic ARM GCC code examples http://www.emb4fun.de/arm/examples/index.html (http://www.emb4fun.de/arm/examples/index.html)