From a95ff9797f5958b9b9c3cdcc7aa1d3604a624efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Fri, 23 Nov 2018 10:33:23 +0100 Subject: [PATCH] [Makefile] Add padding to binary files for the device --- build/targets.device.mak | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/targets.device.mak b/build/targets.device.mak index 5a277dd20..a5231c3ed 100644 --- a/build/targets.device.mak +++ b/build/targets.device.mak @@ -9,6 +9,11 @@ products += $(patsubst %.$(EXE),%.map,$(filter %.$(EXE),$(products))) %.bin: %.$(EXE) @echo "OBJCOPY $@" $(Q) $(OBJCOPY) -O binary $< $@ +# We pad the device binary files because there was a bug in an older version of +# the dfu code, and it did not upload properly a binary of length non-multiple +# of 32 bits. + @echo "Padding $@" + @echo "\x1\x1\x1\x1" >> $@ .PHONY: %_size %_size: %.$(EXE)