From 07f288a9613c40015d45abd7e9d785d4d7b37691 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Wed, 22 Jan 2020 13:27:27 +0100 Subject: [PATCH] sw-led: do not hardcode CC in makefile --- examples/fpga/artya7-100/README.md | 3 ++- examples/sw/led/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/fpga/artya7-100/README.md b/examples/fpga/artya7-100/README.md index eb0e1f18f1..fb79d85180 100644 --- a/examples/fpga/artya7-100/README.md +++ b/examples/fpga/artya7-100/README.md @@ -21,8 +21,9 @@ First the software must be built. Go into `examples/sw/led` and call: make CC=/path/to/RISC-V-compiler ``` +The setting of `CC` is only required if `riscv32-unknown-elf-gcc` is not available through the `PATH` environment variable. The path to the RV32 compiler `/path/to/RISC-V-compiler` depends on the environment. -For example, it can be `riscv32-unknown-elf-gcc` if the binary is available through the `PATH` environment or `/opt/riscv/bin/riscv-none-embed-gcc` if a specific path is used. +For example, it can be for example `/opt/riscv/bin/riscv-none-embed-gcc` if the whole path is required or simply the name of the executable if it is available through the `PATH` environment variable. This should produce a `led.vmem` file which is used in the synthesises to update the SRAM storage. diff --git a/examples/sw/led/Makefile b/examples/sw/led/Makefile index 5b264c58f2..bfd5472f17 100644 --- a/examples/sw/led/Makefile +++ b/examples/sw/led/Makefile @@ -10,7 +10,7 @@ ARCH = rv32imc # ARCH = rv32im # to disable compressed instructions SRCS = $(PROGRAM).c -CC = /tools/riscv/bin/riscv32-unknown-elf-gcc +CC = riscv32-unknown-elf-gcc OBJCOPY ?= $(subst gcc,objcopy,$(wordlist 1,1,$(CC))) OBJDUMP ?= $(subst gcc,objdump,$(wordlist 1,1,$(CC)))