APP_Framework/Framework/:add Kconfig file and SConscript file about CMSIS-NN (version 5)

This commit is contained in:
WentaoWong
2021-11-29 18:46:35 +08:00
parent e0c78f200b
commit fe06b461ee
3 changed files with 75 additions and 0 deletions

View File

@@ -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')