Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists