[freertos - Open Discussion and Support] Stack Violation

已查看 15 次
跳至第一个未读帖子

SourceForge.net

未读,
2011年11月28日 11:01:472011/11/28
收件人 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

未读,
2011年11月28日 11:07:332011/11/28
收件人 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.

回复全部
回复作者
转发
0 个新帖子