Skip to content

Commit

Permalink
boards: add rom boot offset for boards w/bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
kYc0o committed Nov 17, 2017
1 parent d0067b4 commit f571814
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions boards/bluepill/Makefile.include
Expand Up @@ -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
6 changes: 3 additions & 3 deletions boards/opencm904/Makefile.include
Expand Up @@ -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 =
Expand All @@ -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
6 changes: 3 additions & 3 deletions boards/spark-core/Makefile.include
Expand Up @@ -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*)))
Expand All @@ -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

0 comments on commit f571814

Please sign in to comment.