Skip to content

Commit c7759fe

Browse files
authored
Merge pull request #13008 from Patater/armc5-usage-warning-compat
tools: Warn when ARMC5 is no longer supported
2 parents a802ab8 + a5a5444 commit c7759fe

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

tools/build_api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
from .targets import TARGET_NAMES, TARGET_MAP, CORE_ARCH, Target
4848
from .libraries import Library
4949
from .toolchains import TOOLCHAIN_CLASSES, TOOLCHAIN_PATHS
50+
from .toolchains.arm import ARMC5_MIGRATION_WARNING
5051
from .toolchains.arm import UARM_TOOLCHAIN_WARNING
5152
from .toolchains.mbed_toolchain import should_replace_small_c_lib
5253
from .config import Config
@@ -244,11 +245,9 @@ def find_valid_toolchain(target, toolchain):
244245
).format(toolchain_name, search_path)
245246
else:
246247
if toolchain_name == "ARMC5":
247-
raise NotSupportedException(
248-
"Arm Compiler 5 is no longer supported, please upgrade to Arm Compiler 6."
249-
)
248+
end_warnings.append(ARMC5_MIGRATION_WARNING)
250249
if (
251-
toolchain_name in ["uARM", "ARMC6"]
250+
toolchain_name in ["uARM", "ARMC5", "ARMC6"]
252251
and "uARM" in {toolchain_name, target.default_toolchain}
253252
):
254253
end_warnings.append(UARM_TOOLCHAIN_WARNING)

tools/toolchains/arm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
from tools.utils import mkdir, NotSupportedException, run_cmd
3333
from tools.resources import FileRef
3434

35+
ARMC5_MIGRATION_WARNING = (
36+
"Warning: Arm Compiler 5 is no longer supported as of Mbed 6. "
37+
"Please upgrade your environment to Arm Compiler 6 "
38+
"which is free to use with Mbed OS. For more information, "
39+
"please visit https://os.mbed.com/docs/mbed-os/latest/tools/index.html"
40+
)
41+
3542
UARM_TOOLCHAIN_WARNING = (
3643
"Warning: We noticed that you are using uARM Toolchain either via --toolchain command line or default_toolchain option. "
3744
"We are deprecating the use of the uARM Toolchain. "

0 commit comments

Comments
 (0)