mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
makefiles: add shared sam0 board makefile include
This commit is contained in:
parent
fb0412097b
commit
ee1e2af232
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…
Reference in New Issue
Block a user