Skip to content

Commit 4673fb6

Browse files
committed
Check for uARM support when compiling with uARM
1 parent 20d93bf commit 4673fb6

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

tools/toolchains/arm.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ 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-
5552
if target.core == "Cortex-M0+":
5653
cpu = "Cortex-M0"
5754
elif target.core == "Cortex-M4F":
@@ -265,10 +262,26 @@ def redirect_symbol(source, sync, build_dir):
265262

266263

267264
class ARM_STD(ARM):
268-
pass
265+
def __init__(self, target, notify=None, macros=None,
266+
silent=False, extra_verbose=False, build_profile=None,
267+
build_dir=None):
268+
ARM.__init__(self, target, notify, macros, silent,
269+
build_dir=build_dir, extra_verbose=extra_verbose,
270+
build_profile=build_profile)
271+
if "ARM" not in target.supported_toolchains:
272+
raise NotSupportedException("ARM compiler support is required for ARM build")
273+
269274

270275
class ARM_MICRO(ARM):
271276
PATCHED_LIBRARY = False
277+
def __init__(self, target, notify=None, macros=None,
278+
silent=False, extra_verbose=False, build_profile=None,
279+
build_dir=None):
280+
ARM.__init__(self, target, notify, macros, silent,
281+
build_dir=build_dir, extra_verbose=extra_verbose,
282+
build_profile=build_profile)
283+
if not set(("ARM", "uARM")).intersection(set(target.supported_toolchains)):
284+
raise NotSupportedException("ARM/uARM compiler support is required for ARM build")
272285

273286
class ARMC6(ARM_STD):
274287
SHEBANG = "#! armclang -E --target=arm-arm-none-eabi -x c"

0 commit comments

Comments
 (0)