The recommended method is via xpm.

Overview

The xPack GNU RISC-V Embedded GCC can be installed automatically, via xpm (the recommended method), or manually, by downloading and unpacking one of the portable archives.

Easy install

The easiest way to install GNU RISC-V Embedded GCC is by using the binary xPack, available as @xpack-dev-tools/riscv-none-embed-gcc from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

$ xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest --verbose

This command will always install the latest available version, in the central xPacks repository, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

The archive content is unpacked in a folder named .content. On some platforms this might be hidden for normal browsing, and require separate options (like ls -A) or, in file browsers, to enable configurations like Show Hidden Files.

xPacks aware tools, like the Eclipse Embedded CDT plug-ins automatically identify binaries installed with xpm and provide a convenient method to manage paths.

Uninstall

To remove the installed xPack, the command is similar:

$ xpm uninstall --global @xpack-dev-tools/riscv-none-embed-gcc --verbose

Test

To check if the xpm installed GCC starts, use something like:

C:\>%USERPROFILE%\AppData\Roaming\xPacks\@xpack-dev-tools\riscv-none-embed-gcc\8.2.1-3.1.1\.content\bin\riscv-none-embed-gcc.exe" --version
riscv-none-embed-gcc (xPack GNU RISC-V Embedded GCC, 64-bit) 8.2.1

Manual install

For all platforms, the xPack GNU RISC-V Embedded GCC binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases page.

Download

The Windows versions of xPack GNU RISC-V Embedded GCC are packed as ZIP files. Download the latest version named like:

  • xpack-riscv-none-embed-gcc-8.2.1-3.1-win32-x64.zip
  • xpack-riscv-none-embed-gcc-8.2.1-3.1-win32-x32.zip

Select the -x64 file for 64-bit Windows machines and the -x32 file for 32-bit Windows machines.

Unpack

Unpack the archive and copy it into the %USERPROFILE%\AppData\Roaming\xPacks\riscv-none-embed-gcc (for example C:\Users\ilg\AppData\Roaming\xPacks\riscv-none-embed-gcc) folder; according to Microsoft, AppData\Roaming is the recommended location for installing user specific packages.

Test

To check if the manually installed GCC starts, use something like:

C:\>%USERPROFILE%\AppData\Roaming\xPacks\riscv-none-embed-gcc\xpack-riscv-none-embed-gcc-8.2.1-3.1\bin\riscv-none-embed-gcc.exe" --version
riscv-none-embed-gcc (xPack GNU RISC-V Embedded GCC, 64-bit) 8.2.1

Easy install

The easiest way to install GNU RISC-V Embedded GCC is by using the binary xPack, available as @xpack-dev-tools/riscv-none-embed-gcc from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

$ xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest --verbose

This command will always install the latest available version, in the central xPacks repository, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

The archive content is unpacked in a folder named .content. On some platforms this might be hidden for normal browsing, and require separate options (like ls -A) or, in file browsers, to enable configurations like Show Hidden Files.

xPacks aware tools, like the Eclipse Embedded CDT plug-ins automatically identify binaries installed with xpm and provide a convenient method to manage paths.

Uninstall

To remove the installed xPack, the command is similar:

$ xpm uninstall --global @xpack-dev-tools/riscv-none-embed-gcc --verbose

Test

To check if the xpm installed GCC starts, use something like:

$ ~/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/8.2.1-3.1.1/.content/bin/riscv-none-embed-gcc --version
riscv-none-embed-gcc (xPack GNU RISC-V Embedded GCC, 64-bit) 8.2.1

Manual install

For all platforms, the xPack GNU RISC-V Embedded GCC binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases page.

Download

The macOS version of xPack GNU RISC-V Embedded GCC is packed as a .tar.gz archive. Download the latest version named like:

xpack-riscv-none-embed-gcc-8.2.1-3.1-darwin-x64.tgz

Unpack

To install GNU RISC-V Embedded GCC, unpack the archive and copy it to /${HOME}/opt/xPacks/riscv-none-embed-gcc/<version>:

$ mkdir -p ~/opt
$ cd ~/opt

$ tar xvf ~/Downloads/xpack-riscv-none-embed-gcc-8.2.1-3.1-darwin-x64.tgz
$ chmod -R -w xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1

The result is a structure like:

