xPack GNU RISC-V Embedded GCC v8.2.0-3.1 released
Download
The binary files are available from GitHub Releases.
Install
The full details of installing the xPack GNU RISC-V Embedded GCC on various platforms are presented in the separate Install page.
Easy install
The easiest way to install GNU RISC-V Embedded GCC is with
xpm
by using the binary xPack, available as
@xpack-dev-tools/riscv-none-embed-gcc
from the npmjs.com
registry.
To install the latest version available, use:
xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest --verbose
To install this specific version, use:
xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@8.2.0-3.1.1
Compliance
Starting with v8.2.0-2, this distribution closely follows the official SiFive Freedom Tools distribution.
This release is based on the v2019.05.0 release, and includes the SiFive extensions (like CLIC interrupts and a larger multi-lib set).
The following commits (from sifive/freedom-tools) were used:
- the sifive/riscv-gcc project,
branch
sifive-gcc-8.2.0
, commit 242abcaff6 from from 5 April 2019 - the sifive/riscv-binutils-gdb
project, branch
sifive-binutils-2.32
, commit 164267155c from 28 February 2019 - the sifive/riscv-newlib project, commit 42c2e3fb9f from 17 November 2018
GDB was upstreamed and does not require SiFive specific patches,
so the current build uses
git://sourceware.org/git/binutils-gdb.git
, the 9b40759
commit from
28 Feb 2019.
Supported libraries
The supported libraries are:
$ riscv-none-embed-gcc -print-multi-lib
.;
rv32e/ilp32e;@march=rv32e@mabi=ilp32e
rv32em/ilp32e;@march=rv32em@mabi=ilp32e
rv32eac/ilp32e;@march=rv32eac@mabi=ilp32e
rv32emac/ilp32e;@march=rv32emac@mabi=ilp32e
rv32i/ilp32;@march=rv32i@mabi=ilp32
rv32im/ilp32;@march=rv32im@mabi=ilp32
rv32imf/ilp32f;@march=rv32imf@mabi=ilp32f
rv32imaf/ilp32f;@march=rv32imaf@mabi=ilp32f
rv32iac/ilp32;@march=rv32iac@mabi=ilp32
rv32imac/ilp32;@march=rv32imac@mabi=ilp32
rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f
rv32imafdc/ilp32d;@march=rv32imafdc@mabi=ilp32d
rv64i/lp64;@march=rv64i@mabi=lp64
rv64im/lp64;@march=rv64im@mabi=lp64
rv64imf/lp64f;@march=rv64imf@mabi=lp64f
rv64iac/lp64;@march=rv64iac@mabi=lp64
rv64imac/lp64;@march=rv64imac@mabi=lp64
rv64imafc/lp64f;@march=rv64imafc@mabi=lp64f
rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d
Improvements
Compared to the original SiFive version, the same architecture and API options are supported, and there are minimal functional changes
libgloss
was removed from the list of libraries always linked to the application, since it issuesECALL
instructions that fail in bare metal environmentsmarch=rv32imaf/mabi=ilp32f
was added to the list of multi-libs- the standard documentation, in PDF and HTML, is included
newlib-nano
Support for newlib-nano is available using the
--specs=nano.specs
option. For better results, this option must be
added to both compile and link time.
nosys.specs
If no syscalls are needed, --specs=nosys.specs
can be used at link
time to provide empty implementations for the POSIX system calls.
Compile options
The libraries are compiled with -O2 -mcmodel=medany
. The nano version is
compiled with -Os -mcmodel=medany
.
-mcmodel=medany
, otherwise the link will fail.Known problems
- support for Python scripting is experimental and
riscv-none-embed-gdb-py
does not start properly on some systems.
Documentation
The original PDF documentation is available in the share/doc
folder.
Supported platforms
Binaries for Windows, macOS and GNU/Linux are provided.
The binaries were built using the xPack Build Box (XBB), a set of build environments based on slightly older distributions, that should be compatible with most recent systems.
- x86/x64 GNU/Linux: all binaries were built with GCC 7.4, running in a CentOS 6 Docker container
- x86/x64 Windows: all binaries were built with mingw-w64 GCC 7.4, running in a CentOS 6 Docker container
- x64 macOS: most binaries were built with GCC 7.4, running in a separate folder on macOS 10.10.5; GDB cannot be compiled with GCC, so Apple clang was used.
Tests
The binaries were testes on Windows 10 Pro 32/64-bit, Ubuntu 18 LTS 64-bit, Xubuntu 18 LTS 32-bit and macOS 10.13.
The tests consist in building and debugging some simple Eclipse projects available in the build project.
Since the source code used for GCC is identical to the one used by SiFive, the long and complex tests performed by SiFive to validate their release were not executed again.
Checksums
The SHA-256 hashes for the files are:
48ece50b7272a8e49e56e37f54f9962f93dce4ca44f1bb4c8113fab0230fbdf1
xpack-riscv-none-embed-gcc-8.2.0-3.1-darwin-x64.tgz
2e856ee33ef544a2405183366cdf299da2cca697e8cc57627dfaad8ab4460a99
xpack-riscv-none-embed-gcc-8.2.0-3.1-linux-x32.tgz
3d40fab50ebad8424ff85748f25d2eaee50f86a5d5222abd7a45a2e490f1e4f5
xpack-riscv-none-embed-gcc-8.2.0-3.1-linux-x64.tgz
78bcd52f7b404133de3b2f9568e7101c1de747f98db3a7b0d6251b75a1754867
xpack-riscv-none-embed-gcc-8.2.0-3.1-win32-x32.zip
98b60720607f1400081806d60d70796b30399f8b426e2c790a4abb0bffb9e5ec
xpack-riscv-none-embed-gcc-8.2.0-3.1-win32-x64.zip
Download analytics
- GitHub xpack-dev-tools/riscv-none-embed-gcc-xpack
- this release
- all xPack releases
- all GNU MCU Eclipse releases
- individual file counters (grouped per release)
- npmjs.com @xpack-dev-tools/riscv-none-embed-gcc
Credit to Shields IO for the badges and to Somsubhra/github-release-stats for the individual file counters.