Merge pull request #10745 from kaspar030/make_idle_stacksize_configurable

cpu: make default idle/main stacksizes configurable on all archs
This commit is contained in:
benpicco 2020-03-12 14:38:32 +01:00 committed by GitHub
commit d5c7d28b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 1 deletions

View File

@ -39,7 +39,9 @@ extern "C" {
#define THREAD_STACKSIZE_DEFAULT (256)
#endif
#ifndef THREAD_STACKSIZE_IDLE
#define THREAD_STACKSIZE_IDLE (128)
#endif
/** @} */
#ifdef __cplusplus

View File

@ -48,7 +48,9 @@ extern "C" {
/* keep THREAD_STACKSIZE_IDLE > THREAD_EXTRA_STACKSIZE_PRINTF
* to avoid not printing of debug in interrupts
*/
#ifndef THREAD_STACKSIZE_IDLE
#define THREAD_STACKSIZE_IDLE (128)
#endif
/** @} */
/**

View File

@ -38,8 +38,12 @@ extern "C" {
* @{
*/
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (2048)
#endif
#ifndef THREAD_STACKSIZE_IDLE
#define THREAD_STACKSIZE_IDLE (2048)
#endif
/** @} */
/**

View File

@ -48,7 +48,9 @@ extern "C" {
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#ifndef THREAD_STACKSIZE_IDLE
#define THREAD_STACKSIZE_IDLE (160)
#endif
/** @} */
/**
@ -93,7 +95,9 @@ extern "C" {
* @brief Stack size used for the interrupt (ISR) stack
* @{
*/
#ifndef ISR_STACKSIZE
#define ISR_STACKSIZE (400)
#endif
/** @} */
/**

View File

@ -75,7 +75,7 @@ void ps(void)
#endif
"state");
#if defined(DEVELHELP) && defined(ISR_STACKSIZE)
#if defined(DEVELHELP) && ISR_STACKSIZE
int isr_usage = thread_isr_stack_usage();
void *isr_start = thread_isr_stack_start();
void *isr_sp = thread_isr_stack_pointer();

View File

@ -8,4 +8,9 @@ DISABLE_MODULE += test_utils_interactive_sync
USEMODULE += stdio_null
# adjust stack sizes to very small values
ifneq (native,$(BOARD))
CFLAGS += -DTHREAD_STACKSIZE_MAIN=256 -DTHREAD_STACKSIZE_IDLE=128
endif
include $(RIOTBASE)/Makefile.include