diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-09-25 15:21:12 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-09-25 15:21:12 +0200 |
commit | 9d9f9dc034765aa4b1c5bd2d0aa4cd24e4110055 (patch) | |
tree | 517a3a083ec8e1b3437db7087dd219174ba8120e | |
parent | c82637ccbd2a99466dacd830147ef3df92f86753 (diff) |
c++ to c for stm32 firmware
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | stm32f091/main.c (renamed from stm32f091/main.cpp) | 0 | ||||
-rw-r--r-- | stm32f091/makefile | 14 |
3 files changed, 8 insertions, 7 deletions
@@ -2,6 +2,7 @@ copyright **/*.o stm32f091/main.elf stm32f091/main.bin +stm32f091/.cache **/compile_commands.json client/makefile client/client diff --git a/stm32f091/main.cpp b/stm32f091/main.c index 180240e..180240e 100644 --- a/stm32f091/main.cpp +++ b/stm32f091/main.c diff --git a/stm32f091/makefile b/stm32f091/makefile index c187df7..5f5371d 100644 --- a/stm32f091/makefile +++ b/stm32f091/makefile @@ -1,5 +1,5 @@ -CC = arm-none-eabi-g++ -LD = arm-none-eabi-g++ +CC = arm-none-eabi-gcc +LD = arm-none-eabi-gcc OC = arm-none-eabi-objcopy RM = rm -f @@ -9,7 +9,7 @@ SHARED_FLAGS += -g SHARED_FLAGS += -D STM32F091xC SHARED_FLAGS += -Wall SHARED_FLAGS += -Wextra -SHARED_FLAGS += -Wno-register +# 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 @@ -20,8 +20,8 @@ SHARED_FLAGS += -mlittle-endian SHARED_FLAGS += -mthumb SHARED_FLAGS += -masm-syntax-unified SHARED_FLAGS += -specs=nosys.specs -SHARED_FLAGS += -fno-threadsafe-statics -SHARED_FLAGS += -fno-rtti +# SHARED_FLAGS += -fno-threadsafe-statics +# SHARED_FLAGS += -fno-rtti SHARED_FLAGS += -fno-exceptions SHARED_FLAGS += -fno-unwind-tables SHARED_FLAGS += -Wl,-L./lib/STM32-base/linker,-T./lib/STM32-base/linker/STM32F0xx/STM32F091xC.ld @@ -32,7 +32,7 @@ CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) AFLAGS += $(SHARED_FLAGS) -OBJS += $(patsubst %.cpp,%.o, $(wildcard *.cpp)) +OBJS += $(patsubst %.c,%.o, $(wildcard *.c)) OBJS += ./lib/STM32-base/startup/STM32F0xx/STM32F091xC.o OBJS += ./lib/STM32-base-STM32Cube/CMSIS/STM32F0xx/src/system_stm32f0xx.o @@ -47,7 +47,7 @@ $(TARGET).bin: $(TARGET).elf %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ -%.o: %.cpp +%.o: %.c $(CC) -c $(CFLAGS) $< -o $@ $(TARGET).elf: $(OBJS) |