riscv-none-embed-gdb-py3standalone and run on any system.
There are separate binaries for Windows (Intel 32/64-bit), macOS (Intel 64-bit) and GNU/Linux (Intel 32/64-bit, Arm 32/64-bit).
The binary files are available from GitHub releases.
The full details of installing the xPack GNU RISC-V Embedded GCC on various platforms are presented in the separate Install page.
To install the latest version available, use:
xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest
To install this specific version, use:
xpm install --global @firstname.lastname@example.org
Starting with 8.2.0-2, the xPack GNU RISC-V Embedded GCC (formerly GNU MCU Eclipse RISC-V GCC) follows the official SiFive releases, with as little differences as possible.
This release is based on the v2020.04.0-Toolchain.Only release, and includes the SiFive extensions.
The following commits (from sifive/freedom-tools) were used:
- the sifive/riscv-binutils-gdb
sifive-binutils-2.32, commit ac7ecc4 from 3 Feb 2020;
- on top of this, the commit 912ebfa was applied, to fix the LENGTH and ORIGIN bug;
- the sifive/riscv-gcc project,
sifive-gcc-8.3.0, commit e195042 from from 7 Aug 2019
- the sifive/riscv-newlib project, the
fix-S5CSD-1486branch, commit 6c668f8 from 6 Dec 2019
- the sifive/riscv-binutils-gdb
gdb-8.3-release-cache-control-patch, commit ac7ecc4 from 3 Feb 2020.
The supported libraries are:
$ riscv-none-embed-gcc -print-multi-lib .; rv32e/ilp32e;@march=rv32e@mabi=ilp32e rv32ea/ilp32e;@march=rv32ea@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 rv32if/ilp32f;@march=rv32if@mabi=ilp32f rv32ifd/ilp32d;@march=rv32ifd@mabi=ilp32d rv32ia/ilp32;@march=rv32ia@mabi=ilp32 rv32iaf/ilp32f;@march=rv32iaf@mabi=ilp32f rv32imaf/ilp32f;@march=rv32imaf@mabi=ilp32f rv32iafd/ilp32d;@march=rv32iafd@mabi=ilp32d rv32im/ilp32;@march=rv32im@mabi=ilp32 rv32imf/ilp32f;@march=rv32imf@mabi=ilp32f rv32imfc/ilp32f;@march=rv32imfc@mabi=ilp32f rv32imfd/ilp32d;@march=rv32imfd@mabi=ilp32d 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 rv64if/lp64f;@march=rv64if@mabi=lp64f rv64ifd/lp64d;@march=rv64ifd@mabi=lp64d rv64ia/lp64;@march=rv64ia@mabi=lp64 rv64iaf/lp64f;@march=rv64iaf@mabi=lp64f rv64imaf/lp64f;@march=rv64imaf@mabi=lp64f rv64iafd/lp64d;@march=rv64iafd@mabi=lp64d rv64im/lp64;@march=rv64im@mabi=lp64 rv64imf/lp64f;@march=rv64imf@mabi=lp64f rv64imfc/lp64f;@march=rv64imfc@mabi=lp64f rv64imfd/lp64d;@march=rv64imfd@mabi=lp64d rv64iac/lp64;@march=rv64iac@mabi=lp64 rv64imac/lp64;@march=rv64imac@mabi=lp64 rv64imafc/lp64f;@march=rv64imafc@mabi=lp64f rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d
Compared to the original SiFive version, the same architecture and API options are supported, and there are minimal functional changes
libglosswas removed from the list of libraries always linked to the application, since it issues
ECALLinstructions that fail in bare metal environments
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.
If no syscalls are needed,
--specs=nosys.specs can be used at link
time to provide empty implementations for the POSIX system calls.
The libraries are compiled with
-O2 -mcmodel=medany. The nano version is
-mcmodel=medany, otherwise the link will fail.
Support for Python scripting was added to GDB. This distribution provides
a separate binary,
support for Python 3.7.
The Python 3 run-time is included, so GDB does not need any version of Python to be installed, and is insensitive to the presence of other versions.
Support for Python 2 was discontinued.
Text User Interface (TUI)
Support for TUI was added to GDB. The
ncurses library (v6.2) was added to
- GDB may issue the following warning, riscv-none-embed-gdb: warning:
Couldn’t determine a path for the index cache directory.;
it is a known problem, caused when trying to create the cache
- the archive size got too big for the Windows 32-bit node to handle, and
xpm installfails with RangeError: Array buffer allocation failed.
On all platforms the packages are standalone, and expect only the standard runtime to be present on the host.
All dependencies that are build as shared libraries are copied locally in the same folder as the executable.
On GNU/Linux the binaries are adjusted to use a relative path:
$ readelf -d library.so | grep runpath 0x000000000000001d (RPATH) Library rpath: [$ORIGIN]
In the GNU ld.so search strategy, the
the highest priority, higher than
LD_LIBRARY_PATH, so if this later one
is set in the environment, it should not interfere with the xPack binaries.
Please note that previous versions, up to mid-2020, used
has a priority lower than
LD_LIBRARY_PATH, and does not tolerate setting
it in the environment.
Similarly, on macOS, the binaries are adjusted with
otool to use a
The original PDF documentation is available in the
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.
- Intel GNU/Linux: all binaries were built with GCC 9.3, running in an Ubuntu 12 Docker container
- Arm GNU/Linux: all binaries were built with GCC 9.3, running in an Ubuntu 16 Docker container (added in mid-2020)
- Windows: all binaries were built with mingw-w64 GCC 9.3, running in an Ubuntu 12 Docker container
- macOS: all binaries were built with GCC 9.3, running in a separate folder on macOS 10.10.5.
The scripts used to build this distribution are in:
For the prerequisites and more details on the build procedure, please see the How to build page.
The first set of tests were performed on Travis, by running a simple script to check if the binaries start and compile several simple programs on a wide range of platforms and distributions:
The binaries were testes on Windows 10 Pro 32/64-bit, Ubuntu 18 LTS 64-bit, Xubuntu 18 LTS 32-bit and macOS 10.14.
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.
The SHA-256 hashes for the files are:
2b138c630e85535d254ea4e2a9147859ba15fff90b9b0f0451035100cb2cd752 xpack-riscv-none-embed-gcc-8.3.0-2.3-darwin-x64.tar.gz 7bd7fdeb93481f60271f7d3fb39e41ed7599c9a2f7d03cd1313585ca1f75952d xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-arm64.tar.gz c541d610b6d32d462e828d3e7fc98cbbf42e06df9292107bcea26007dcabfc2d xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-arm.tar.gz 8ebcebf9bd7088a866085be30ca1007bd950d9a1a837b04cc2b9238677fc745c xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x32.tar.gz 708d0cb5ff12eb5ad070153594c4f7771cd86d4b6721a77b23f8fe695c8f9402 xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz 778d4cf3389a07f9209f5c1d91ae324dea8ca59ae141b406598a82e34edd6493 xpack-riscv-none-embed-gcc-8.3.0-2.3-win32-x32.zip 59d62abc7585ba76a69da5f4ba0254cf2301ef897d47ad8e5a94468f38449db8 xpack-riscv-none-embed-gcc-8.3.0-2.3-win32-x64.zip
- 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