[freertos - Open Discussion and Support] Stack Violation

15 views
Skip to first unread message

SourceForge.net

unread,
Nov 28, 2011, 11:01:47 AM11/28/11
to SourceForge.net

Read and respond to this message at:
https://sourceforge.net/projects/freertos/forums/forum/382005/topic/4847546
By: fbpp

I am using ISE-13.3 with microblaze and FreeRTOS-7.02.
I load my app from XMD console, and type run, then the XMD console prints:
XMD% Warning: Stack Violation. Check the stack size of your program
Then I removed all the xTaskCreate() function call, but the XMD still prints
the same warning.
If I remove the vTaskStartScheduler() call, the warning just dispeared.
I don't understand why that warning comes without any task running?


_____________________________________________________________________________________
You are receiving this email because you elected to monitor this topic or entire forum.
To stop monitoring this topic visit:
https://sourceforge.net/projects/freertos/forums/forum/382005/topic/4847546/unmonitor
To stop monitoring this forum visit:
https://sourceforge.net/projects/freertos/forums/forum/382005/unmonitor

SourceForge.net

unread,
Nov 28, 2011, 11:07:33 AM11/28/11
to SourceForge.net
By: davedoors

The kernel creates at least one, and possibly two tasks, when you call
vTaskStartScheduler(). So tasks are being created, even if you don't create
them in your code.

How does it know the stack has been violated? What check is it performing to
determine that? If it is just checking that the stack pointer is in the stack
segment as configured by your linker script then the warning message can probably
be ignored. I know this is how the IAR compiler works, so it is likely to be
the same in your ISE. When a task is running, the stack pointer will (correctly)
point to the stack allocated to that task, which will come from a heap somewhere,
and be outside of the memory region the tool expects it to point into.

Reply all
Reply to author
Forward
0 new messages