From 4f28407af820927b42b3f70201f5a07633885ec5 Mon Sep 17 00:00:00 2001 From: Francisco Acosta <fco.ja.ac@gmail.com> Date: Tue, 15 May 2018 02:34:09 +0200 Subject: [PATCH] cpu/atmega_common: use the same cpu_conf for all atmega based boards Removes redundancy of code since all the boards were defining the same variables. Moreover, the stack sizes are unified per architecture, as required. --- .../include/cpu_conf.h | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) rename cpu/{atmega1284p => atmega_common}/include/cpu_conf.h (60%) diff --git a/cpu/atmega1284p/include/cpu_conf.h b/cpu/atmega_common/include/cpu_conf.h similarity index 60% rename from cpu/atmega1284p/include/cpu_conf.h rename to cpu/atmega_common/include/cpu_conf.h index e87b7d2a01..933c60bc59 100644 --- a/cpu/atmega1284p/include/cpu_conf.h +++ b/cpu/atmega_common/include/cpu_conf.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen + * 2017 RWTH Aachen, Josua Arndt * 2018 Matthew Blue * * This file is subject to the terms and conditions of the GNU Lesser @@ -8,7 +9,7 @@ */ /** - * @ingroup cpu_atmega1284p + * @ingroup cpu_atmega_common * @{ * * @file @@ -16,6 +17,8 @@ * * @author Hauke Petersen <hauke.petersen@fu-berlin.de> * @author Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de> + * @author Josua Arndt <jarndt@ias.rwth-aachen.de> + * @author Steffen Robertz <steffen.robertz@rwth-aachen.de> * @author Matthew Blue <matthew.blue.neuro@gmail.com> */ @@ -28,19 +31,23 @@ extern "C" { #endif +#define THREAD_EXTRA_STACKSIZE_PRINTF (128) + /** - * @name Kernel configuration + * @name Kernel configuration * - * Since printf seems to get memory allocated by the linker/avr-libc the stack - * size tested successfully even with pretty small stacks.k + * Since printf seems to get memory allocated by the + * linker/avr-libc the stack size tested successfully + * even with pretty small stacks. * @{ */ -#define THREAD_EXTRA_STACKSIZE_PRINTF (128) - #ifndef THREAD_STACKSIZE_DEFAULT -#define THREAD_STACKSIZE_DEFAULT (256) +#define THREAD_STACKSIZE_DEFAULT (512) #endif +/* keep THREAD_STACKSIZE_IDLE > THREAD_EXTRA_STACKSIZE_PRINTF + * to avoid not printing of debug in interrupts + */ #define THREAD_STACKSIZE_IDLE (128) /** @} */ @@ -48,5 +55,6 @@ extern "C" { } #endif + #endif /* CPU_CONF_H */ /** @} */ -- GitLab