From 7b98ecd905f65fdc0ebbbc5d4e275d67b21e3a5f Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 9 Feb 2023 14:27:33 +0100 Subject: add style guide + formatters --- stm32/makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'stm32') diff --git a/stm32/makefile b/stm32/makefile index 81f3ec9..22e956e 100644 --- a/stm32/makefile +++ b/stm32/makefile @@ -72,7 +72,7 @@ OBJS += lib/STM32-base-STM32Cube/HAL/STM32F0xx/src/stm32f0xx_hal_rcc.o \ OBJS += idle_task_static_memory.o OBJS += main.o -.PHONY: flash clean +.PHONY: flash clean format $(TARGET).bin: $(TARGET).elf $(OC) -O binary $< $@ @@ -96,10 +96,14 @@ $(TARGET).elf: $(OBJS) flash: $(TARGET).bin st-flash --reset write $(TARGET).bin 0x08000000 -compile_commands: clean +compile_commands.json: clean compiledb make -Bn ../scripts/compiledb-full-path-mingw.sh compile_commands.json +format: + clang-format -i $(SRCS) + clang-tidy --fix-errors $(SRCS) + clean: $(RM) $(TARGET).bin $(TARGET).elf $(OBJS) -- cgit v1.2.3