Skip to content

Commit 1fb1805

Browse files
committed
Update the gcc baremetal cross-compile instructions
1 parent a69828b commit 1fb1805

1 file changed

Lines changed: 35 additions & 6 deletions

File tree

content/install-guides/gcc/cross.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,55 @@ Software can be compiled on an `x86` or `Arm` host machine.
3434

3535
## How do I download a GCC cross compiler targeting Arm?
3636

37-
The Linux package manager will download the required files so there are no special download instructions.
37+
For the Linux cross-compilers targeting 32-bit and 64-bit Linux applications (`arm-linux-gnueabihf` and `aarch64-linux-gnu`), the Linux package manager downloads the required files.
38+
39+
For the bare-metal cross-compiler (`arm-none-eabi`), Arm no longer publishes new releases through Debian or Ubuntu package repositories. To get the latest version, download it directly from the [Arm GNU Toolchain downloads page](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads).
3840

3941
## How do I install a GCC cross compiler on Linux?
4042

4143
You can install a GCC cross compiler with Arm as a target architecture using Linux package managers.
4244

4345
### Installing on Debian based distributions such as Ubuntu
4446

45-
Use the `apt` command to install software packages on any Debian based Linux distribution.
47+
Use the `apt` command to install the cross-compilers for 32-bit and 64-bit Linux targets.
4648

4749
```bash { target="ubuntu:latest" }
4850
sudo apt update
49-
sudo apt install gcc-arm-none-eabi -y
5051
sudo apt install gcc-arm-linux-gnueabihf -y
5152
sudo apt install gcc-aarch64-linux-gnu -y
5253
```
5354

55+
These packages are maintained by Canonical and the GCC version you receive is tied to your Ubuntu release (for example, GCC 13 on Ubuntu 24.04 LTS, GCC 15 on Ubuntu 25.10). This is normal Ubuntu packaging behaviour and is not the same issue as with `arm-none-eabi`.
56+
57+
For the bare-metal cross-compiler (`arm-none-eabi`), Arm no longer publishes new releases to Debian or Ubuntu package repositories. The version available through `apt` is older and may not include support for recent Arm cores or architecture features.
58+
59+
To install the latest `arm-none-eabi` toolchain (15.2.Rel1), download the pre-built tarball for your host architecture from the [Arm GNU Toolchain downloads page](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads). Extract the archive and add the `bin` directory to your `PATH`.
60+
61+
On an `aarch64` host:
62+
63+
```bash
64+
wget https://developer.arm.com/-/media/Files/downloads/gnu/15.2.rel1/binrel/arm-gnu-toolchain-15.2.rel1-aarch64-arm-none-eabi.tar.xz
65+
tar -xJf arm-gnu-toolchain-15.2.rel1-aarch64-arm-none-eabi.tar.xz
66+
export PATH="$HOME/arm-gnu-toolchain-15.2.rel1-aarch64-arm-none-eabi/bin:$PATH"
67+
```
68+
69+
On an `x86_64` host:
70+
71+
```bash
72+
wget https://developer.arm.com/-/media/Files/downloads/gnu/15.2.rel1/binrel/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi.tar.xz
73+
tar -xJf arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi.tar.xz
74+
export PATH="$HOME/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi/bin:$PATH"
75+
```
76+
77+
The commands above extract the toolchain into the current directory. Move the folder to a permanent location such as `$HOME` first if you'd like a stable install path.
78+
79+
To make the change permanent, add the `export` line to your shell profile such as `~/.bashrc` or `~/.profile`.
80+
5481
### Installing on Fedora
5582

56-
Fedora uses the `dnf` package manager.
83+
Fedora uses the `dnf` package manager. The `arm-none-eabi-gcc-cs` package in current Fedora releases (42 and later) tracks the latest GCC release closely.
5784

58-
To install the most common development tools use the commands below.
85+
If you're on RHEL, CentOS, or another EPEL-based distribution, the available version may be older. In that case, download the latest toolchain directly from the [Arm GNU Toolchain downloads page](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) and follow the manual extraction steps described in the Ubuntu section above.
5986

6087
- If the machine has `sudo` you can use it:
6188

@@ -79,12 +106,14 @@ To install the most common development tools use the commands below.
79106

80107
## How do I install a GCC cross compiler on macOS?
81108

82-
You can install a GCC cross compiler with Arm as a target architecture using Homebrew, a package manager for macOS (and Linux).
109+
You can install a GCC cross compiler with Arm as a target architecture using Homebrew, a package manager for macOS (and Linux). The Homebrew formula tracks the latest GCC release and provides pre-built bottles for Apple Silicon.
83110

84111
```console
85112
brew install arm-none-eabi-gcc
86113
```
87114

115+
Alternatively, Arm provides an official `.pkg` installer for macOS on Apple Silicon. Download the latest version from the [Arm GNU Toolchain downloads page](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) and run it to install the toolchain to `/Applications/ArmGNUToolchain/`.
116+
88117
## Setting up product license {#license}
89118

90119
GCC is open source and freely available for use.

0 commit comments

Comments
 (0)