FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2012 Threads] STM32F107_GCC_Rowley Demo w/ CrossStudio 2.2Posted 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.2Posted 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.2Posted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|