Deadloop in case of stackoverflow, better than flooding console
This commit is contained in:
@@ -2166,7 +2166,9 @@ void __attribute__((noreturn)) AppMain(void) {
|
|||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
if (_stack_start != 0xdeadbeef) {
|
if (_stack_start != 0xdeadbeef) {
|
||||||
Dbprintf("Stack overflow detected! Please increase stack size.");
|
Dbprintf("Stack overflow detected! Please increase stack size, currently %d bytes", (&_stack_end - &_stack_start) << 2);
|
||||||
|
Dbprintf("Unplug your device now.");
|
||||||
|
while (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is a packet available
|
// Check if there is a packet available
|
||||||
|
|||||||
Reference in New Issue
Block a user