Skip to content
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

M2351: Support GCC and IAR #13643

Merged
merged 7 commits into from
Oct 13, 2020

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented Sep 21, 2020

Summary of changes

This PR is backport of #12353 and #12366 to mbed-os-5.15 branch. It has the following modifications on M2351:

  1. Enable GCC support on non-PSA non-secure target
  2. Enable IAR support on non-PSA non-secure target
  3. Refactor for above toolchain support
  4. Other minor fix

NOTE1: Disable GCC support on secure targets because of GCC bug (as of 9-2019-q4-major): In non-secure entry function, callee-saved registers must be restored, but they are incorrectly cleared at optimization level Os.
NOTE2: Disable IAR on secure targets because of IAR toolchain bug (as of IAR 8.32): cmse_nonsecure_caller() is not always inlined.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Ths is to prepare for supporting GCC/IAR officially.
1.  Re-organize to make clear all targets/toolchains support in single startup file
2.  Inline assembly syntax is limited, esp. on IAR. Try paving the way for accessing external symbols still in inline assembly instead of re-write in assembly.
3.  Update GCC C run-time sequence to fit future GCC script file.
1.  Refine memory partition files to support different toolchains
2.  Exclude NSC region from flash IAP range
Separate out secure/non-secure ARMC6 scatter files instead of merging them
1.  Enable GCC support on non-secure targets
2.  Disable GCC support on secure targets becasue of GCC bug (as of 9-2019-q4-major): In non-secure entry function, callee-saved registers must be restored, but they are incorrectly cleared at optimization level "Os".
1.  Enable IAR on non-secure targets
2.  Disable IAR on secure targets because:
    (1) IAR toolchain bug: As of IAR 8.32, cmse_nonsecure_caller() is not always inlined.
    (2) TFM hasn't supported IAR yet.
@ciarmcom ciarmcom requested a review from a team September 21, 2020 02:00
@ciarmcom
Copy link
Member

@ccli8, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@mergify mergify bot added needs: CI and removed needs: review labels Sep 29, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Sep 30, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Sep 30, 2020

Test run: SUCCESS

Summary: 10 of 10 test jobs passed
Build number : 1
Build artifacts

Copy link
Collaborator

@andypowers andypowers left a comment

Choose a reason for hiding this comment

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

Approved.

@ccli8
Copy link
Contributor Author

ccli8 commented Oct 8, 2020

Update?

@0xc0170 0xc0170 merged commit f1e304b into ARMmbed:mbed-os-5.15 Oct 13, 2020
@mergify mergify bot removed the ready for merge label Oct 13, 2020
@ccli8 ccli8 deleted the nuvoton_m2351_gcc_iar_5.15 branch March 16, 2021 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants