From 45c15489719e3373df9020a9a8d2cecf19d6d28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A0rius=20Mont=C3=B3n?= Date: Sat, 22 Jun 2019 16:31:06 +0200 Subject: [PATCH 1/2] Update README.md add how to compile cross compiler for riscv32 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index c85a536..c22ff77 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Table of Contents * [Memory Map](./README.md#memory-map) * [TODO](./README.md#todo) * [Compile](./README.md#compile) + * [Cross-compiler](./README.md#cross) * [Docker container](./README.md#docker-container) * [How to use Docker](./README.md#how-to-use-docker) * [Test](./README.md#test) @@ -122,6 +123,19 @@ $ ./RISCV_TLM asm/BasicLoop.hex -D loglevel: 3 for detailed (INFO) log, 0 to ERROR log level -f filename .hex filename to use +## Cross-compiler +It is possible to use gcc for risc-v compiler. Follow the instructions (from https://github.com/riscv/riscv-gnu-toolchain): +~~~ +$ git clone --recursive https://github.com/riscv/riscv-gnu-toolchain +$ cd riscv-gnu-toolchain +$ ./configure --prefix=/opt/riscv --with-arch=rv32gc --with-abi=ilp32d +$ make +... +wait for long time ... +... +$ export PATH=$PATH:/opt/riscv/bin +~~~ + ## Docker container There is a Docker container available with the latest release at https://hub.docker.com/r/mariusmm/riscv-tlm. From 32c9c6c6a523b581bf15624dfbbf39421b38e8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A0rius=20Mont=C3=B3n?= Date: Sat, 22 Jun 2019 17:07:34 +0200 Subject: [PATCH 2/2] Update README.md typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c22ff77..364aaa2 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Table of Contents * [Memory Map](./README.md#memory-map) * [TODO](./README.md#todo) * [Compile](./README.md#compile) - * [Cross-compiler](./README.md#cross) + * [Cross-compiler](./README.md#cross-compiler) * [Docker container](./README.md#docker-container) * [How to use Docker](./README.md#how-to-use-docker) * [Test](./README.md#test) @@ -128,7 +128,7 @@ It is possible to use gcc for risc-v compiler. Follow the instructions (from htt ~~~ $ git clone --recursive https://github.com/riscv/riscv-gnu-toolchain $ cd riscv-gnu-toolchain -$ ./configure --prefix=/opt/riscv --with-arch=rv32gc --with-abi=ilp32d +$ ./configure --prefix=/opt/riscv --with-arch=rv32gc --with-abi=ilp32 $ make ... wait for long time ...