File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ BUILD_DIR = build
2626# #####################################
2727
2828# Choose your board mcu F407VG or F411RE
29- MCU_TARGET = F407VG
29+ MCU_TARGET ?= F407VG
3030# The directory of mcu target
3131TARGET_DIR = Targets/$(MCU_TARGET )
3232
@@ -36,7 +36,7 @@ TARGET_DIR = Targets/$(MCU_TARGET)
3636TARGET = OpenFFBoard_$(MCU_TARGET )
3737
3838# Output directory for hex/bin files
39- OUTPUT_DIR = $(BUILD_DIR )
39+ OUTPUT_DIR ? = $(BUILD_DIR )
4040
4141# C sources
4242C_SOURCES = $(wildcard $(TARGET_DIR ) /Core/Src/* .c)
@@ -229,15 +229,15 @@ $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
229229
230230$(OUTPUT_DIR ) /% .hex : $(BUILD_DIR ) /% .elf | $(OUTPUT_DIR )
231231 $(HEX ) $< $@
232-
232+
233233$(OUTPUT_DIR ) /% .bin : $(BUILD_DIR ) /% .elf | $(OUTPUT_DIR )
234- $(BIN ) $< $@
235-
234+ $(BIN ) $< $@
235+
236236$(BUILD_DIR ) :
237- -mkdir $@
238-
237+ -mkdir -p $@
238+
239239$(OUTPUT_DIR ) : $(BUILD_DIR )
240- -mkdir $@
240+ -mkdir -p $@
241241
242242# ######################################
243243# clean up
@@ -256,4 +256,4 @@ upload: $(BUILD_DIR)/$(TARGET).bin
256256# ######################################
257257-include $(wildcard $(BUILD_DIR ) /* .d)
258258
259- # *** EOF ***
259+ # *** EOF ***
You can’t perform that action at this time.
0 commit comments