1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #17997 from aabadie/pr/tests/pkg_cmsis_nn_kconfig

pkg/cmsis-nn: model in Kconfig
This commit is contained in:
Alexandre Abadie 2022-04-26 09:23:02 +02:00 committed by GitHub
commit e2900acd6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 59 additions and 13 deletions

View File

@ -11,6 +11,7 @@ rsource "c25519/Kconfig"
rsource "cayenne-lpp/Kconfig"
rsource "cifra/Kconfig"
rsource "cmsis-dsp/Kconfig"
rsource "cmsis-nn/Kconfig"
rsource "cn-cbor/Kconfig"
rsource "driver_atwinc15x0/Kconfig"
rsource "driver_bme680/Kconfig"

36
pkg/cmsis-nn/Kconfig Normal file
View File

@ -0,0 +1,36 @@
# Copyright (c) 2022 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config PACKAGE_CMSIS-NN
bool "NN ARM CMSIS package"
depends on TEST_KCONFIG
depends on HAS_CPU_CORE_CORTEXM
select MODULE_CMSIS-NN_ACTIVATIONFUNCTIONS
select MODULE_CMSIS-NN_CONVOLUTIONFUNCTIONS
select MODULE_CMSIS-NN_FULLYCONNECTEDFUNCTIONS
select MODULE_CMSIS-NN_NNSUPPORTFUNCTIONS
select MODULE_CMSIS-NN_POOLINGFUNCTIONS
select MODULE_CMSIS-NN_SOFTMAXFUNCTIONS
config MODULE_CMSIS-NN_ACTIVATIONFUNCTIONS
bool
config MODULE_CMSIS-NN_CONVOLUTIONFUNCTIONS
bool
config MODULE_CMSIS-NN_FULLYCONNECTEDFUNCTIONS
bool
config MODULE_CMSIS-NN_NNSUPPORTFUNCTIONS
bool
config MODULE_CMSIS-NN_POOLINGFUNCTIONS
bool
config MODULE_CMSIS-NN_SOFTMAXFUNCTIONS
bool

View File

@ -8,16 +8,24 @@ include $(RIOTBASE)/pkg/pkg.mk
CFLAGS += -Wno-cast-align
CMSIS_NN_MODULES = \
cmsis-nn_ActivationFunctions \
cmsis-nn_ConvolutionFunctions \
cmsis-nn_FullyConnectedFunctions \
cmsis-nn_NNSupportFunctions \
cmsis-nn_PoolingFunctions \
cmsis-nn_SoftmaxFunctions \
cmsis-nn_activationfunctions \
cmsis-nn_convolutionfunctions \
cmsis-nn_fullyconnectedfunctions \
cmsis-nn_nnsupportfunctions \
cmsis-nn_poolingfunctions \
cmsis-nn_softmaxfunctions \
#
DIR_activationfunctions := ActivationFunctions
DIR_convolutionfunctions := ConvolutionFunctions
DIR_fullyconnectedfunctions := FullyConnectedFunctions
DIR_nnsupportfunctions := NNSupportFunctions
DIR_poolingfunctions := PoolingFunctions
DIR_softmaxfunctions := SoftmaxFunctions
.PHONY: cmsis-nn_%
all: $(CMSIS_NN_MODULES)
cmsis-nn_%:
$(MAKE) -C $(PKG_SOURCE_DIR)/CMSIS/NN/Source/$* -f $(CURDIR)/Makefile.cmsis-nn MODULE=$@
$(MAKE) -C $(PKG_SOURCE_DIR)/CMSIS/NN/Source/$(DIR_$*) -f $(CURDIR)/Makefile.cmsis-nn MODULE=$@

View File

@ -1,8 +1,8 @@
FEATURES_REQUIRED += cpu_core_cortexm
USEMODULE += cmsis-nn_ActivationFunctions
USEMODULE += cmsis-nn_ConvolutionFunctions
USEMODULE += cmsis-nn_FullyConnectedFunctions
USEMODULE += cmsis-nn_NNSupportFunctions
USEMODULE += cmsis-nn_PoolingFunctions
USEMODULE += cmsis-nn_SoftmaxFunctions
USEMODULE += cmsis-nn_activationfunctions
USEMODULE += cmsis-nn_convolutionfunctions
USEMODULE += cmsis-nn_fullyconnectedfunctions
USEMODULE += cmsis-nn_nnsupportfunctions
USEMODULE += cmsis-nn_poolingfunctions
USEMODULE += cmsis-nn_softmaxfunctions

View File

@ -0,0 +1 @@
CONFIG_PACKAGE_CMSIS-NN=y