diff --git a/boards/bluepill/Makefile.include b/boards/bluepill/Makefile.include index 394d1257accfadcc8f87c17ecc16a90b1b54d06c..1b9d722416a682c54c05480e11e95267bfa8c381 100644 --- a/boards/bluepill/Makefile.include +++ b/boards/bluepill/Makefile.include @@ -15,16 +15,16 @@ include $(RIOTMAKE)/tools/serial.inc.mk # To stop bootloader from loading an existing firmware, pull down # (ground) GPIO B1. ifeq ($(PROGRAMMER),dfu-util) - export LINKER_SCRIPT = stm32f103c8_bluepill.ld - export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE)) + export ROM_OFFSET ?= 0x2000 # Skip the space needed by the embedded bootloader + export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE)) + export FLASHER = dfu-util + export DEBUGGER = # no debugger + export RESET = # dfu-util has no support for resetting the device - export FLASHER = dfu-util - export DEBUGGER = # no debugger - export RESET = # dfu-util has no support for resetting the device - - export OFLAGS = -O binary - export FFLAGS = -d 1d50:6017 -s 0x08002000:leave -D "$(HEXFILE)" + export OFLAGS = -O binary + export FFLAGS = -d 1d50:6017 -s 0x08002000:leave -D "$(HEXFILE)" else + # this board uses openocd by default include $(RIOTMAKE)/tools/openocd.inc.mk endif diff --git a/boards/opencm904/Makefile.include b/boards/opencm904/Makefile.include index 18b0b6cffa421ce5c52de5988a0e613146f35b4c..c84c2fc89e2c5e571a6e59edb5fd1149e07e7778 100644 --- a/boards/opencm904/Makefile.include +++ b/boards/opencm904/Makefile.include @@ -2,9 +2,6 @@ export CPU = stm32f1 export CPU_MODEL = stm32f103cb -# custom linkerscript -export LINKER_SCRIPT = stm32f103cb_opencm904.ld - # custom flasher to use with the bootloader export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/robotis-loader.py export DEBUGGER = @@ -19,5 +16,8 @@ export DEBUGGER_FLAGS = PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) +# Skip the space needed by the embedded bootloader +export ROM_OFFSET ?= 0x3000 + # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/spark-core/Makefile.include b/boards/spark-core/Makefile.include index b2942cc3f85ea44bd306afbc3ecfe6aad61a34f3..98c8cbee6abb6154aa16d6c461b2542b12a556d7 100644 --- a/boards/spark-core/Makefile.include +++ b/boards/spark-core/Makefile.include @@ -2,9 +2,6 @@ export CPU = stm32f1 export CPU_MODEL = stm32f103cb -# the spark-core uses its own custom linkerscript... -export LINKER_SCRIPT = stm32f103cb_sparkcore.ld - # configure the serial interface PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) @@ -21,5 +18,8 @@ export FFLAGS = -d 1d50:607f -a 0 -s 0x08005000:leave -D "$(HEXFILE)" export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include/ +# Skip the space needed by the embedded bootloader +export ROM_OFFSET ?= 0x5000 + # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk