From b1efdefebb5586aa25a9fc475661af0055238106 Mon Sep 17 00:00:00 2001 From: MurphyZhao Date: Fri, 23 Aug 2019 23:25:58 +0800 Subject: [PATCH] =?UTF-8?q?[tools][fix]=20=E4=BF=AE=E6=94=B9=20iar.py=20?= =?UTF-8?q?=E4=B8=AD=20iar=20=E7=89=88=E6=9C=AC=E6=9F=A5=E6=89=BE=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=90=8E=E7=9A=84=E5=A4=84=E7=90=86=EF=BC=8C=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E5=9C=A8=E5=87=BA=E9=94=99=E5=90=8E=E7=BB=88?= =?UTF-8?q?=E6=AD=A2=20scons=20=E7=A8=8B=E5=BA=8F=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E5=B9=B6=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=9B=E5=B9=B6=E5=9C=A8=E6=88=90=E5=8A=9F=E5=90=8E=E6=89=93?= =?UTF-8?q?=E5=8D=B0=20iar=20=E7=89=88=E6=9C=AC=EF=BC=8C=E4=BE=BF=E4=BA=8E?= =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MurphyZhao --- tools/iar.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/iar.py b/tools/iar.py index 18a3cb8328..23cb8e11ac 100644 --- a/tools/iar.py +++ b/tools/iar.py @@ -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 -- GitLab