You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/doc/rustc/src/platform-support/armv7a-vex-v5.md
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
Allows compiling user programs for the [VEX V5 Brain](https://www.vexrobotics.com/276-4810.html), a microcontroller for educational and competitive robotics.
6
6
7
-
Rust support for this target is not affiliated with VEX Robotics or IFI.
7
+
Rust support for this target is not affiliated with VEX Robotics or IFI, and does not link to any official VEX SDK.
8
8
9
9
## Target maintainers
10
10
@@ -17,22 +17,32 @@ This target is maintained by members of the [vexide](https://github.com/vexide)
17
17
18
18
## Requirements
19
19
20
-
This target is cross-compiled and currently requires `#![no_std]`. Dynamic linking is unsupported.
20
+
This target is cross-compiled. Dynamic linking is unsupported.
21
+
22
+
`#![no_std]` crates can be built using `build-std` to build `core` and `panic_abort` and optionally `alloc`. Unwinding panics are not yet supported on this target.
23
+
24
+
`std` has only partial support due platform limitations. Notably:
25
+
-`std::process` and `std::net` are unimplemented. `std::thread` only supports sleeping and yielding, as this is a single-threaded environment.
26
+
-`std::time` has full support for `Instant`, but no support for `SystemTime`.
27
+
-`std::io` has full support for `stdin`/`stdout`/`stderr`. `stdout` and `stderr` both write to to USB channel 1 on this platform and are not differentiated.
28
+
-`std::fs`, has limited support for reading or writing to files. Directory operations, file deletion, and some file opening features are unsupported and will return errors.
29
+
- A global allocator is provided and implemented on top of `dlmalloc`.
30
+
- Modules that do not need to interact with the OS beyond allocation, such as `std::collections`, `std::hash`, `std::future`, `std::sync`, etc are fully supported.
31
+
- Random number generation is insecure, as there is no reliable source of entropy on this platform.
32
+
33
+
In order to support some APIs, users are expected to provide a supporting runtime SDK for `libstd` to link against. This library may be provided either by [`vex-sdk-build`](https://github.com/vexide/vex-sdk/tree/main/packages/vex-sdk-build) (which will download an official SDK from VEX) or through an open-source implementation such as [`vex-sdk-jumptable`](https://crates.io/crates/vex-sdk-jumptable).
21
34
22
35
When compiling for this target, the "C" calling convention maps to AAPCS with VFP registers (hard float ABI) and the "system" calling convention maps to AAPCS without VFP registers (soft float ABI).
23
36
24
-
This target generates binaries in the ELF format that may uploaded to the brain with external tools.
37
+
This target generates binaries in the ELF format that may be uploaded to the brain with external tools.
25
38
26
39
## Building the target
27
40
28
41
You can build Rust with support for this target by adding it to the `target` list in `bootstrap.toml`, and then running `./x build --target armv7a-vex-v5 compiler`.
29
42
30
43
## Building Rust programs
31
44
32
-
Rust does not yet ship pre-compiled artifacts for this target. To compile for
33
-
this target, you will either need to build Rust with the target enabled (see
34
-
"Building the target" above), or build your own copy of `core` by using
35
-
`build-std` or similar.
45
+
Rust does not yet ship pre-compiled artifacts for this target. To compile for this target, you will either need to build Rust with the target enabled (see "Building the target" above), or build your own copy of `core` by using `build-std` or similar.
36
46
37
47
When the compiler builds a binary, an ELF build artifact will be produced. Additional tools are required for this artifact to be recognizable to VEXos as a user program.
0 commit comments