aboutsummaryrefslogtreecommitdiff
path: root/stm32f091
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-09-09 12:51:21 +0200
committerlonkaars <loek@pipeframe.xyz>2022-09-09 12:51:21 +0200
commitbde529a4fb135eef1596ac0a5e6a8fa6a81cf711 (patch)
treeef24ef2bb0e556388c637928c824448a6c71e435 /stm32f091
parent2b4f8a78d5c0fc1e94b41fb0373a2b7fecd9c267 (diff)
update makefile for stm32
Diffstat (limited to 'stm32f091')
-rw-r--r--stm32f091/makefile9
1 files changed, 6 insertions, 3 deletions
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