diff --git a/boards/common/arduino-atmega/include/board_common.h b/boards/common/arduino-atmega/include/board_common.h
index 6694f2a93a27924153b577dcc30bec5a092d6048..a433f164aaa50638ea5d282ddbafb3b877b887df 100644
--- a/boards/common/arduino-atmega/include/board_common.h
+++ b/boards/common/arduino-atmega/include/board_common.h
@@ -59,6 +59,20 @@ extern "C" {
 #define LED0_TOGGLE         (PORTB ^=  LED0_MASK)
 /** @} */
 
+/**
+ * @name    Usage of LED to turn on when a kernel panic occurs.
+ * @{
+ */
+#define LED_PANIC           LED0_ON
+/** @} */
+
+/**
+ * @name CPU clock scale for arduino boards
+ *
+ */
+#define CPU_ATMEGA_CLK_SCALE_INIT    CPU_ATMEGA_CLK_SCALE_DIV1
+/** @} */
+
 /**
  * @name    xtimer configuration values
  * @{
diff --git a/boards/jiminy-mega256rfr2/include/board.h b/boards/jiminy-mega256rfr2/include/board.h
index 410addb56b449da56ec5312f2114353c97a7805c..5379ffff0d0ed6a1269c1cf12adaee7f2e273da6 100644
--- a/boards/jiminy-mega256rfr2/include/board.h
+++ b/boards/jiminy-mega256rfr2/include/board.h
@@ -73,6 +73,13 @@ extern "C" {
 #define LED2_TOGGLE         (LED_PORT ^=  LED2_MASK)
 /** @} */
 
+/**
+ * @name   White LED light is used to signal ERROR.
+ * @{
+ */
+#define LED_PANIC           (LED_PORT |= LED2_MASK | LED1_MASK | LED0_MASK)
+/** @} */
+
 /**
  * @name xtimer configuration values
  * @{
@@ -83,6 +90,40 @@ extern "C" {
 #define XTIMER_HZ           (125000UL)
 /** @} */
 
+/**
+ * @name Indicate Watchdog cleared in bootloader an
+ *
+ * AVR CPUs need to reset the Watchdog as fast as possible.
+ * This flag indicates that the watchdog is reseted in the bootloader
+ * and that the MCUSR value is stored in register 2 (r2)
+ * @{
+ */
+#define BOOTLOADER_CLEARS_WATCHDOG_AND_PASSES_MCUSR 1
+/** @} */
+
+/**
+ * @name Indicate Watchdog cleared in bootloader an
+ *
+ * AVR CPUs need to reset the Watchdog as fast as possible.
+ * This flag indicates that the watchdog is reseted in the bootloader
+ * and that the MCUSR value is stored in register 2 (r2)
+ * @{
+ */
+#define BOOTLOADER_CLEARS_WATCHDOG_AND_PASSES_MCUSR 1
+/** @} */
+
+/**
+ * @name CPU clock scale for jiminy-megarfr256rfr2
+ *
+ * The CPU can not be used with the external xtal oscillator if the core
+ * should be put in sleep while the transceiver is in rx mode.
+ *
+ * It seems the as teh peripheral clock divider is set to 1 and this all
+ * clocks of the timer, etc run with 16MHz increasing power consumption.
+ */
+#define CPU_ATMEGA_CLK_SCALE_INIT    CPU_ATMEGA_CLK_SCALE_DIV1
+/** @} */
+
 /**
  * @brief Initialize board specific hardware, including clock, LEDs and std-IO
  */
diff --git a/boards/mega-xplained/include/board.h b/boards/mega-xplained/include/board.h
index f7021dd8296a0e1719ca5aae5f5f9c643294ec38..2e2176d1330d5cd21ae5bfd470c4fe327935d33e 100644
--- a/boards/mega-xplained/include/board.h
+++ b/boards/mega-xplained/include/board.h
@@ -90,6 +90,13 @@ extern "C" {
 #define LED3_TOGGLE         PORTB ^=  LED3_PIN
 /** @} */
 
+/**
+ * @name    Usage of LED to turn on when a kernel panic occurs.
+ * @{
+ */
+#define LED_PANIC           LED1_ON
+/** @} */
+
 /**
  * @name    Button pin configuration
  * @{
@@ -111,6 +118,13 @@ extern "C" {
 #define FILTER_OUTPUT          GPIO_PIN(PORT_A, 7)
 /** @} */
 
+/**
+ * @name CPU clock scale for mega-xplained
+ *
+ */
+#define CPU_ATMEGA_CLK_SCALE_INIT    CPU_ATMEGA_CLK_SCALE_DIV1
+/** @} */
+
 /**
  * @brief   Initialize board specific hardware, including clock, LEDs and std-IO
  */
diff --git a/boards/waspmote-pro/include/board.h b/boards/waspmote-pro/include/board.h
index 8fa8a538ab9574d6b46e00adae5f3fb1e4236ede..24bd91676948f8d9cc9c685ea8a79afe7c122f21 100644
--- a/boards/waspmote-pro/include/board.h
+++ b/boards/waspmote-pro/include/board.h
@@ -78,6 +78,13 @@ extern "C" {
 #define LED_RED_TOGGLE       LED0_TOGGLE
 /** @} */
 
+/**
+ * @name    Usage of LED to turn on when a kernel panic occurs.
+ * @{
+ */
+#define LED_PANIC            LED_RED_ON
+/** @} */
+
 /**
  * @name    Macros for controlling the on-board MUXes.
  * @{
@@ -143,6 +150,13 @@ extern "C" {
                                      MUX_USB_XBEE_ON
 /** @} */
 
+/**
+ * @name CPU clock scale for waspmote-pro
+ *
+ */
+#define CPU_ATMEGA_CLK_SCALE_INIT    CPU_ATMEGA_CLK_SCALE_DIV1
+/** @} */
+
 /**
  * @name    xtimer configuration values
  * @{
diff --git a/cpu/atmega1281/Makefile b/cpu/atmega1281/Makefile
index e17e41db7225d898b224d42b91d3f00fa6f6bc0f..8b5bf236d32d5f42c31441029d8c901461c6a834 100644
--- a/cpu/atmega1281/Makefile
+++ b/cpu/atmega1281/Makefile
@@ -1,5 +1,7 @@
 # define the module that is build
 MODULE = cpu
+
 # add a list of subdirectories, that should also be build
-DIRS = $(ATMEGA_COMMON)
+DIRS = $(RIOTCPU)/atmega_common/
+
 include $(RIOTBASE)/Makefile.base
diff --git a/cpu/atmega1281/Makefile.include b/cpu/atmega1281/Makefile.include
index 093660e72e8d608a6ad8147d97e6d8dfab044ed8..66add33aaaf2e5c9dc51d1b4c7cf8cc269c26459 100644
--- a/cpu/atmega1281/Makefile.include
+++ b/cpu/atmega1281/Makefile.include
@@ -1,15 +1,8 @@
 # tell the build system that the CPU depends on the atmega common files
 USEMODULE += atmega_common
 
-# define path to atmega common module, which is needed for this CPU
-export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/
-
-# explicitly tell the linker to link the syscalls and startup code.
-#   Without this the interrupt vectors will not be linked correctly!
-export UNDEF += $(BINDIR)/cpu/startup.o
-
 RAM_LEN = 8K
 ROM_LEN = 128K
 
 # CPU depends on the atmega common module, so include it
-include $(ATMEGA_COMMON)Makefile.include
+include $(RIOTCPU)/atmega_common/Makefile.include
diff --git a/cpu/atmega1281/cpu.c b/cpu/atmega1281/cpu.c
deleted file mode 100644
index 2d184cf544dba12d8672a318c0c897bc5d492970..0000000000000000000000000000000000000000
--- a/cpu/atmega1281/cpu.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega1281
- * @{
- *
- * @file
- * @brief       Implementation of the CPU initialization
- *
- * @author      Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- * @}
- */
-
-#include "cpu.h"
-#include "periph/init.h"
-
-/**
- * @brief Initialize the CPU, set IRQ priorities
- */
-void cpu_init(void)
-{
-    /* trigger static peripheral initialization */
-    periph_init();
-}
diff --git a/cpu/atmega1281/include/cpu_conf.h b/cpu/atmega1281/include/cpu_conf.h
deleted file mode 100644
index 438cbc70ed6368c41fab0af13a111b229279fee7..0000000000000000000000000000000000000000
--- a/cpu/atmega1281/include/cpu_conf.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @{
- *
- * @file
- * @brief           Implementation specific CPU configuration options
- *
- * @author          Hauke Petersen <hauke.petersen@fu-berlin.de>
- * @author          Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- */
-
-#ifndef CPU_CONF_H
-#define CPU_CONF_H
-
-#include "atmega_regs_common.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @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.
- * @{
- */
-#define THREAD_EXTRA_STACKSIZE_PRINTF    (128)
-
-#ifndef THREAD_STACKSIZE_DEFAULT
-#   define THREAD_STACKSIZE_DEFAULT   (256)
-#endif
-
-#ifndef THREAD_STACKSIZE_IDLE
-#   define THREAD_STACKSIZE_IDLE      (128)
-#endif
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CONF_H */
-/** @} */
diff --git a/cpu/atmega1281/startup.c b/cpu/atmega1281/startup.c
deleted file mode 100644
index c6521055ef58e1152a493829d29ced120f749830..0000000000000000000000000000000000000000
--- a/cpu/atmega1281/startup.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega1281
- * @{
- *
- * @file
- * @brief       Startup code and interrupt vector definition
- *
- * @author     Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- *
- * @}
- */
-
-#include <stdint.h>
-#include <avr/interrupt.h>
-#include <avr/io.h>
-
-/* For Catchall-Loop */
-#include "board.h"
-
-
-/**
- * @brief functions for initializing the board, std-lib and kernel
- */
-extern void board_init(void);
-extern void kernel_init(void);
-extern void __libc_init_array(void);
-
-/**
- * @brief This pair of functions hook circumvent the call to main
- *
- * avr-libc normally uses the .init9 section for a call to main. This call
- * seems to be not replaceable without hacking inside the library. We
- * circumvent the call to main by using section .init7 to call the function
- * reset_handler which therefore is the real entry point and  section .init8
- * which should never be reached but just in case jumps to exit.
- * This way there should be no way to call main directly.
- */
-void init7_ovr(void) __attribute__((naked)) __attribute__((section(".init7")));
-void init8_ovr(void) __attribute__((naked)) __attribute__((section(".init8")));
-
-
-void init7_ovr(void)
-{
-    __asm__("call reset_handler");
-}
-
-void init8_ovr(void)
-{
-    __asm__("jmp exit");
-}
-/**
- * @brief This function is the entry point after a system reset
- *
- * After a system reset, the following steps are necessary and carried out:
- * 1. initialize the board (sync clock, setup std-IO)
- * 2. initialize and start RIOTs kernel
- */
-void reset_handler(void)
-{
-    /* initialize the board and startup the kernel */
-    board_init();
-    /* startup the kernel */
-    kernel_init();
-}
diff --git a/cpu/atmega1284p/Makefile b/cpu/atmega1284p/Makefile
index 81f110b68d093c93e2626885a5e8ba9af9b229fc..8b5bf236d32d5f42c31441029d8c901461c6a834 100644
--- a/cpu/atmega1284p/Makefile
+++ b/cpu/atmega1284p/Makefile
@@ -1,6 +1,7 @@
 # define the module that is build
 MODULE = cpu
+
 # add a list of subdirectories, that should also be build
-DIRS = $(ATMEGA_COMMON)
+DIRS = $(RIOTCPU)/atmega_common/
 
 include $(RIOTBASE)/Makefile.base
diff --git a/cpu/atmega1284p/Makefile.include b/cpu/atmega1284p/Makefile.include
index 7575f04ff925015739cdab72185fe5e692497aa5..985d14cf9e425b5c71a90aaf32b167b1ae25be59 100644
--- a/cpu/atmega1284p/Makefile.include
+++ b/cpu/atmega1284p/Makefile.include
@@ -1,11 +1,8 @@
 # tell the build system that the CPU depends on the atmega common files
 USEMODULE += atmega_common
 
-# define path to atmega common module, which is needed for this CPU
-export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/
-
 RAM_LEN = 16K
 ROM_LEN = 128K
 
 # CPU depends on the atmega common module, so include it
-include $(ATMEGA_COMMON)Makefile.include
+include $(RIOTCPU)/atmega_common/Makefile.include
diff --git a/cpu/atmega1284p/cpu.c b/cpu/atmega1284p/cpu.c
deleted file mode 100644
index 1597edb175da12cbea5531407281ccbc240b1d1d..0000000000000000000000000000000000000000
--- a/cpu/atmega1284p/cpu.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *               2018 Matthew Blue
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega1284p
- * @{
- *
- * @file
- * @brief       Implementation of the CPU initialization
- *
- * @author      Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- * @author      Matthew Blue <matthew.blue.neuro@gmail.com>
- * @}
- */
-
-#include "cpu.h"
-#include "periph/init.h"
-
-/**
- * @brief Initialize the CPU, set IRQ priorities
- */
-void cpu_init(void)
-{
-    /* trigger static peripheral initialization */
-    periph_init();
-}
diff --git a/cpu/atmega1284p/startup.c b/cpu/atmega1284p/startup.c
deleted file mode 100644
index 7c4d8a56d7c03ae8509cc4f3c8c3f110760a70b4..0000000000000000000000000000000000000000
--- a/cpu/atmega1284p/startup.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *               2018 Matthew Blue
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega1284p
- * @{
- *
- * @file
- * @brief       Startup code and interrupt vector definition
- *
- * @author      Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- * @author      Matthew Blue <matthew.blue.neuro@gmail.com>
- *
- * @}
- */
-
-#include <stdint.h>
-#include <avr/interrupt.h>
-#include <avr/io.h>
-
-/* For Catchall-Loop */
-#include "board.h"
-
-
-/**
- * @brief functions for initializing the board, std-lib and kernel
- */
-extern void board_init(void);
-extern void kernel_init(void);
-extern void __libc_init_array(void);
-
-/**
- * @brief This pair of functions hook circumvent the call to main
- *
- * avr-libc normally uses the .init9 section for a call to main. This call
- * seems to be not replaceable without hacking inside the library. We
- * circumvent the call to main by using section .init7 to call the function
- * reset_handler which therefore is the real entry point and  section .init8
- * which should never be reached but just in case jumps to exit.
- * This way there should be no way to call main directly.
- */
-void init7_ovr(void) __attribute__((naked)) __attribute__((section(".init7")));
-void init8_ovr(void) __attribute__((naked)) __attribute__((section(".init8")));
-
-
-void init7_ovr(void)
-{
-    __asm__("call reset_handler");
-}
-
-void init8_ovr(void)
-{
-    __asm__("jmp exit");
-}
-/**
- * @brief This function is the entry point after a system reset
- *
- * After a system reset, the following steps are necessary and carried out:
- * 1. initialize the board (sync clock, setup std-IO)
- * 2. initialize and start RIOTs kernel
- */
-void reset_handler(void)
-{
-    /* initialize the board and startup the kernel */
-    board_init();
-    /* startup the kernel */
-    kernel_init();
-}
diff --git a/cpu/atmega2560/Makefile b/cpu/atmega2560/Makefile
index e17e41db7225d898b224d42b91d3f00fa6f6bc0f..8b5bf236d32d5f42c31441029d8c901461c6a834 100644
--- a/cpu/atmega2560/Makefile
+++ b/cpu/atmega2560/Makefile
@@ -1,5 +1,7 @@
 # define the module that is build
 MODULE = cpu
+
 # add a list of subdirectories, that should also be build
-DIRS = $(ATMEGA_COMMON)
+DIRS = $(RIOTCPU)/atmega_common/
+
 include $(RIOTBASE)/Makefile.base
diff --git a/cpu/atmega2560/Makefile.include b/cpu/atmega2560/Makefile.include
index 18bfb9a45476f846fb8eab256f76c8d6f186fa17..16c500d37cc6e6531b65099811176b8603e65932 100644
--- a/cpu/atmega2560/Makefile.include
+++ b/cpu/atmega2560/Makefile.include
@@ -1,15 +1,8 @@
 # tell the build system that the CPU depends on the atmega common files
 USEMODULE += atmega_common
 
-# define path to atmega common module, which is needed for this CPU
-export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/
-
-# explicitly tell the linker to link the syscalls and startup code.
-#   Without this the interrupt vectors will not be linked correctly!
-export UNDEF += $(BINDIR)/cpu/startup.o
-
 RAM_LEN = 8K
 ROM_LEN = 256K
 
 # CPU depends on the atmega common module, so include it
-include $(ATMEGA_COMMON)Makefile.include
+include $(RIOTCPU)/atmega_common/Makefile.include
diff --git a/cpu/atmega2560/cpu.c b/cpu/atmega2560/cpu.c
deleted file mode 100644
index 8ea4e28b5f0f154af9ab068beccf1465bc76aa75..0000000000000000000000000000000000000000
--- a/cpu/atmega2560/cpu.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega2560
- * @{
- *
- * @file
- * @brief       Implementation of the CPU initialization
- *
- * @author      Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- * @}
- */
-
-#include "cpu.h"
-#include "periph/init.h"
-
-/**
- * @brief Initialize the CPU, set IRQ priorities
- */
-void cpu_init(void)
-{
-    /* trigger static peripheral initialization */
-    periph_init();
-}
diff --git a/cpu/atmega2560/include/cpu_conf.h b/cpu/atmega2560/include/cpu_conf.h
deleted file mode 100644
index 1e7f0eac9a056e7c7a63dfb7efbe5935dd7315c6..0000000000000000000000000000000000000000
--- a/cpu/atmega2560/include/cpu_conf.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup         cpu_atmega2560
- * @{
- *
- * @file
- * @brief           Implementation specific CPU configuration options
- *
- * @author          Hauke Petersen <hauke.petersen@fu-berlin.de>
- * @author          Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- */
-
-#ifndef CPU_CONF_H
-#define CPU_CONF_H
-
-#include "atmega_regs_common.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @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
- * @{
- */
-#define THREAD_EXTRA_STACKSIZE_PRINTF    (128)
-
-#ifndef THREAD_STACKSIZE_DEFAULT
-#define THREAD_STACKSIZE_DEFAULT   (256)
-#endif
-
-#define THREAD_STACKSIZE_IDLE      (128)
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CONF_H */
-/** @} */
diff --git a/cpu/atmega2560/startup.c b/cpu/atmega2560/startup.c
deleted file mode 100644
index b53d18f2dc2ead0ae292f67ba6d8b36fae0d12d3..0000000000000000000000000000000000000000
--- a/cpu/atmega2560/startup.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega2560
- * @{
- *
- * @file
- * @brief       Startup code and interrupt vector definition
- *
- * @author     Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- *
- * @}
- */
-
-#include <stdint.h>
-#include <avr/interrupt.h>
-#include <avr/io.h>
-
-/* For Catchall-Loop */
-#include "board.h"
-
-
-/**
- * @brief functions for initializing the board, std-lib and kernel
- */
-extern void board_init(void);
-extern void kernel_init(void);
-extern void __libc_init_array(void);
-
-/**
- * @brief This pair of functions hook circumvent the call to main
- *
- * avr-libc normally uses the .init9 section for a call to main. This call
- * seems to be not replaceable without hacking inside the library. We
- * circumvent the call to main by using section .init7 to call the function
- * reset_handler which therefore is the real entry point and  section .init8
- * which should never be reached but just in case jumps to exit.
- * This way there should be no way to call main directly.
- */
-void init7_ovr(void) __attribute__((section(".init7")));
-void init8_ovr(void) __attribute__((section(".init8")));
-
-
-__attribute__((used,naked)) void init7_ovr(void)
-{
-    __asm__("call reset_handler");
-}
-
-__attribute__((used,naked)) void init8_ovr(void)
-{
-    __asm__("jmp exit");
-}
-
-/**
- * @brief This function is the entry point after a system reset
- *
- * After a system reset, the following steps are necessary and carried out:
- * 1. initialize the board (sync clock, setup std-IO)
- * 2. initialize and start RIOTs kernel
- */
-__attribute__((used)) void reset_handler(void)
-{
-    /* initialize the board and startup the kernel */
-    board_init();
-    /* startup the kernel */
-    kernel_init();
-}
diff --git a/cpu/atmega256rfr2/Makefile b/cpu/atmega256rfr2/Makefile
index 5148810cfa673b6e7b397f91f539d7f7c1627c69..bfe7b40097c93aab136e89cc9ec0a9a08cff5bdc 100644
--- a/cpu/atmega256rfr2/Makefile
+++ b/cpu/atmega256rfr2/Makefile
@@ -1,5 +1,7 @@
 # define the module that is build
 MODULE = cpu
+
 # add a list of subdirectories, that should also be build
-DIRS = periph $(ATMEGA_COMMON)
+DIRS = periph $(RIOTCPU)/atmega_common/
+
 include $(RIOTBASE)/Makefile.base
diff --git a/cpu/atmega256rfr2/Makefile.include b/cpu/atmega256rfr2/Makefile.include
index 7d1eb48a2a9f34aaf085e86a8627eabfc3f9a353..c7e4d680eaeb74eae8abe1e9bc668b80fe334f15 100644
--- a/cpu/atmega256rfr2/Makefile.include
+++ b/cpu/atmega256rfr2/Makefile.include
@@ -1,11 +1,5 @@
 # tell the build system that the CPU depends on the atmega common files
 USEMODULE += atmega_common
-# define path to atmega common module, which is needed for this CPU
-export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/
-
-# explicitly tell the linker to link the syscalls and startup code.
-#   Without this the interrupt vectors will not be linked correctly!
-export UNDEF += $(BINDIR)/cpu/startup.o
 
 #include periph module
 USEMODULE += periph
@@ -14,4 +8,4 @@ RAM_LEN = 32K
 ROM_LEN = 256K
 
 # CPU depends on the atmega common module, so include it
-include $(ATMEGA_COMMON)Makefile.include
+include $(RIOTCPU)/atmega_common/Makefile.include
diff --git a/cpu/atmega256rfr2/include/cpu_conf.h b/cpu/atmega256rfr2/include/cpu_conf.h
deleted file mode 100644
index e7eb3c681e113e89a9415707e25c8afde91a4897..0000000000000000000000000000000000000000
--- a/cpu/atmega256rfr2/include/cpu_conf.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2017 RWTH Aachen, Josua Arndt
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup         cpu_atmega256rfr2
- * @{
- *
- * @file
- * @brief           Implementation specific CPU configuration options
- *
- * @author          Josua Arndt <jarndt@ias.rwth-aachen.de>
- * @author          Steffen Robertz <steffen.robertz@rwth-aachen.de>
- */
-
-#ifndef CPU_CONF_H
-#define CPU_CONF_H
-
-#include "atmega_regs_common.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @name Kernel configuration
- *
- * Since printf seems to get memory allocated by the linker/avr-libc the stack
- * size tested sucessfully even with pretty small stacks.k
- * @{
- */
-
-/* keep THREAD_STACKSIZE_IDLE > THREAD_EXTRA_STACKSIZE_PRINTF
- * to avoid not printing of debug in interrupts
- */
-#define THREAD_EXTRA_STACKSIZE_PRINTF    (128)
-
-#ifndef THREAD_STACKSIZE_DEFAULT
-#define THREAD_STACKSIZE_DEFAULT   (512)
-#endif
-
-#define THREAD_STACKSIZE_IDLE      (129)
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CONF_H */
-/** @} */
diff --git a/cpu/atmega328p/Makefile b/cpu/atmega328p/Makefile
index 81f110b68d093c93e2626885a5e8ba9af9b229fc..8b5bf236d32d5f42c31441029d8c901461c6a834 100644
--- a/cpu/atmega328p/Makefile
+++ b/cpu/atmega328p/Makefile
@@ -1,6 +1,7 @@
 # define the module that is build
 MODULE = cpu
+
 # add a list of subdirectories, that should also be build
-DIRS = $(ATMEGA_COMMON)
+DIRS = $(RIOTCPU)/atmega_common/
 
 include $(RIOTBASE)/Makefile.base
diff --git a/cpu/atmega328p/Makefile.include b/cpu/atmega328p/Makefile.include
index c014b254ccd08f40346c94fad089403946bf851c..058b45a115f06efa9a43680a31cd85d36778dc61 100644
--- a/cpu/atmega328p/Makefile.include
+++ b/cpu/atmega328p/Makefile.include
@@ -1,11 +1,8 @@
 # tell the build system that the CPU depends on the atmega common files
 USEMODULE += atmega_common
 
-# define path to atmega common module, which is needed for this CPU
-export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/
-
 RAM_LEN = 2K
 ROM_LEN = 32K
 
 # CPU depends on the atmega common module, so include it
-include $(ATMEGA_COMMON)Makefile.include
+include $(RIOTCPU)/atmega_common/Makefile.include
\ No newline at end of file
diff --git a/cpu/atmega328p/cpu.c b/cpu/atmega328p/cpu.c
deleted file mode 100644
index ed865bd42a56f188d2da978e2ffb5be8b2aef006..0000000000000000000000000000000000000000
--- a/cpu/atmega328p/cpu.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega328p
- * @{
- *
- * @file
- * @brief       Implementation of the CPU initialization
- *
- * @author      Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- * @}
- */
-
-#include "cpu.h"
-#include "periph/init.h"
-
-/**
- * @brief Initialize the CPU, set IRQ priorities
- */
-void cpu_init(void)
-{
-    /* trigger static peripheral initialization */
-    periph_init();
-}
diff --git a/cpu/atmega328p/include/cpu_conf.h b/cpu/atmega328p/include/cpu_conf.h
deleted file mode 100644
index 91ac74da4d81e946d804bd006fd074b0edc69e34..0000000000000000000000000000000000000000
--- a/cpu/atmega328p/include/cpu_conf.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup         cpu_atmega328p
- * @{
- *
- * @file
- * @brief           Implementation specific CPU configuration options
- *
- * @author          Hauke Petersen <hauke.petersen@fu-berlin.de>
- * @author          Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- */
-
-#ifndef CPU_CONF_H
-#define CPU_CONF_H
-
-#include "atmega_regs_common.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @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
- * @{
- */
-#define THREAD_EXTRA_STACKSIZE_PRINTF    (128)
-
-#ifndef THREAD_STACKSIZE_DEFAULT
-#define THREAD_STACKSIZE_DEFAULT   (256)
-#endif
-
-#define THREAD_STACKSIZE_IDLE      (128)
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CONF_H */
-/** @} */
diff --git a/cpu/atmega328p/startup.c b/cpu/atmega328p/startup.c
deleted file mode 100644
index 4601dcc43027191a25bf2cb64ae89fc185579c10..0000000000000000000000000000000000000000
--- a/cpu/atmega328p/startup.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License v2.1. See the file LICENSE in the top level
- * directory for more details.
- */
-
-/**
- * @ingroup     cpu_atmega328p
- * @{
- *
- * @file
- * @brief       Startup code and interrupt vector definition
- *
- * @author     Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
- *
- * @}
- */
-
-#include <stdint.h>
-#include <avr/interrupt.h>
-#include <avr/io.h>
-
-/* For Catchall-Loop */
-#include "board.h"
-
-
-/**
- * @brief functions for initializing the board, std-lib and kernel
- */
-extern void board_init(void);
-extern void kernel_init(void);
-extern void __libc_init_array(void);
-
-/**
- * @brief This pair of functions hook circumvent the call to main
- *
- * avr-libc normally uses the .init9 section for a call to main. This call
- * seems to be not replaceable without hacking inside the library. We
- * circumvent the call to main by using section .init7 to call the function
- * reset_handler which therefore is the real entry point and  section .init8
- * which should never be reached but just in case jumps to exit.
- * This way there should be no way to call main directly.
- */
-void init7_ovr(void) __attribute__((naked)) __attribute__((section(".init7")));
-void init8_ovr(void) __attribute__((naked)) __attribute__((section(".init8")));
-
-
-void init7_ovr(void)
-{
-    __asm__("call reset_handler");
-}
-
-void init8_ovr(void)
-{
-    __asm__("jmp exit");
-}
-/**
- * @brief This function is the entry point after a system reset
- *
- * After a system reset, the following steps are necessary and carried out:
- * 1. initialize the board (sync clock, setup std-IO)
- * 2. initialize and start RIOTs kernel
- */
-void reset_handler(void)
-{
-    /* initialize the board and startup the kernel */
-    board_init();
-    /* startup the kernel */
-    kernel_init();
-}
diff --git a/cpu/atmega_common/Makefile b/cpu/atmega_common/Makefile
index 387e91627c4526c4990e6aef48bc8e5bc75b41eb..8f1257b6783d14f28e94fef1db46d4cf366daca3 100644
--- a/cpu/atmega_common/Makefile
+++ b/cpu/atmega_common/Makefile
@@ -1,5 +1,7 @@
-# define the module that is build
+# define the module that is build (not strictly necessary)
 MODULE = atmega_common
+
 # add a list of subdirectories, that should also be build
 DIRS = periph
+
 include $(RIOTBASE)/Makefile.base
diff --git a/cpu/atmega256rfr2/cpu.c b/cpu/atmega_common/cpu.c
similarity index 62%
rename from cpu/atmega256rfr2/cpu.c
rename to cpu/atmega_common/cpu.c
index fa3b7d4e33b9e3afb5971d18fe2ad5e3126dbfaf..f02469beb44790eee7d73fea5c2bc42fc31a8e62 100644
--- a/cpu/atmega256rfr2/cpu.c
+++ b/cpu/atmega_common/cpu.c
@@ -1,5 +1,7 @@
 /*
- * Copyright (C) 2017 RWTH Aachen, Josua Arndt
+ * 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
  * General Public License v2.1. See the file LICENSE in the top level
@@ -7,45 +9,68 @@
  */
 
 /**
- * @ingroup     cpu_atmega256rfr2
+ * @ingroup     cpu_atmega_common
  * @{
  *
  * @file
  * @brief       Implementation of the CPU initialization
  *
+ * @author      Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
  * @author      Steffen Robertz <steffen.robertz@rwth-aachen.de>
  * @author      Josua Arndt <jarndt@ias.rwth-aachen.de>
+ * @author      Matthew Blue <matthew.blue.neuro@gmail.com>
+ * @author      Francisco Acosta <francisco.acosta@inria.fr>
+
  * @}
  */
 
 #include <avr/io.h>
 #include <avr/wdt.h>
 #include <avr/pgmspace.h>
+
 #include "cpu.h"
 #include "board.h"
 #include "periph/init.h"
+#include "panic.h"
 
 #define ENABLE_DEBUG (0)
 #include "debug.h"
 
 /*
-* Since this MCU does not feature a software reset, the watchdog timer
+* Since atmega MCUs do not feature a software reset, the watchdog timer
 * is being used. It will be set to the shortest time and then force a
 * reset. Therefore the MCUSR register needs to be resetted as fast as
-* possible. In this case in the bootloader already. In order to regain
-* information about the reset cause, the MCUSR is copied to r2 beforehand.
-* When a software reset was triggered, r3 will contain 0xAA. In order to
-* prevent changes to the values from the .init section, r2 and r3 are saved
-* in the .init0 section
+* possible.
+* Which means in the bootloader or in the following init0 if no bootloader is used.
+* Bootloader resets watchdog and pass MCUSR in r2 (e.g. Optiboot) in order to pass
+* information about the reset cause to the application.
+* When no Bootloader is used the watchdog will be disabled in the init0 section.
+* When a software reset was triggered, r3 will contain 0xAA.
+* In order to prevent changes to the values from the .init section, MCUSR and r3
+* are saved in the .init0 section
 */
 uint8_t mcusr_mirror __attribute__((section(".noinit")));
 uint8_t soft_rst __attribute__((section(".noinit")));
 void get_mcusr(void) __attribute__((naked)) __attribute__((section(".init0")));
+
 void get_mcusr(void)
 {
+    /* save soft reset flag set in reset routine */
+    __asm__ __volatile__("mov %0, r3\n" : "=r" (soft_rst) :);
+#ifdef BOOTLOADER_CLEARS_WATCHDOG_AND_PASSES_MCUSR
     /* save the reset flags passed from the bootloader */
     __asm__ __volatile__("mov %0, r2\n" : "=r" (mcusr_mirror) :);
-    __asm__ __volatile__("mov %0, r3\n" : "=r" (soft_rst) :);
+#else
+    /* save the reset flags */
+#ifdef MCUCSR
+  mcusr_mirror = MCUCSR;
+  MCUSR = 0;
+#else
+  mcusr_mirror = MCUSR;
+  MCUSR = 0;
+#endif
+    wdt_disable();
+#endif
 }
 
 void _reset_cause(void)
@@ -66,9 +91,11 @@ void _reset_cause(void)
             DEBUG("Watchdog reset!\n");
         }
     }
+#if !defined (CPU_ATMEGA328P)
     if (mcusr_mirror & (1 << JTRF)) {
         DEBUG("JTAG reset!\n");
     }
+#endif
 }
 
 void cpu_init(void)
@@ -78,20 +105,6 @@ void cpu_init(void)
     wdt_reset();   /* should not be nececessary as done in bootloader */
     wdt_disable(); /* but when used without bootloader this is needed */
 
-    /* Set system clock Prescaler */
-    CLKPR = (1 << CLKPCE);  /* enable a change to CLKPR */
-    /* set the Division factor to 1 results in divisor 2 for internal Oscillator
-     * So FCPU = 8MHz
-     *
-     * Attention!
-     * The CPU can not be used with the external xtal oscillator if the core
-     * should be put in sleep while the transceiver is in rx mode.
-     *
-     * It seems the as teh peripheral clock divider is set to 1 and this all
-     * clocks of the timer, etc run with 16MHz increasing power consumption.
-     * */
-    CLKPR = 0;
-
     /* Initialize peripherals for which modules are included in the makefile.*/
     /* spi_init */
     /* rtc_init */
@@ -110,28 +123,32 @@ void cpu_init(void)
  * EIFR – External Interrupt Flag Register
  * PCIFR – Pin Change Interrupt Flag Register
  */
-ISR(BADISR_vect){
-
+ISR(BADISR_vect)
+{
     _reset_cause();
 
-    printf_P(PSTR("FATAL ERROR: BADISR_vect called, unprocessed Interrupt.\n"
-                  "STOP Execution.\n"));
-
+#if defined (CPU_ATMEGA256RFR2)
     printf("IRQ_STATUS %#02x\nIRQ_STATUS1 %#02x\n",
-            (unsigned int)IRQ_STATUS, (unsigned int)IRQ_STATUS1 );
+            (unsigned int)IRQ_STATUS, (unsigned int)IRQ_STATUS1);
 
-    printf("SCIRQS %#02x\nBATMON %#02x\n", (unsigned int)SCIRQS, (unsigned int)BATMON );
+    printf("SCIRQS %#02x\nBATMON %#02x\n", (unsigned int)SCIRQS, (unsigned int)BATMON);
 
-    printf("EIFR %#02x\nPCIFR %#02x\n", (unsigned int)EIFR, (unsigned int)PCIFR );
+    printf("EIFR %#02x\nPCIFR %#02x\n", (unsigned int)EIFR, (unsigned int)PCIFR);
+#endif
+#ifdef LED_PANIC
+    /* Use LED light to signal ERROR. */
+    LED_PANIC;
+#endif
 
-    /* White LED light is used to signal ERROR. */
-    LED_PORT |= (LED2_MASK | LED1_MASK | LED0_MASK);
-
-    while (1) {}
+    core_panic(PANIC_GENERAL_ERROR, PSTR("FATAL ERROR: BADISR_vect called, unprocessed Interrupt.\n"
+                  "STOP Execution.\n"));
 }
 
-ISR(BAT_LOW_vect, ISR_BLOCK){
+#if defined (CPU_ATMEGA256RFR2)
+ISR(BAT_LOW_vect, ISR_BLOCK)
+{
     __enter_isr();
-    DEBUG("BAT_LOW \n");
+    DEBUG("BAT_LOW\n");
     __exit_isr();
 }
+#endif
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 e87b7d2a01553ae7ecc01ed334e79544af6c4931..933c60bc59cdf21792d41a725bcf5a3771eeceba 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 */
 /** @} */
diff --git a/cpu/atmega_common/periph/pm.c b/cpu/atmega_common/periph/pm.c
index 609d2ce4bdb55a1473badeb9411ffcc04e2f1946..341f95d45adaa5dad221b1d3a5a04b11fd0cb90b 100644
--- a/cpu/atmega_common/periph/pm.c
+++ b/cpu/atmega_common/periph/pm.c
@@ -30,14 +30,12 @@
 
 void pm_reboot(void)
 {
-#if defined(CPU_ATMEGA256RFR2)
     /* clear MCU Status Register Interrupt flags */
     MCUSR = 0x00;
     /* Softreset recognition feature, "r3" will be read out in .init0
      * to be able to distinguish WDT reset and WDT software reset
      */
     __asm__ __volatile__("mov r3, %0\n" :: "r" (0xAA));
-#endif /* CPU_ATMEGA256RFR2 */
 
     /*
      * Since the AVR doesn't support a real software reset, we set the Watchdog
diff --git a/cpu/atmega256rfr2/startup.c b/cpu/atmega_common/startup.c
similarity index 98%
rename from cpu/atmega256rfr2/startup.c
rename to cpu/atmega_common/startup.c
index 98b8cbadbf5ca375c55d64edb3796d8fce130399..1792fac5d893e59cfa371a9882cbcdd4b1dd80c1 100644
--- a/cpu/atmega256rfr2/startup.c
+++ b/cpu/atmega_common/startup.c
@@ -7,7 +7,7 @@
  */
 
 /**
- * @ingroup     cpu_atmega256rfr2
+ * @ingroup     cpu_atmega_common
  * @{
  *
  * @file
diff --git a/examples/cord_epsim/Makefile b/examples/cord_epsim/Makefile
index f40884bdeb62a66c85dfa7e32bead5d7b06fb76a..110dae7f864ac6d7a025014c23919c2db1f90473 100644
--- a/examples/cord_epsim/Makefile
+++ b/examples/cord_epsim/Makefile
@@ -11,7 +11,7 @@ BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-mega2560 arduino-uno \
                              chronos hifive1 msb-430 msb-430h nucleo-f030r8 \
                              nucleo-l053r8 nucleo-f031k6 nucleo-f042k6 \
                              nucleo-f303k8 nucleo-f334r8 nucleo-l031k6 \
-                             stm32f0discovery telosb waspmote-pro \
+                             mega-xplained stm32f0discovery telosb waspmote-pro \
                              wsn430-v1_3b wsn430-v1_4 z1
 
 # Enable GNRC networking
diff --git a/examples/ipc_pingpong/Makefile b/examples/ipc_pingpong/Makefile
index 03828548a90b879847c035b85a3f05b54aca2074..b7dd2ef8e0cfd5742b2a61fe71290be470f53d00 100644
--- a/examples/ipc_pingpong/Makefile
+++ b/examples/ipc_pingpong/Makefile
@@ -4,7 +4,8 @@ APPLICATION = ipc_pingpong
 # If no BOARD is found in the environment, use this default:
 BOARD ?= native
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6 \
+
 
 # This has to be the absolute path to the RIOT base directory:
 RIOTBASE ?= $(CURDIR)/../..
diff --git a/tests/bench_sizeof_coretypes/Makefile b/tests/bench_sizeof_coretypes/Makefile
index c3cb1b3e017b8c0f5c71f05aef1075789001bd72..a3f0b96487ada27706761cc5f448251af3f706ea 100644
--- a/tests/bench_sizeof_coretypes/Makefile
+++ b/tests/bench_sizeof_coretypes/Makefile
@@ -1,5 +1,7 @@
 include ../Makefile.tests_common
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 # Modules that will have an impact on the size of the TCB (thread_t):
 #
 # disabled by default, enable on demand:
diff --git a/tests/driver_bmx055/Makefile b/tests/driver_bmx055/Makefile
index 9c9293fbfd516318b488fd43da5820a8ff926a48..f1a5f72c27af177a343a455dfe9e14e594a44f9f 100644
--- a/tests/driver_bmx055/Makefile
+++ b/tests/driver_bmx055/Makefile
@@ -1,5 +1,7 @@
 include ../Makefile.tests_common
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 # include and auto-initialize all available sensors
 USEMODULE += saul_default
 # include driver for bmx055 sensor
diff --git a/tests/driver_enc28j60/Makefile b/tests/driver_enc28j60/Makefile
index 21e3a1f1ac0bf954ce2c0859a3db87c3f9c772cb..db65bd668dfe0df4a7b174d4f9ca66c54809367d 100644
--- a/tests/driver_enc28j60/Makefile
+++ b/tests/driver_enc28j60/Makefile
@@ -3,7 +3,7 @@ include ../Makefile.tests_common
 BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-mega2560 arduino-uno \
                              msb-430 msb-430h nucleo-f334r8 nucleo-l053r8 \
                              nucleo-f031k6 nucleo-f042k6 nucleo-f303k8 \
-                             nucleo-l031k6 stm32f0discovery telosb \
+                             nucleo-l031k6 mega-xplained stm32f0discovery telosb \
                              waspmote-pro wsn430-v1_3b wsn430-v1_4 z1
 
 USEMODULE += auto_init_gnrc_netif
diff --git a/tests/driver_mpu9150/Makefile b/tests/driver_mpu9150/Makefile
index 5f564681c8cbcc6a359eff59f9c715b1b274097f..c487eac2d8baa6fcb70e0005f3fcc98b7db71298 100644
--- a/tests/driver_mpu9150/Makefile
+++ b/tests/driver_mpu9150/Makefile
@@ -1,5 +1,7 @@
 include ../Makefile.tests_common
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 USEMODULE += mpu9150
 USEMODULE += xtimer
 
diff --git a/tests/driver_nvram_spi/Makefile b/tests/driver_nvram_spi/Makefile
index d056bae463ccc4bf82e404d4fc940f4dbaa9bd64..50ab28ce16aca12813acc047f33162d8f93c8d10 100644
--- a/tests/driver_nvram_spi/Makefile
+++ b/tests/driver_nvram_spi/Makefile
@@ -1,5 +1,7 @@
 include ../Makefile.tests_common
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 USEMODULE += nvram_spi
 USEMODULE += xtimer
 
diff --git a/tests/driver_pir/Makefile b/tests/driver_pir/Makefile
index a509648dccacbbc6738e0382c8be5a3c70e21f3c..b0d775f67b31ff354b4af285f3a38bea256e720b 100644
--- a/tests/driver_pir/Makefile
+++ b/tests/driver_pir/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 USEMODULE += pir
 
diff --git a/tests/driver_tsl4531x/Makefile b/tests/driver_tsl4531x/Makefile
index 487030b625962f9f58668b9267ba7b732b6986b2..c9ba61e4d8bf42364773c85d3e5e6befa45559a1 100644
--- a/tests/driver_tsl4531x/Makefile
+++ b/tests/driver_tsl4531x/Makefile
@@ -1,5 +1,7 @@
 include ../Makefile.tests_common
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 USEMODULE += tsl4531x
 USEMODULE += xtimer
 
diff --git a/tests/driver_xbee/Makefile b/tests/driver_xbee/Makefile
index 84d09bfa1bc017ac2cf97e52006e9ed79a01802e..2099972dea93d5aa70fdd4d76cb711908c89e85e 100644
--- a/tests/driver_xbee/Makefile
+++ b/tests/driver_xbee/Makefile
@@ -2,7 +2,7 @@ include ../Makefile.tests_common
 
 BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6 \
                              nucleo-f042k6 nucleo-f030r8 nucleo-f334r8 \
-                             stm32f0discovery
+                             stm32f0discovery waspmote-pro
 
 USEMODULE += xbee
 USEMODULE += gnrc_txtsnd
diff --git a/tests/emb6/Makefile b/tests/emb6/Makefile
index 184b11188c03dd86cb785760683b0c0f2585b106..e9065cc367d0b83d2f68cb799a460ef910f42b16 100644
--- a/tests/emb6/Makefile
+++ b/tests/emb6/Makefile
@@ -6,10 +6,10 @@ include ../Makefile.tests_common
 BOARD_BLACKLIST := msb-430 msb-430h pic32-clicker pic32-wifire \
                    telosb wsn430-v1_3b wsn430-v1_4 z1
 
-BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno \
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-mega2560 arduino-uno \
                              msb-430 msb-430h nucleo-l031k6 nucleo-f031k6 \
                              nucleo-f042k6 nucleo-l053r8 stm32f0discovery \
-                             telosb wsn430-v1_3b wsn430-v1_4 z1
+                             telosb waspmote-pro wsn430-v1_3b wsn430-v1_4 z1
 
 USEPKG += emb6
 
diff --git a/tests/evtimer_msg/Makefile b/tests/evtimer_msg/Makefile
index cc66a9e3d9ed1a5b521b920a27a027ce78f50a8a..eb62ad17957aea8222ce78c084384b02b9c9cf83 100644
--- a/tests/evtimer_msg/Makefile
+++ b/tests/evtimer_msg/Makefile
@@ -1,6 +1,7 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6 nucleo-f042k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6 \
+                             nucleo-f042k6
 
 USEMODULE += evtimer
 
diff --git a/tests/evtimer_underflow/Makefile b/tests/evtimer_underflow/Makefile
index cc66a9e3d9ed1a5b521b920a27a027ce78f50a8a..eb62ad17957aea8222ce78c084384b02b9c9cf83 100644
--- a/tests/evtimer_underflow/Makefile
+++ b/tests/evtimer_underflow/Makefile
@@ -1,6 +1,7 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6 nucleo-f042k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6 \
+                             nucleo-f042k6
 
 USEMODULE += evtimer
 
diff --git a/tests/gnrc_ipv6_nib/Makefile b/tests/gnrc_ipv6_nib/Makefile
index 2b8205ec5d15ddef99e1e679e9aec87bdaa7767f..7f767162da4179d651354274f035bb94d8405352 100644
--- a/tests/gnrc_ipv6_nib/Makefile
+++ b/tests/gnrc_ipv6_nib/Makefile
@@ -1,8 +1,8 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno \
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-mega2560 arduino-uno \
                              chronos nucleo-f031k6 nucleo-f042k6 nucleo-l031k6 \
-                             telosb wsn430-v1_3b wsn430-v1_4
+                             telosb waspmote-pro wsn430-v1_3b wsn430-v1_4
 
 USEMODULE += gnrc_ipv6
 USEMODULE += gnrc_ipv6_nib
diff --git a/tests/gnrc_sock_udp/Makefile b/tests/gnrc_sock_udp/Makefile
index ae292db100d30156899c6ec24e24c7944a2b83f4..4583d8b4f5bc0177c321656b9dd55e28b0a5343b 100644
--- a/tests/gnrc_sock_udp/Makefile
+++ b/tests/gnrc_sock_udp/Makefile
@@ -1,7 +1,8 @@
 include ../Makefile.tests_common
 
 BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno \
-                             chronos nucleo-f031k6 nucleo-f042k6 nucleo-l031k6
+                             chronos nucleo-f031k6 nucleo-f042k6 nucleo-l031k6 \
+                             waspmote-pro
 
 USEMODULE += gnrc_sock_check_reuse
 USEMODULE += gnrc_sock_udp
diff --git a/tests/irq/Makefile b/tests/irq/Makefile
index 4a9dbbdb5d8d9f1d289b1ddc5d245b6b431de8ce..4824580eb065d245d29d66e10baecb32b3b9a8b8 100644
--- a/tests/irq/Makefile
+++ b/tests/irq/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 USEMODULE += auto_init
 USEMODULE += xtimer
diff --git a/tests/isr_yield_higher/Makefile b/tests/isr_yield_higher/Makefile
index bfb6dbf0b1af35203942d932e53f6bfa3000abf0..551df56bb799d548b216025770e47c61b9fa2ff7 100644
--- a/tests/isr_yield_higher/Makefile
+++ b/tests/isr_yield_higher/Makefile
@@ -1,7 +1,7 @@
 APPLICATION = isr_yield_higher
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 USEMODULE += xtimer
 
diff --git a/tests/msg_send_receive/Makefile b/tests/msg_send_receive/Makefile
index 54a42556f80cfcd3aa57c8a33a5d7533a88b9da6..489976d1e82bf327a2decb770c96d05475462b55 100644
--- a/tests/msg_send_receive/Makefile
+++ b/tests/msg_send_receive/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 TEST_ON_CI_WHITELIST += all
 
diff --git a/tests/periph_eeprom/Makefile b/tests/periph_eeprom/Makefile
index a34d7a7e28e3dc88162c9f56d2932cdb39cb3e76..1771c5bd5db1fcf7ba3e40a6ed4abf34653644e9 100644
--- a/tests/periph_eeprom/Makefile
+++ b/tests/periph_eeprom/Makefile
@@ -3,6 +3,8 @@ include ../Makefile.tests_common
 
 FEATURES_REQUIRED += periph_eeprom
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 USEMODULE += shell
 USEMODULE += shell_commands  # provides reboot command
 
diff --git a/tests/pipe/Makefile b/tests/pipe/Makefile
index 10f63e29cd64bc6113e680c9aa29a210b747e41b..10a4697c3956e176f3d675b4bb125514e81b5847 100644
--- a/tests/pipe/Makefile
+++ b/tests/pipe/Makefile
@@ -2,7 +2,7 @@ include ../Makefile.tests_common
 
 #malloc.h not found
 BOARD_BLACKLIST := jiminy-mega256rfr2 mega-xplained
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 USEMODULE += pipe
 
diff --git a/tests/sched_testing/Makefile b/tests/sched_testing/Makefile
index 54a42556f80cfcd3aa57c8a33a5d7533a88b9da6..489976d1e82bf327a2decb770c96d05475462b55 100644
--- a/tests/sched_testing/Makefile
+++ b/tests/sched_testing/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 TEST_ON_CI_WHITELIST += all
 
diff --git a/tests/struct_tm_utility/Makefile b/tests/struct_tm_utility/Makefile
index 549f162764732ea0705176ce7d6425aec449c02b..3a359b349190dfad1dba1ac663d2d513fff53d56 100644
--- a/tests/struct_tm_utility/Makefile
+++ b/tests/struct_tm_utility/Makefile
@@ -2,6 +2,8 @@ include ../Makefile.tests_common
 
 DISABLE_MODULE += auto_init
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 USEMODULE += shell
 USEMODULE += timex
 
diff --git a/tests/thread_exit/Makefile b/tests/thread_exit/Makefile
index 61bc51c2c4b26329229d3fe021a12ceff7f2cb24..e2e53cdc4480e194e1105baee71c01ed602f021e 100644
--- a/tests/thread_exit/Makefile
+++ b/tests/thread_exit/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 DISABLE_MODULE += auto_init
 
diff --git a/tests/thread_flags/Makefile b/tests/thread_flags/Makefile
index 30365019ccec03b1370ebe6f02b8dfd2086759dd..e2ad1f354512798b584999356f796870f08276b2 100644
--- a/tests/thread_flags/Makefile
+++ b/tests/thread_flags/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 USEMODULE += core_thread_flags
 USEMODULE += xtimer
diff --git a/tests/thread_race/Makefile b/tests/thread_race/Makefile
index 391995e8f6d12c5bcba1b3ccbac63873c882200d..25a5f776ef8031d4fadfaa76f59fd244d96ebd13 100644
--- a/tests/thread_race/Makefile
+++ b/tests/thread_race/Makefile
@@ -2,6 +2,8 @@ include ../Makefile.tests_common
 
 DISABLE_MODULE += auto_init
 
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno
+
 TEST_ON_CI_WHITELIST += all
 
 include $(RIOTBASE)/Makefile.include
diff --git a/tests/xtimer_hang/Makefile b/tests/xtimer_hang/Makefile
index c32a4e70bffedb9a98d2e564c5a2dde8fb5134bb..fa58b99b80d6911ba3f3fdc054cf20948a550204 100644
--- a/tests/xtimer_hang/Makefile
+++ b/tests/xtimer_hang/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 USEMODULE += xtimer
 
diff --git a/tests/xtimer_msg/Makefile b/tests/xtimer_msg/Makefile
index d2da7702d4541efecfb2cf7e3ac5614289c5818b..5ef90226bffdcdd026de29a776697c7ca0a36324 100644
--- a/tests/xtimer_msg/Makefile
+++ b/tests/xtimer_msg/Makefile
@@ -1,6 +1,6 @@
 include ../Makefile.tests_common
 
-BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
+BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-uno nucleo-f031k6
 
 USEMODULE += xtimer