You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/02/24 14:26:33 UTC
[incubator-nuttx-apps] branch master updated: mlearning: cmsis: enable FPU support
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 18609ab mlearning: cmsis: enable FPU support
18609ab is described below
commit 18609ab1df05876092e0fb376f47c21c2883f043
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Feb 24 12:18:38 2022 +0000
mlearning: cmsis: enable FPU support
In case of HW with FPU we can benefit from the FPU support.
Signed-off-by: Alin Jerpelea <al...@sony.com>
---
mlearning/cmsis/libcmsisdsp/Makefile | 4 ++++
mlearning/cmsis/libcmsisnn/Makefile | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/mlearning/cmsis/libcmsisdsp/Makefile b/mlearning/cmsis/libcmsisdsp/Makefile
index 0da31d8..55f9a43 100644
--- a/mlearning/cmsis/libcmsisdsp/Makefile
+++ b/mlearning/cmsis/libcmsisdsp/Makefile
@@ -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/}
diff --git a/mlearning/cmsis/libcmsisnn/Makefile b/mlearning/cmsis/libcmsisnn/Makefile
index ac7688e..759b05f 100644
--- a/mlearning/cmsis/libcmsisnn/Makefile
+++ b/mlearning/cmsis/libcmsisnn/Makefile
@@ -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