11# Arm Linux support in Rust
22
33The Arm Architecture has been around since the mid-1980s, going through nine
4- major revisions, many minor revisions, and spanning both 32-bith and 64-bit
4+ major revisions, many minor revisions, and spanning both 32-bit and 64-bit
55architectures. This page covers 32-bit Arm platforms that run some form of
66Linux (but not Android). Those targets are:
77
@@ -49,7 +49,7 @@ The architecture component simply called `arm` corresponds to the Armv6
4949architecture - that is, version 6 of the Arm Architecture as defined in
5050version 6 of the Arm Architecture Reference Manual (the Arm ARM). This was the
5151last 'legacy' release of the Arm architecture, before they split into
52- Application, Real-Time and Microcontroller profiles (leading to Armv7-A,
52+ Application, Real-Time, and Microcontroller profiles (leading to Armv7-A,
5353Armv7-R and Armv7-M). Processors that implement the Armv6 architecture include
5454the ARM1176JZF-S, as found in BCM2835 SoC that powers the Raspberry Pi Zero.
5555Arm processors are generally fairly backwards compatible, especially for
@@ -59,7 +59,7 @@ on newer ARMv7-A systems, or even 64/32-bit Armv8-A systems.
5959The ` armeb ` architecture component specifies an Armv6 processor running in Big
6060Endian mode (` eb ` is for big-endian - the letters are backwards because
6161engineers used to little-endian systems perceive big-endian numbers to be
62- written into memory backwards, and they thought it was funnier like that).
62+ written into memory backwards, and they thought it was funny like that).
6363Most Arm processors can operate in either little-endian or big-endian mode and
6464little-endian mode is by far the most common. However, if for whatever reason
6565you wish to store your Most Significant Bytes first, these targets are
@@ -70,7 +70,7 @@ Targets that start with `armv4t` are for processors implementing the Armv4T
7070architecture from 1994. These include the ARM7TDMI, as found in the Nokia 6110
7171brick-phone and the Game Boy Advance. The 'T' stands for * Thumb* and indicate
7272that the processors can execute smaller 16-bit versions of some of the 32-bit
73- Arm instructions. Because a Thumb is like a small version of an Arm.
73+ Arm instructions. This is because a Thumb is like a small version of an Arm.
7474
7575Targets that start with ` armv5te ` are for processors implementing the Armv5TE
7676architecture. These are mostly from the ARM9 family, like the ARM946E-S found
@@ -111,11 +111,11 @@ The `gnueabi` ABI component indicates support for using the GNU C Library
111111(glibc), and the Arm Embedded ABI (EABI). The EABI is a replacement for the
112112original ABI (now called the Old ABI or OABI), and it is the standard ABI for
11311332-bit Arm systems. With this ABI, function parameters that are ` f32 ` or ` f64 `
114- are passed as if they were integers, instead of being passed via in FPU
115- registers. Generally these targets also disable the use of the FPU entirely,
114+ are passed as if they were integers, instead of being passed in FPU
115+ registers. Generally, these targets also disable the use of the FPU entirely,
116116although that isn't always true.
117117
118- The ` gnueabihf ` ABI component is like ` gnueabi ` , except that it support the
118+ The ` gnueabihf ` ABI component is like ` gnueabi ` , except that it supports the
119119'hard-float' of the EABI. That is, function parameters that are ` f32 ` or ` f64 `
120120are passed in FPU registers. Naturally, this makes the FPU mandatory.
121121
@@ -147,15 +147,15 @@ the Arm architecture, and more importantly, knows where to find a suitable C
147147Library to link against.
148148
149149To do that, you can add the ` linker ` property to your ` .cargo/config.toml ` .
150- Typically you would refer to a suitable copy of GCC that has built as a
150+ Typically, you would refer to a suitable copy of GCC that was built as a
151151cross-compiler, alongside a C library.
152152
153153``` toml
154154[target .arm-unknown-linux-gnueabi ]
155155linker = " arm-linux-gnueabi-gcc"
156156```
157157
158- On Debian Linux , you could install such a cross-compilation toolchain with
158+ On Debian, you could install such a cross-compilation toolchain with
159159` apt install gcc-arm-linux-gnueabi ` . For more exotic combinations, you might
160160need to build a bespoke version of GCC using [ crosstool-ng] .
161161
0 commit comments