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

23 lines
807 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.
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')