boards: add rom boot offset for boards w/bootloader
This commit is contained in:
parent
d0067b451f
commit
f571814ded
@ -15,16 +15,16 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
|||||||
# To stop bootloader from loading an existing firmware, pull down
|
# To stop bootloader from loading an existing firmware, pull down
|
||||||
# (ground) GPIO B1.
|
# (ground) GPIO B1.
|
||||||
ifeq ($(PROGRAMMER),dfu-util)
|
ifeq ($(PROGRAMMER),dfu-util)
|
||||||
export LINKER_SCRIPT = stm32f103c8_bluepill.ld
|
export ROM_OFFSET ?= 0x2000 # Skip the space needed by the embedded bootloader
|
||||||
export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))
|
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 OFLAGS = -O binary
|
||||||
export DEBUGGER = # no debugger
|
export FFLAGS = -d 1d50:6017 -s 0x08002000:leave -D "$(HEXFILE)"
|
||||||
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)"
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# this board uses openocd by default
|
# this board uses openocd by default
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -2,9 +2,6 @@
|
|||||||
export CPU = stm32f1
|
export CPU = stm32f1
|
||||||
export CPU_MODEL = stm32f103cb
|
export CPU_MODEL = stm32f103cb
|
||||||
|
|
||||||
# custom linkerscript
|
|
||||||
export LINKER_SCRIPT = stm32f103cb_opencm904.ld
|
|
||||||
|
|
||||||
# custom flasher to use with the bootloader
|
# custom flasher to use with the bootloader
|
||||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/robotis-loader.py
|
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/robotis-loader.py
|
||||||
export DEBUGGER =
|
export DEBUGGER =
|
||||||
@ -19,5 +16,8 @@ export DEBUGGER_FLAGS =
|
|||||||
PORT_LINUX ?= /dev/ttyACM0
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||||
|
|
||||||
|
# Skip the space needed by the embedded bootloader
|
||||||
|
export ROM_OFFSET ?= 0x3000
|
||||||
|
|
||||||
# setup serial terminal
|
# setup serial terminal
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||||
|
|||||||
@ -2,9 +2,6 @@
|
|||||||
export CPU = stm32f1
|
export CPU = stm32f1
|
||||||
export CPU_MODEL = stm32f103cb
|
export CPU_MODEL = stm32f103cb
|
||||||
|
|
||||||
# the spark-core uses its own custom linkerscript...
|
|
||||||
export LINKER_SCRIPT = stm32f103cb_sparkcore.ld
|
|
||||||
|
|
||||||
# configure the serial interface
|
# configure the serial interface
|
||||||
PORT_LINUX ?= /dev/ttyUSB0
|
PORT_LINUX ?= /dev/ttyUSB0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
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/
|
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
|
# this board uses openocd
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user