Skip to content

Commit 01b2cac

Browse files
luismarquesmundaym
authored andcommitted
Update toolchain to release 20220210-1 with bitmanip support
This release updates the meson cross files to make the toolchains more easily configurable. The tool versions for the bitmanip variant are: - Binutils 2.35 - GCC: 10.2.0 - Clang/LLVM: 13.0.1 - GDB 11.1 - Binutils: `7c9dd840fbb6a1171a51feb08afb859288615137` (riscv-binutils-2.35-rvb) with Pirmin's bitmanip 1.00+0.93 PR patch (riscvarchive/riscv-binutils-gdb#267). - GCC: `73055647d33c0b63a3125c372019d1dac0f8ac34` (RISC-V bitmanip fork, branch riscv-gcc-10.2.0-rvb, commit 73055647d33 from 2021-07-09) - Clang/LLVM: 13.0.1 - GDB 11.1 Signed-off-by: Luís Marques <[email protected]>
1 parent 3281bd3 commit 01b2cac

File tree

4 files changed

+10
-60
lines changed

4 files changed

+10
-60
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ variables:
1616
VERIBLE_VERSION: v0.0-1213-g9e5c085
1717
RUST_VERSION: 1.55.0
1818
# Release tag from https://github.com/lowRISC/lowrisc-toolchains/releases
19-
TOOLCHAIN_VERSION: 20210412-1
19+
TOOLCHAIN_VERSION: 20220210-1
2020
# This controls where builds happen, and gets picked up by build_consts.sh.
2121
BUILD_ROOT: $(Build.ArtifactStagingDirectory)
2222
VIVADO_VERSION: "2020.2"

doc/ug/install_instructions/index.md

Lines changed: 6 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,14 @@ $ pip3 install --user -r python-requirements.txt
154154

155155
## Software development
156156

157-
### Device compiler toolchain (RV32IMC)
157+
### Device compiler toolchain
158158

159-
To build device software you need a baremetal RV32IMC compiler toolchain.
159+
To build device software you need a baremetal RISC-V toolchain.
160160
We recommend using a prebuilt toolchain provided by lowRISC.
161-
Alternatively, you can build your own.
162-
Whichever option you choose, we recommend installing the toolchain to `/tools/riscv`.
161+
The prebuilt toolchains contain both GCC and Clang, targeting RISC-V.
162+
By default the OpenTitan device software is built with Clang.
163163

164-
#### Option 1 (recommended): Use the lowRISC-provided prebuilt toolchain
165-
166-
lowRISC provides a prebuilt toolchain for the OpenTitan project.
167-
This toolchain contains both GCC and Clang, targeting RISC-V.
168-
By default the device software is built with Clang.
169-
We recommend using the `util/get-toolchain.py` tool to download and install the latest version of this toolchain.
164+
We recommend using the `util/get-toolchain.py` tool to download and install the latest version of this toolchain, and that you install the toolchain to the default path, `/tools/riscv`.
170165

171166
```cmd
172167
$ cd $REPO_TOP
@@ -175,52 +170,7 @@ $ ./util/get-toolchain.py
175170

176171
This tool will automatically adjust the toolchain configuration if you override the installation directory (by using the `--install-dir` option).
177172
It also provides the ability to perform a staged installation (by supplying a `--dest-dir` option), if the toolchain needs to be unpacked first at a temporary staging directory, before it can be moved to the final installation directory.
178-
Alternatively, manually download the file starting with `lowrisc-toolchain-rv32imc-` from [GitHub releases](https://github.com/lowRISC/lowrisc-toolchains/releases/latest) and unpack it to the desired installation directory.
179-
180-
#### Option 2: Compile your own GCC toolchain
181-
182-
1. Install all build prerequisites listed [in the documentation](https://github.com/riscv/riscv-gnu-toolchain/#prerequisites).
183-
184-
2. Build the toolchain (this should be done outside the `$REPO_TOP` directory):
185-
```console
186-
$ git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
187-
$ cd riscv-gnu-toolchain
188-
$ ./configure --prefix=/tools/riscv --with-abi=ilp32 --with-arch=rv32imc --with-cmodel=medany
189-
$ make
190-
```
191-
192-
The `make` command installs the toolchain to `/tools/riscv`, no additional `make install` step is needed.
193-
194-
3. Write a [meson toolchain configuration file](https://mesonbuild.com/Cross-compilation.html#defining-the-environment) for your toolchain.
195-
It should look like the following (though your paths may be different):
196-
```ini
197-
[binaries]
198-
c = '/tools/riscv/bin/riscv32-unknown-elf-gcc'
199-
cpp = '/tools/riscv/bin/riscv32-unknown-elf-g++'
200-
ar = '/tools/riscv/bin/riscv32-unknown-elf-ar'
201-
ld = '/tools/riscv/bin/riscv32-unknown-elf-ld'
202-
objdump = '/tools/riscv/bin/riscv32-unknown-elf-objdump'
203-
objcopy = '/tools/riscv/bin/riscv32-unknown-elf-objcopy'
204-
strip = '/tools/riscv/bin/riscv32-unknown-elf-strip'
205-
as = '/tools/riscv/bin/riscv32-unknown-elf-as'
206-
207-
[properties]
208-
needs_exe_wrapper = true
209-
has_function_printf = false
210-
c_args = ['-march=rv32imc', '-mabi=ilp32', '-mcmodel=medany']
211-
c_link_args = ['-march=rv32imc', '-mabi=ilp32', '-mcmodel=medany']
212-
cpp_args = ['-march=rv32imc', '-mabi=ilp32', '-mcmodel=medany']
213-
cpp_link_args = ['-march=rv32imc', '-mabi=ilp32', '-mcmodel=medany']
214-
215-
[host_machine]
216-
system = 'bare metal'
217-
cpu_family = 'riscv32'
218-
cpu = 'ibex'
219-
endian = 'little'
220-
```
221-
222-
You will need to pass the path to this file to `./meson_init.sh` using the `-t FILE` option.
223-
173+
Alternatively, manually download the file starting with `lowrisc-toolchain-rv32imcb-` from [GitHub releases](https://github.com/lowRISC/lowrisc-toolchains/releases/latest) and unpack it to the desired installation directory.
224174

225175
### OpenOCD
226176

util/container/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARG VERILATOR_VERSION=4.210
1010
ARG OPENOCD_VERSION=0.11.0
1111
ARG VERIBLE_VERSION=v0.0-1213-g9e5c085
1212
# The RISCV toolchain version should match the release tag used in GitHub.
13-
ARG RISCV_TOOLCHAIN_TAR_VERSION=20210412-1
13+
ARG RISCV_TOOLCHAIN_TAR_VERSION=20220210-1
1414
ARG RUST_VERSION=1.55.0
1515

1616
# Main container image.

util/get-toolchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
# the keys in this dictionary specify valid toolchain kinds
2020
ASSET_PREFIXES = {
2121
# kind : prefix,
22-
"combined": "lowrisc-toolchain-rv32imc-",
23-
"gcc-only": "lowrisc-toolchain-gcc-rv32imc-",
22+
"combined": "lowrisc-toolchain-rv32imcb-",
23+
"gcc-only": "lowrisc-toolchain-gcc-rv32imcb-",
2424
}
2525
ASSET_SUFFIX = ".tar.xz"
2626
RELEASES_URL_BASE = 'https://api.github.com/repos/lowRISC/lowrisc-toolchains/releases'

0 commit comments

Comments
 (0)