aboutsummaryrefslogtreecommitdiff
path: root/stm32/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'stm32/makefile')
-rw-r--r--stm32/makefile8
1 files changed, 6 insertions, 2 deletions
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)