From 964495f489460d25db06317095d71fd830b54c81 Mon Sep 17 00:00:00 2001 From: Friedrich Hagedorn Date: Fri, 1 Jul 2016 20:50:08 +0200 Subject: [PATCH] create binary demo.bin by default (in order to copy to a NUCLEO board) --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3121362..9984cf1 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ endif .PHONY: all dirs program debug template clean -all: $(TARGET).elf +all: $(TARGET).bin -include $(DEPS) @@ -146,6 +146,10 @@ $(TARGET).elf: $(OBJS) @echo "[SIZE] $(TARGET).elf" $(SIZE) $(TARGET).elf +$(TARGET).bin: $(TARGET).elf + @echo "[OBJCOPY] $(TARGET).bin" + $Q$(OBJCOPY) -O binary $< $@ + openocd: $(OCD) -s $(OCD_DIR) $(OCDFLAGS) @@ -179,6 +183,7 @@ template: cube src cp -i $(CUBE_DIR)/Projects/$(BOARD)/$(EXAMPLE)/TrueSTUDIO/$(BOARD)/$(MCU_UC)_FLASH.ld $(MCU_LC).ld clean: + @echo "[RM] $(TARGET).bin"; rm -f $(TARGET).bin @echo "[RM] $(TARGET).elf"; rm -f $(TARGET).elf @echo "[RM] $(TARGET).map"; rm -f $(TARGET).map @echo "[RM] $(TARGET).lst"; rm -f $(TARGET).lst