Forum : ARM
Original Post
Post Information | Post |
---|---|
June 3, 2009 - 5:04pm
|
Hi, Everything compile fine, except linking: Running: LD \"C:\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m3 -mthumb -Wl,-T -Xlinker "C:\work\FreeRTOS\Demo\CORTEX_STM32F103_Primer_GCC\RTOSDemo.elf.ld" -u _start -Wl,-static -Wl,--gc-sections -nostartfiles -Wl,-Map -Xlinker "C:\work\FreeRTOS\Demo\CORTEX_STM32F103_Primer_GCC\RTOSDemo.map" C:\Raisonance\Ride\Lib\ARM\STM32x_io_putchar_thumb.a(STM32F10X_IO_putchar.o): In function `putchar': STM32F10X_IO_putchar.c:(.text.putchar+0x0): multiple definition of `putchar' c:/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-putchar.o):putchar.c:(.text+0x0): first defined here collect2: ld returned 1 exit status The following options are selected: ST library: Yes UART0 Putchar: Yes Small printf: Yes Small no-float printf: Yes Any idea how to prevent ld from linking libc putchar? Or any solution for this problem? Thanks in advance, |
It seems that putchar is also defined into FreeRtos. Did you try:
UART0 Putchar: No
?
Yes, I've discovered that putchar is also defined in FreeRtos code. Removing it from here and using libc putchar compiles fine but hang during execution.
The solution that works for me is to use sprintf for formatting into buffer and then sending buffer to UART "manually".