From 69b703729fdffef80a684dd82931d667a6f5c2f6 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Mon, 17 Oct 2016 11:05:22 +0200 Subject: [PATCH] cpu: make standard stack sizes configurable --- cpu/atmega1281/include/cpu_conf.h | 9 +++++++-- cpu/msp430-common/include/cpu_conf.h | 22 ++++++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/cpu/atmega1281/include/cpu_conf.h b/cpu/atmega1281/include/cpu_conf.h index 6fb1d27dc4..ccad511d09 100644 --- a/cpu/atmega1281/include/cpu_conf.h +++ b/cpu/atmega1281/include/cpu_conf.h @@ -38,8 +38,13 @@ extern "C" { # define THREAD_STACKSIZE_DEFAULT (256) #endif -#define THREAD_STACKSIZE_IDLE (128) -#define ISR_STACKSIZE (0) +#ifndef THREAD_STACKSIZE_IDLE +# define THREAD_STACKSIZE_IDLE (128) +#endif + +#ifndef ISR_STACKSIZE +# define ISR_STACKSIZE (0) +#endif /** @} */ #ifdef __cplusplus diff --git a/cpu/msp430-common/include/cpu_conf.h b/cpu/msp430-common/include/cpu_conf.h index 004918b115..edd54020b5 100644 --- a/cpu/msp430-common/include/cpu_conf.h +++ b/cpu/msp430-common/include/cpu_conf.h @@ -17,19 +17,29 @@ extern "C" { * @name Kernel configuration * @{ */ -#define THREAD_EXTRA_STACKSIZE_PRINTF (256) -#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (THREAD_EXTRA_STACKSIZE_PRINTF) +#ifndef THREAD_EXTRA_STACKSIZE_PRINTF +# define THREAD_EXTRA_STACKSIZE_PRINTF (256) +#endif + +#ifndef THREAD_EXTRA_STACKSIZE_PRINTF +# define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (THREAD_EXTRA_STACKSIZE_PRINTF) +#endif #ifndef THREAD_STACKSIZE_DEFAULT # define THREAD_STACKSIZE_DEFAULT (256) #endif -#define THREAD_STACKSIZE_IDLE (96) -#define ISR_STACKSIZE (256) +#ifndef THREAD_STACKSIZE_IDLE +# define THREAD_STACKSIZE_IDLE (96) +#endif + +#ifndef ISR_STACKSIZE +# define ISR_STACKSIZE (256) +#endif #ifndef GNRC_PKTBUF_SIZE -# define GNRC_PKTBUF_SIZE (2560) /* TODO: Make this value - * overall MTU dependent */ +/* TODO: Make this value overall MTU dependent */ +# define GNRC_PKTBUF_SIZE (2560) #endif /** @} */