Skip to content

Commit eea29d3

Browse files
author
Deepika
committed
Corrected check for ARM/ARMC6 toolchain
ARMC6 support required ARM compiler support as mandatory requirement which should not be the case. Cortex-M23/M33 devices are not suuported by ARM compiler5 Adding ARMC6 without ARM in target.json should work now.
1 parent 60c600a commit eea29d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/toolchains/arm.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def __init__(self, target, notify=None, macros=None,
4949
extra_verbose=extra_verbose,
5050
build_profile=build_profile)
5151

52+
if "ARM" not in target.supported_toolchains:
53+
raise NotSupportedException("ARM compiler support is required for ARM build")
54+
5255
if target.core == "Cortex-M0+":
5356
cpu = "Cortex-M0"
5457
elif target.core == "Cortex-M4F":
@@ -276,8 +279,8 @@ def check_executable():
276279
def __init__(self, target, *args, **kwargs):
277280
mbedToolchain.__init__(self, target, *args, **kwargs)
278281

279-
if "ARM" not in target.supported_toolchains:
280-
raise NotSupportedException("ARM compiler support is required for ARMC6 support")
282+
if not set(("ARM", "ARMC6")).intersection(set(target.supported_toolchains)):
283+
raise NotSupportedException("ARM/ARMC6 compiler support is required for ARMC6 build")
281284

282285
if target.core.lower().endswith("fd"):
283286
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-2])

0 commit comments

Comments
 (0)