summaryrefslogtreecommitdiff
path: root/examples/device/hid_composite_freertos/Makefile
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-01-17 23:38:10 +0700
committerhathach <[email protected]>2023-01-17 23:38:10 +0700
commit8df2fd1916d5e69cfaad7516399a8d7da5060f57 (patch)
tree1b82bd8dc67b97c19042defa39c815c891323115 /examples/device/hid_composite_freertos/Makefile
parentc86e628a4c199a39f8317a0d4b5dd96e9692e544 (diff)
update freertos example to build with iar
Diffstat (limited to 'examples/device/hid_composite_freertos/Makefile')
-rw-r--r--examples/device/hid_composite_freertos/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/device/hid_composite_freertos/Makefile b/examples/device/hid_composite_freertos/Makefile
index 9c66b896d..a354a90b6 100644
--- a/examples/device/hid_composite_freertos/Makefile
+++ b/examples/device/hid_composite_freertos/Makefile
@@ -4,13 +4,14 @@ include ../../../tools/top.mk
include ../../make.mk
FREERTOS_SRC = lib/FreeRTOS-Kernel
+FREERTOS_PORTABLE_SRC= $(FREERTOS_SRC)/portable/$(if $(USE_IAR),IAR,GCC)/$(FREERTOS_PORT)
INC += \
src \
src/FreeRTOSConfig \
$(TOP)/hw \
$(TOP)/$(FREERTOS_SRC)/include \
- $(TOP)/$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)
+ $(TOP)/$(FREERTOS_PORTABLE_SRC)
# Example source
EXAMPLE_SOURCE = \
@@ -26,17 +27,20 @@ SRC_C += \
$(FREERTOS_SRC)/queue.c \
$(FREERTOS_SRC)/tasks.c \
$(FREERTOS_SRC)/timers.c \
- $(subst ../../../,,$(wildcard ../../../$(FREERTOS_SRC)/portable/GCC/$(FREERTOS_PORT)/*.c))
+ $(subst ../../../,,$(wildcard ../../../$(FREERTOS_PORTABLE_SRC)/*.c))
+
+SRC_S += \
+ $(subst ../../../,,$(wildcard ../../../$(FREERTOS_PORTABLE_SRC)/*.s))
# 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
-CFLAGS += -Wno-error=redundant-decls
+GCC_CFLAGS += -Wno-error=redundant-decls
# Suppress FreeRTOS source warnings
-CFLAGS += -Wno-error=cast-qual
+GCC_CFLAGS += -Wno-error=cast-qual
# FreeRTOS (lto + Os) linker issue
LDFLAGS += -Wl,--undefined=vTaskSwitchContext