You have probably included definitions for the trace macros, but not included the FreeRTOS+Trace recorder source file.
Is "trcKernelPort.h" being included from FreeRTOSConfig.h? The #include will probably be at the bottom of the source file if it is. That is the header file that defines the trace macros, so if you comment out the inclusion of the header file then those errors should disappear.
If you have any other build errors then post the compiler's output here.
Regards.
If trcKernelPort.h is included then you must also include the
FreeRTOS+Trace recorder source files - otherwise you will get linker errors.
If you are creating a new project I would recommend not including
trcKernelPort.h, so commenting it out. Once you have your project
running you can always add in the trace recorder at a later time.
The link errors occurs , even when I include the FreeRTOS+Trace recorder source files.
Generally when debugging or building I would be tempted to consolidate what I have, or remove functionality to get a clean building base from where to work - rather than add more files in when what I have is already not building.
undefined reference to `xTaskStartScheduler’ main.c /FirstFreeRTOSPRoj line 11 C/C++
Problem as an error
Ah good, sounds like you have made progress then. This one is easy to fix; The name of the function is vTaskStartScheduler() [note the v prefix, rather than the x prefix, because it is a void function].
I solved the last problem, with the error Undefined reference to vTaskStartScheduler()
by adding the source files queue.c list.c task.c and port.c
But now, I get the old problem:
Description Resource Path Location Type
undefined reference to prvTraceGetCurrentTaskHandle' queue.c /FirstFreeRTOSPRoj line 1502 C/C++ Problem undefined reference to prvTraceGetCurrentTaskHandle’ queue.c /FirstFreeRTOSPRoj line 1396 C/C++ Problem
more undefined references to vAssertCalled' follow port.c /FirstFreeRTOSPRoj line 514 C/C++ Problem more undefined references to vAssertCalled’ follow queue.c /FirstFreeRTOSPRoj line 620 C/C++ Problem
more undefined references to vAssertCalled' follow queue.c /FirstFreeRTOSPRoj line 1729 C/C++ Problem undefined reference to prvTraceGetCurrentTaskHandle’ tasks.c /FirstFreeRTOSPRoj line 876 C/C++ Problem
undefined reference to prvTraceGetCurrentTaskHandle' queue.c /FirstFreeRTOSPRoj line 1016 C/C++ Problem undefined reference to prvTraceGetCurrentTaskHandle’ queue.c /FirstFreeRTOSPRoj line 928 C/C++ Problem
Look at the project that works and see what files and configuration it uses
and compare it to your new project…
This is all very basic setup of the IDE your using and NOT directly related
to FreeRTOS issues…
Make sure the FreeRTOSconfig.h is set with the correct option for your
development…
Make sure you have the correct port.c file for your processor…
Make sure the IDE knows the path to all of the .h and .c files…
Search the forum, you will most likely find solutions to all of your
questions…
The issue you have are very easy to solve. Just look!, then you will
understand…
We can’t offer solutions if we don’t know what the problem is. For
example…
I solved the last problem, with the error Undefined reference to
vTaskStartScheduler()
by adding the source files queue.c list.c task.c and port.c
As your first post referenced a documentation page that tells you to add
these files
(Creating a new RTOS project), it would
not occur to a responder on the forum that in fact you had not included
the files - but were trying to call functions in them - hence they would
not offer that as a potential solution.
it seems that in win32 simulator
there are some functions defined at main.c
that some source files defined them as external function.
Therefore when creating new project, at the main file these functions
have to appear(and defined correctly).
…except that is not the case. The Windows port has no more
dependencies than any other port. It looks like your FreeRTOSConfig.h
file is defining macros that call functions that are not part of the
FreeRTOS code - that does not mean you have to define the functions to
use the Windows port - just that you have to define any function that
you actually try calling. In particular in this case I think your
configASSERT() function is calling vAssertCalled(). configASSERT() is
an application definition, it is not defined by FreeRTOS.
1)What about all the hook functions and demonstration functions at main.c and main_full.c
do I really need them?
2)It seems that there are other source files that I need to add in addition to what http://www.freertos.org/Creating-a-new-FreeRTOS-project.html tells, like BlockQ.c
Can you explain me what are those files?
3)Which free RTOS files has external dependencies of application functions created on main.c
and main_full.c?