# export this module and its includes USEMODULE += boards_common_nucleo INCLUDES += -I$(RIOTBOARD)/common/nucleo/include # we use shared STM32 configuration snippets INCLUDES += -I$(RIOTBOARD)/common/stm32/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