]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support/armv5te-none-eabi.md
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / src / doc / rustc / src / platform-support / armv5te-none-eabi.md
1 # `armv5te-none-eabi`
2
3 **Tier: 3**
4
5 Bare-metal target for any cpu in the ARMv5TE architecture family, supporting
6 ARM/Thumb code interworking (aka `a32`/`t32`), with `a32` code as the default code
7 generation.
8
9 The `thumbv5te-none-eabi` target is the same as this one, but the instruction set defaults to `t32`.
10
11 ## Target Maintainers
12
13 * [@QuinnPainter](https://github.com/QuinnPainter)
14
15 ## Requirements
16
17 The target is cross-compiled, and uses static linking.
18
19 By default, the `lld` linker included with Rust will be used.
20
21 However, you may want to use the `arm-none-eabi-ld` linker instead. This can be obtained for Windows/Mac/Linux from the [ARM
22 Developer Website][arm-dev], or possibly from your OS's package manager. To use it, add the following to your `.cargo/config.toml`:
23
24 ```toml
25 [target.armv5te-none-eabi]
26 linker = "arm-none-eabi-ld"
27 ```
28
29 [arm-dev]: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain
30
31 This target doesn't provide a linker script, you'll need to bring your own
32 according to the specific device you want to target. Pass
33 `-Clink-arg=-Tyour_script.ld` as a rustc argument to make the linker use
34 `your_script.ld` during linking.
35
36 ## Building Rust Programs
37
38 Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target.
39
40 Just use the `build-std` nightly cargo feature to build the `core` library. You
41 can pass this as a command line argument to cargo, or your `.cargo/config.toml`
42 file might include the following lines:
43
44 ```toml
45 [unstable]
46 build-std = ["core"]
47 ```
48
49 Most of `core` should work as expected, with the following notes:
50 * the target is "soft float", so `f32` and `f64` operations are emulated in
51   software.
52 * integer division is also emulated in software.
53 * the target is old enough that it doesn't have atomic instructions.
54
55 `alloc` is also supported, as long as you provide your own global allocator.
56
57 Rust programs are output as ELF files.
58
59 ## Testing
60
61 This is a cross-compiled target that you will need to emulate during testing.
62
63 Because this is a device-agnostic target, and the exact emulator that you'll
64 need depends on the specific device you want to run your code on.
65
66 For example, when programming for the DS, you can use one of the several available DS emulators, such as [melonDS](https://melonds.kuribo64.net/).