summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal')
-rw-r--r--stmhal/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile
index 3cc98d7be8..f6619859ce 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -196,7 +196,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_FATFS:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_CC3K:.c=.o))
OBJ += $(BUILD)/pins_$(BOARD).o
-all: $(BUILD)/firmware.dfu
+all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex
.PHONY: deploy
@@ -210,6 +210,10 @@ $(BUILD)/firmware.dfu: $(BUILD)/firmware.elf
$(Q)$(OBJCOPY) -O binary -j .text -j .data $^ $(BUILD)/firmware1.bin
$(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/firmware0.bin -b 0x08020000:$(BUILD)/firmware1.bin $@
+$(BUILD)/firmware.hex: $(BUILD)/firmware.elf
+ $(ECHO) "Create $@"
+ $(Q)$(OBJCOPY) -O ihex $< $@
+
$(BUILD)/firmware.elf: $(OBJ)
$(ECHO) "LINK $@"
$(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)