0 Star 0 Fork 0

OneOS-Ability/ICM20602 运动传感器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
SConstruct 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
taotao 提交于 2024-10-25 09:32 . ICM20602 component
import os
import sys
import osconfig
if os.getenv('OS_ROOT'):
OS_ROOT = os.getenv('OS_ROOT')
else:
OS_ROOT = os.path.normpath(os.getcwd() + '/../..')
sys.path = sys.path + [os.path.join(OS_ROOT, 'scripts')]
try:
from build_tools import *
except:
print('Cannot found oneos root directory, please check OS_ROOT')
print(OS_ROOT)
exit(-1)
RESULT = 'oneos.' + osconfig.RESULT_SUFFIX
env = Environment(tools = ['mingw'],
AS = osconfig.AS, ASFLAGS = osconfig.AFLAGS,
CC = osconfig.CC, CCFLAGS = osconfig.CFLAGS,
AR = osconfig.AR, ARFLAGS = '-rc',
CXX = osconfig.CXX, CXXFLAGS = osconfig.CXXFLAGS,
LINK = osconfig.LINK, LINKFLAGS = osconfig.LFLAGS)
env.PrependENVPath('PATH', osconfig.COMPILER_PATH)
if osconfig.COMPILER == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map oneos.map')
Export('OS_ROOT')
Export('osconfig')
# prepare building environment
objs = SetupCompile(env, OS_ROOT, has_libcpu=False)
Import('kernel_vdir')
# make a building
StartCompile(RESULT, objs)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/oneos-ability/icm20602-motion-sensor.git
[email protected]:oneos-ability/icm20602-motion-sensor.git
oneos-ability
icm20602-motion-sensor
ICM20602 运动传感器
master

搜索帮助