Closed spth closed 4 years ago
dfu suffix should be added since dfu-util claims it will not support dfu files without dfu suffix in future. So right now you can build and flash firmware without a valid dfu suffix but this might change over night when dfu-util gets an update and disables the deprecated behavior.
Unfortunately the dfu-suffix tool does not support to specify an output file so I added a workaround to perform the step in a way that only if dfu-suffix worked correct the dfu file will exist afterwards.
I also removed the "-" which makes dfu-suffix mandatory now.
$(BUILD_DIR)/%.dfu: $(BUILD_DIR)/%.bin | $(BUILD_DIR)
cp $< $@.tmp
$(DFU_SUFFIX) -v 0483 -p df11 -a $@.tmp
mv $@.tmp $@
fixed in commit 7b0a3e17e7f4a494e0e2c6a8706e72836edc1a96
I just tried the current version from development. When trying to build the firmware without dfu-suffix installed, I got an error. But after installing dfu-suffix (but installing it shouldn't matter for this bug), make claimed that there was nothing to be done. Only after doing a make clean could I then get a proper firmware build with dfu-suffix.
If dfu-suffix is not necessary to build the firmware, there should be no error. If it is necessary, there should still be an error the second time make is invoked (if dfu-suffix is still missing, otherwise there should be a build using dfu-suffix).
The problem is in the Makefile:
This rule first creates the target file, then uses dfu-suffix on it. Even if there is no dfu-suffix, the target file is created, so on second invokation of make, make thinks everything is fine.