Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ BUILD_DIR = build
######################################

# Choose your board mcu F407VG or F411RE
MCU_TARGET=F407VG
MCU_TARGET ?= F407VG
# The directory of mcu target
TARGET_DIR = Targets/$(MCU_TARGET)

Expand All @@ -36,7 +36,7 @@ TARGET_DIR = Targets/$(MCU_TARGET)
TARGET = OpenFFBoard_$(MCU_TARGET)

# Output directory for hex/bin files
OUTPUT_DIR = $(BUILD_DIR)
OUTPUT_DIR ?= $(BUILD_DIR)

# C sources
C_SOURCES = $(wildcard $(TARGET_DIR)/Core/Src/*.c)
Expand Down Expand Up @@ -229,15 +229,15 @@ $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile

$(OUTPUT_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(OUTPUT_DIR)
$(HEX) $< $@

$(OUTPUT_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(OUTPUT_DIR)
$(BIN) $< $@
$(BIN) $< $@

$(BUILD_DIR):
-mkdir $@
-mkdir -p $@

$(OUTPUT_DIR): $(BUILD_DIR)
-mkdir $@
-mkdir -p $@

#######################################
# clean up
Expand All @@ -256,4 +256,4 @@ upload: $(BUILD_DIR)/$(TARGET).bin
#######################################
-include $(wildcard $(BUILD_DIR)/*.d)

# *** EOF ***
# *** EOF ***