Skip to content

Commit

Permalink
sw-led: do not hardcode CC in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanct authored and imphil committed Jan 27, 2020
1 parent 43752a6 commit 07f288a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/fpga/artya7-100/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion examples/sw/led/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 07f288a

Please sign in to comment.