Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

STM32F107_GCC_Rowley Demo w/ CrossStudio 2.2

Posted by Michael Audi on March 13, 2012
Hi,
I am attempting to build the provided demo from FreeRTOS7.1.0 in CrossStudio 2.2 as explained in the getting started tutorial. However, there is a build problem with Linking the RTOSDemo.elf. The program will compile but not build. I thought it might be that I am missing some install packages for the IDE. I tried installing most if not all of the ones that seemed applicable with no use. Does anyone know where/why I am seeing these errors and if it is the required packages, what packages need to be installed? The output log and errors are shown below:

Building “RTOSDemo” in configuration “THUMB Flash Debug”
'THUMB Flash Debug/flash.o' is up to date
'THUMB Flash Debug/recmutex.o' is up to date
'THUMB Flash Debug/semtest.o' is up to date
'THUMB Flash Debug/BlockQ.o' is up to date
'THUMB Flash Debug/GenQTest.o' is up to date
'THUMB Flash Debug/integer.o' is up to date
'THUMB Flash Debug/PollQ.o' is up to date
'THUMB Flash Debug/QPeek.o' is up to date
'THUMB Flash Debug/tasks.o' is up to date
'THUMB Flash Debug/list.o' is up to date
'THUMB Flash Debug/queue.o' is up to date
'THUMB Flash Debug/heap_2.o' is up to date
'THUMB Flash Debug/port.o' is up to date
'THUMB Flash Debug/main.o' is up to date
'THUMB Flash Debug/ParTest.o' is up to date
'THUMB Flash Debug/stm32f10x_usart.o' is up to date
'THUMB Flash Debug/stm32f10x_gpio.o' is up to date
'THUMB Flash Debug/stm32f10x_lib.o' is up to date
'THUMB Flash Debug/stm32f10x_nvic.o' is up to date
'THUMB Flash Debug/stm32f10x_rcc.o' is up to date
'THUMB Flash Debug/stm32f10x_systick.o' is up to date
'THUMB Flash Debug/stm32fxxx_eth.o' is up to date
'THUMB Flash Debug/printf-stdarg.o' is up to date
'THUMB Flash Debug/stm32f10x_tim.o' is up to date
'THUMB Flash Debug/lcd.o' is up to date
'THUMB Flash Debug/stm32f10x_spi.o' is up to date
'THUMB Flash Debug/timer.o' is up to date
'THUMB Flash Debug/uip.o' is up to date
'THUMB Flash Debug/uip_arp.o' is up to date
'THUMB Flash Debug/psock.o' is up to date
'THUMB Flash Debug/uIP_Task.o' is up to date
'THUMB Flash Debug/httpd.o' is up to date
'THUMB Flash Debug/httpd-cgi.o' is up to date
'THUMB Flash Debug/httpd-fs.o' is up to date
'THUMB Flash Debug/http-strings.o' is up to date
'THUMB Flash Debug/emac.o' is up to date
'THUMB Flash Debug/timertest.o' is up to date
'THUMB Flash Debug/thumb_crt0.o' is up to date
'THUMB Flash Debug/STM32F10x_Startup.o' is up to date
THUMB Flash Debug/RTOSDemo.elf does not exist.
Linking RTOSDemo.elf
C:/Program Files/Rowley Associates Limited/CrossWorks for ARM 2.2/lib/libc_v7m_t_le.a(libc2.o): In function `snprintf':
libc2.c:(.text.libc.snprintf+0x0): multiple definition of `snprintf'
printf-stdarg.c
C:/Program Files/Rowley Associates Limited/CrossWorks for ARM 2.2/lib/libc_v7m_t_le.a(libc2.o): In function `sprintf':
libc2.c:(.text.libc.sprintf+0x0): multiple definition of `sprintf'
printf-stdarg.c
Build failed

Any help is appreciated!
Thank you,
-Mike

RE: STM32F107_GCC_Rowley Demo w/ CrossStudio 2.2

Posted by Richard on March 13, 2012
This is due to changes in the CrossWorks compiler and/or configuration since the demo was created. The project includes basic versions of sprintf() and snprintf() in a file called printf-stdarg.c. Exclude/remove that file from the build and you will probably find the problem goes away.

The other was to fix it would be to change the project options so it does not try an include its own versions of these functions from the standard libraries.

Two things to note: The printf-stdarg.c file is included because it does not use much stack. If you remove the file and instead use the Rowley (or GCC) library version you may find you object file gets much bigger, and you start to see stack overflows in your tasks. The second thing to note is that snprintf() is not really implemented in printf-stdarg.c, it is just defined to keep the linker happy - don't try using it.

Regards.

RE: STM32F107_GCC_Rowley Demo w/ CrossStudio 2.2

Posted by Michael Audi on March 13, 2012
The issues seems to have been resolved simply by commenting out the two functions sprintf and snprintf in the file printf-stdarg.c. I believe that version 2.2 links to a file which includes these functions causing the multiple definition error. It should run properly now as long as the included print functions require the same parameters.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner