-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Arm bare-metal target doc changes #124404
Changes from 5 commits
b0f7562
b173984
e6f0e03
a9022d4
fa6b90c
8cea4f3
de0c02c
fcaba9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# `thumbv6m-none-eabi` | ||
|
||
**Tier: 2** | ||
|
||
Bare-metal target for CPUs in the [ARMv6-M] architecture family, supporting a | ||
subset of the [T32 ISA][t32-isa]. | ||
|
||
Processors in this family include the: | ||
|
||
* [Arm Cortex-M0][cortex-m0] | ||
* [Arm Cortex-M0+][cortex-m0plus] | ||
* [Arm Cortex-M1][cortex-m1] | ||
|
||
See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all | ||
`arm-none-eabi` targets. | ||
|
||
This target uses the soft-float ABI: functions which take `f32` or `f64` as | ||
arguments will have those values packed into integer registers. This is the | ||
only option because there is no FPU support in [ARMv6-M]. | ||
|
||
[t32-isa]: https://developer.arm.com/Architectures/T32%20Instruction%20Set%20Architecture | ||
[ARMv6-M]: https://developer.arm.com/documentation/ddi0419/latest/ | ||
[cortex-m0]: https://developer.arm.com/Processors/Cortex-M0 | ||
[cortex-m0plus]: https://developer.arm.com/Processors/Cortex-M0+ | ||
[cortex-m1]: https://developer.arm.com/Processors/Cortex-M1 | ||
|
||
## Target maintainers | ||
|
||
* [Rust Embedded Devices Working Group Cortex-M | ||
Team](https://github.com/rust-embedded), `[email protected]` | ||
|
||
## Target CPU and Target Feature options | ||
|
||
See [the bare-metal Arm | ||
docs](arm-none-eabi.md#target-cpu-and-target-feature-options) for details on how | ||
to use these flags. | ||
|
||
### Table of supported CPUs | ||
|
||
| CPU | FPU | Target CPU | Target Features | | ||
| ---------- | --- | --------------- | --------------------- | | ||
| Cortex-M0 | No | `cortex-m0` | None | | ||
| Cortex-M0+ | No | `cortex-m0plus` | None | | ||
| Cortex-M1 | No | `cortex-m1` | None | | ||
|
||
### Arm Cortex-M0 | ||
|
||
The target CPU option is `cortex-m0`. | ||
|
||
There are no relevant feature flags, and the FPU is not available. | ||
|
||
### Arm Cortex-M0+ | ||
|
||
The target CPU option is `cortex-m0plus`. | ||
|
||
There are no relevant feature flags, and the FPU is not available. | ||
|
||
### Arm Cortex-M1 | ||
|
||
The target CPU option is `cortex-m1`. | ||
|
||
There are no relevant feature flags, and the FPU is not available. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# `thumbv7em-none-eabi` and `thumbv7em-none-eabihf` | ||
|
||
**Tier: 2** | ||
|
||
Bare-metal target for CPUs in the [ARMv7E-M] architecture family, supporting a | ||
subset of the [T32 ISA][t32-isa]. | ||
|
||
Processors in this family include the: | ||
|
||
* [Arm Cortex-M4][cortex-m4] and Arm Cortex-M4F | ||
* [Arm Cortex-M7][cortex-m7] and Arm Cortex-M7F | ||
|
||
See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all | ||
`arm-none-eabi` targets, in particular the difference between the `eabi` and | ||
`eabihf` ABI. | ||
|
||
[t32-isa]: https://developer.arm.com/Architectures/T32%20Instruction%20Set%20Architecture | ||
[ARMv7E-M]: https://developer.arm.com/documentation/ddi0403/latest/ | ||
[cortex-m4]: https://developer.arm.com/Processors/Cortex-M4 | ||
[cortex-m7]: https://developer.arm.com/Processors/Cortex-M7 | ||
|
||
## Target maintainers | ||
|
||
* [Rust Embedded Devices Working Group Cortex-M | ||
Team](https://github.com/rust-embedded), `[email protected]` | ||
|
||
## Target CPU and Target Feature options | ||
|
||
See [the bare-metal Arm | ||
docs](arm-none-eabi.md#target-cpu-and-target-feature-options) for details on how | ||
to use these flags. | ||
|
||
### Table of supported CPUs for `thumbv7em-none-eabi` | ||
|
||
| CPU | FPU | DSP | Target CPU | Target Features | | ||
| ---------- | --- | --- | ----------- | --------------- | | ||
| Any | No | Yes | None | None | | ||
| Cortex-M4 | No | Yes | `cortex-m4` | `+soft-float` | | ||
| Cortex-M4F | SP | Yes | `cortex-m4` | None | | ||
| Cortex-M7 | No | Yes | `cortex-m7` | `+soft-float` | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW this is a problematic piece of advice to give, since this target feature is also implicated in the soundness issue tracked at #116344. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although as we discussed extensively on Zulip currently we know of no other way of stopping This feature is totally unsound on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The target-feature checker is still WIP, and will be improved to handle this, somehow. But the docs maybe should call out that this same flag is unsound to use on other targets (until rustc reaches the point where it is able to tell users about this directly). |
||
| Cortex-M7F | SP | Yes | `cortex-m7` | `-fp64` | | ||
| Cortex-M7F | DP | Yes | `cortex-m7` | None | | ||
|
||
### Table of supported CPUs for `thumbv7em-none-eabihf` | ||
|
||
| CPU | FPU | DSP | Target CPU | Target Features | | ||
| ---------- | --- | --- | ----------- | --------------- | | ||
| Any | SP | Yes | None | None | | ||
| Cortex-M4F | SP | Yes | `cortex-m4` | None | | ||
| Cortex-M7F | SP | Yes | `cortex-m7` | `-fp64` | | ||
| Cortex-M7F | DP | Yes | `cortex-m7` | None | | ||
|
||
### Arm Cortex-M4 and Arm Cortex-M4F | ||
|
||
The target CPU is `cortex-m4`. | ||
|
||
* All Cortex-M4 have DSP extensions | ||
* support is controlled by the `dsp` *target-feature* | ||
* enabled by default with this *target* | ||
* Cortex-M4F has a single precision FPU | ||
* support is enabled by default with this *target-cpu* | ||
* disable support using the `+soft-float` feature (`eabi` only) | ||
|
||
### Arm Cortex-M7 and Arm Cortex-M7F | ||
|
||
The target CPU is `cortex-m7`. | ||
|
||
* All Cortex-M7 have DSP extensions | ||
* support is controlled by the `dsp` *target-feature* | ||
* enabled by default with this *target* | ||
* Cortex-M7F have either a single-precision or double-precision FPU | ||
* double-precision support is enabled by default with this *target-cpu* | ||
* opt-out by using the `-f64` *target-feature* | ||
* disable support entirely using the `+soft-float` feature (`eabi` only) |
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.
Arm