diff --git a/cpu/atmega_common/panic.c b/cpu/atmega_common/panic.c new file mode 100644 index 0000000000000000000000000000000000000000..dc5fe06e59b46ed4c29e2784425452e7bfe086ca --- /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 <oliver.hahm@inria.fr> + */ + +#include <avr/wdt.h> +#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 + +} diff --git a/examples/gnrc_border_router/Makefile b/examples/gnrc_border_router/Makefile index bf3af7f9fcd9b01300e36e44524642467a857092..c0331642f28512f240b6ac6b0cb825a296dc155f 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 3c19daef3fc4b95258677fe9e638f5ae84910f50..e0b2be14ac951fde28aad96dd8c9dbc3cf4261ce 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.