1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

cpu/{atmega_common,atxmega}: increase idle thread stack size

Our AVR port doesn't make use of an ISR stack and just victimizes the
stack of whatever thread happens to be running, which in most cases is
the idle thread. Hence, the idle stack has to be large enough to
support the ztimer ISR.
This commit is contained in:
Marian Buschsieweke 2022-06-27 13:04:01 +02:00
parent d9fc082686
commit 8cc0199437
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94
2 changed files with 10 additions and 8 deletions

View File

@ -49,10 +49,11 @@ extern "C" {
* to avoid not printing of debug in interrupts
*/
#ifndef THREAD_STACKSIZE_IDLE
#if MODULE_XTIMER || MODULE_ZTIMER64
/* xtimer's 64 bit arithmetic doesn't perform well on 8 bit archs. In order to
* prevent a stack overflow when an timer triggers while the idle thread is
* running, we have to increase the stack size then
#if MODULE_XTIMER || MODULE_ZTIMER || MODULE_ZTIMER64
/* For AVR no ISR stack is used, hence an IRQ will victimize the stack of
* whatever thread happens to be running with the IRQ kicks in. If more than
* trivial stuff is needed to be done in ISRs (e.g. when soft timers are used),
* the idle stack will overflow.
*/
#define THREAD_STACKSIZE_IDLE (192)
#else

View File

@ -41,10 +41,11 @@ extern "C" {
* to avoid not printing of debug in interrupts
*/
#ifndef THREAD_STACKSIZE_IDLE
#if MODULE_XTIMER || MODULE_ZTIMER64
/* xtimer's 64 bit arithmetic doesn't perform well on 8 bit archs. In order to
* prevent a stack overflow when an timer triggers while the idle thread is
* running, we have to increase the stack size then
#if MODULE_XTIMER || MODULE_ZTIMER || MODULE_ZTIMER64
/* For AVR no ISR stack is used, hence an IRQ will victimize the stack of
* whatever thread happens to be running with the IRQ kicks in. If more than
* trivial stuff is needed to be done in ISRs (e.g. when soft timers are used),
* the idle stack will overflow.
*/
#define THREAD_STACKSIZE_IDLE (384)
#else