Docker image for the RISC-V GNU compiler toolchain
#1
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...in/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
Reply
#2
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
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#3
Sure, you can advertise it. It is free to use for everybody. If you like to attribute, you can name our company, Coderitter.
Reply
#4
Hello everyone,

we updated the PULP RISC-V GNU Toolchain Docker images: https://hub.docker.com/r/coderitter/pulp...-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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)