Toolchains for ARC Processors¶
System Requirements¶
GNU toolchain for ARC has the same standard prerequisites as an upstream GNU toolchain as documented in the GNU toolchain user guide or on the GCC website.
Prebuilt toolchain on the release page are supported on these systems for x86-64 targets:
- Ubuntu 22.04
- RedHat Enterprise Linux (RHEL) 8.x and compatible alternatives
- Windows 11
Note that the TCF wrapper and the Buildlib tool are not supported for Windows hosts.
The Buildlib tool tool has extra requirements:
-
Python 3.8 or higher is required. The default RedHat 8.x setup does not meet this requirement. You can install it using
dnfand then usepython3.8for running the Buildlib script: -
Meson 0.61 is or higher required. The default RedHat 8.x setup does not meet this requirement. You can install it in a user environment using
pip3:Then reboot the system or logout and login again.
Toolchains for Baremetal Targets¶
GNU toolchains for baremetal ARC targets consist of GCC, Binutils, GDB and a standard library. There are two versions of baremetal toolchain with different standard libraries: Picolibc and Newlib. There is a separate page for ARC Classic toolchain with Picolibc since it's still under development.
ARCompact, ARCv2 and ARCv3 families are supported for ARC Classic targets. GNU toolchain for ARC-V targets supports all ARC-V families:
- Tuning GCC instruction scheduling for RMX-100, RMX-500, RHX-100 and RPX-100.
- Includes optimized sets of libraries for basic profiles for RMX-100, RMX-500, RHX-100 and RPX-100.
- Enabling ARC-V caches on startup.
This table depicts which GCC driver should be used depending on ISA:
| ISA | Driver/Triplet | Driver/Triplet (alias) | Families | Endianness |
|---|---|---|---|---|
| ARC-V | riscv64-snps-elf |
- | RMX, RHX, RPX | Little |
| ARCv3 | arc64-elf-gcc |
arc64-snps-elf-gcc |
ARC HS6x, ARC HS5x | Little1 |
| ARCv2 | arc-elf32-gcc |
arc-snps-elf-gcc |
ARC HS, ARC EM | Little |
| ARCv2 | arceb-elf32-gcc |
arceb-snps-elf-gcc |
ARC HS, ARC EM | Big |
| ARCompact | arc-elf32-gcc |
arc-snps-elf-gcc |
ARC 700, ARC 600 | Little |
| ARCompact | arceb-elf32-gcc |
arceb-snps-elf-gcc |
ARC 700, ARC 600 | Big |
Note that binaries for both ARCv1 and ARCv2 may be built using a single arc-elf32-gcc driver. It means
that there is a single toolchain for two ISAs.
Prebuilt toolchains for ARCv3 families on
the release page
are configured with arc64-elf- prefix only and work both with HS5x and HS6x
families. However, you can configure the toolchain for HS5x with arc32-elf- prefix using
Crosstool-NG
configuration menu.
Toolchains for Linux Targets for ARC Classic¶
There is a set of GNU toolchains for ARC Classic processors which allow to build and debug applications for Linux. The Linux kernel itself for ARC Classic processors may be built using both baremetal and Linux toolchains.
Linux toolchains are presented for all ARC processor families except ARC EM and ARC 600. Two Linux standard libraries are currently supported: glibc and uClibc-ng. This table depicts which GCC driver should be used depending on CPU family:
| Family | Standard library | Driver/Triplet |
|---|---|---|
| ARC 700 | glibc | arc-linux-gnu-gcc |
| ARC 700 | uClibc-ng | arc-linux-uclibc-gcc |
| ARC HS3x/4x | glibc | arc-linux-gnu-gcc |
| ARC HS3x/4x | uClibc-ng | arc-linux-uclibc-gcc |
| ARC HS5x | uClibc-ng | arc32-linux-uclibc-gcc |
| ARC HS6x | glibc | arc64-linux-gnu-gcc |
Note, that in case of Linux toolchains, arc-linux-* drivers for ARC 700 and ARC HS are
different toolchains! For example, if you want to build applications for ARC 700 Linux targets,
then you need to use a particular toolchain for ARC 700 and the same is applicable for ARC HS,
though they have the same names.
Native Toolchains for Linux Targets for ARC Classic¶
Native toolchains are toolchains that can be used on the targets Linux system natively. Here is a list of native toolchains which are available on a release page:
| Family | Standard library | Driver/Triplet |
|---|---|---|
| ARC HS3x/4x | glibc | arc-linux-gnu-gcc |
| ARC HS5x | uClibc-ng | arc32-linux-uclibc-gcc |
| ARC HS6x | glibc | arc64-linux-gnu-gcc |
Eclipse IDE Package¶
Eclipse IDE bundle is also available on a release page. The bundle may contains different components depending on the host platform:
| Component | Linux | Windows |
|---|---|---|
| Installer | ❌ | ✅ |
| ARCompact/ARCv2 baremetal toolchain (little endian) | ✅ | ✅ |
| ARCompact/ARCv2 baremetal toolchain (big endian) | ✅ | ✅ |
| ARCv2 Linux uClibc toolchain (little endian) | ✅ | ❌ |
| ARCv2 Linux uClibc toolchain (big endian) | ✅ | ❌ |
| OpenOCD | ✅ | ✅ |
| Eclipse IDE | ✅ | ✅ |
Linux toolchains are not included in the bundle for Windows because they are not supported by case-insensitive file systems.
Also, there is no an installer for Linux hosts - the bundle may be extracted and
used anywhere in a file system. Add <ide>/bin directory to PATH variable
to make all toolchain binaries available. Eclipse IDE may be launched by
<ide>/eclipse/eclipse binary.
How to Get The Toolchain¶
There are several ways of getting the toolchain:
- Download the latest release of the prebuilt toolchain on the release page of main toolchain's repository. Also, Eclipse IDE is available for downloading which is shipped with some of toolchains and OpenOCD.
- You can build toolchains using Crosstool-NG build system. Follow instructions presented in
README.mdof main toolchain's repository on GitHub.
Resources¶
Because the ARC toolchains are built on top of standard components such as GCC, Binutils, and GDB, all functionality of these tools stays in place and can be studied in detail in the corresponding manuals:
-
Big endian targets are not supported by GNU toolchain for ARCv3. ↩