mlearning: cmsis: enable FPU support

In case of HW with FPU we can benefit from the FPU support.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2022-02-24 12:18:38 +00:00 committed by Alan Carvalho de Assis
parent 18b5902a3e
commit 18609ab1df
2 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,10 @@ endif
ifeq ($(CONFIG_CMSIS_DSP_ARM_MATH_ROUNDING),y)
CFLAGS += -DARM_MATH_ROUNDING
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CFLAGS += -D__FPU_PRESENT=1U
CXXFLAGS += -D__FPU_PRESENT=1U
endif
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/PrivateInclude/}
CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/PrivateInclude/}

View File

@ -22,6 +22,11 @@ include $(APPDIR)/Make.defs
CMSIS5_NN := ../CMSIS_5/CMSIS/NN/Source
ifeq ($(CONFIG_ARCH_FPU),y)
CFLAGS += -D__FPU_PRESENT=1U
CXXFLAGS += -D__FPU_PRESENT=1U
endif
CSRCS += $(CMSIS5_NN)/ActivationFunctions/arm_nn_activations_q15.c
CSRCS += $(CMSIS5_NN)/ActivationFunctions/arm_relu6_s8.c
CSRCS += $(CMSIS5_NN)/ActivationFunctions/arm_relu_q15.c