I have make
installed, I have the riscv32-unknown-linux-gnu
toolchain installed.
I have added riscv/bin
to my path. I can successfully execute any of the toolchain commands in the shell. e.g. riscv32-unknown-linux gnu-as ... hello.s -o boot.o
works.
When i run which riscv32-unknown-linux-gnu-as
, there is nothing printed to the terminal.
When I run make
in the directory of my makefile i get
riscv32-unknown-linux-gnu-as -march=rv32i -mabi=ilp32 hello.s -o hello.o
make: riscv32-unknown-linux-gnu-as: Command not found
Makefile:18: recipe for target 'hello.o' failed
make: *** [hello.o] Error 127
It seems this is a problem with my path? I'm not sure why which and make can't find it, but I can execute it just fine.
** EDIT **
~/.profile
export PATH="~/riscv/bin:$PATH"
The only thing I can think of is something with the path is weird, this is on WSL
PATH
by editing you shell's startup files (which one), or did you just add it for the current session by modifyingPATH
on the command line, or both? – Kusalananda Nov 08 '19 at 20:51.profile
– christopher clark Nov 08 '19 at 20:52export PATH := /absolute/path/to/your/home/dir/riscv/bin:$(PATH)
should do it – Garo Nov 08 '19 at 20:59PATH
in.profile
, or use$HOME
rather than~
, or setSHELL=/bin/bash
in your Makefile. I'm sure there's a duplicate question somewhere on the site... – Kusalananda Nov 08 '19 at 21:01$PATH
by thebash
shell which expands tilde even though it's quoted). – Kusalananda Nov 08 '19 at 21:06