antmicro-labs / video-processing

0 stars 1 forks source link

Get familiar with litex manual and build design for arty simulation #8

Closed kowalik-lukasz closed 4 years ago

kowalik-lukasz commented 4 years ago

Build new design for ARTY board, run design in simulation. Build design for zynq board with copied def arty and defined ports and interfaces. Take names for ports and devices from vivado.

kgugala commented 4 years ago

please provide the description of this task

tobiaszpuslecki commented 4 years ago

@kgugala when I tried to build arty board (after install every listed tools), there is a problem with riscv tools. I don't understand why commands are unable to find, since I build riscv toolchain. Is it a problem with environmental path?

Traceback (most recent call last): File "./arty.py", line 115, in main() File "./arty.py", line 111, in main builder.build(**vivado_build_argdict(args)) File "/home/tobi/Desktop/litex/litex/soc/integration/builder.py", line 201, in build self._generate_includes() File "/home/tobi/Desktop/litex/litex/soc/integration/builder.py", line 90, in _generate_includes for k, v in export.get_cpu_mak(self.soc.cpu, self.compile_software): File "/home/tobi/Desktop/litex/litex/soc/integration/export.py", line 85, in get_cpu_mak ("TRIPLE", select_triple(triple)), File "/home/tobi/Desktop/litex/litex/soc/integration/export.py", line 80, in select_triple raise OSError(msg) OSError: Unable to find any of the cross compilation toolchains:

kgugala commented 4 years ago

This means that you don't have RISC-V toolchain binary in your PATH. Can you point to the guide you're using?

tobiaszpuslecki commented 4 years ago

I’m only using this guide -> https://github.com/antmicro-labs/video-processing/wiki/LiteX---Zephyr-tutorial

I’m not sure, what exactly will should be in PATH, if we talk about RISC-V toolchain. Could you tell me, what do you have in your PATH? (Refer to RISC-V)

rw1nkler commented 4 years ago

You have to add the following line to your ~/.bashrc:

export PATH="$PATH:/opt/riscv/bin"
tobiaszpuslecki commented 4 years ago

It works. But there is another problem. After I tried to run ./arty.py, there is error shown below.

make: Leaving directory '/home/tobi/Desktop/litex/litex/boards/targets/soc_basesoc_arty/software/bios' application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory

(...)

top.v file is generated, but top.bit not. I cannot to find librdi_commontasks.so anywhere. Could you tell me why?

rw1nkler commented 4 years ago

Maybe this will help: https://forums.xilinx.com/t5/Installation-and-Licensing/Installing-Vivado-2018-1-on-Fedora-28/td-p/855996

kowalik-lukasz commented 4 years ago

@kgugala when I tried to build arty board (after install every listed tools), there is a problem with riscv tools. I don't understand why commands are unable to find, since I build riscv toolchain. Is it a problem with environmental path?

Traceback (most recent call last): File "./arty.py", line 115, in main() File "./arty.py", line 111, in main builder.build(**vivado_build_argdict(args)) File "/home/tobi/Desktop/litex/litex/soc/integration/builder.py", line 201, in build self._generate_includes() File "/home/tobi/Desktop/litex/litex/soc/integration/builder.py", line 90, in _generate_includes for k, v in export.get_cpu_mak(self.soc.cpu, self.compile_software): File "/home/tobi/Desktop/litex/litex/soc/integration/export.py", line 85, in get_cpu_mak ("TRIPLE", select_triple(triple)), File "/home/tobi/Desktop/litex/litex/soc/integration/export.py", line 80, in select_triple raise OSError(msg) OSError: Unable to find any of the cross compilation toolchains:

* riscv64-unknown-elf

* riscv32-unknown-elf

* riscv-none-embed

* riscv64-linux

* riscv-sifive-elf

* riscv64-none-elf

I have the same problem but in my case adding PATH to bashrc didn't change anything.

rw1nkler commented 4 years ago

Where did you install the toolchain? You have to add path to the toolchain bin directory to your PATH variable.

kowalik-lukasz commented 4 years ago

@rw1nkler It's in the same directory as mentioned above - /opt/riscv/bin.

rw1nkler commented 4 years ago

Please, paste here the result of the following commands:

which riscv64-unknown-elf-gcc
stat /opt/riscv/bin
stat /opt/riscv/bin/riscv64-unknown-elf-gcc
echo $PATH
kowalik-lukasz commented 4 years ago
exweap@exweap-Lenovo-Y520-15IKBN:~$ which riscv64-unknown-elf-gcc
/opt/riscv/bin/riscv64-unknown-elf-gcc
exweap@exweap-Lenovo-Y520-15IKBN:~$ stat /opt/riscv/bin
  File: /opt/riscv/bin
  Size: 4096        Blocks: 8          IO Block: 4096   directory
Device: 806h/2054d  Inode: 20840531    Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-05-15 00:11:06.263564729 +0200
Modify: 2020-05-15 00:09:27.379517771 +0200
Change: 2020-05-15 00:09:27.379517771 +0200
 Birth: -
exweap@exweap-Lenovo-Y520-15IKBN:~$ stat /opt/riscv/bin/riscv64-unknown-elf-gcc
  File: /opt/riscv/bin/riscv64-unknown-elf-gcc
  Size: 6196120     Blocks: 12104      IO Block: 4096   regular file
Device: 806h/2054d  Inode: 20841665    Links: 2
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-05-15 00:11:06.267564730 +0200
Modify: 2020-05-15 00:09:27.031517601 +0200
Change: 2020-05-15 00:09:27.039517605 +0200
 Birth: -
exweap@exweap-Lenovo-Y520-15IKBN:~$ echo $PATH
/tools/Xilinx/DocNav:/tools/Xilinx/Vivado/2019.2/bin:/home/exweap/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/riscv/bin:/opt/riscv/bin
rw1nkler commented 4 years ago

The toolchain is both in your filesystem and in your path. That is a strange situation. Can you post here the whole log from running arty.py file?

Please, attach it as a separate file with .log extension

kowalik-lukasz commented 4 years ago

arty.log

kowalik-lukasz commented 4 years ago

@rw1nkler So does the .log file say anything useful?