$ tree -L 2 /Users/ilg/opt/xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1
/Users/ilg/opt/xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1/
├── README.md
├── bin
│   ├── libexpat.1.6.7.dylib
│   ├── libexpat.1.dylib -> libexpat.1.6.7.dylib
│   ├── libgcc_s.1.dylib
│   ├── libgmp.10.dylib
│   ├── libiconv.2.dylib
│   ├── liblzma.5.dylib
│   ├── libmpfr.4.dylib
│   ├── libz.1.2.8.dylib
│   ├── libz.1.dylib -> libz.1.2.8.dylib
│   ├── riscv-none-embed-addr2line
│   ├── riscv-none-embed-ar
│   ├── riscv-none-embed-as
│   ├── riscv-none-embed-c++
│   ├── riscv-none-embed-c++filt
│   ├── riscv-none-embed-cpp
│   ├── riscv-none-embed-elfedit
│   ├── riscv-none-embed-g++
│   ├── riscv-none-embed-gcc
│   ├── riscv-none-embed-gcc-8.2.1
│   ├── riscv-none-embed-gcc-ar
│   ├── riscv-none-embed-gcc-nm
│   ├── riscv-none-embed-gcc-ranlib
│   ├── riscv-none-embed-gcov
│   ├── riscv-none-embed-gcov-dump
│   ├── riscv-none-embed-gcov-tool
│   ├── riscv-none-embed-gdb
│   ├── riscv-none-embed-gdb-add-index
│   ├── riscv-none-embed-gdb-add-index-py
│   ├── riscv-none-embed-gdb-py
│   ├── riscv-none-embed-gprof
│   ├── riscv-none-embed-ld
│   ├── riscv-none-embed-ld.bfd
│   ├── riscv-none-embed-nm
│   ├── riscv-none-embed-objcopy
│   ├── riscv-none-embed-objdump
│   ├── riscv-none-embed-ranlib
│   ├── riscv-none-embed-readelf
│   ├── riscv-none-embed-size
│   ├── riscv-none-embed-strings
│   └── riscv-none-embed-strip
├── distro-info
│   ├── CHANGELOG.md
│   ├── licenses
│   ├── patches
│   └── scripts
├── include
│   └── gdb
├── lib
│   ├── bfd-plugins
│   ├── gcc
│   ├── libcc1.0.so
│   └── libcc1.so -> libcc1.0.so
├── libexec
│   └── gcc
├── riscv-none-embed
│   ├── bin
│   ├── include
│   ├── lib
│   └── share
└── share
    ├── doc
    └── gcc-riscv-none-embed

20 directories, 44 files

Test

To check if the manually installed GCC starts, use something like:

$ ~/opt/xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1/bin/riscv-none-embed-gcc --version
riscv-none-embed-gcc (xPack GNU RISC-V Embedded GCC, 64-bit) 8.2.1

Easy install

The easiest way to install GNU RISC-V Embedded GCC is by using the binary xPack, available as @xpack-dev-tools/riscv-none-embed-gcc from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

$ xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest --verbose

This command will always install the latest available version, in the central xPacks repository, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

The archive content is unpacked in a folder named .content. On some platforms this might be hidden for normal browsing, and require separate options (like ls -A) or, in file browsers, to enable configurations like Show Hidden Files.

xPacks aware tools, like the Eclipse Embedded CDT plug-ins automatically identify binaries installed with xpm and provide a convenient method to manage paths.

Uninstall

To remove the installed xPack, the command is similar:

$ xpm uninstall --global @xpack-dev-tools/riscv-none-embed-gcc --verbose

Test

To check if the xpm installed GCC starts, use something like:

$ ~/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/8.2.1-3.1.1/.content/bin/riscv-none-embed-gcc --version
riscv-none-embed-gcc (xPack GNU RISC-V Embedded GCC, 64-bit) 8.2.1

Manual install

For all platforms, the xPack GNU RISC-V Embedded GCC binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases page.

Download

The GNU/Linux versions of xPack GNU RISC-V Embedded GCC are packed as .tar.gz archives. Download the latest version named like:

  • xpack-riscv-none-embed-gcc-8.2.1-3.1-linux-x64.tgz
  • xpack-riscv-none-embed-gcc-8.2.1-3.1-linux-x32.tgz

