1 Star 0 Fork 45

kunpeng.zhao/W600-RT-Thread智能指纹门锁

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
SConstruct 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
hanxiaohu 提交于 2020-11-28 04:01 . first commit
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')
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)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/kunpengzhao/W600-RT-Thread-door-lock.git
git@gitee.com:kunpengzhao/W600-RT-Thread-door-lock.git
kunpengzhao
W600-RT-Thread-door-lock
W600-RT-Thread智能指纹门锁
master

搜索帮助