xiuos/APP_Framework/Framework/knowing/cmsis_5/SConscript

35 lines
1.1 KiB
Python

import os
from building import *
cwd = GetCurrentDir()
src = []
CPPDEFINES = []
CPPPATH = []
CPPPATH += [os.path.join(cwd, 'Core/Include')]
if GetDepend('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')