2021-03-18 16:28:44 +07:00
|
|
|
DEPS_SUBMODULES += lib/FreeRTOS-Kernel
|
|
|
|
|
2020-04-07 16:19:47 +07:00
|
|
|
include ../../../tools/top.mk
|
|
|
|
include ../../make.mk
|
|
|
|
|
2021-03-01 22:13:21 +07:00
|
|
|
FREERTOS_SRC = lib/FreeRTOS-Kernel
|
2022-03-09 12:14:55 +00:00
|
|
|
FREERTOS_PORT_PATH = lib/FreeRTOS-Kernel/portable/GCC
|
2020-04-07 16:19:47 +07:00
|
|
|
|
|
|
|
INC += \
|
|
|
|
src \
|
2021-09-25 16:16:55 +07:00
|
|
|
src/FreeRTOSConfig \
|
2020-04-07 16:19:47 +07:00
|
|
|
$(TOP)/hw \
|
|
|
|
$(TOP)/$(FREERTOS_SRC)/include \
|
2022-03-09 12:14:55 +00:00
|
|
|
$(TOP)/$(FREERTOS_PORT)
|
2020-04-07 16:19:47 +07:00
|
|
|
|
|
|
|
# Example source
|
2021-09-25 16:16:55 +07:00
|
|
|
EXAMPLE_SOURCE = \
|
|
|
|
src/freertos_hook.c \
|
|
|
|
src/main.c \
|
|
|
|
src/usb_descriptors.c
|
2022-03-09 12:14:55 +00:00
|
|
|
|
2020-04-07 16:19:47 +07:00
|
|
|
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
|
|
|
|
|
|
|
|
# FreeRTOS source, all files in port folder
|
|
|
|
SRC_C += \
|
|
|
|
$(FREERTOS_SRC)/list.c \
|
|
|
|
$(FREERTOS_SRC)/queue.c \
|
|
|
|
$(FREERTOS_SRC)/tasks.c \
|
|
|
|
$(FREERTOS_SRC)/timers.c \
|
2022-03-09 12:14:55 +00:00
|
|
|
$(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORT)/*.c))
|
2020-04-07 16:19:47 +07:00
|
|
|
|
2021-10-17 16:26:27 +07:00
|
|
|
# Suppress FreeRTOS warnings
|
|
|
|
CFLAGS += -Wno-error=cast-qual
|
|
|
|
|
2020-04-07 16:19:47 +07:00
|
|
|
# FreeRTOS (lto + Os) linker issue
|
|
|
|
LDFLAGS += -Wl,--undefined=vTaskSwitchContext
|
|
|
|
|
|
|
|
include ../../rules.mk
|