23 lines
807 B
Python
23 lines
807 B
Python
from building import *
|
||
import esconfig
|
||
#1.生成group_startup(对应project里面的startup)
|
||
cwd = GetCurrentDir()
|
||
|
||
#add *.s file
|
||
if esconfig.CROSS_TOOL == 'gcc':
|
||
stup = Glob('Startup/gcc/*.s')
|
||
elif esconfig.CROSS_TOOL == 'keil':
|
||
stup = Glob('Startup/keil/*.s')
|
||
elif esconfig.CROSS_TOOL == 'iar':
|
||
stup = Glob('Startup/iar/*.s')
|
||
|
||
|
||
#add include path,其实startup没有对应的.h文件,但是这里的操作是把内核相关的.h文件以及芯片寄存器的.h文件以及芯片寄存器的.h文件
|
||
#include在魔法棒c/c++里面的include paths里
|
||
include_path = [cwd + '..\..\..\..\Include']
|
||
include_path += [cwd + '/Include', cwd + '/Include/ES32W3120']
|
||
group_startup = DefineGroup('startup', stup, depend = [''], CPPPATH = include_path)
|
||
|
||
#返回group_startup
|
||
Return('group_startup')
|