aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/makefile
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-09-26 16:36:55 +0200
committerlonkaars <loek@pipeframe.xyz>2022-09-26 16:36:55 +0200
commit07e2eef57eeff5a2d21945b9ad6ca1dbd714b924 (patch)
tree63531bad637e201e17d1f58d0dfa42adc316ec2f /stm32f091/makefile
parentc82637ccbd2a99466dacd830147ef3df92f86753 (diff)
freertos compiles without errors
Diffstat (limited to 'stm32f091/makefile')
-rw-r--r--stm32f091/makefile30
1 files changed, 22 insertions, 8 deletions
diff --git a/stm32f091/makefile b/stm32f091/makefile
index c187df7..a359853 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,19 +9,23 @@ 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/usr/arm-none-eabi/include/
SHARED_FLAGS += -I./lib/STM32-base-STM32Cube/CMSIS/ARM/inc
SHARED_FLAGS += -I./lib/STM32-base-STM32Cube/CMSIS/STM32F0xx/inc
SHARED_FLAGS += -I./lib/STM32-base/startup
+SHARED_FLAGS += -I./lib/FreeRTOS-Kernel/include
+SHARED_FLAGS += -I./lib/FreeRTOS-Kernel/portable/GCC/ARM_CM0/
+SHARED_FLAGS += -I.
SHARED_FLAGS += -ffunction-sections
SHARED_FLAGS += -fdata-sections
SHARED_FLAGS += -mlittle-endian
SHARED_FLAGS += -mthumb
-SHARED_FLAGS += -masm-syntax-unified
+# 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 +36,17 @@ CFLAGS += $(SHARED_FLAGS)
LFLAGS += $(SHARED_FLAGS)
AFLAGS += $(SHARED_FLAGS)
-OBJS += $(patsubst %.cpp,%.o, $(wildcard *.cpp))
+OBJS += $(patsubst %.c,%.o, $(wildcard *.c))
+OBJS += lib/FreeRTOS-Kernel/croutine.o \
+ lib/FreeRTOS-Kernel/event_groups.o \
+ lib/FreeRTOS-Kernel/list.o \
+ lib/FreeRTOS-Kernel/queue.o \
+ lib/FreeRTOS-Kernel/stream_buffer.o \
+ lib/FreeRTOS-Kernel/tasks.o \
+ lib/FreeRTOS-Kernel/timers.o \
+ lib/FreeRTOS-Kernel/portable/GCC/ARM_CM0/port.o \
+ lib/FreeRTOS-Kernel/portable/MemMang/heap_4.o
+
OBJS += ./lib/STM32-base/startup/STM32F0xx/STM32F091xC.o
OBJS += ./lib/STM32-base-STM32Cube/CMSIS/STM32F0xx/src/system_stm32f0xx.o
@@ -47,7 +61,7 @@ $(TARGET).bin: $(TARGET).elf
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
-%.o: %.cpp
+%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
$(TARGET).elf: $(OBJS)