add compile_flags (for clangd autocomplte)

This commit is contained in:
2025-04-17 15:00:21 +02:00
parent 55a0442b52
commit 623c2d2f89
2 changed files with 21 additions and 0 deletions

View File

@@ -154,6 +154,7 @@ LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BU
# default action: build all
all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
echo $(CFLAGS) | sed -E 's/ /\n/g' > compile_flags.txt
#######################################

20
compile_flags.txt Normal file
View File

@@ -0,0 +1,20 @@
-mcpu=cortex-m0plus
-mthumb
-DUSE_HAL_DRIVER
-DSTM32G0B1xx
-IInc
-IDrivers/STM32G0xx_HAL_Driver/Inc
-IDrivers/STM32G0xx_HAL_Driver/Inc/Legacy
-IDrivers/CMSIS/Device/ST/STM32G0xx/Include
-IDrivers/CMSIS/Include
-IDrivers/RTT/Config
-IDrivers/RTT/RTT
-Og
-Wall
-fdata-sections
-ffunction-sections
-g
-gdwarf-2
-MMD
-MP
-MFall