Increasing stack size for IMX8 FreeRTOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Increasing stack size for IMX8 FreeRTOS

609 Views
tom_orsi
Contributor I

Hello,

We believe we are running out of stack space, I can see occasionally in the problematic code the Stack Overflow handler called but please note this is not consistent. 

In the LD file I have changed this line STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0800;

This was 0x0400 and is now doubled.

1. Can anyone tell me if there are any negative side effects to making this change? my understanding is that if the linker will link with this value then the binary should be viable.

2. Can any comment on the issue we (believe) we are having where the stack over hook isn't always called? I have included the prototype, we have tried various implementations which include, a simple PRINTF, and even a PRINTF followed by a endless loop with a vTaskDelay in it.

extern "C" {
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{

3. We only see issues in our code, when we using the UART debugging. I examined the source code fsl_debug_console.c and it seems that the printf() is using a stack variable of 128 bytes, these seems a little access for a default linker file only allowing 1K word for the stack size. 

Thanks

Tom

Tags (2)
0 Kudos
1 Reply

529 Views
b36401
NXP Employee
NXP Employee

Actually everything should be fine with increasing stack size if you have enough amount of the memory.

0 Kudos