Skip to content

Commit 3f68411

Browse files
committed
Warn with ARMC6 and not v8m
1 parent ae033da commit 3f68411

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/toolchains/arm.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from shutil import rmtree
2626
from distutils.version import LooseVersion
2727

28+
from tools.targets import CORE_ARCH
2829
from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
2930
from tools.hooks import hook_tool
3031
from tools.utils import mkdir, NotSupportedException, run_cmd
@@ -368,6 +369,14 @@ def __init__(self, target, *args, **kwargs):
368369
if target.core not in self.SUPPORTED_CORES:
369370
raise NotSupportedException(
370371
"this compiler does not support the core %s" % target.core)
372+
if CORE_ARCH[target.core] < 8:
373+
self.notify.cc_info({
374+
'severity': "Error", 'file': "", 'line': "", 'col': "",
375+
'message': "ARMC6 does not support ARM architecture v{}"
376+
" targets".format(CORE_ARCH[target.core]),
377+
'text': '', 'target_name': self.target.name,
378+
'toolchain_name': self.name
379+
})
371380

372381
if not set(("ARM", "ARMC6")).intersection(set(target.supported_toolchains)):
373382
raise NotSupportedException("ARM/ARMC6 compiler support is required for ARMC6 build")

0 commit comments

Comments
 (0)