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)