@@ -3,19 +3,36 @@ NMSIS_LIB_ARCH ?= $(RISCV_ARCH)
33
44INCDIRS += $(NUCLEI_SDK_NMSIS ) /Core/Include
55
6+ # When set to 1, will use compatiable library
7+ # provided in toolchain such as terapines zcc toolchain
8+ # present NMSIS DSP/NN compatiable library
9+ NMSIS_LIB_COMPAT ?=
10+
611ifeq ($(filter nmsis_nn,$(NMSIS_LIB_SORTED ) ) ,nmsis_nn)
712INCDIRS += $(NUCLEI_SDK_NMSIS ) /NN/Include
813LIBDIRS += $(NUCLEI_SDK_NMSIS ) /Library/NN/GCC
9- LDLIBS += -lnmsis_nn_ $( NMSIS_LIB_ARCH )
10- else ifeq ($(filter tpt_nn,$(NMSIS_LIB_SORTED)),tpt_nn )
14+ ifeq ( $( TOOLCHAIN ) ,terapines )
15+ ifeq ($(NMSIS_LIB_COMPAT ) ,1 )
1116LDLIBS += -lnn
17+ else
18+ LDLIBS += -lnmsis_nn_$(NMSIS_LIB_ARCH )
19+ endif
20+ else
21+ LDLIBS += -lnmsis_nn_$(NMSIS_LIB_ARCH )
22+ endif
1223endif
1324
1425ifeq ($(filter nmsis_dsp,$(NMSIS_LIB_SORTED ) ) ,nmsis_dsp)
1526INCDIRS += $(NUCLEI_SDK_NMSIS ) /DSP/Include \
1627 $(NUCLEI_SDK_NMSIS ) /DSP/PrivateInclude
1728LIBDIRS += $(NUCLEI_SDK_NMSIS ) /Library/DSP/GCC
18- LDLIBS += -lnmsis_dsp_ $( NMSIS_LIB_ARCH )
19- else ifeq ($(filter tpt_dsp,$(NMSIS_LIB_SORTED)),tpt_dsp )
29+ ifeq ( $( TOOLCHAIN ) ,terapines )
30+ ifeq ($(NMSIS_LIB_COMPAT ) ,1 )
2031LDLIBS += -ldsp
32+ else
33+ LDLIBS += -lnmsis_dsp_$(NMSIS_LIB_ARCH )
34+ endif
35+ else
36+ LDLIBS += -lnmsis_dsp_$(NMSIS_LIB_ARCH )
37+ endif
2138endif
0 commit comments