From 623c2d2f897ff14435d94646088df38d0a98eb1c Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Thu, 17 Apr 2025 15:00:21 +0200 Subject: [PATCH] add compile_flags (for clangd autocomplte) --- Makefile | 1 + compile_flags.txt | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 compile_flags.txt diff --git a/Makefile b/Makefile index bdf6ff7..429cb32 100644 --- a/Makefile +++ b/Makefile @@ -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 ####################################### diff --git a/compile_flags.txt b/compile_flags.txt new file mode 100644 index 0000000..5efdd1b --- /dev/null +++ b/compile_flags.txt @@ -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