Downloading and Installing ARM Cross Toolchain on Linux Systems

Three methods for downloading and installing the ARM cross toolchain on Linux systems.

Method 1: Install via Package Manager (for Debian/Ubuntu)

1.Update package list

sudo apt update

2.Install the ARM cross toolchain

oFor ARM 32-bit architecture (e.g., Cortex-A series):

sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf

oFor ARM bare-metal development (e.g., Cortex-M series):

sudo apt install gcc-arm-none-eabi g++-arm-none-eabi

oFor ARM 64-bit architecture (AArch64):

sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

3.Verify installation

arm-linux-gnueabihf-gcc –version # 32-bit toolchain arm-none-eabi-gcc –version # Bare-metal toolchain aarch64-linux-gnu-gcc –version # 64-bit toolchain

Method 2: Manually Download Precompiled Toolchain

1.Visit the official ARM toolchain pageOpen your browser and go to the ARM GNU Toolchain download page

https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Downloading and Installing ARM Cross Toolchain on Linux Systems

2.Select toolchain version

oSelect based on target architecture:

§AArch32 (32-bit ARM):Select ARM Cortex-A & Cortex-R

§AArch64 (64-bit ARM):Select ARM Cortex-A

§Bare-metal development (e.g., microcontrollers):Select Bare-metal targetDownloading and Installing ARM Cross Toolchain on Linux Systems

3.Download the toolchain

oFor example, download the AArch32 toolchain for 64-bit Linux host:

wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz

4.Extract the toolchain

tar -xf arm-gnu-toolchain-*.tar.xz -C ~/ # Extract to user directory

5.Configure environment variables

oEdit ~/.bashrc or ~/.bash_profile

echo ‘export PATH=”$HOME/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi/bin:$PATH”‘ >> ~/.bashrc

oMake the configuration effective:

source ~/.bashrc

6.Verify installation

arm-none-eabi-gcc –version

Method 3: Using Linaro Toolchain (for ARM Linux Development)

1.Visit the Linaro download pageGo to Linaro Releases

2.Select version and architecture

oFor example, select aarch64-linux-gnu and the latest version.

https://releases.linaro.org/components/toolchain/binaries/

Downloading and Installing ARM Cross Toolchain on Linux Systems

3.Download and extract

wget https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz tar -xf gcc-linaro-*.tar.xz -C ~/

4.Configure environment variables

echo ‘export PATH=”$HOME/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin:$PATH”‘ >> ~/.bashrc

source ~/.bashrc

5.Verify installation

aarch64-linux-gnu-gcc –version

Common Issues

1.Permission issues:If extracting to system directories (e.g., /opt), you may need to use sudo

2.Missing dependencies:If you encounter errors during execution, try installing the required libraries:

sudo apt install libncurses5 libstdc++6

Leave a Comment