提交 b1efdefe 编写于 作者: M MurphyZhao

[tools][fix] 修改 iar.py 中 iar 版本查找失败后的处理,目的是在出错后终止 scons 程序,以发现并修改错误;并在成功后打印 iar 版本,便于调试

Signed-off-by: NMurphyZhao <d2014zjt@163.com>
上级 76f2be20
......@@ -194,10 +194,12 @@ def IARVersion():
cmd = os.path.join(path, 'iccarm.exe')
else:
print('Error: get IAR version failed. Please update the IAR installation path in rtconfig.py!')
return "0.0"
exit(-1)
child = subprocess.Popen([cmd, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = child.communicate()
# example stdout: IAR ANSI C/C++ Compiler V8.20.1.14183/W32 for ARM
return re.search('[\d\.]+', stdout).group(0)
iar_version = re.search('[\d\.]+', stdout).group(0)
print("IAR version: %s" % iar_version)
return iar_version
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册