mcu_base/libs/freertos.mk

39 lines
1.2 KiB
Makefile

# FreeRTOS
FREERTOS_OBJSR = list.o croutine.o queue.o timers.o tasks.o event_groups.o stream_buffer.o
FREERTOS_OBJSR += portable/MemMang/heap_4.o # For Coalescing malloc!
# Compile options
ifeq ($(MCU_CORE),cm0p)
FREERTOS_OBJSR += portable/GCC/ARM_CM0/port.o
MCU_CPPFLAGS += -I$(LIBDIR)/FreeRTOS/portable/GCC/ARM_CM0
endif
ifeq ($(MCU_CORE),cm0)
FREERTOS_OBJSR += portable/GCC/ARM_CM0/port.o
MCU_CPPFLAGS += -I$(LIBDIR)/FreeRTOS/portable/GCC/ARM_CM0
endif
ifeq ($(MCU_CORE),cm3)
FREERTOS_OBJSR += portable/GCC/ARM_CM3/port.o
MCU_CPPFLAGS += -I$(LIBDIR)/FreeRTOS/portable/GCC/ARM_CM3
endif
ifeq ($(MCU_CORE),cm4) # is there a cm4 without VFP?
FREERTOS_OBJSR += portable/GCC/ARM_CM4F/port.o
MCU_CPPFLAGS += -I$(LIBDIR)/FreeRTOS/portable/GCC/ARM_CM4F
endif
FREERTOS_OBJS += $(addprefix $(LIBDIR)/FreeRTOS/,$(FREERTOS_OBJSR))
MCU_CPPFLAGS += -I$(LIBDIR)/FreeRTOS/include
# Our target library
$(LIBDIR)/freertos-$(MCU)_OBJS += $(FREERTOS_OBJS)
# Add to the link list and the clean list
LIBRARIES += $(LIBDIR)/freertos-$(MCU).a
LIBS_OBJS += $(FREERTOS_OBJS)
# Generic compiliation
$(LIBDIR)/freertos-$(MCU).a: $($(LIBDIR)/freertos-$(MCU)_OBJS)
@$(E) " AR " $@
$(Q)$(AR) cr $@ $^