Skip to content

uARM: Fix deprecate warning printing wrongly for GCC_ARM/IAR toolchain build #12198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions tools/build_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,20 @@ def find_valid_toolchain(target, toolchain):
last_error = None
for index, toolchain_name in enumerate(toolchain_names):
internal_tc_name = get_toolchain_name(target, toolchain_name)
if toolchain == "ARM" and toolchain_name == "ARMC5" and index != 0:
end_warnings.append(ARMC5_MIGRATION_WARNING)
if not TOOLCHAIN_CLASSES[internal_tc_name].check_executable():
search_path = TOOLCHAIN_PATHS[internal_tc_name] or "No path set"
last_error = (
"Could not find executable for {}.\n"
"Currently set search path: {}"
).format(toolchain_name, search_path)
else:
if toolchain_name == "uARM" or target.default_toolchain == "uARM":
end_warnings.append(UARM_TOOLCHAIN_WARNING)
else:
if toolchain_name == "ARMC5":
end_warnings.append(ARMC5_MIGRATION_WARNING)
if (
toolchain_name in ["uARM", "ARMC5", "ARMC6"]
and "uARM" in {toolchain_name, target.default_toolchain}
):
end_warnings.append(UARM_TOOLCHAIN_WARNING)
return toolchain_name, internal_tc_name, end_warnings
else:
if last_error:
Expand Down
4 changes: 2 additions & 2 deletions tools/toolchains/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
)

UARM_TOOLCHAIN_WARNING = (
"Warning: We noticed that you are using uARM Toolchain. "
"We are deprecating the use of uARM Toolchain. "
"Warning: We noticed that you are using uARM Toolchain either via --toolchain command line or default_toolchain option. "
"We are deprecating the use of the uARM Toolchain. "
"For more information on how to use the ARM toolchain with small C libraries, "
"please visit https://os.mbed.com/docs/mbed-os/latest/reference/using-small-c-libraries.html"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to UARM_DEFAULT_TOOLCHAIN_WARNING that you had before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have combined into existing UARM_TOOLCHAIN_WARNING

Expand Down