minimal/Makefile: Split rule for firmware.bin generation.

This commit is contained in:
Paul Sokolovsky 2016-10-22 22:01:44 +03:00
parent 197a5724d8
commit a4dbb4230a

View File

@ -68,9 +68,11 @@ $(BUILD)/firmware.elf: $(OBJ)
$(Q)$(LD) $(LDFLAGS) -o $@ $^ $(LIBS) $(Q)$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
$(Q)$(SIZE) $@ $(Q)$(SIZE) $@
$(BUILD)/firmware.dfu: $(BUILD)/firmware.elf $(BUILD)/firmware.bin: $(BUILD)/firmware.elf
$(ECHO) "Create $@"
$(Q)$(OBJCOPY) -O binary -j .isr_vector -j .text -j .data $^ $(BUILD)/firmware.bin $(Q)$(OBJCOPY) -O binary -j .isr_vector -j .text -j .data $^ $(BUILD)/firmware.bin
$(BUILD)/firmware.dfu: $(BUILD)/firmware.bin
$(ECHO) "Create $@"
$(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/firmware.bin $@ $(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/firmware.bin $@
deploy: $(BUILD)/firmware.dfu deploy: $(BUILD)/firmware.dfu