From d89ac480ebaad39d0f1847333e6e750617234af4 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Sun, 20 Sep 2015 18:10:48 +0200 Subject: [PATCH 1/2] atmega: added panic function --- cpu/atmega_common/panic.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cpu/atmega_common/panic.c diff --git a/cpu/atmega_common/panic.c b/cpu/atmega_common/panic.c new file mode 100644 index 0000000000..dc5fe06e59 --- /dev/null +++ b/cpu/atmega_common/panic.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2015 INRIA + * + * 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_atmega_common + * @{ + * + * @file + * @brief Crash handling functions implementation for ATmega MCUs + * + * @author Oliver Hahm + */ + +#include +#include "lpm.h" + +void panic_arch(void) +{ + wdt_disable(); +#ifdef DEVELHELP + /* enter infinite loop, into deepest possible sleep mode */ + while (1) { + lpm_set(LPM_OFF); + } +#endif + +} From 04bda78e7f6234772d45eed69c27736fcd9cc212 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Sun, 20 Sep 2015 21:45:27 +0200 Subject: [PATCH 2/2] examples: removed superfluous blacklisting ATmega now has a panic function, no need for blacklisting any more. --- examples/gnrc_border_router/Makefile | 2 -- examples/gnrc_networking/Makefile | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/gnrc_border_router/Makefile b/examples/gnrc_border_router/Makefile index bf3af7f9fc..c0331642f2 100644 --- a/examples/gnrc_border_router/Makefile +++ b/examples/gnrc_border_router/Makefile @@ -10,8 +10,6 @@ RIOTBASE ?= $(CURDIR)/../.. BOARD_INSUFFICIENT_MEMORY := airfy-beacon nrf51dongle nrf6310 pca10000 pca10005 nucleo-f334 \ spark-core stm32f0discovery yunjia-nrf51822 -BOARD_BLACKLIST := arduino-mega2560 # panic_arch not defined - ifeq (,$(SLIP_UART)) # set default (last available UART) SLIP_UART="(UART_NUMOF-1)" diff --git a/examples/gnrc_networking/Makefile b/examples/gnrc_networking/Makefile index 3c19daef3f..e0b2be14ac 100644 --- a/examples/gnrc_networking/Makefile +++ b/examples/gnrc_networking/Makefile @@ -12,7 +12,7 @@ BOARD_INSUFFICIENT_MEMORY := airfy-beacon chronos msb-430 msb-430h nrf51dongle \ stm32f0discovery telosb wsn430-v1_3b wsn430-v1_4 \ yunjia-nrf51822 z1 -BOARD_BLACKLIST := arduino-mega2560 spark-core +BOARD_BLACKLIST := spark-core # arduino-mega2560: unknown error types (e.g. -EBADMSG) # Include packages that pull up and auto-init the link layer.