Files
CherryUSB/demo/es32/Drivers/ALD/ES32F36xx/SConscript
2022-05-29 15:22:56 +08:00

35 lines
1017 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Import('ES32_SDK_ROOT')
from building import *
Import('esconfig')
#目的1首先生成group_ald对应project里面的ald
cwd = GetCurrentDir()
src =[]
#获取Source中.c文件后将其转换成字符串
clist=Glob('Source/*.c')
cstr=""
for i in clist:
cstr=cstr.__add__(str(i))
#判断conf内的.h文件在Source中有没有对应的.c文件有.c则添加没有.c则不添加
if esconfig.ald_lib_src:
for i in set(esconfig.ald_lib_src):
if i in cstr:
src.append('Source/' + i)
else:
src = Glob('Source/*.c')
#将md_.c添加进md中将所有md_.h都include在魔法棒c/c++里面的include paths里将USE_ASSERT加入到魔法棒c/c++里面的define中
include_path = [cwd + '/Include']
group_ald = DefineGroup('ald', src, depend = [''], CPPPATH = include_path,CPPDEFINES = ['USE_ASSERT','ES32F36xx'])
#2.生成group_bsp对应project里面的bsp
srcb=[]
group_bsp = DefineGroup('bsp', srcb, depend = [''])
#返回group_bspgroup_ald
Return('group_ald','group_bsp')