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] [January 2015 Threads] Creating Project MinGW or MSVC - undefined reference to "xTaskCreate"Posted by andrewalo on January 12, 2015 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"Posted by davedoors on January 12, 2015 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"Posted by andrewalo on January 12, 2015 Yes, i leave only main.c, in the attachment there is the output:
Creating Project MinGW or MSVC - undefined reference to "xTaskCreate"Posted by rtel on January 12, 2015 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"Posted by andrewalo on January 12, 2015 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"Posted by rtel on January 12, 2015 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"Posted by andrewalo on January 12, 2015 Thank you so much guys :)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|