Forum: ARM programming with GCC/GNU tools trouble with printf on Cortex-M3 (STM32)

von Ajeet N. (ajeetnatu)

Rate this post
0 useful
not useful

I am trying to use yagarto (arm-elf-gcc 4.3.3) for STM32.
Everything works ok if I don't use printf.
But I need to use printf, so #included <stdio.h>. It produced error:
In file included from main.c:31:
C:\SCARM\GNUARM\arm-elf\include/stdio.h:190: error: expected declaration specifiers or '...' before '__gnuc_va_list'

Did not know the right way to overcome this error. So I added these
lines in main.c before #include <stdio.h>
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef void *__gnuc_va_list;

Then I could compile without errors, but linker produced many errors of
this type:
../arm-elf/bin/ld.exe: ERROR: stm32f10x_gpio.o uses FPA instructions, whereas Hello.elf does not

Does it mean that the newlib that came with yagarto is compiled using
FPA? Does it mean it can not be used for Cortex-M3? Is there a solution?

Thanks and Best Regards,



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.