Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

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:

Attachments

img.JPG (78960 bytes)

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 :)

Attachments

img.JPG (96035 bytes)

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 :)


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner