Skip to content

Commit 9c4c630

Browse files
author
Cruz Monrreal
authored
Merge pull request #7367 from theotherjimmy/check-arm-component
Tools: Detect Arm Compiler version using Component
2 parents 226e799 + ed04c1b commit 9c4c630

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tools/test/toolchains/api_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ def test_arm_version_check(_run_cmd):
3131
toolchain.version_check()
3232
assert notifier.messages == []
3333
_run_cmd.return_value = ("""
34+
Product: MDK Professional 5.22
35+
Component: ARM Compiler 5.06 update 5 (build 528)
36+
Tool: armcc [4d3621]
37+
""", "", 0)
38+
toolchain.version_check()
39+
assert notifier.messages == []
40+
_run_cmd.return_value = ("""
3441
Product: ARM Compiler
3542
Component: ARM Compiler
3643
Tool: armcc [4d3621]

tools/toolchains/arm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ARM(mbedToolchain):
4141
SUPPORTED_CORES = ["Cortex-M0", "Cortex-M0+", "Cortex-M3", "Cortex-M4",
4242
"Cortex-M4F", "Cortex-M7", "Cortex-M7F", "Cortex-M7FD", "Cortex-A9"]
4343
ARMCC_RANGE = (LooseVersion("5.06"), LooseVersion("5.07"))
44-
ARMCC_VERSION_RE = re.compile("Product: ARM Compiler (\d+\.\d+)")
44+
ARMCC_VERSION_RE = re.compile("Component: ARM Compiler (\d+\.\d+)")
4545

4646
@staticmethod
4747
def check_executable():

0 commit comments

Comments
 (0)