Hi!
I'm using ChibiOS 3.0.0 on a STM32f407 mikrocontroller.
Here I was trying to find the correct stack size for the different threads I’m using as it is explained in the tutorials. The problem I have is that there is a thread „Player_Thread()“ (I suppose, see attached picture) which causes a stack overflow although if I look at the memory address of the corresponding working area there is enough space (0x55's) to the top of the stack. Increasing the working area didn't change anything.
Is there probably a maximum limit for the working area? The thread needs about 20kB.
I would like to know in which way this stack check is done in order to find the root cause.
Thanks in advance!
Using CH_DBG_ENABLE_STACK_CHECK and CH_DBG_FILL_THREADS
Moderator: RoccoMarco
Using CH_DBG_ENABLE_STACK_CHECK and CH_DBG_FILL_THREADS
- Attachments
-
- 2015-01-24.png (221 KiB) Viewed 1642 times
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Using CH_DBG_ENABLE_STACK_CHECK and CH_DBG_FILL_THREADS
Hi,
The stack overflow is detected on context switching when the system tries to push into the stack an "intctx" structure (very large), probably there is not enough space for the whole structure even if there is some space left.
Giovanni
The stack overflow is detected on context switching when the system tries to push into the stack an "intctx" structure (very large), probably there is not enough space for the whole structure even if there is some space left.
Giovanni