diff --git a/boards/common/wsn430/Makefile.features b/boards/common/wsn430/Makefile.features new file mode 100644 index 0000000000000000000000000000000000000000..6d1b3acb462b0120b429fba1676466f20bb65649 --- /dev/null +++ b/boards/common/wsn430/Makefile.features @@ -0,0 +1,10 @@ +# Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_gpio +FEATURES_PROVIDED += periph_timer +FEATURES_PROVIDED += periph_spi +FEATURES_PROVIDED += periph_uart + +# The board MPU family (used for grouping by the CI system) +FEATURES_MCU_GROUP = msp430 + +-include $(RIOTCPU)/msp430fxyz/Makefile.features diff --git a/boards/common/wsn430/Makefile.include b/boards/common/wsn430/Makefile.include index 3d197451b76c4b326e03f300790113373d375bb1..8bf601afa24a350a8bec28e8dbbc0e79f3598ee6 100644 --- a/boards/common/wsn430/Makefile.include +++ b/boards/common/wsn430/Makefile.include @@ -1,17 +1,18 @@ -## the cpu to build for +# select the used CPU export CPU = msp430fxyz export CPU_MODEL = msp430f1611 -# set default port depending on operating system +# include this module in the build +USEMODULE += boards_common_wsn430 +# use common wsn430 includes +export INCLUDES += -I$(RIOTBOARD)/common/wsn430/include + +# configure the serial interface PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) -# setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -# setup flash tool +# configure the flash tool export OFLAGS = -O ihex export FLASHER = mspdebug export FFLAGS = -d $(PORT) -j uif "prog $(HEXFILE)" - -# include common wsn430 includes -export INCLUDES += -I$(RIOTBOARD)/common/wsn430/include diff --git a/boards/common/wsn430/include/board_common.h b/boards/common/wsn430/include/board.h similarity index 75% rename from boards/common/wsn430/include/board_common.h rename to boards/common/wsn430/include/board.h index cbcef903b7d3966468df6086741dab34ec9366ac..6a39234d32b5d3e78bbfb6312a87499c96f69145 100644 --- a/boards/common/wsn430/include/board_common.h +++ b/boards/common/wsn430/include/board.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de> - * 2016 Freie Universität Berlin + * 2015-2017 Freie Universität Berlin * * 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 @@ -8,9 +8,9 @@ */ /** - * @defgroup boards_common_wsn430 WSN430 common + * @defgroup boards_common_wsn430 Shared WSN430 files * @ingroup boards_common - * @brief Shared files and configuration for all WSN430 based boards. + * @brief Common files for WSN430 based boards * @{ * * @file @@ -21,8 +21,10 @@ * */ -#ifndef BOARD_COMMON_H -#define BOARD_COMMON_H +#ifndef BOARD_H +#define BOARD_H + +#include "cpu.h" #ifdef __cplusplus extern "C" { @@ -41,6 +43,18 @@ extern "C" { #define XTIMER_BACKOFF (40) /** @} */ +/** + * @name CPU core configuration + * @{ + */ +/** @todo Move this to the periph_conf.h */ +#define MSP430_INITIAL_CPU_SPEED 800000uL +#define F_CPU MSP430_INITIAL_CPU_SPEED +#define F_RC_OSCILLATOR 32768 +#define MSP430_HAS_DCOR 0 +#define MSP430_HAS_EXTERNAL_CRYSTAL 1 +/** @} */ + /** * @name LED pin definitions and handlers * @{ @@ -71,5 +85,5 @@ extern "C" { } #endif -#endif /* BOARD_COMMON_H */ +#endif /* BOARD_H */ /** @} */ diff --git a/boards/common/wsn430/include/periph_conf.h b/boards/common/wsn430/include/periph_conf.h index e0f32a5e43e6069cecfad8f3fdc6ff3510f6f11e..879518e821f26a2fccc3fe52cfb9f86366cbf4f3 100644 --- a/boards/common/wsn430/include/periph_conf.h +++ b/boards/common/wsn430/include/periph_conf.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2014 INRIA - * 2015 Freie Universität Berlin + * 2015,2017 Freie Universität Berlin * * 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 @@ -12,7 +12,7 @@ * @{ * * @file - * @brief WSN30 peripheral configuration + * @brief WSN430 peripheral configuration * * @author Oliver Hahm <oliver.hahm@inria.fr> * Hauke Petersen <hauke.petersen@fu-berlin.de> @@ -29,7 +29,6 @@ extern "C" { * @name Clock configuration * @{ */ -/** @todo Move all clock configuration code here from the board.h */ #define CLOCK_CORECLOCK (8000000U) #define CLOCK_CMCLK CLOCK_CORECLOCK /* no divider programmed */ diff --git a/boards/wsn430-v1_3b/Makefile b/boards/wsn430-v1_3b/Makefile index 77db0c19088c99699cd48562d89b7733acd6c217..3bf2d5cd3c8e680a2565d74e771f9a2f20531005 100644 --- a/boards/wsn430-v1_3b/Makefile +++ b/boards/wsn430-v1_3b/Makefile @@ -1,5 +1,4 @@ MODULE = board - DIRS = $(RIOTBOARD)/common/wsn430 include $(RIOTBASE)/Makefile.base diff --git a/boards/wsn430-v1_3b/Makefile.features b/boards/wsn430-v1_3b/Makefile.features index 6d1b3acb462b0120b429fba1676466f20bb65649..41bb7f28639d1ab56fa117e5b57ae9f762a6307a 100644 --- a/boards/wsn430-v1_3b/Makefile.features +++ b/boards/wsn430-v1_3b/Makefile.features @@ -1,10 +1 @@ -# Put defined MCU peripherals here (in alphabetical order) -FEATURES_PROVIDED += periph_gpio -FEATURES_PROVIDED += periph_timer -FEATURES_PROVIDED += periph_spi -FEATURES_PROVIDED += periph_uart - -# The board MPU family (used for grouping by the CI system) -FEATURES_MCU_GROUP = msp430 - --include $(RIOTCPU)/msp430fxyz/Makefile.features +include $(RIOTBOARD)/common/wsn430/Makefile.features diff --git a/boards/wsn430-v1_3b/Makefile.include b/boards/wsn430-v1_3b/Makefile.include index 54a6472f9a8e250d0150d5f0d54afe1a17504ae8..e63bf64dd294081af0513227fe6f23fde2e1dba5 100644 --- a/boards/wsn430-v1_3b/Makefile.include +++ b/boards/wsn430-v1_3b/Makefile.include @@ -1,2 +1 @@ -USEMODULE += boards_common_wsn430 include $(RIOTBOARD)/common/wsn430/Makefile.include diff --git a/boards/wsn430-v1_3b/include/board.h b/boards/wsn430-v1_3b/include/board.h deleted file mode 100644 index 3836c71056006ca2714ec3a78a26777dadcc1677..0000000000000000000000000000000000000000 --- a/boards/wsn430-v1_3b/include/board.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de> - * 2015 Freie Universität Berlin - * - * 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. - */ - -/** - * @defgroup boards_wsn430-v1_3b WSN430 v1.3b - * @ingroup boards - * @brief Support for the Senslab WSN430 v1.3b board - * - * <h2>Compontents</h2> - * \li MSP430 - * \li CC1100 - * - * @{ - * - * @file - * @brief Basic definitions for the Senslab WSN430 v1.3b board - * - * @author Milan Babel <babel@inf.fu-berlin.de> - * @author Hauke Petersen <hauke.petersen@fu-berlin.de> - */ - -#ifndef BOARD_H -#define BOARD_H - -#include "board_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Define the CPU model for the <msp430.h> - */ -#ifndef __MSP430F1611__ -#define __MSP430F1611__ -#endif - -/** - * @name CPU core configuration - * @{ - */ -/** @todo Move this to the periph_conf.h */ -#define MSP430_INITIAL_CPU_SPEED 800000uL -#define F_CPU MSP430_INITIAL_CPU_SPEED -#define F_RC_OSCILLATOR 32768 -#define MSP430_HAS_DCOR 0 -#define MSP430_HAS_EXTERNAL_CRYSTAL 1 -/** @} */ - -#ifdef __cplusplus -} -#endif - -#include <msp430x16x.h> - -/** @} */ -#endif /* BOARD_H */ diff --git a/boards/wsn430-v1_4/Makefile b/boards/wsn430-v1_4/Makefile index 77db0c19088c99699cd48562d89b7733acd6c217..3bf2d5cd3c8e680a2565d74e771f9a2f20531005 100644 --- a/boards/wsn430-v1_4/Makefile +++ b/boards/wsn430-v1_4/Makefile @@ -1,5 +1,4 @@ MODULE = board - DIRS = $(RIOTBOARD)/common/wsn430 include $(RIOTBASE)/Makefile.base diff --git a/boards/wsn430-v1_4/Makefile.features b/boards/wsn430-v1_4/Makefile.features index 6d1b3acb462b0120b429fba1676466f20bb65649..41bb7f28639d1ab56fa117e5b57ae9f762a6307a 100644 --- a/boards/wsn430-v1_4/Makefile.features +++ b/boards/wsn430-v1_4/Makefile.features @@ -1,10 +1 @@ -# Put defined MCU peripherals here (in alphabetical order) -FEATURES_PROVIDED += periph_gpio -FEATURES_PROVIDED += periph_timer -FEATURES_PROVIDED += periph_spi -FEATURES_PROVIDED += periph_uart - -# The board MPU family (used for grouping by the CI system) -FEATURES_MCU_GROUP = msp430 - --include $(RIOTCPU)/msp430fxyz/Makefile.features +include $(RIOTBOARD)/common/wsn430/Makefile.features diff --git a/boards/wsn430-v1_4/Makefile.include b/boards/wsn430-v1_4/Makefile.include index 54a6472f9a8e250d0150d5f0d54afe1a17504ae8..e63bf64dd294081af0513227fe6f23fde2e1dba5 100644 --- a/boards/wsn430-v1_4/Makefile.include +++ b/boards/wsn430-v1_4/Makefile.include @@ -1,2 +1 @@ -USEMODULE += boards_common_wsn430 include $(RIOTBOARD)/common/wsn430/Makefile.include diff --git a/boards/wsn430-v1_4/include/board.h b/boards/wsn430-v1_4/include/board.h deleted file mode 100644 index 9771516bc3185799cafc4b4707c68ace48ca1b8e..0000000000000000000000000000000000000000 --- a/boards/wsn430-v1_4/include/board.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de> - * 2015 Freie Universität Berlin - * - * 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. - */ - -/** - * @defgroup boards_wsn430-v1_4 WSN430 v1.4 - * @ingroup boards - * @brief Support for the Senslab WSN430 v1.4 board - * - * <h2>Compontents</h2> - * \li MSP430 - * \li CC2420 - * - * @{ - * - * @file - * @brief Basic definitions for the Senslab WSN430 v1.4 board - * - * @author Milan Babel <babel@inf.fu-berlin.de> - * @author Hauke Petersen <hauke.petersen@fu-berlin.de> - */ - -#ifndef BOARD_H -#define BOARD_H - -#include "board_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Define the CPU model for the <msp430.h> - */ -#ifndef __MSP430F1611__ -#define __MSP430F1611__ -#endif - -/** - * @name CPU core configuration - * @{ - */ -/** @todo Move this to the periph_conf.h */ -#define MSP430_INITIAL_CPU_SPEED 800000uL -#define F_CPU MSP430_INITIAL_CPU_SPEED -#define F_RC_OSCILLATOR 32768 -#define MSP430_HAS_DCOR 0 -#define MSP430_HAS_EXTERNAL_CRYSTAL 1 -/** @} */ - -#ifdef __cplusplus -} -#endif - -#include <msp430x16x.h> - -/** @} */ -#endif /* BOARD_H */