Merge pull request #7080 from kaspar030/deduplicate_sam0_board_makefiles
boards: sam0: deduplicate sam0 board makefiles
This commit is contained in:
commit
0d98a91e18
@ -2,24 +2,4 @@
|
|||||||
export CPU = samd21
|
export CPU = samd21
|
||||||
export CPU_MODEL = samd21g18a
|
export CPU_MODEL = samd21g18a
|
||||||
|
|
||||||
# set default port depending on operating system
|
include $(RIOTMAKE)/boards/sam0.inc.mk
|
||||||
export PORT_LINUX ?= /dev/ttyACM0
|
|
||||||
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
||||||
|
|
||||||
# setup serial terminal
|
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
||||||
|
|
||||||
# Add board selector (USB serial) to OpenOCD options if specified.
|
|
||||||
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
|
|
||||||
# Usage: SERIAL="<SERIAL>" BOARD="arduino-zero" make flash
|
|
||||||
ifneq (,$(SERIAL))
|
|
||||||
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
|
|
||||||
SERIAL_TTY = $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL))
|
|
||||||
ifeq (,$(SERIAL_TTY))
|
|
||||||
$(error Did not find a device with serial $(SERIAL))
|
|
||||||
endif
|
|
||||||
PORT_LINUX := $(SERIAL_TTY)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# this board uses openocd
|
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
|
||||||
|
|||||||
@ -2,24 +2,4 @@
|
|||||||
export CPU = samd21
|
export CPU = samd21
|
||||||
export CPU_MODEL = samd21j18a
|
export CPU_MODEL = samd21j18a
|
||||||
|
|
||||||
# set default port depending on operating system
|
include $(RIOTMAKE)/boards/sam0.inc.mk
|
||||||
PORT_LINUX ?= /dev/ttyACM0
|
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
||||||
|
|
||||||
# setup serial terminal
|
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
||||||
|
|
||||||
# Add board selector (USB serial) to OpenOCD options if specified.
|
|
||||||
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
|
|
||||||
# Usage: SERIAL="ATML..." BOARD="samd21-xpro" make flash
|
|
||||||
ifneq (,$(SERIAL))
|
|
||||||
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
|
|
||||||
SERIAL_TTY = $(firstword $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL)))
|
|
||||||
ifeq (,$(SERIAL_TTY))
|
|
||||||
$(error Did not find a device with serial $(SERIAL))
|
|
||||||
endif
|
|
||||||
PORT_LINUX := $(SERIAL_TTY)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# this board uses openocd
|
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
|
||||||
|
|||||||
@ -3,9 +3,4 @@ export CPU = saml21
|
|||||||
export CPU_MODEL = saml21j18a
|
export CPU_MODEL = saml21j18a
|
||||||
export CFLAGS += -D__SAML21J18A__
|
export CFLAGS += -D__SAML21J18A__
|
||||||
|
|
||||||
# setup serial terminal
|
include $(RIOTMAKE)/boards/sam0.inc.mk
|
||||||
PORT_LINUX ?= /dev/ttyACM0
|
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
||||||
|
|
||||||
# this board uses openocd
|
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
|
||||||
|
|||||||
@ -2,24 +2,4 @@
|
|||||||
export CPU = samd21
|
export CPU = samd21
|
||||||
export CPU_MODEL = samr21g18a
|
export CPU_MODEL = samr21g18a
|
||||||
|
|
||||||
# set default port depending on operating system
|
include $(RIOTMAKE)/boards/sam0.inc.mk
|
||||||
PORT_LINUX ?= /dev/ttyACM0
|
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
||||||
|
|
||||||
# setup serial terminal
|
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
||||||
|
|
||||||
# Add board selector (USB serial) to OpenOCD options if specified.
|
|
||||||
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
|
|
||||||
# Usage: SERIAL="ATML..." BOARD="samr21-xpro" make flash
|
|
||||||
ifneq (,$(SERIAL))
|
|
||||||
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
|
|
||||||
SERIAL_TTY = $(firstword $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL)))
|
|
||||||
ifeq (,$(SERIAL_TTY))
|
|
||||||
$(error Did not find a device with serial $(SERIAL))
|
|
||||||
endif
|
|
||||||
PORT_LINUX := $(SERIAL_TTY)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# this board uses openocd
|
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
|
||||||
|
|||||||
@ -2,26 +2,4 @@
|
|||||||
export CPU = samd21
|
export CPU = samd21
|
||||||
export CPU_MODEL = samd21j18a
|
export CPU_MODEL = samd21j18a
|
||||||
|
|
||||||
# set default port depending on operating system
|
include $(RIOTMAKE)/boards/sam0.inc.mk
|
||||||
PORT_LINUX ?= /dev/ttyACM0
|
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
||||||
|
|
||||||
export OFLAGS = -O binary
|
|
||||||
|
|
||||||
# setup serial terminal
|
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
||||||
|
|
||||||
# Add board selector (USB serial) to OpenOCD options if specified.
|
|
||||||
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
|
|
||||||
# Usage: SERIAL="AAA..." BOARD="sodaq-autonomo" make flash
|
|
||||||
ifneq (,$(SERIAL))
|
|
||||||
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
|
|
||||||
SERIAL_TTY = $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL))
|
|
||||||
ifeq (,$(SERIAL_TTY))
|
|
||||||
$(error Did not find a device with serial $(SERIAL))
|
|
||||||
endif
|
|
||||||
PORT_LINUX := $(SERIAL_TTY)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# this board uses openocd
|
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
|
||||||
|
|||||||
21
makefiles/boards/sam0.inc.mk
Normal file
21
makefiles/boards/sam0.inc.mk
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# set default port depending on operating system
|
||||||
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||||
|
|
||||||
|
# setup serial terminal
|
||||||
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||||
|
|
||||||
|
# Add board selector (USB serial) to OpenOCD options if specified.
|
||||||
|
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
|
||||||
|
# Usage: SERIAL="ATML..." BOARD=<board> make flash
|
||||||
|
ifneq (,$(SERIAL))
|
||||||
|
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
|
||||||
|
SERIAL_TTY = $(firstword $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL)))
|
||||||
|
ifeq (,$(SERIAL_TTY))
|
||||||
|
$(error Did not find a device with serial $(SERIAL))
|
||||||
|
endif
|
||||||
|
PORT_LINUX := $(SERIAL_TTY)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# this board uses openocd
|
||||||
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
Loading…
x
Reference in New Issue
Block a user