2021-03-18 16:28:44 +07:00
|
|
|
DEPS_SUBMODULES += lib/FreeRTOS-Kernel
|
|
|
|
|
2019-05-01 14:30:48 +07:00
|
|
|
include ../../make.mk
|
|
|
|
|
2021-03-01 22:13:21 +07:00
|
|
|
FREERTOS_SRC = lib/FreeRTOS-Kernel
|
2023-03-16 23:11:11 +07:00
|
|
|
FREERTOS_PORTABLE_PATH= $(FREERTOS_SRC)/portable/$(if $(USE_IAR),IAR,GCC)
|
2020-03-10 15:34:05 +07:00
|
|
|
|
2019-05-01 14:30:48 +07:00
|
|
|
INC += \
|
|
|
|
src \
|
2021-09-25 16:16:55 +07:00
|
|
|
src/FreeRTOSConfig \
|
2019-05-01 14:30:48 +07:00
|
|
|
$(TOP)/hw \
|
2020-03-10 15:34:05 +07:00
|
|
|
$(TOP)/$(FREERTOS_SRC)/include \
|
2023-03-16 23:11:11 +07:00
|
|
|
$(TOP)/$(FREERTOS_PORTABLE_SRC)
|
2022-03-09 12:14:55 +00:00
|
|
|
|
2019-05-01 14:30:48 +07:00
|
|
|
# Example source
|
2021-09-25 16:16:55 +07:00
|
|
|
EXAMPLE_SOURCE = \
|
|
|
|
src/freertos_hook.c \
|
|
|
|
src/main.c \
|
|
|
|
src/msc_disk.c \
|
|
|
|
src/usb_descriptors.c
|
|
|
|
|
2019-05-01 14:30:48 +07:00
|
|
|
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
|
|
|
|
|
2020-03-11 00:47:13 +07:00
|
|
|
# FreeRTOS source, all files in port folder
|
2019-05-01 14:30:48 +07:00
|
|
|
SRC_C += \
|
2020-03-10 15:34:05 +07:00
|
|
|
$(FREERTOS_SRC)/list.c \
|
|
|
|
$(FREERTOS_SRC)/queue.c \
|
|
|
|
$(FREERTOS_SRC)/tasks.c \
|
|
|
|
$(FREERTOS_SRC)/timers.c \
|
2023-03-16 23:11:11 +07:00
|
|
|
$(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.c))
|
2019-05-01 16:01:44 +07:00
|
|
|
|
2023-01-17 23:38:10 +07:00
|
|
|
SRC_S += \
|
2023-03-16 23:11:11 +07:00
|
|
|
$(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.s))
|
2019-05-01 16:01:44 +07:00
|
|
|
|
2022-12-05 12:09:41 +07:00
|
|
|
# include heap manage if configSUPPORT_DYNAMIC_ALLOCATION = 1
|
|
|
|
# SRC_C += $(FREERTOS_SRC)/portable/MemMang/heap_1.c
|
|
|
|
# CFLAGS += -Wno-error=sign-compare
|
|
|
|
|
|
|
|
# Suppress FreeRTOSConfig.h warnings
|
2023-06-24 20:32:18 +07:00
|
|
|
CFLAGS_GCC += -Wno-error=redundant-decls
|
2022-12-05 12:09:41 +07:00
|
|
|
|
|
|
|
# Suppress FreeRTOS source warnings
|
2023-06-24 20:32:18 +07:00
|
|
|
CFLAGS_GCC += -Wno-error=cast-qual
|
2021-10-17 16:26:27 +07:00
|
|
|
|
2019-05-01 16:01:44 +07:00
|
|
|
# FreeRTOS (lto + Os) linker issue
|
|
|
|
LDFLAGS += -Wl,--undefined=vTaskSwitchContext
|
2019-05-01 14:30:48 +07:00
|
|
|
|
|
|
|
include ../../rules.mk
|