diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-09-09 12:51:21 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-09-09 12:51:21 +0200 |
commit | bde529a4fb135eef1596ac0a5e6a8fa6a81cf711 (patch) | |
tree | ef24ef2bb0e556388c637928c824448a6c71e435 | |
parent | 2b4f8a78d5c0fc1e94b41fb0373a2b7fecd9c267 (diff) |
update makefile for stm32
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | stm32f091/makefile | 9 |
2 files changed, 7 insertions, 3 deletions
@@ -2,3 +2,4 @@ copyright **/*.o stm32f091/main.elf stm32f091/main.bin +**/compile_commands.json diff --git a/stm32f091/makefile b/stm32f091/makefile index fa610fd..c187df7 100644 --- a/stm32f091/makefile +++ b/stm32f091/makefile @@ -9,6 +9,7 @@ SHARED_FLAGS += -g SHARED_FLAGS += -D STM32F091xC SHARED_FLAGS += -Wall SHARED_FLAGS += -Wextra +SHARED_FLAGS += -Wno-register SHARED_FLAGS += -Wa,--defsym,CALL_ARM_SYSTEM_INIT=1 SHARED_FLAGS += -I./lib/STM32-base-STM32Cube/CMSIS/ARM/inc SHARED_FLAGS += -I./lib/STM32-base-STM32Cube/CMSIS/STM32F0xx/inc @@ -35,6 +36,11 @@ OBJS += $(patsubst %.cpp,%.o, $(wildcard *.cpp)) OBJS += ./lib/STM32-base/startup/STM32F0xx/STM32F091xC.o OBJS += ./lib/STM32-base-STM32Cube/CMSIS/STM32F0xx/src/system_stm32f0xx.o +.PHONY: flash clean + +$(TARGET).bin: $(TARGET).elf + $(OC) -O binary $< $@ + %.o: %.s $(CC) -c $(AFLAGS) $< -o $@ @@ -47,9 +53,6 @@ OBJS += ./lib/STM32-base-STM32Cube/CMSIS/STM32F0xx/src/system_stm32f0xx.o $(TARGET).elf: $(OBJS) $(LD) $(LFLAGS) $^ -o $@ -$(TARGET).bin: $(TARGET).elf - $(OC) -O binary $< $@ - flash: $(TARGET).bin st-flash write $(TARGET).bin 0x08000000 |