Quality RTOS & Embedded Software

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




Loading

Missing functions in MSP430 GCC port

Posted by Andre Carvalhais on August 20, 2009
Hi folks,

When trying to compile RTOS for MSP430 gcc I get the following error messages:

FreeRTOS\tasks.o: In function `prvIdleTask':
../FreeRTOS/tasks.c:1785: undefined reference to `vApplicationIdleHook'
FreeRTOS\tasks.o: In function `prvAllocateTCBAndStack':
../FreeRTOS/tasks.c:1931: undefined reference to `pvPortMalloc'
../FreeRTOS/tasks.c:1938: undefined reference to `pvPortMalloc'
../FreeRTOS/tasks.c:1943: undefined reference to `vPortFree'
FreeRTOS\tasks.o: In function `prvDeleteTCB':
../FreeRTOS/tasks.c:2080: undefined reference to `vPortFree'
../FreeRTOS/tasks.c:2081: undefined reference to `vPortFree'
FreeRTOS\queue.o: In function `xQueueCreate':
../FreeRTOS/queue.c:241: undefined reference to `pvPortMalloc'
../FreeRTOS/queue.c:248: undefined reference to `pvPortMalloc'
../FreeRTOS/queue.c:273: undefined reference to `vPortFree'
FreeRTOS\queue.o: In function `vQueueDelete':
../FreeRTOS/queue.c:1024: undefined reference to `vPortFree'
FreeRTOS\croutine.o: In function `xCoRoutineCreate':
../FreeRTOS/croutine.c:125: undefined reference to `pvPortMalloc'
Build error occurred, build is stopped
Time consumed: 1234 ms.

I´ve looked for pvPortMalloc, and it is prototyped in portables.h, but there isn´t such a function in port.c (where it should be located, at least in theory) or anywhere else. I´ve not looked for the other functions.
I don´t get what I´m missing here, and I don´t believe it is related to my compiler or IDE (using latest mspgcc within eclipse), since I´ve already compiled good code with it.

Any help will be very welcome.

RE: Missing functions in MSP430 GCC port

Posted by Peter on August 20, 2009
Hi Andre,
a) Define void vApplicationIdleHook() in your Application to get an idle event from the scheduler. This can also be disabled in the FreeRTOS_Config.h
b) You need to add one of the three heap managers to your project. heap_1..3.c for having memory management. Files are located in FreeRTOS/portable/MemMang
c) For Queue stuff add the queue.h to your include area.

Hope this helps,
Peter

RE: Missing functions in MSP430 GCC port

Posted by Andre Carvalhais on August 21, 2009
Thanks Peter,

I´ve added heap_1.c heap manager, and it worked like a charm. No more complains from the compiler.
I´ve seen there is a documentation on this on the website (after reading your hints), but I think this should be made more clear on the pages, specially on the "Source Organization" page, since it says that the kernel is composed of only 3 files (4 if co-routines are enabled); this should clearly count as a file, since it is needed for a clean compile. What do you think?
Maybe I should contact Mr. Richard Barry regarding this. Thank you one more time, best regards,

Andre.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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