APP_Framework/Framework/:add Kconfig file and SConscript file about CMSIS-NN (version 5)
This commit is contained in:
parent
e0c78f200b
commit
fe06b461ee
|
@ -8,4 +8,5 @@ if SUPPORT_KNOWING_FRAMEWORK
|
||||||
source "$APP_DIR/Framework/knowing/filter/Kconfig"
|
source "$APP_DIR/Framework/knowing/filter/Kconfig"
|
||||||
source "$APP_DIR/Framework/knowing/ota/Kconfig"
|
source "$APP_DIR/Framework/knowing/ota/Kconfig"
|
||||||
source "$APP_DIR/Framework/knowing/image_processing/Kconfig"
|
source "$APP_DIR/Framework/knowing/image_processing/Kconfig"
|
||||||
|
source "$APP_DIR/Framework/knowing/cmsis_5/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
menuconfig USING_CMSIS_5
|
||||||
|
bool "CMSIS-5"
|
||||||
|
default n
|
||||||
|
|
||||||
|
if USING_CMSIS_5
|
||||||
|
|
||||||
|
menuconfig USING_USING_CMSIS_5_NN
|
||||||
|
bool "CMSIS-5 NN"
|
||||||
|
default n
|
||||||
|
|
||||||
|
if USING_USING_CMSIS_5_NN
|
||||||
|
|
||||||
|
config USING_CMSIS_5_NN_ACTIVATION
|
||||||
|
bool "CMSIS-5 NN ACTIVATION"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config USING_CMSIS_5_NN_CONVOLUTION
|
||||||
|
bool "CMSIS-5 NN CONVOLUTION"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config USING_CMSIS_5_NN_FULLY_CONNECTED
|
||||||
|
bool "CMSIS-5 NN FULLY CONNECTED"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config USING_CMSIS_5_NN_SUPPORT
|
||||||
|
bool "CMSIS-5 NN SUPPORT"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config USING_CMSIS_5_NN_POOLING
|
||||||
|
bool "CMSIS-5 NN POOLING"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config USING_CMSIS_5_NN_SOFTMAX
|
||||||
|
bool "CMSIS-5 NN SOFTMAX"
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
import os
|
||||||
|
from building import *
|
||||||
|
|
||||||
|
cwd = GetCurrentDir()
|
||||||
|
src = []
|
||||||
|
CPPDEFINES = []
|
||||||
|
CPPPATH = []
|
||||||
|
|
||||||
|
CPPPATH += [os.path.join(cwd, 'Core/Include')]
|
||||||
|
|
||||||
|
if GetDepend('USING_USING_CMSIS_5_NN'):
|
||||||
|
CPPPATH += [os.path.join(cwd, 'DSP/Include')]
|
||||||
|
CPPPATH += [os.path.join(cwd, 'NN/Include')]
|
||||||
|
CPPDEFINES += ['__FPU_PRESENT=1']
|
||||||
|
if GetDepend('USING_CMSIS_5_NN_ACTIVATION'):
|
||||||
|
src += Glob('NN/Source/ActivationFunctions/*.c')
|
||||||
|
if GetDepend('USING_CMSIS_5_NN_CONVOLUTION'):
|
||||||
|
src += Glob('NN/Source/ConvolutionFunctions/*.c')
|
||||||
|
if GetDepend('USING_CMSIS_5_NN_FULLY_CONNECTED'):
|
||||||
|
src += Glob('NN/Source/FullyConnectedFunctions/*.c')
|
||||||
|
if GetDepend('USING_CMSIS_5_NN_SUPPORT'):
|
||||||
|
src += Glob('NN/Source/NNSupportFunctions/*.c')
|
||||||
|
if GetDepend('USING_CMSIS_5_NN_POOLING'):
|
||||||
|
src += Glob('NN/Source/PoolingFunctions/*.c')
|
||||||
|
if GetDepend('USING_CMSIS_5_NN_SOFTMAX'):
|
||||||
|
src += Glob('NN/Source/SoftmaxFunctions/*.c')
|
||||||
|
|
||||||
|
if GetDepend('ARCH_ARM_CORTEX_M4'):
|
||||||
|
CPPDEFINES += ['ARM_MATH_CM4']
|
||||||
|
|
||||||
|
|
||||||
|
group = DefineGroup('CMSIS-5', src, depend = ['USING_CMSIS_5'], CPPPATH = CPPPATH, LOCAL_CPPDEFINES=CPPDEFINES)
|
||||||
|
|
||||||
|
Return('group')
|
Loading…
Reference in New Issue