Creating Project MinGW or MSVC – undefined reference to “xTaskCreate”

HI all, I’m newbie with FreeRTOS and i’m trying to compile a simply example application. If i open the demo application with Microsoft Visual Studio, it works greatly, but once i remove all .c leave only main.c with some simply instatements like xTaskCreate(), cause this errors: undefined reference to: xTaskCreate(); I’ve tried also to create a new project with include all header, but the result it’s the same. Toolchain tried: Codeblock and Eclipse Luna with MinGW header and Microsoft Visual Studio with header MSVC I’ve seen that in the source file, there aren’t .lib or .dll but only .h. Thanks in advance 🙂

Creating Project MinGW or MSVC – undefined reference to “xTaskCreate”

You know you use FreeRTOS by including its source files in your project right? So if you remove >all< the files except main.c you will have removed FreeRTOS. This link http://www.freertos.org/a00017.html tells you about the source files and directories. The Microsoft Visual Studio project probably includes a folder called something similar to “FreeRTOS Source” which includes the FreeRTOS files.

Creating Project MinGW or MSVC – undefined reference to “xTaskCreate”

Yes, i leave only main.c, in the attachment there is the output:

Creating Project MinGW or MSVC – undefined reference to “xTaskCreate”

Don’t delete any files from the “FreeRTOS Source” directory in the MSVC project. They implement the FreeRTOS kernel, so without them your application will not link. Regards.

Creating Project MinGW or MSVC – undefined reference to “xTaskCreate”

Now it works, in the attachment there is the output. I’ve call an extern function called main2 that contains my simple application. I’ve seen that if there aren’t prvInitialiseHeap() and vTraceInitTraceData(), it throws some exceptions. This method is right?or i’ve done some mistake? Thank you all for helping 🙂

Creating Project MinGW or MSVC – undefined reference to “xTaskCreate”

Really a lot of information has gone into documenting these things. I think the information you need can be found with a little time investment reading….. http://www.freertos.org/Creating-a-new-FreeRTOS-project.html http://www.freertos.org/porting-a-freertos-demo-to-different-hardware.html Whether or not prvInitialiseHeap() is needed or not depends on the memory scheme used http://www.freertos.org/a00111.html Whether or not vTraceInitTraceData() is needed or not depends on whether the trace functionality is included or not http://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusTrace/RTOSTraceInstructions.shtml

Creating Project MinGW or MSVC – undefined reference to “xTaskCreate”

Thank you so much guys 🙂