1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/common/nucleo/Makefile.include
2018-01-24 10:23:17 +01:00

39 lines
1.5 KiB
Makefile

# export this module and its includes
USEMODULE += boards_common_nucleo
INCLUDES += -I$(RIOTBOARD)/common/nucleo/include
# configure the serial terminal
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
include $(RIOTMAKE)/tools/serial.inc.mk
# all Nucleo boards have an on-board ST-link v2-1 adapter
export DEBUG_ADAPTER ?= stlink
export STLINK_VERSION ?= 2-1
# select OpenOCD configuration depending on CPU type
ifeq (,$(OPENOCD_CONFIG))
ifeq ($(CPU),stm32f0)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-f0.cfg
else ifeq ($(CPU),stm32f1)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-f1.cfg
else ifeq ($(CPU),stm32f2)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-f2.cfg
else ifeq ($(CPU),stm32f3)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-f3.cfg
else ifeq ($(CPU),stm32f4)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-f4.cfg
else ifeq ($(CPU),stm32f7)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-f7.cfg
else ifeq ($(CPU),stm32l0)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-l0.cfg
else ifeq ($(CPU),stm32l1)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-l1.cfg
else ifeq ($(CPU),stm32l4)
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/openocd-l4.cfg
endif
endif
# this board uses openocd
include $(RIOTMAKE)/tools/openocd.inc.mk