summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-10-22 11:59:33 -0700
committerScott Shawcroft <scott@tannewt.org>2017-10-22 12:39:01 -0700
commita1be272b1e30d90fedb2d13051374d774e84d248 (patch)
tree656b0925fc5e49345886bdb1c355ee154f8a01e6
parentbb008cdbc963ed3c3bdb949c7f7b6825d000ab40 (diff)
atmel-samd: Correct the UF2 bootloader offset when converting the bin to uf2.
-rw-r--r--atmel-samd/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/atmel-samd/Makefile b/atmel-samd/Makefile
index b183369f1..4ca07c478 100644
--- a/atmel-samd/Makefile
+++ b/atmel-samd/Makefile
@@ -159,9 +159,11 @@ LIBS := -lgcc -lc
ifeq ($(CHIP_FAMILY), samd21)
LDFLAGS += -mthumb -mcpu=cortex-m0plus -Lasf/thirdparty/CMSIS/Lib/GCC/
LIBS := -lm $(LIBS) # -larm_cortexM0l_math
+BOOTLOADER_SIZE := 0x2000
else ifeq ($(CHIP_FAMILY), samd51)
LDFLAGS += -mthumb -mcpu=cortex-m4
LIBS := -lm $(LIBS)
+BOOTLOADER_SIZE := 0x4000
endif
SRC_ASF := \
@@ -320,7 +322,7 @@ $(BUILD)/firmware.bin: $(BUILD)/firmware.elf
$(BUILD)/firmware.uf2: $(BUILD)/firmware.bin
$(ECHO) "Create $@"
- python2 $(TOP)/tools/uf2/utils/uf2conv.py -c -o $@ $^
+ python2 $(TOP)/tools/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -c -o $@ $^
deploy: $(BUILD)/firmware.bin
$(ECHO) "Writing $< to the board"