QuickLogic-Corp / qorc-sdk

Open source FreeRTOS SDK for EOS S3 MCU+eFPGA SoC including gateware, software and documentation under QuickLogic Open Reconfigurable Computing (QORC) Initiative
Apache License 2.0
43 stars 27 forks source link

unable to build helloworldfpga_bit.h from qf_apps #150

Open jabTheGeek opened 2 years ago

jabTheGeek commented 2 years ago

After starting a clean install with

git clone https://github.com/QuickLogic-Corp/qorc-sdk.git cd qorc-sdk source envsetup.sh

the installer finishes the process, but bitstream is not generated and terminates with "fatal error: helloworldfpga_bit.h: No such file or directory"

WesMaster7 commented 2 years ago

Are you in a conda environment?

jabTheGeek commented 2 years ago

After the installation process, yes.

By trying it in a zshell I get: envsetup.sh:21: = not found when running the command source envsetup.sh in a bash shell the installation completes with the waiting times described below, but bitstream generation fails.

The problem was first found in 5.16.11-2-MANJARO linux, so I wanted to verify that it might run in another OS and tried Ubuntu and CentOS.

In Ubuntu the "Downloading and installation" step is sometimes stuck for minutes before it goes on. Most probably at the yosys or vtr stage. I ran Ubuntu 20.04 kernel 5.13 in a VM now and the downloading step took 25 minutes at the 61MB big vtr file (my internet was fine meanwhile). In Ubuntu the installation finishes with the message "check fpga toolchain \n!!fpga toolchain path not as expected..." and ql_symbiflow is not found.

To bypass these errors I wanted to build from source, but I found out, that vtr is not building with newer tbb releases at the moment.

I finally got a version that is compiling the bitstream by setting up a CentOS (5.14.0-70.el9) VM with an older tbb version (2020.3), building yosys and vtr, and copying the binaries into the ".../v1.3.1/conda/bin/" folder.

I would nevertheless prefer an official installer to be sure I can use the EOS S3 for production.

Aminekachkach commented 1 year ago

Hello, I encountered a problem when compiling the qf_apps/qf_helloworldhw/GCC_project on various systems including Windows with Ubuntu 18.04/20.04, Debian WSL2, Centos 7.9, and Ubuntu 22.04 dual boot. The error message "fatal error: helloworldfpga_bit.h: No such file or directory" always appears.

I also tried installing both Symbiflow v1.3.1 and v1.3.2, but encountered an error message during the WSL2 installation stating that the python installation in my environment is incompatible with the required specifications. Specifically, the yosys package requires python version 3.8 while my system has python version 3.10.

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - yosys==0.8.0_0103_ga920ab6=None -> python=3.8
  - yosys==0.8.0_0103_ga920ab6=None -> python[version='>=3.8,<3.9.0a0']

Your python: python=3.10

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.27=0
  - python=3.10 -> libgcc-ng[version='>=11.2.0'] -> __glibc[version='>=2.17']
  - yosys==0.8.0_0103_ga920ab6=None -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.27

I tried downgrading python to version 3.8 after installation, but the problem persisted. It seems that running the Symbiflow installation script installs anaconda by default, which uses python 3.10 and is not compatible with yosys.

update I managed to resolve the problem on Ubuntu 18.04 (working on Ubuntu 20.04 too) by manually installing quicklogic-yosys. After installing the latest version of Symbiflow v1.3.2, I ran the following commands:

export INSTALL_DIR=${PWD}/fpga_toolchain_install/v1.3.2
bash Symbiflow_v1.3.2.gz.run
export PATH="$INSTALL_DIR/quicklogic-arch-defs/bin:$INSTALL_DIR/quicklogic-arch-defs/bin/python:$PATH"
source "$INSTALL_DIR/conda/etc/profile.d/conda.sh"
conda activate
sudo apt install build-essential  
sudo apt-get install tcl8.6-dev
sudo apt-get install libreadline-dev 
sudo apt-get install bison
sudo apt-get install flex
sudo apt install libffi-dev
git clone https://github.com/QuickLogic-Corp/yosys.git -b quicklogic-rebased quicklogic-yosys
cd quicklogic-yosys
make config-gcc
make install PREFIX='/home/Your_space_user/qorc-sdk/fpga_toolchain_install/v1.3.2/conda/share/yosys'
export PATH=$PATH:/home/Your_space_user/qorc-sdk/fpga_toolchain_install/v1.3.2/conda/share/yosys/bin/

Please note that if you launch the envsetup.sh shell after this installation, it will reinstall Symbiflow_v1.3.1 and conflicts may occur between the two conda versions.

Br

jiapei100 commented 7 months ago

Yeah... Modifying envsetup.sh heavily now...

Clearly, envsetup.sh is buggy...

And Symbiflow is now f4pga...