How To Install gcc-arm-none-eabi on Ubuntu 20.04

In this tutorial we learn how to install gcc-arm-none-eabi on Ubuntu 20.04. gcc-arm-none-eabi is GCC cross compiler for ARM Cortex-R/M processors

Introduction

In this tutorial we learn how to install gcc-arm-none-eabi on Ubuntu 20.04.

What is gcc-arm-none-eabi

gcc-arm-none-eabi is:

Bare metal C and C++ compiler for embedded ARM chips using Cortex-M, and Cortex-R processors. This package is based on the GNU ARM toolchain provided by ARM.

There are three methods to install gcc-arm-none-eabi on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install gcc-arm-none-eabi Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install gcc-arm-none-eabi using apt-get by running the following command:

sudo apt-get -y install gcc-arm-none-eabi

Install gcc-arm-none-eabi Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install gcc-arm-none-eabi using apt by running the following command:

sudo apt -y install gcc-arm-none-eabi

Install gcc-arm-none-eabi Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install gcc-arm-none-eabi using aptitude by running the following command:

sudo aptitude -y install gcc-arm-none-eabi

How To Uninstall gcc-arm-none-eabi on Ubuntu 20.04

To uninstall only the gcc-arm-none-eabi package we can use the following command:

sudo apt-get remove gcc-arm-none-eabi

Uninstall gcc-arm-none-eabi And Its Dependencies

To uninstall gcc-arm-none-eabi and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove gcc-arm-none-eabi

Remove gcc-arm-none-eabi Configurations and Data

To remove gcc-arm-none-eabi configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge gcc-arm-none-eabi

Remove gcc-arm-none-eabi configuration, data, and all of its dependencies

We can use the following command to remove gcc-arm-none-eabi configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge gcc-arm-none-eabi

References

Summary

In this tutorial we learn how to install gcc-arm-none-eabi package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.