orangecrab-fpga / orangecrab-examples

Example projects/code for the OrangeCrab
MIT License
104 stars 27 forks source link

litex example cannot find Yosys or nextpnr-ecp5 programs #10

Closed opendbf closed 4 years ago

opendbf commented 4 years ago

Greg,

I am trying to build the SoC for the orange crab but have had no luck so far. Here is the output when I try to build it: ~/FPGA_Dev/OrangeCrab-examples/litex$ python3 SoC-CircuitPython.py lxbuildenv: v2020.6.1.1 (run SoC-CircuitPython.py --lx-help for help) lxbuildenv: nextpnr-ecp5: nextpnr-ecp5 not found in your PATH -- None lxbuildenv: yosys: yosys not found in your PATH -- None lxbuildenv: To ignore dependencies, re-run with "--lx-ignore-deps" 2 missing dependencies were found

This is strange to me as these are in the PATH and I can verify by running the following just as the tutorial says: ~/FPGA_Dev/OrangeCrab-examples/litex$ yosys -V Yosys 0.9+3477 (open-tool-forge build) (git sha1 3cb3978f, gcc 9.3.0-10ubuntu2 -Os) ~/FPGA_Dev/OrangeCrab-examples/litex$ nextpnr-ecp5 -V nextpnr-ecp5 -- Next Generation Place and Route (Version nightly-20200801)

Here is the build with the --lx-print-env argument: ~/FPGA_Dev/OrangeCrab-examples/litex$ python3 SoC-CircuitPython.py --lx-print-env lxbuildenv: v2020.6.1.1 (run SoC-CircuitPython.py --lx-help for help) PYTHONPATH=/home/TH/FPGA_Dev/OrangeCrab-examples/litex/deps/litex-boards:/home/TH/FPGA_Dev/OrangeCrab-examples/litex/deps/litedram:/home/TH/FPGA_Dev/OrangeCrab-examples/litex/deps/valentyusb:/home/TH/FPGA_Dev/OrangeCrab-examples/litex/deps/pythondata-cpu-vexriscv:/home/TH/FPGA_Dev/OrangeCrab-examples/litex/deps/migen:/home/haines/FPGA_Dev/OrangeCrab-examples/litex/deps/litex PYTHONHASHSEED=1 PYTHON=/usr/bin/python3 LXBUILDENV_REEXEC=1

Thanks for your help!

gregdavill commented 4 years ago

@opendbf I noticed that you closed this issue, did you find a solution?

I'm in the process of writing guides for the Litex builds, handy to know if there are any bits I need to add for troubleshooting configuration/setup issues like this.

opendbf commented 4 years ago

@gregdavill My solution was to setup the PATH variable in the temporary fashion that is described in you tutorials (export PATH={new path}:$PATH). After I verified that this worked simply copied the command to a text file so I can run it whenever I need it (I know this is not the best way but it works for my purposes).

I originally added the new paths to /etc/environment. This worked for the riscv compiler but not the fpga tool binaries (yosys and nextpnr). I believe that this was my own fault as I included a ~/{path to binaries} in the path but I am not sure. I may explore this option more thoroughly.

Thanks!