-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add target for Big-endian ARM Cortex-R4F/R5F MCUs #50813
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
The ARM Real-Time (‘R’) profile provides high-performing processors for safety-critical environments.
(rust_highfive has picked a reviewer for you, use r? to override) |
ENV TARGET=armebv7r-none-eabihf | ||
|
||
ENV CC_armebv7r_none_eabihf=armeb-eabi-gcc \ | ||
CFLAGS_armebv7r_none_eabihf="-mthumb -march=armv7-r" |
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.
To match this rust target, you want -marm
instead of -mthumb
.
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.
Cortex-R has ARM+Thumb instruction (dual mode). Wake-up in ARM mode and can use Thumb instr. So here armv7-r
select ARM mode, -mthumb
extend support for Thumb.
The same logic also in LLVM: the triple armebv7r-none-eabihf
and the feature +thumb2
.
This is a working Makefile that use -mthumb -march=armv7-r
and this a working JSON.
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.
Yes, that's correct, it supports Arm and Thumb state. The question is what you want the default for this target to be? -mthumb
and +thumb2
are not equivalent, +thumb2
does nothing because it's already Armv7. -mthumb
is equivalent to using llvm_target thumbebv7r-none-eabihf
or adding +thumb-mode
to armebv7r-none-eabihf
.
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.
Ahh ok. Default shall be Arm. I'll move to -marm
removing +thumb2
too.
I'll test again on target (TI TMS570LS3137) in the afternoon. Thanks.
To confirm, we've matched naming so far sort of with Debian but otherwise just tried to find preexisting conventions to name targets. In that sense, there's precedent for this name? |
- remove +thumb2 that has not effect - remove -mthumb Tested on TMS570LS3137
Updated with comments from @parched |
@bors: r+ |
📌 Commit 4897093 has been approved by |
Add target for Big-endian ARM Cortex-R4F/R5F MCUs The ARM Real-Time (‘R’) profile provides high-performing processors for safety-critical environments. Cortex-R has ARM, Thumb instruction whereas Cortex-M makes use of Thumb only. CI/Dockerfile is intentionally in the `disabled` folder.
☀️ Test successful - status-appveyor, status-travis |
The ARM Real-Time (‘R’) profile provides high-performing processors for safety-critical environments.
Cortex-R has ARM, Thumb instruction whereas Cortex-M makes use of Thumb only.
CI/Dockerfile is intentionally in the
disabled
folder.