As the name implies, these are GNU/Linux tar.gz archives; they were build on CentOS, but can be executed on most recent GNU/Linux distributions. Select the -x64 file for 64-bit machines and the -x32 file for 32-bit machines.

Unpack

To install GNU RISC-V Embedded GCC, unpack the archive and move it to /${HOME}/opt/xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1:

$ mkdir -p ~/opt
$ cd ~/opt

$ tar xvf ~/Downloads/xpack-riscv-none-embed-gcc-8.2.1-3.1-linux-x64.tgz
$ chmod -R -w xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1

The result is a structure like:

$ tree -L 2 /home/ilg/opt/xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1/
/home/ilg/opt/xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1/
├── bin
│   ├── libexpat.so.1 -> libexpat.so.1.6.7
│   ├── libexpat.so.1.6.7
│   ├── libfl.so.2 -> libfl.so.2.0.0
│   ├── libfl.so.2.0.0
│   ├── libgmp.so.10 -> libgmp.so.10.3.2
│   ├── libgmp.so.10.3.2
│   ├── libiconv.so.2 -> libiconv.so.2.6.0
│   ├── libiconv.so.2.6.0
│   ├── liblzma.so.5 -> liblzma.so.5.2.3
│   ├── liblzma.so.5.2.3
│   ├── libmpfr.so.4 -> libmpfr.so.4.1.6
│   ├── libmpfr.so.4.1.6
│   ├── libpython2.7.so.1.0
│   ├── libz.so.1 -> libz.so.1.2.8
│   ├── libz.so.1.2.8
│   ├── riscv-none-embed-addr2line
│   ├── riscv-none-embed-ar
│   ├── riscv-none-embed-as
│   ├── riscv-none-embed-c++
│   ├── riscv-none-embed-c++filt
│   ├── riscv-none-embed-cpp
│   ├── riscv-none-embed-elfedit
│   ├── riscv-none-embed-g++
│   ├── riscv-none-embed-gcc
│   ├── riscv-none-embed-gcc-8.2.1
│   ├── riscv-none-embed-gcc-ar
│   ├── riscv-none-embed-gcc-nm
│   ├── riscv-none-embed-gcc-ranlib
│   ├── riscv-none-embed-gcov
│   ├── riscv-none-embed-gcov-dump
│   ├── riscv-none-embed-gcov-tool
│   ├── riscv-none-embed-gdb
│   ├── riscv-none-embed-gdb-add-index
│   ├── riscv-none-embed-gdb-add-index-py
│   ├── riscv-none-embed-gdb-py
│   ├── riscv-none-embed-gprof
│   ├── riscv-none-embed-ld
│   ├── riscv-none-embed-ld.bfd
│   ├── riscv-none-embed-nm
│   ├── riscv-none-embed-objcopy
│   ├── riscv-none-embed-objdump
│   ├── riscv-none-embed-ranlib
│   ├── riscv-none-embed-readelf
│   ├── riscv-none-embed-size
│   ├── riscv-none-embed-strings
│   └── riscv-none-embed-strip
├── distro-info
│   ├── CHANGELOG.md
│   ├── licenses
│   ├── patches
│   └── scripts
├── include
│   └── gdb
├── lib
│   ├── bfd-plugins
│   └── gcc
├── lib64
│   ├── libcc1.so -> libcc1.so.0.0.0
│   ├── libcc1.so.0 -> libcc1.so.0.0.0
│   ├── libcc1.so.0.0.0
│   ├── libgcc_s.so.1
│   ├── libstdc++.so.6 -> libstdc++.so.6.0.24
│   └── libstdc++.so.6.0.24
├── libexec
│   └── gcc
├── README.md
├── riscv-none-embed
│   ├── bin
│   ├── include
│   ├── lib
│   └── share
└── share
    ├── doc
    └── gcc-riscv-none-embed

21 directories, 54 files

Test

To check if the manually installed GCC starts, use something like:

$ ~/opt/xPacks/riscv-none-embed-gcc/xpack-riscv-none-embed-gcc-8.2.1-3.1/bin/riscv-none-embed-gcc --version
riscv-none-embed-gcc (xPack GNU RISC-V Embedded GCC, 64-bit) 8.2.1
Edit

Comments on the content of this page that might be useful for other readers are welcomed here. For question and general support, please use the project forums.