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

StackOverflow while Debugging one task

Posted by Patrick_ECR on December 16, 2011
Hi

I'm debugging a new project which runs with FreeRTOS and have got an problem during debugging the source.

Problem:
Everytime I set a breakpoint in one task, there are three taks running (quasi-)parallel, it stops there and next time never gets to this BP again. When I stop the application I see, that the vApplicationStackOverflowHook()-function was called. The other 2 tasks are still running fine. But the task I want to debug, is now in the endless-for-loop..

I can also do the same with one of the two other running tasks, which also stops then after reaching the overflow-function..

Any suggestions?

Best regards
Patrick

RE: StackOverflow while Debugging one task

Posted by Dave on December 16, 2011
“Any suggestions?”


Yes - tell us which chip and compiler you are using.

RE: StackOverflow while Debugging one task

Posted by Patrick_ECR on December 19, 2011
Omg ... bad job from my side to forget it.

I use MCF52259 (on MCF52259EVB) from Freescale. IDE CW 10.1, I use the included Coldfire-Compiler there.

The code I use is the following:


#define Queue_Active 0

unsigned int counter;
unsigned int counter_T2;
xQueueHandle xQueue1;


static portTASK_FUNCTION(vMainTask, pvParameters) {
const portTickType xDelay = 2/portTICK_RATE_MS;
portTickType xActual = 0;

#if Queue_Active
counter = 0;
xQueue1 = xQueueCreate(4, sizeof(unsigned int));

if(xQueueSend(xQueue1,&counter,10) != pdPASS ){
portNOP();
}
#endif

for(;;){
xActual = xTaskGetTickCount();
vTaskDelayUntil(&xActual,xDelay);
#if Queue_Active
portENTER_CRITICAL();
#endif
Bit1_NegVal();
#if Queue_Active
xQueueReceive(xQueue1,&counter,1);
counter++;
xQueueSend(xQueue1,&counter,1);
counter = 0;
portEXIT_CRITICAL();
#endif
}
}


static portTASK_FUNCTION(vMainTask2, pvParameters) {
const portTickType xDelay = 2/portTICK_RATE_MS;

for(;;){
vTaskDelay(xDelay);
#if Queue_Active
portENTER_CRITICAL();
#endif
Bit2_NegVal();
#if Queue_Active
xQueueReceive(xQueue1,&counter_T2,1);
counter_T2++;
xQueueSend(xQueue1,&counter_T2,1);
counter_T2 = 0;
portEXIT_CRITICAL();
#endif
}
}


static portTASK_FUNCTION(vMainTask3, pvParameters) {
const portTickType xDelay = 10/portTICK_RATE_MS;

for(;;){
vTaskDelay(xDelay);
Bit3_NegVal();
}
}


I already tried to increase stack ov all and of certain tasks (from standard 600 to 2.4k) but without success.

Thx!

Best regards
Patrick


[ 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