Quality RTOS & Embedded Software

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


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 ]    [ 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