diff --git a/boards/arduino-mkrfox1200/Makefile b/boards/arduino-mkrfox1200/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..392f7d5c56a44660650be5838dff657b62005bf3 --- /dev/null +++ b/boards/arduino-mkrfox1200/Makefile @@ -0,0 +1,5 @@ +MODULE = board + +DIRS = $(RIOTBOARD)/common/arduino-mkr + +include $(RIOTBASE)/Makefile.base diff --git a/boards/arduino-mkrfox1200/Makefile.dep b/boards/arduino-mkrfox1200/Makefile.dep new file mode 100644 index 0000000000000000000000000000000000000000..698c09c572a1e5b6f4dbbd9fcaa3a57f5752b412 --- /dev/null +++ b/boards/arduino-mkrfox1200/Makefile.dep @@ -0,0 +1 @@ +include $(RIOTBOARD)/common/arduino-mkr/Makefile.dep diff --git a/boards/arduino-mkrfox1200/Makefile.features b/boards/arduino-mkrfox1200/Makefile.features new file mode 100644 index 0000000000000000000000000000000000000000..bc8c9ae857bcd05ca625e58ce8ae770abf0940ba --- /dev/null +++ b/boards/arduino-mkrfox1200/Makefile.features @@ -0,0 +1,3 @@ +include $(RIOTBOARD)/common/arduino-mkr/Makefile.features + +-include $(RIOTCPU)/samd21/Makefile.features diff --git a/boards/arduino-mkrfox1200/Makefile.include b/boards/arduino-mkrfox1200/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..6cdeddbe11b31bc7632501dcf7adea2a0e01a7f6 --- /dev/null +++ b/boards/arduino-mkrfox1200/Makefile.include @@ -0,0 +1,10 @@ +USEMODULE += boards_common_arduino-mkr + +ifeq ($(PROGRAMMER),jlink) + export MKR_JLINK_DEVICE = atsamd21 +endif + +include $(RIOTBOARD)/common/arduino-mkr/Makefile.include + +# add arduino-mkrfox1200 include path +INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include diff --git a/boards/arduino-mkrfox1200/doc.txt b/boards/arduino-mkrfox1200/doc.txt new file mode 100644 index 0000000000000000000000000000000000000000..700ef82e8859e12ae8cf565f04149dece5d80bec --- /dev/null +++ b/boards/arduino-mkrfox1200/doc.txt @@ -0,0 +1,34 @@ +/** + * @defgroup boards_arduino-mkrfox1200 Arduino MKRFOX1200 + * @ingroup boards + * @brief Support for the Arduino MKRFOX1200 board. + * + * ### General information + * + * The [Arduino MKRFOX1200](https://www.arduino.cc/en/Main.ArduinoBoardMKRFox1200) board is + * a learning and development board that provides Sigfox connectivity and is + * powered by an Atmel SAMD21 microcontroller. + * + * ### Pinout + * + * <img src="https://www.arduino.cc/en/uploads/Main/MKR1000_pinout.png" + * alt="Arduino MKRFOX1200 pinout" style="height:800px;"/> + * + * ### Flash the board + * + * 1. Put the board in bootloader mode by double tapping the reset button.<br/> + * When the board is in bootloader mode, the user led (green) oscillates + * smoothly. + * + * + * 2. Use `BOARD=arduino-mkrfox1200` with the `make` command.<br/> + * Example with `hello-world` application: + * ``` + * make BOARD=arduino-mkrfox1200 -C examples/hello-world flash + * ``` + * + * ### Accessing STDIO via UART + * + * To access the STDIO of RIOT, a FTDI to USB converter needs to be plugged to + * the RX/TX pins on the board. + */ \ No newline at end of file diff --git a/boards/arduino-mkrfox1200/include/board.h b/boards/arduino-mkrfox1200/include/board.h new file mode 100644 index 0000000000000000000000000000000000000000..1adf6f1859ab3ae70bde634853fdba2f68e2f7c9 --- /dev/null +++ b/boards/arduino-mkrfox1200/include/board.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2017 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 boards_arduino-mkrfox1200 + * @{ + * + * @file + * @brief Board specific definitions for the Arduino MKRFOX1200 + * board + * + * @author Alexandre Abadie <alexandre.abadie@inria.fr> + */ + +#ifndef BOARD_H +#define BOARD_H + +#include "cpu.h" +#include "periph_conf.h" +#include "board_common.h" +#include "arduino_pinmap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief The on-board LED is connected to pin 6 on this board + */ +#define ARDUINO_LED (6U) + +/** + * @name LED pin definitions and handlers + * @{ + */ +#define LED0_PIN GPIO_PIN(PA, 20) + +#define LED_PORT PORT->Group[PA] +#define LED0_MASK (1 << 20) + +#define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK) +#define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK) +#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK) +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* BOARD_H */ +/** @} */ diff --git a/tests/unittests/Makefile b/tests/unittests/Makefile index 494f87560bc06dd709b01f81b7cb8fe4c13a163d..0d5d411d3ddb39ba9bd32addcb23516c6caa2c9e 100644 --- a/tests/unittests/Makefile +++ b/tests/unittests/Makefile @@ -4,6 +4,7 @@ BOARD_INSUFFICIENT_MEMORY := airfy-beacon \ arduino-duemilanove \ arduino-mega2560 \ arduino-mkr1000 \ + arduino-mkrfox1200 \ arduino-mkrzero \ arduino-uno \ arduino-zero \ @@ -82,6 +83,7 @@ DISABLE_TEST_FOR_ARM7 := tests-relic tests-cpp_% ARM_CORTEX_M_BOARDS := airfy-beacon \ arduino-due \ arduino-mkr1000 \ + arduino-mkrfox1200 \ arduino-mkrzero \ arduino-zero \ b-l072z-lrwan1 \