Quality RTOS & Embedded Software

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




Loading

IAR tasks.c linker error

Posted by Peter Eisenhower on June 4, 2010
I am using IAR cortex M3 Kick Start to work with the energyMicro EFM32 G290F128.

I am using all the files from the freeRTOS website to start my project. I used the configuration files and source code from that demo and moved it into a project I have been working on.

When I go to build my project I get the following error:

Error[Li005]: no definition for "vApplicationStackOverflowHook" [referenced from C:\repo\Embedded\Energy Micro Sandbox\Telit\Debug\Obj\tasks.o]


I put a #error in the StackMacro.h file to make sure the function was being declared and it is.
What doesnt make sense to me is that a macro is defined in StackMacro.h taskFIRST_CHECK_FOR_STACK_OVERFLOW() and that macro has a function definition and declartion in it (extern void vApplicationStackOverflowHook...). But that macro is then called within another function. I did not think that was even possible.

I can fix this error by pulling out the macro and making it a function in the task.c file but i dont thing that is the correct fix.

If someone undestands this error I would greatly appreciate the help.

Thanks,
Peter

RE: IAR tasks.c linker error

Posted by Richard Damon on June 4, 2010
the extern void vApplicationStackOverflowHook in the macro is a function DECLARATION not a DEFINITION. It tells the compiler how to call the function, but not what is in it. FreeRTOS does not include a definition of this function, because it doesn't know what you want to be done once the error occurs. You program needs to provide the definition of this function, which could be as simple as just an infinite loop.

RE: IAR tasks.c linker error

Posted by Peter Eisenhower on June 4, 2010
Fantastic thanks a bunch.

RE: IAR tasks.c linker error

Posted by Peter Eisenhower on June 4, 2010
That fixed it. The only file I did not copy from the demo was main and thats where vApplicationStackOverflowHook was defined.

thanks again,
Peter

RE: IAR tasks.c linker error

Posted by Richard on June 4, 2010
Thanks to Richard_Damon for his excellent support - as always.

Anything that starts vApplication is intended for definition by the application code. These are always optional, with settings in FreeRTOSConfig.h being used to either enable or disable the option.

Regards.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists