1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/bluepill/Makefile.include
cladmi 3f145413f5 boards/makefiles: Remove '-Otype' from OFLAGS
* Remove '-Oihex' and '-Obinary' from OFLAGS for all boards
  It is now provided by the Makefile.include rule.
2018-04-09 17:32:46 +02:00

33 lines
1.0 KiB
Makefile

## the cpu to build for
export CPU = stm32f1
export CPU_MODEL = stm32f103c8
# define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# 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
export FLASHER = dfu-util
export DEBUGGER = # no debugger
export RESET = # dfu-util has no support for resetting the device
HEXFILE = $(BINFILE)
export FFLAGS = -d 1d50:6017 -s 0x08002000:leave -D "$(HEXFILE)"
else
# this board uses openocd by default
export DEBUG_ADAPTER ?= stlink
export STLINK_VERSION ?= 2
include $(RIOTMAKE)/tools/openocd.inc.mk
endif