Increasing stack size for IMX8 FreeRTOS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Increasing stack size for IMX8 FreeRTOS

833件の閲覧回数
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

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 返信

753件の閲覧回数
b36401
NXP Employee
NXP Employee

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

0 件の賞賛
返信