Skip to content

Synopsys ARC Processors and GNU Toolchains for Them

Yuriy Kolerov edited this page Jun 6, 2023 · 10 revisions

Synopsys ARC Processors

Synopsys ARC processors are represented by three generations of Instruction Set Architectures (ISA). Each ISA consists of one or more processor families with different microarchitectures. All cores may be configured to support little or big endianness. All families except ARC EM family may be configured to support running complex operation systems like Linux. Some of them are listed here:

  1. ARCv1 ISA:

  2. ARCv2 ISA:

  3. ARCv3 ISA:

You can find programmer's reference manuals and datasheets for each core on corresponding web pages.

Toolchains for Baremetal Targets

GNU toolchains for ARC processors consist of GCC, Binutils and GDB. Newlib standard library is used for building baremetal applications. This table depicts which GCC driver should be used depending on ISA:

ISA Driver/Triplet
ARCv1 arc-elf32-gcc
ARCv2 arc-elf32-gcc
ARCv3 arc64-elf-gcc

In addition to the common options, GCC also supports a set of -m<value> target specific options. Each of them configures a particular feature or an extension. For example, -mno-code-density option disables generating code density instructions.

-mcpu=<core> selects a particular ISA and CPU family and enables/disables a set of other -m options. Each -mcpu value leads to linking with a prebuilt library which corresponds to this particular -mcpu=<value> and is built using this -mcpu=<value>.

For example, option combination -mcpu=em4 -mno-code-density will generate code that doesn't use code density instructions, however it will be linked with standard library that has been built with just -mcpu=em4, which uses code density instructions - therefore a final application still may use code density instructions.

Values of -mcpu for ARC HS Family

-mcpu= -mdiv-rem -matomic -mll64 -mmpy-option= -mfpu=
hs Y
hs34 Y mpy
archs Y Y Y mpy
hs38 Y Y Y plus_qmacw
hs4x Y Y Y plus_qmacw
hs4xd Y Y Y plus_qmacw
hs38_linux Y Y Y plus_qmacw fpud_all

Values of -mcpu for ARC EM Family

-mcpu -mcode-density -mnorm -mswap -mbarrel-shifter -mdiv-rem -mmpy-option= -mfpu= -mrf16
em
em_mini Y
em4 Y Y
arcem Y Y wlh1 Y
em4_dmips Y Y Y Y Y wlh1 Y
em4_fpus Y Y Y Y Y wlh1 fpus Y
em4_fpuda Y Y Y Y Y wlh1 fpuda Y
Clone this wiki locally