mirror of https://github.com/rusefi/canable-fw.git
added .bin build (for flashing with dfu-util) to Makefile
This commit is contained in:
parent
d0b23b111b
commit
9d7bffe88c
9
Makefile
9
Makefile
|
@ -86,7 +86,11 @@ CFLAGS += -mcpu=$(CPU) -mthumb
|
||||||
CFLAGS += $(USER_CFLAGS)
|
CFLAGS += $(USER_CFLAGS)
|
||||||
|
|
||||||
# default action: build the user application
|
# default action: build the user application
|
||||||
all: $(BUILD_DIR)/$(TARGET).hex
|
all: $(BUILD_DIR)/$(TARGET).bin $(BUILD_DIR)/$(TARGET).hex
|
||||||
|
|
||||||
|
flash: all
|
||||||
|
sudo dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D $(BUILD_DIR)/$(TARGET).bin
|
||||||
|
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# build the st micro peripherial library
|
# build the st micro peripherial library
|
||||||
|
@ -148,6 +152,9 @@ LDFLAGS = -T $(LD_SCRIPT) -L $(CUBELIB_BUILD_DIR) -static $(LIBS) $(USER_LDFLAGS
|
||||||
$(BUILD_DIR)/$(TARGET).hex: $(BUILD_DIR)/$(TARGET).elf
|
$(BUILD_DIR)/$(TARGET).hex: $(BUILD_DIR)/$(TARGET).elf
|
||||||
$(OBJCOPY) -O ihex $(BUILD_DIR)/$(TARGET).elf $@
|
$(OBJCOPY) -O ihex $(BUILD_DIR)/$(TARGET).elf $@
|
||||||
|
|
||||||
|
$(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf
|
||||||
|
$(OBJCOPY) -O binary $(BUILD_DIR)/$(TARGET).elf $@
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) $(USB_OBJECTS) $(CUBELIB)
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) $(USB_OBJECTS) $(CUBELIB)
|
||||||
$(CC) -o $@ $(CFLAGS) $(OBJECTS) $(USB_OBJECTS) \
|
$(CC) -o $@ $(CFLAGS) $(OBJECTS) $(USB_OBJECTS) \
|
||||||
$(LDFLAGS) -Xlinker \
|
$(LDFLAGS) -Xlinker \
|
||||||
|
|
Loading…
Reference in New Issue