summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRafael Silva <[email protected]>2022-03-09 12:14:55 +0000
committerRafael Silva <[email protected]>2022-06-02 09:35:30 +0100
commit2a17a7e8f851c1a29d7e06ff520d15f36b7a652c (patch)
treecc004dd15bbef0deb8a8aa0401e2756f1055cd22 /examples
parent03777f4a467c7ff7e0e764cfcf79d04235a2659d (diff)
rework make freertos port handling
this allows ports to specify a freertos port outside the FreeRTOS-Kernel lib directory, which would otherwise not be possible Signed-off-by: Rafael Silva <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/device/cdc_msc_freertos/Makefile7
-rw-r--r--examples/device/hid_composite_freertos/Makefile7
2 files changed, 8 insertions, 6 deletions
diff --git a/examples/device/cdc_msc_freertos/Makefile b/examples/device/cdc_msc_freertos/Makefile
index a155d6cb7..368bc8cfa 100644
--- a/examples/device/cdc_msc_freertos/Makefile
+++ b/examples/device/cdc_msc_freertos/Makefile
@@ -4,14 +4,15 @@ include ../../../tools/top.mk
include ../../make.mk
FREERTOS_SRC = lib/FreeRTOS-Kernel
+FREERTOS_PORT_PATH = lib/FreeRTOS-Kernel/portable/GCC
INC += \
src \
src/FreeRTOSConfig \
$(TOP)/hw \
$(TOP)/$(FREERTOS_SRC)/include \
- $(TOP)/$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)
-
+ $(TOP)/$(FREERTOS_PORT)
+
# Example source
EXAMPLE_SOURCE = \
src/freertos_hook.c \
@@ -27,7 +28,7 @@ SRC_C += \
$(FREERTOS_SRC)/queue.c \
$(FREERTOS_SRC)/tasks.c \
$(FREERTOS_SRC)/timers.c \
- $(subst ../../../,,$(wildcard ../../../$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)/*.c))
+ $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORT)/*.c))
# Suppress FreeRTOS warnings
CFLAGS += -Wno-error=cast-qual
diff --git a/examples/device/hid_composite_freertos/Makefile b/examples/device/hid_composite_freertos/Makefile
index c9b7abdf5..f2e0210ae 100644
--- a/examples/device/hid_composite_freertos/Makefile
+++ b/examples/device/hid_composite_freertos/Makefile
@@ -4,20 +4,21 @@ include ../../../tools/top.mk
include ../../make.mk
FREERTOS_SRC = lib/FreeRTOS-Kernel
+FREERTOS_PORT_PATH = lib/FreeRTOS-Kernel/portable/GCC
INC += \
src \
src/FreeRTOSConfig \
$(TOP)/hw \
$(TOP)/$(FREERTOS_SRC)/include \
- $(TOP)/$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)
+ $(TOP)/$(FREERTOS_PORT)
# Example source
EXAMPLE_SOURCE = \
src/freertos_hook.c \
src/main.c \
src/usb_descriptors.c
-
+
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
# FreeRTOS source, all files in port folder
@@ -26,7 +27,7 @@ SRC_C += \
$(FREERTOS_SRC)/queue.c \
$(FREERTOS_SRC)/tasks.c \
$(FREERTOS_SRC)/timers.c \
- $(subst ../../../,,$(wildcard ../../../$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)/*.c))
+ $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORT)/*.c))
# Suppress FreeRTOS warnings
CFLAGS += -Wno-error=cast-qual