Skip to main content.

GNU Toolchain for ARC

The most recent release of pre-built GNU tools for ARC could be obtained from here - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases.

At the moment the most recent version is arc-2014.12.

Available are 4 flavors of uClibc GNU toolchains for ARC:

Important notes

  1. Only uClibc toolchain could be used for building U-Boot because elf32 version doesn't support linkage of Position Independent Executables (-pie).
  2. Pre-built tools are compatible with 64-bit hosts only, if one needs to run it on 32-bit host then toolchain could be built on 32-bit host with whether scripts from https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/tree/arc-2014.12 or with up to date Buildroot.
  3. RedHat/!CentOS 5.x uses earlier version of glibc and thus is not-compatible with pre-built toolchain.
  4. From U-Boot v2015.04rc2 on libc is built in U-Boot itself. This allows to use either uClibc toolchain for ARC (be it liitle- or big-endian, for ARCompact or ARCv2) for U-Boot building. This is because gcc itself in all ARC toolchains may generate code for any ARC core. The only significant difference between toolchains is pre-built libs that could be linked in resulting executable. Now we don't rely on anything pre-built so any toolchain will work.

Run U-Boot on ARC with MetaWare debugger

This U-Boot version is linked as position-independent executable (POE) which is required for normal operation of this bootloader. Unfortunately even the most recent version of MetaWare debugger cannot work with POE executables.

That's why it's required to modify u-boot elf to fake MDB.

Note that after this modification all debug information will be stripped from elf.

Starting from U-Boot v2015.04rc1 all written above could be made by executing a special make target "mdbtrick" like this:

 make mdbtrick

If you're going to use u-boot.bin image for loading it directly in memory note that it must be loaded in memory starting from CONFIG_SYS_TEXT_BASE and then set PC to the same address.

ARC custodian tips

Repo URL: ssh://gu-arc@git.denx.de/u-boot-arc