stm32-for-vscode update

This commit is contained in:
Jasper Blanckenburg 2023-04-11 21:33:30 +02:00
parent 30607718ac
commit 78c3c38988
1 changed files with 10 additions and 1 deletions

View File

@ -565,8 +565,14 @@ vpath %.cpp $(sort $(dir $(CPP_SOURCES)))
# list of C objects # list of C objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
vpath %.c $(sort $(dir $(C_SOURCES))) vpath %.c $(sort $(dir $(C_SOURCES)))
# list of ASM program objects # list of ASM program objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) # list of ASM program objects
UPPER_CASE_ASM_SOURCES = $(filter %.S,$(ASM_SOURCES))
LOWER_CASE_ASM_SOURCES = $(filter %.s,$(ASM_SOURCES))
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(UPPER_CASE_ASM_SOURCES:.S=.o)))
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(LOWER_CASE_ASM_SOURCES:.s=.o)))
vpath %.s $(sort $(dir $(ASM_SOURCES))) vpath %.s $(sort $(dir $(ASM_SOURCES)))
$(BUILD_DIR)/%.o: %.cpp STM32Make.make | $(BUILD_DIR) $(BUILD_DIR)/%.o: %.cpp STM32Make.make | $(BUILD_DIR)
@ -581,6 +587,9 @@ $(BUILD_DIR)/%.o: %.c STM32Make.make | $(BUILD_DIR)
$(BUILD_DIR)/%.o: %.s STM32Make.make | $(BUILD_DIR) $(BUILD_DIR)/%.o: %.s STM32Make.make | $(BUILD_DIR)
$(AS) -c $(CFLAGS) $< -o $@ $(AS) -c $(CFLAGS) $< -o $@
$(BUILD_DIR)/%.o: %.S STM32Make.make | $(BUILD_DIR)
$(AS) -c $(CFLAGS) $< -o $@
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) STM32Make.make $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) STM32Make.make
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@ $(CXX) $(OBJECTS) $(LDFLAGS) -o $@
$(SZ) $@ $(SZ) $@