Skip to content

Commit f481c68

Browse files
committed
build: Fix wrong setup for nmsis library selection in DSP testing makefile
Signed-off-by: Huaqi Fang <[email protected]>
1 parent 0a90083 commit f481c68

File tree

3 files changed

+9
-23
lines changed

3 files changed

+9
-23
lines changed

NMSIS/DSP/Benchmark/Makefile.common

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ RISCV_ALIGN ?= OFF
1313
COMMON_FLAGS ?= -O2
1414
STDCLIB ?= newlib_full
1515

16-
ifeq (${TOOLCHAIN}, terapines)
17-
NMSIS_LIB := tpt_dsp
18-
else
1916
NMSIS_LIB := nmsis_dsp
20-
endif
2117

2218
ifeq ($(BENCH_UNIT),instret)
2319
$(warning "Benchmark by reading cpu instret")

NMSIS/DSP/Test/Makefile.common

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ RISCV_ALIGN ?= OFF
1313
COMMON_FLAGS ?= -O2
1414
STDCLIB ?= newlib_full
1515

16-
ifeq (${TOOLCHAIN}, terapines)
17-
NMSIS_LIB := tpt_dsp
18-
else
1916
NMSIS_LIB := nmsis_dsp
20-
endif
2117

2218
ifeq ($(BENCH_UNIT),instret)
2319
$(warning "Benchmark by reading cpu instret")

NMSIS/build.mk

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,24 @@ INCDIRS += $(NUCLEI_SDK_NMSIS)/Core/Include
99
NMSIS_LIB_COMPAT ?=
1010

1111
ifeq ($(filter nmsis_nn,$(NMSIS_LIB_SORTED)),nmsis_nn)
12-
INCDIRS += $(NUCLEI_SDK_NMSIS)/NN/Include
13-
LIBDIRS += $(NUCLEI_SDK_NMSIS)/Library/NN/GCC
14-
ifeq ($(TOOLCHAIN),terapines)
15-
ifeq ($(NMSIS_LIB_COMPAT),1)
12+
ifeq ($(TOOLCHAIN)-$(NMSIS_LIB_COMPAT),terapines-1)
13+
# use nn library from terapines zcc toolchain when NMSIS_LIB_COMPAT=1
1614
LDLIBS += -lnn
1715
else
1816
LDLIBS += -lnmsis_nn_$(NMSIS_LIB_ARCH)
19-
endif
20-
else
21-
LDLIBS += -lnmsis_nn_$(NMSIS_LIB_ARCH)
17+
INCDIRS += $(NUCLEI_SDK_NMSIS)/NN/Include
18+
LIBDIRS += $(NUCLEI_SDK_NMSIS)/Library/NN/GCC
2219
endif
2320
endif
2421

2522
ifeq ($(filter nmsis_dsp,$(NMSIS_LIB_SORTED)),nmsis_dsp)
26-
INCDIRS += $(NUCLEI_SDK_NMSIS)/DSP/Include \
27-
$(NUCLEI_SDK_NMSIS)/DSP/PrivateInclude
28-
LIBDIRS += $(NUCLEI_SDK_NMSIS)/Library/DSP/GCC
29-
ifeq ($(TOOLCHAIN),terapines)
30-
ifeq ($(NMSIS_LIB_COMPAT),1)
23+
ifeq ($(TOOLCHAIN)-$(NMSIS_LIB_COMPAT),terapines-1)
24+
# use dsp library from terapines zcc toolchain when NMSIS_LIB_COMPAT=1
3125
LDLIBS += -ldsp
3226
else
3327
LDLIBS += -lnmsis_dsp_$(NMSIS_LIB_ARCH)
34-
endif
35-
else
36-
LDLIBS += -lnmsis_dsp_$(NMSIS_LIB_ARCH)
28+
INCDIRS += $(NUCLEI_SDK_NMSIS)/DSP/Include \
29+
$(NUCLEI_SDK_NMSIS)/DSP/PrivateInclude
30+
LIBDIRS += $(NUCLEI_SDK_NMSIS)/Library/DSP/GCC
3731
endif
3832
endif

0 commit comments

Comments
 (0)