-
Notifications
You must be signed in to change notification settings - Fork 3k
Initial support for Cortex M-23/M-33 devices. #4875
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
Conversation
Look at travis failure, looks like there's assembly file not using uppercase suffix. Would this be easier if this patch would be split into two (generic M-23/M-33, and then nuvoton on top of it) ?
Will IAR 8.x help there? |
fe0fb0a
to
678e1e0
Compare
b535ded
to
4b68b5c
Compare
tools/profiles/debug.json
Outdated
@@ -42,7 +42,7 @@ | |||
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-On", "-r", "-DMBED_DEBUG", | |||
"-DMBED_TRAP_ERRORS_ENABLED=1"], | |||
"asm": [], | |||
"c": ["--vla"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why suddenly are not compatible ? This flag is only for C compiler ,thus should not cause any errors (we used to have it in common, and then I recall we faced an error with compatilibity , probably the same one you are seeing?) . See #1985 why it was enabled.
This commit should be a separate pull request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are correct. I tried using them in common location at *.json files and got errors. Will verify once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I was getting compilation issues with exporters when enabling "--c++", "--no_rtti", "--no_exceptions" flags in *.json files. Compile flags and exporter flags didn't seemed synchronized.
"--no_rtti", "--no_exceptions" - Not working with export tool. Enabling those flags directly in project settings work, but updating the template files didn't help as well. Verified now, the *.ewp file version for IAR8 is 3 and we are using version 2. Migration required.
Will remove this commit and add bug to mbed-os
platform/mbed_critical.c
Outdated
@@ -23,12 +23,6 @@ | |||
#include "platform/mbed_assert.h" | |||
#include "platform/mbed_toolchain.h" | |||
|
|||
#if !defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 , can this be send separately? Should be quick to integrate, and then just rebase your branch to get it in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #4902, will remove and rebase shortly
4b68b5c
to
c6eebfc
Compare
Can you elabore this dependency? What is expected to be delivered and who is taking an action item to do so? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tools changes look fine.
c6eebfc
to
070f88d
Compare
Rebased on top of #4902 |
@0xc0170 - I am looking into IAR changes with CMSIS team, but might get delayed due to vacation time. |
070f88d
to
98fcad6
Compare
Rebased on top of IAR_fix branch |
@@ -37,7 +37,8 @@ | |||
#define CTHUNK_ADDRESS 1 | |||
#define CTHUNK_VARIABLES volatile uint32_t code[2] | |||
|
|||
#if (defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7) || defined(__CORTEX_A9)) | |||
#if (defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7) || defined(__CORTEX_A9) \ | |||
|| defined(__CORTEX_M23) || defined(__CORTEX_M33)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? I would have guessed that the M23 needed to be aligned with the M0/P version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Armv8-M architecture reference manual has new term now for Thumb instructions. It says v8-M variant supports T32 instruction set and does not distinguish between mainline (M-33) and baseline (M-23) architecture.
All instructions are decoded as T32 (not as 16-bit Thumb has to be aligned to half word).
Also, callbacks in test were successful.
LGTM, waiting for IAR 8.x support, will tag this accordingly. |
98fcad6
to
586479b
Compare
586479b
to
43c8907
Compare
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild Prep failed! |
Looks like git fetch error from github
|
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
IAR license issue |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Testing Done, however as this has dependency on another PR, this will require rebase once that goes on, and retest again If we can (me or someone) do that rebase (push to your branch), would be good in case you are not around |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The irq_armv8mml
and etc. files were copied from CMSIS, but to file paths that are different than in upstream CMSIS. Please be sure to update any file path mapping scripts or documentation (cc @bulislaw)
tools/toolchains/gcc.py
Outdated
if target.core == "Cortex-M23" or target.core == "Cortex-M23-NS": | ||
self.cpu.append("-march=armv8-m.base") | ||
elif target.core == "Cortex-M33" or target.core == "Cortex-M33-NS": | ||
self.cpu.append("-march=armv8-m.main") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider adding:
self.cpu.append("-mcmse")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
platform/mbed_retarget.cpp
Outdated
@@ -884,6 +884,9 @@ extern "C" WEAK void __iar_file_Mtxinit(__iar_Rmtx *mutex) {} | |||
extern "C" WEAK void __iar_file_Mtxdst(__iar_Rmtx *mutex) {} | |||
extern "C" WEAK void __iar_file_Mtxlock(__iar_Rmtx *mutex) {} | |||
extern "C" WEAK void __iar_file_Mtxunlock(__iar_Rmtx *mutex) {} | |||
#if (__IAR_SYSTEMS_ICC__ >= 8) | |||
extern "C" WEAK void *__aeabi_read_tp (void) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is an empty implementation really sufficient? Do the TLS tests still pass with this empty implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLS (Thread local storage support) is not yet added to mbed-os
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
@Patater Could your review comments go on a separate PR that we get into RC2 ? |
2d8e199
to
9422c35
Compare
Rebased after IAR changes were merged |
/morph test |
@adbridge @bulislaw @deepikabhavnani Yes, the "file path mapping scripts and documentation" changes can go into a separate PR. Thanks! |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Added RTX + tools support for GCC only.
IAR 7.8 Cortex-23 does not support exclusive and secure commands. Move to IAR 8.0 requires changed in either Thread class or CMSIS (Ideal would be CMSIS). Hence dropping IAR in this PR
Required for : Rebased Nuvoton code for M2351 - PR #4892
Dependent on IAR 8.0 support