This repository contains toolchain builds and tools to create toolchains for lowRISC internal and partner use. The toolchains are not supported by lowRISC or recommended to be used outside of lowRISC and partners.
Head over to the GitHub releases for this repository for pre-built toolchains.
The following toolchains are provided:
- Binutils + Clang RV32IMCB without hardfloat support, targeting Ibex.
- Binutils + Clang RV64IMAC, targeting Muntjac.
-
Push the changes or do a pull request, and wait for the CI workflow to complete.
The build can be tested by downloading the GitHub artifacts.
- Go to the Github Actions page.
- Select a workflow run from the list.
- Download the desired artifact from the bottom of the page and test it.
-
Tag the release.
VERSION=$(date +%Y%m%d)-1 git tag -a -m "Release version $VERSION" $VERSION
-
Push the tag.
git push origin $VERSIONNow the release builds on GitHub's CI, and the resulting binaries will be uploaded to GitHub releases.
-
Download a release archive matching your host architecture and target system from the Github releases.
-
Extract the archive:
xzcat <path to the downloaded archive> | tar -xvf -
-
You should now be able to use the toolchain. You may optionally add the
binsubfolder to yourPATHto use the binaries from anywhere.
The Ibex toolchain artifacts are consumed by Bazel for building Opentitan software. For development and testing purposes, you may override the toolchain used with a local build instead of a released version.
In the following steps, OPENTITAN denotes the path to your Opentitan checkout, and
TOOLCHAIN denotes the path to the toolchain you wish to override with
(if you have a locally built toolchain, this should be the dist folder).
-
Create an empty
REPO.bazelfile in the toolchain folder.touch $TOOLCHAIN/REPO.bazel -
Create a symbolic link called
BUILDin the toolchain folder, pointing to the toolchain's build file in the Opentitan checkout.ln -s $OPENTITAN/third_party/lowrisc/BUILD.lowrisc_rv32imcb_toolchain.bazel $TOOLCHAIN/BUILD
-
Override the repository in your Bazel commands.
bazel --override_repository=+lowrisc_rv32imcb_toolchain+lowrisc_rv32imcb_toolchain=$TOOLCHAIN ...Repeatedly specifying the flag can be tedious, so to override the repository by default for all commands, create a
.bazelrc-sitefile in your Opentitan checkout containing the following:common --override_repository=+lowrisc_rv32imcb_toolchain+lowrisc_rv32imcb_toolchain=<path to your toolchain>