"Multiple definition of [...]" error, FreeRTOS+Trace Atmel SAM4L - Page 1
Forum section: electronics / general

author: Araho
author_rank: Regular Contributor
timestamp: April 26, 2015, 01:42:46 am
content: Hi!I've recently been trying to implement FreeRTOS on a SAM4L (specifically the SAM4L Xplained Pro Eval Board). I've been following Atmels tutorial (http://www.atmel.com/Images/Atmel-42382-Getting-Started-with-FreeRTOS-on-Atmel-SAM-Flash-MCUs_ApplicationNote_AT04056.pdf) which is woefully lacking in some areas compared to doing the real thing with recent builds, especially with the Trace-module from Percepio.Some files have different names from the tutorial, and I've ran into a few issues that have been solved in different ways, but now I'm seriously stuck incorporating the Trace-module. I've run into the "multiple definition of [...]" error (~80 instances of that error, actually), which according to my google-fu typically means that I've got a definition in a header-file, instead of just a declaration. But I haven't!!Picture 1 is just the error message, with the definition ("vTraceError"), filename and linenumber. That file and linenumber is shown in picture 3. Searching through the entire project solution shows that "void vTraceError" is found two places only: trcBase.c and trcBase.h. In the .h-file, there is only one occurence, and that is definitely just a declaration as shown in picture 2. Searching for just "vTraceError" shows that except the two places mentioned, there are only uses of the function or mentions in comments.The error message is afaik a linker error , and I have no idea how to fix it. I've added the "trace" folder to the Compiler Directories, but otherwise it's just a standard ASF-project with FreeRTOS added via the ASF Wizard and then configured manually as per the Getting Started-guide.Anyone have any clues as to where I'm going wrong?

author: andersm
author_rank: Super Contributor
timestamp: April 26, 2015, 05:17:23 am
content: Can you post the actual error message (preferably the full build log)?

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: April 26, 2015, 08:43:06 am
content: Errors in C often cause a cascading series of spurious errors, which are quite unrelated to the underlying problem. You need to find the first one, and fix that first. Confusingly, some tools don't list the errors in line number order, or even in order by file if doing a parallel build.If you are importing previously working code, often the problem comes down to a missing #define, include file not found, or identifier collision, which cause the error cascade.From the minimal info you have posted, I can see many other errors occurring apart from the one you are trying to fix. Sort by line number and look at the first.

author: Araho
author_rank: Regular Contributor
timestamp: April 26, 2015, 12:55:09 pm
content: Full build log:Code:Warning1"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning2"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning3"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning4"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning5no previous prototype for 'vTraceStoreMemMangEvent' [-Wmissing-prototypes]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernel.c1826FreeRTOSTest2Warning6"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning7"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning8no previous prototype for 'vTraceStoreMemMangEvent' [-Wmissing-prototypes]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernel.c1826FreeRTOSTest2Warning9"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning10"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning11"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning12"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning13"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning14"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning15"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning16"USE_TRACEALYZER_RECORDER" is not defined [-Wundef]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\trace\trcKernelHooks.h506FreeRTOSTest2Warning17no previous prototype for 'taskOne' [-Wmissing-prototypes]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\main.c466FreeRTOSTest2Warning18no previous prototype for 'TimerOneCallback' [-Wmissing-prototypes]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\main.c846FreeRTOSTest2Warning19passing argument 2 of 'vQueueAddToRegistry' discards 'const' qualifier from pointer target type [enabled by default]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\main.c952FreeRTOSTest2Message20expected 'signed char *' but argument is of type 'const char *'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\ASF\thirdparty\freertos\freertos-7.3.0\source\include\queue.h12837FreeRTOSTest2Warning21pointer targets in passing argument 2 of 'xTaskGenericCreate' differ in signedness [-Wpointer-sign]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\main.c1282FreeRTOSTest2Message22expected 'const signed char * const' but argument is of type 'const char *'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\ASF\thirdparty\freertos\freertos-7.3.0\source\include\task.h131022FreeRTOSTest2Warning23pointer targets in passing argument 2 of 'xTaskGenericCreate' differ in signedness [-Wpointer-sign]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\main.c1292FreeRTOSTest2Message24expected 'const signed char * const' but argument is of type 'const char *'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\ASF\thirdparty\freertos\freertos-7.3.0\source\include\task.h131022FreeRTOSTest2Warning25pointer targets in passing argument 1 of 'xTimerCreate' differ in signedness [-Wpointer-sign]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\main.c1322FreeRTOSTest2Message26expected 'const signed char *' but argument is of type 'const char *'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\ASF\thirdparty\freertos\freertos-7.3.0\source\include\timers.h23514FreeRTOSTest2Warning27pointer targets in passing argument 2 of 'xTaskGenericCreate' differ in signedness [-Wpointer-sign]D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\main.c1372FreeRTOSTest2Message28expected 'const signed char * const' but argument is of type 'const char *'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\src\ASF\thirdparty\freertos\freertos-7.3.0\source\include\task.h131022FreeRTOSTest2Error29multiple definition of `vTraceError'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c4601FreeRTOSTest2Error30multiple definition of `xTraceNextFreeEventBufferSlot'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c2281FreeRTOSTest2Error31multiple definition of `uiIndexOfObject'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c2441FreeRTOSTest2Error32multiple definition of `vTraceFreeObjectHandle'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c3351FreeRTOSTest2Error33multiple definition of `prvCheckDataToBeOverwrittenForMultiEntryEvents'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c4941FreeRTOSTest2Error34multiple definition of `prvTraceUpdateCounters'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c5381FreeRTOSTest2Error35multiple definition of `prvTraceLookupSymbolTableEntry'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c6961FreeRTOSTest2Error36multiple definition of `prvTraceCreateSymbolTableEntry'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c7391FreeRTOSTest2Error37multiple definition of `prvTraceGetChecksum'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c7981FreeRTOSTest2Error38multiple definition of `prvTraceOpenSymbol'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c4191FreeRTOSTest2Error39multiple definition of `prvTraceInitCortexM'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcHardwarePort.c661FreeRTOSTest2Error40multiple definition of `vTracePortGetTimeStamp'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcHardwarePort.c1131FreeRTOSTest2Error41multiple definition of `prvTraceGetDTS'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c5741FreeRTOSTest2Error42multiple definition of `vTraceSetReadyEventsEnabled'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c661FreeRTOSTest2Error43multiple definition of `vTraceStoreTaskReady'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c751FreeRTOSTest2Error44multiple definition of `vTraceStoreLowPower'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c1381FreeRTOSTest2Error45multiple definition of `vTraceStoreMemMangEvent'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c1831FreeRTOSTest2Error46multiple definition of `vTraceStoreKernelCallWithNumericParamOnly'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c4201FreeRTOSTest2Error47multiple definition of `vTraceStoreObjectNameOnCloseEvent'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c5701FreeRTOSTest2Error48multiple definition of `vTraceStoreObjectPropertiesOnCloseEvent'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c6001FreeRTOSTest2Error49multiple definition of `vTraceSetPriorityProperty'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c6301FreeRTOSTest2Error50multiple definition of `uiTraceGetPriorityProperty'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c6401FreeRTOSTest2Error51multiple definition of `vTraceSetObjectState'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c6501FreeRTOSTest2Error52multiple definition of `uiTraceGetObjectState'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c6601FreeRTOSTest2Error53multiple definition of `vTraceStoreTaskswitch'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c4741FreeRTOSTest2Error54multiple definition of `vTraceSetTaskInstanceFinished'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c6701FreeRTOSTest2Error55multiple definition of `prvTraceGetObjectNumber'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c671FreeRTOSTest2Error56multiple definition of `prvTraceGetObjectType'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c831FreeRTOSTest2Error57multiple definition of `prvTraceGetTaskNumber'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c881FreeRTOSTest2Error58multiple definition of `prvTraceIsSchedulerActive'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c931FreeRTOSTest2Error59multiple definition of `prvTraceIsSchedulerSuspended'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c981FreeRTOSTest2Error60multiple definition of `prvTraceIsSchedulerStarted'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c1031FreeRTOSTest2Error61multiple definition of `prvTraceGetCurrentTaskHandle'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c1081FreeRTOSTest2Error62multiple definition of `vTraceInitObjectPropertyTable'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c1151FreeRTOSTest2Error63multiple definition of `vTraceInitObjectHandleStack'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c1501FreeRTOSTest2Error64multiple definition of `prvTraceInitTraceData'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c1161FreeRTOSTest2Error65multiple definition of `pszTraceGetErrorNotEnoughHandles'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c1701FreeRTOSTest2Error66multiple definition of `xTraceGetObjectHandle'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c2851FreeRTOSTest2Error67multiple definition of `vTraceSetObjectName'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcBase.c3831FreeRTOSTest2Error68multiple definition of `uiTraceIsObjectExcluded'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernelPortFreeRTOS.c1931FreeRTOSTest2Error69multiple definition of `vTraceStoreKernelCall'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c2611FreeRTOSTest2Error70multiple definition of `vTraceStoreKernelCallWithParam'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcKernel.c3271FreeRTOSTest2Error71multiple definition of `uiInEventGroupSetBitsFromISR'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error72multiple definition of `TraceObjectClassTable'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug\src\trace\trcRecorder.o11FreeRTOSTest2Error73first defined hereD:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug\src\trace\trcKernelPortFreeRTOS.o11FreeRTOSTest2Error74multiple definition of `inExcludedTask'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error75multiple definition of `handle_of_last_logged_task'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error76multiple definition of `nISRactive'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error77multiple definition of `DWT_CYCLES_ADDED'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error78multiple definition of `uiTraceTickCount'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error79multiple definition of `last_timestamp'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error80multiple definition of `trace_disable_timestamp'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error81multiple definition of `traceErrorMessage'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error82multiple definition of `recorder_busy'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error83multiple definition of `RecorderDataPtr'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error84multiple definition of `objectHandleStacks'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error85multiple definition of `excludedEventCodes'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error86multiple definition of `excludedObjects'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error87multiple definition of `vTraceInitTraceData'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c801FreeRTOSTest2Error88multiple definition of `vTraceSetStopHook'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1051FreeRTOSTest2Error89multiple definition of `vTraceClear'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1151FreeRTOSTest2Error90multiple definition of `uiTraceStart'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1501FreeRTOSTest2Error91multiple definition of `vTraceStart'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c1971FreeRTOSTest2Error92multiple definition of `vTraceStop'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c2081FreeRTOSTest2Error93multiple definition of `xTraceGetLastError'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c2261FreeRTOSTest2Error94multiple definition of `vTraceClearError'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c2391FreeRTOSTest2Error95multiple definition of `vTraceGetTraceBuffer'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c2541FreeRTOSTest2Error96multiple definition of `uiTraceGetTraceBufferSize'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c2661FreeRTOSTest2Error97multiple definition of `vTraceTaskInstanceFinish'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c3261FreeRTOSTest2Error98multiple definition of `vTraceTaskInstanceFinishDirect'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c3581FreeRTOSTest2Error99multiple definition of `vTraceSetISRProperties'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c3991FreeRTOSTest2Error100multiple definition of `vTraceStoreISRBegin'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c5311FreeRTOSTest2Error101multiple definition of `vTraceStoreISREnd'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c6321FreeRTOSTest2Error102multiple definition of `vTraceUserEvent'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c14291FreeRTOSTest2Error103multiple definition of `xTraceOpenLabel'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c15111FreeRTOSTest2Error104multiple definition of `vTracePrintF_Helper'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c12951FreeRTOSTest2Error105multiple definition of `vTracePrintF'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c12841FreeRTOSTest2Error106multiple definition of `threshold_low_watermark'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug\src\trace\trcUser.o11FreeRTOSTest2Error107first defined hereD:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug\src\trace\trcRecorder.o11FreeRTOSTest2Error108multiple definition of `DWTCycleCountAtLastISRExit'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c7691FreeRTOSTest2Error109multiple definition of `ptrLastISRExitEvent'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c7691FreeRTOSTest2Error110multiple definition of `vTraceStopHookPtr'D:\Asgeir\Dropbox\Prosjekter\FreeRTOSTest2\FreeRTOSTest2\Debug/../src/trace/trcUser.c7691FreeRTOSTest2Error111ld returned 1 exit statuscollect2.exe00FreeRTOSTest2I've included full source in the .zip, (except some ASF-stuff for CMSIS, watchdog timer and board drivers etc, max filesize-limit of the forum stopped that) if anyone wants to take a peek.All i do is include trcUser.h in main.c, and include trcKernelHooks.h at the end of FreeRTOSConfig.h. trcConfig.h has been adjusted to set SELECTED_PORT to PORT_ARM_CortexM, with includes for board.h and sysclk.h, as well as setting FREERTOS_VERSION to FREERTOS_VERSION_7_3_OR_7_4.

author: andersm
author_rank: Super Contributor
timestamp: April 26, 2015, 02:08:46 pm
content: At least some of the errors seem to stem from you including both trcRecorder.c and the source files it includes into the project.

author: RichardBarry
author_rank: Newbie
timestamp: April 26, 2015, 05:32:21 pm
content: I suspect your problem will be caused by building both the trcRecorder.c source file - which #includes the other required .c files - and the individual .c files that have already been built by trcRecorder.c. I think the idea is to facilitate builds by allowing people to add only trcRecorder.c in their project. What happens in reality, especially when using Eclipse and Atmel Studio (both of which automatically build all the files in a directory unless you tell it not to) is that people accidentally build both - as I suspect is the case here.