-
Download GNU RISC-C GCC according to your host SO. Win32-x64 for Windows or Linux-x64 for Linux.
- Use version 11.3, for instance: xpack-riscv-none-elf-gcc-11.3.0-1-linux-x64.tar.gz
-
Extract the downloaded package.
-
Rename the folder "xpack-riscv-..." to gcc creating the following tree:
./compiler/gcc/bin/+
|- riscv-none-elf-gcc
|- (...)
- Update the path in each Makefile:
RISCV_TOOLS_PREFIX = ../compiler/gcc/bin/riscv-none-elf-
- Type make to compile.
-
Install WSL: Microsoft Docs.
-
Install WSL Ubuntu.
- Follow this link in order to integrate a compiler in Visual Code.
-
In the Ubuntu Shell (search for Ubuntu in Windows Start Menu), follow the same above steps.