1 Star 0 Fork 0

andy/W601_RT-thread_Alarm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
SConstruct 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
Rayuu 提交于 2019-12-07 21:40 . 初始化版本
import os
import sys
import rtconfig
if os.getenv('RTT_ROOT'):
RTT_ROOT = os.getenv('RTT_ROOT')
else:
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../rt-thread')
# set RTT_ROOT
if not os.getenv("RTT_ROOT"):
RTT_ROOT="rt-thread"
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
try:
from building import *
except:
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
print(RTT_ROOT)
exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
Export('RTT_ROOT')
Export('rtconfig')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
SDK_ROOT = os.path.abspath('./')
bsp_vdir = 'build'
if os.path.exists(SDK_ROOT + '/libraries'):
libraries_path_prefix = SDK_ROOT
else:
# include libraries and drivers
libraries_path_prefix = os.path.dirname(os.path.dirname(SDK_ROOT))
objs.extend(SConscript(libraries_path_prefix + '/libraries/SConscript', variant_dir = bsp_vdir + '/libraries', duplicate = 0))
objs.extend(SConscript(libraries_path_prefix + '/drivers/SConscript', variant_dir = bsp_vdir + '/drivers', duplicate = 0))
# make a building
DoBuilding(TARGET, objs)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/andylu666/W601_RT-thread_Alarm.git
git@gitee.com:andylu666/W601_RT-thread_Alarm.git
andylu666
W601_RT-thread_Alarm
W601_RT-thread_Alarm
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385