mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/arduino-mkr1000: adapt implementation to use common code
This commit is contained in:
parent
333206ac45
commit
b04bf93a17
@ -1,3 +1,5 @@
|
||||
MODULE = board
|
||||
|
||||
DIRS = $(RIOTBOARD)/arduino-mkr-common
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -1,3 +1 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
include $(RIOTBOARD)/arduino-mkr-common/Makefile.dep
|
||||
|
@ -1,18 +1 @@
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
FEATURES_PROVIDED += periph_cpuid
|
||||
FEATURES_PROVIDED += periph_gpio
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_pwm
|
||||
FEATURES_PROVIDED += periph_rtc
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += cpp
|
||||
FEATURES_PROVIDED += arduino
|
||||
|
||||
# The board MPU family (used for grouping by the CI system)
|
||||
FEATURES_MCU_GROUP = cortex_m0_2
|
||||
include $(RIOTBOARD)/arduino-mkr-common/Makefile.features
|
||||
|
@ -1,24 +1,6 @@
|
||||
# define the cpu used by Arduino/Genuino MKR1000 board
|
||||
export CPU = samd21
|
||||
export CPU_MODEL = samd21g18a
|
||||
USEMODULE += arduino-mkr-common
|
||||
|
||||
#export needed for flash rule
|
||||
export PORT_LINUX ?= /dev/ttyACM0
|
||||
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
include $(RIOTBOARD)/arduino-mkr-common/Makefile.include
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# setup the flash tool used
|
||||
ifeq ($(PROGRAMMER),jlink)
|
||||
# in case J-Link is attached to SWD pins, use a plain CPU memory model
|
||||
export JLINK_DEVICE := atsamw25
|
||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||
else
|
||||
# on default, we use BOSSA to flash this board
|
||||
export LINKER_SCRIPT ?= $(RIOTCPU)/sam0_common/ldscripts/$(CPU_MODEL)_mkr1000.ld
|
||||
include $(RIOTMAKE)/tools/bossa.inc.mk
|
||||
endif
|
||||
|
||||
# setup the boards dependencies
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
||||
# add arduino-mkr1000 include path
|
||||
INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "cpu.h"
|
||||
#include "periph_conf.h"
|
||||
#include "periph_cpu.h"
|
||||
#include "board_common.h"
|
||||
#include "arduino_pinmap.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -32,7 +32,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name LED pin definitions and handlers
|
||||
* @brief The on-board LED is connected to pin 6 on this board
|
||||
*/
|
||||
#define ARDUINO_LED (6U)
|
||||
|
||||
/**
|
||||
* @brief LED pin definitions and handlers
|
||||
* @{
|
||||
*/
|
||||
#define LED0_PIN GPIO_PIN(PA, 20)
|
||||
@ -45,11 +50,6 @@ extern "C" {
|
||||
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
||||
*/
|
||||
void board_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "cpu.h"
|
||||
#include "periph_cpu.h"
|
||||
#include "periph_conf_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
Loading…
Reference in New Issue
Block a user