1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

boards/common/blxxxpill: Use STM32 programmer conf

This commit is contained in:
Marian Buschsieweke 2019-11-12 15:53:18 +01:00
parent a949179f69
commit c510ad858c
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -1,36 +1,11 @@
INCLUDES += -I$(RIOTBOARD)/common/blxxxpill/include
# define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# For older versions of the DFU bootloader, set DFU_USB_ID to 1d50:6017 and
# uncomment the DFU_FLAGS line
DFU_USB_ID ?= 1eaf:0003
#DFU_FLAGS ?= -s 0x08002000:leave
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
STLINK_VERSION ?= 2
# optionally, use dfu-util to flash via usb
# note: needs a bootloader flashed before, config below is compatible
# with blackmagic_dfu, see https://github.com/blacksphere/blackmagic/
# To stop bootloader from loading an existing firmware, pull down
# (ground) GPIO B1.
ifeq ($(PROGRAMMER),dfu-util)
export ROM_OFFSET ?= 0x2000 # Skip the space needed by the embedded bootloader
FLASHER = dfu-util
DEBUGGER = # no debugger
RESET ?= # dfu-util has no support for resetting the device
FLASHFILE ?= $(BINFILE)
FFLAGS = -d 1eaf:0003 -a 2 -D $(FLASHFILE)
# for older bootloader versions use this:
# FFLAGS = -d 1d50:6017 -s 0x08002000:leave -D $(FLASHFILE)
else
# this board uses openocd by default
DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2
# call a 'reset halt' command before starting the debugger
# it is required as `connect_assert_srst` is set
export OPENOCD_DBG_START_CMD = -c 'reset halt'
include $(RIOTMAKE)/tools/openocd.inc.mk
endif
# Setup of programmer and serial is shared between STM32 based boards
include $(RIOTMAKE)/boards/stm32.inc.mk