PULP Community
Docker image for the RISC-V GNU compiler toolchain - Printable Version

+- PULP Community (https://pulp-platform.org/community)
+-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1)
+--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2)
+--- Thread: Docker image for the RISC-V GNU compiler toolchain (/showthread.php?tid=282)



Docker image for the RISC-V GNU compiler toolchain - Coderitter GmbH - 02-08-2022

Hello everyone,

to ease the use of the compiler, at least in our company, we created a Docker image of the latest version 7.1.1. that we want to share with the community.

https://hub.docker.com/repository/docker/coderitter/pulp-riscv-gnu-toolchain/general

You can use it like this:

In your project, create a shell script for the RISC V compiler executable. You can name the file "riscv32-unknown-elf-gcc" which is the exact name of the RISC V compiler executable inside the Docker container. Put the following content inside of it.

Code:
#!/bin/sh
docker run --rm --entrypoint riscv32-unknown-elf-gcc --volume $PWD:/hostdir coderitter/pulp-riscv-gnu-toolchain "$@"

This call to "docker run" will create a temporary Docker container with the current directory mounted into Docker container. It then executes the RISC V compiler executable and forwards any parameters which were made when the script was executed.
The last step is to set the permission of the file so that is executable.

Code:
chmod a+x riscv32-unknown-elf-gcc

Now you can use the script as if the compiler itself was installed in your host system.

Code:
./riscv32-unknown-elf-gcc -std=c99 -march=rv32imfdcxpulpv2 src -o build/firmware



RE: Docker image for the RISC-V GNU compiler toolchain - kgf - 02-08-2022

That sounds awesome.

Do you mind if we advertise it? Of course feel free to let us know how we should attribute it.
Cheers,
KGF


RE: Docker image for the RISC-V GNU compiler toolchain - Coderitter GmbH - 02-08-2022

Sure, you can advertise it. It is free to use for everybody. If you like to attribute, you can name our company, Coderitter.


RE: Docker image for the RISC-V GNU compiler toolchain - Coderitter GmbH - 02-14-2023

Hello everyone,

we updated the PULP RISC-V GNU Toolchain Docker images: https://hub.docker.com/r/coderitter/pulp-riscv-gnu-toolchain

We added an image in which the toolchain is compiled with soft floats and we added images for the newest available compiler version 9.2.0. Here are the new tags.

7.1.1-soft-float
7.1.1-hard-float
9.2.0-soft-float <- Also the tag latest
9.2.0-hard-float

Feel free to give us feedback and if everything works as expected.

Best regards