@@ -24,28 +24,46 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all
24
24
25
25
## Requirements
26
26
27
- All Armv7-A processors include an FPU (a VFPv3 or a VFPv4). The difference
28
- between the ` -eabi ` and ` -eabihf ` targets is whether the FPU is used for
29
- passing function arguments. You may prefer the ` -eabi ` soft-float target when
27
+ Almost all Armv7-A processors include an FPU (a VFPv3 or a VFPv4). The
28
+ difference between the ` -eabi ` and ` -eabihf ` targets is whether the FPU is
29
+ used for passing function arguments. You may prefer the ` -eabi ` soft-float
30
+ target when the processor does not have a floating point unit or the compiled
31
+ code should not use the floating point unit.
30
32
31
33
When using the hardfloat targets, the minimum floating-point features assumed
32
- are those of the ` vfpv3-d16 ` , which includes single- and double-precision,
33
- with 16 double-precision registers. This floating-point unit appears in
34
- Cortex-A8 and Cortex-A8 processors. See [ VFP in the Cortex-A processors] [ vfp ]
35
- for more details on the possible FPU variants.
34
+ are those of the VFPv3-D16 , which includes single- and double-precision, with
35
+ 16 double-precision registers. This floating-point unit appears in Cortex-A8
36
+ and Cortex-A9 processors. See [ VFP in the Cortex-A processors] [ vfp ] for more
37
+ details on the possible FPU variants.
36
38
37
39
If your processor supports a different set of floating-point features than the
38
- default expectations of ` vfpv3-d16 ` , then these should also be enabled or
40
+ default expectations of VFPv3-D16 , then these should also be enabled or
39
41
disabled as needed with ` -C target-feature=(+/-) ` .
40
42
43
+ In general, the following four combinations are possible:
44
+
45
+ - VFPv3-D16, target feature ` +vfp3 ` and ` -d32 `
46
+ - VFPv3-D32, target feature ` +vfp3 ` and ` +d32 `
47
+ - VFPv4-D16, target feature ` +vfp4 ` and ` -d32 `
48
+ - VFPv4-D32, target feature ` +vfp4 ` and ` +d32 `
49
+
50
+ An Armv7-A processor may optionally include a NEON hardware unit which
51
+ provides Single Instruction Multiple Data (SIMD) operations. The
52
+ implementation of this unit implies VFPv3-D32. The target feature ` +neon ` may
53
+ be added to inform the compiler about the availability of NEON.
54
+
55
+ You can refer to the [ arm-none-eabi] ( arm-none-eabi.md ) documentation for a
56
+ generic guide on target feature and target CPU specification and how to enable
57
+ and disable them via ` .cargo/config.toml ` file.
58
+
41
59
[ vfp ] : https://developer.arm.com/documentation/den0013/0400/Floating-Point/Floating-point-basics-and-the-IEEE-754-standard/ARM-VFP
42
60
43
61
## Start-up and Low-Level Code
44
62
45
63
The [ Rust Embedded Devices Working Group Arm Team] maintain the [ ` cortex-ar ` ]
46
64
and [ ` cortex-a-rt ` ] crates, which may be useful for writing bare-metal code
47
- using this target. Those crates include several examples which run in QEMU and
48
- build using these targets.
65
+ using this target. The [ ` cortex-ar ` repository ] ( https://github.com/rust-embedded/cortex-ar )
66
+ includes several examples which run in QEMU and build using these targets.
49
67
50
68
[ `cortex-ar` ] : https://docs.rs/cortex-ar
51
69
[ `cortex-a-rt` ] : https://docs.rs/cortex-a-rt
0 commit comments