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

Help me to make this link error "vApplicationStackOverflowHook

Posted by immanuvel on October 16, 2013

Hi,

I am a beginner in freertos. Please Help me

When I compile this small below program it has compiled but it is not make.i am getting Link Error.

Link Error: Undefined: "vApplicationStackOverflowHook" Referenced from "vTaskSwitchContext" in.

(and i am using Coldfire MCF52259 Microcontroller)

include "FreeRTOS.h"
include "task.h"
include "queue.h"
include "timers.h"

void mytask(void *pvParameters) { while(1) { MCFGPIODDRTC=0x0F; MCFGPIOSETTC=0x0F; vTaskDelay( 500 / portTICKRATEMS); MCFGPIOCLRTC=0x0F; } } int main(void) {

xTaskCreate(mytask,(signed char*) "mytask", configMINIMAL_STACK_SIZE, NULL, 1, NULL);
return 0;

}


This is FreeRTOSConfig.h file which i have used for this above program

ifndef FREERTOSCONFIGH
define FREERTOSCONFIGH

/* Library includes. */

include "common.h"

/----------------------------------------------------------- * Application specific definitions. * * These definitions should be adjusted for your particular hardware and * application requirements. * * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. * * See http://www.freertos.org/a00110.html. *----------------------------------------------------------/

define configUSE_PREEMPTION 1
define configUSEIDLEHOOK 0
define configUSETICKHOOK 0
define configCPUCLOCKHZ ( ( unsigned long ) 80000000 )
define configTICKRATEHZ ( ( portTickType ) 100 )
define configMINIMALSTACKSIZE ( ( unsigned short ) 160 )
define configTOTALHEAPSIZE ( ( size_t ) (30* 1024 ) )
define configMAXTASKNAME_LEN ( 12 )
define configUSETRACEFACILITY 1
define configUSE16BIT_TICKS 0
define configIDLESHOULDYIELD 0
define configUSECOROUTINES 0
define configUSE_MUTEXES 1
define configCHECKFORSTACK_OVERFLOW 2
define configUSERECURSIVEMUTEXES 1
define configQUEUEREGISTRYSIZE 0
define configUSECOUNTINGSEMAPHORES 0
define configUSEMALLOCFAILED_HOOK 0
define configMAXPRIORITIES ( ( unsigned portBASETYPE ) 6 )
define configMAXCOROUTINE_PRIORITIES ( 2 )

/* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */

define INCLUDE_vTaskPrioritySet 1
define INCLUDE_uxTaskPriorityGet 1
define INCLUDE_vTaskDelete 1
define INCLUDE_vTaskCleanUpResources 0
define INCLUDE_vTaskSuspend 1
define INCLUDE_vTaskDelayUntil 1
define INCLUDE_vTaskDelay 1
define INCLUDE_uxTaskGetStackHighWaterMark 1
define configYIELDINTERRUPTVECTOR 16UL
define configKERNELINTERRUPTPRIORITY 1
define configMAXSYSCALLINTERRUPT_PRIORITY 4

/* This demo makes use of one or more example stats formatting functions. These format the raw data provided by the uxTaskGetSystemState() function in to human readable ASCII form. See the notes in the implementation of vTaskList() within FreeRTOS/Source/tasks.c for limitations. */

define configUSESTATSFORMATTING_FUNCTIONS 1

void vApplicationSetupInterrupts( void );

/* Ethernet configuration. */

define configMAC_0 0x00
define configMAC_1 0x04
define configMAC_2 0x9F
define configMAC_3 0x00
define configMAC_4 0xAB
define configMAC_5 0x2B
define configIP_ADDR0 192
define configIP_ADDR1 168
define configIP_ADDR2 0
define configIP_ADDR3 11
define configGW_ADDR0 172
define configGW_ADDR1 25
define configGW_ADDR2 218
define configGW_ADDR3 3
define configNET_MASK0 255
define configNET_MASK1 255
define configNET_MASK2 255
define configNET_MASK3 0
define configNUMFECTX_BUFFERS 2
define configNUMFECRX_BUFFERS 4
define configFECBUFFERSIZE 1520
define configUSEPROMISCUOUSMODE 0
define configETHERNETINPUTTASKSTACKSIZE ( 320 )
define configETHERNETINPUTTASKPRIORITY ( configMAXPRIORITIES - 1 )
define configPHY_ADDRESS 1
if ( configFECBUFFERSIZE & 0x0F ) != 0
#error configFEC_BUFFER_SIZE must be a multiple of 16.
endif
endif /* FREERTOSCONFIGH */

Help me to make this link error "vApplicationStackOverflowHook

Posted by xz8987f on October 16, 2013

Hello, it is because you have asked to check for stack overflow in your FreeRTOSConfig.h: configCHECKFORSTACK_OVERFLOW Set it to 0 if you want Stack overflow disabled. Altough I recommend to have it enabled. Simply add something like this to your application:

void FRTOS1vApplicationStackOverflowHook(xTaskHandle pxTask, signed portCHAR pcTaskName) { / This will get called if a stack overflow is detected during the context switch. Set configCHECKFORSTACKOVERFLOWS to 2 to also check for stack problems within nested interrupts, but only do this for debug purposes as it will increase the context switch time. / (void)pxTask; (void)pcTaskName; taskDISABLE_INTERRUPTS(); / Write your code here ... */ for(;;) {} }

If you are using ColdFire V2 (MCF52259) with CodeWarrior, then you might have a look at my Processor Expert component for FreeRTOS: it supports many cores, including ColdFire: http://mcuoneclipse.com/2012/06/28/tutorial-freertos-on-demojm/ http://mcuoneclipse.com/tag/freertos/

I hope this helps.


[ 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