diff --git a/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst b/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst index 7ba4e45d8caeba92035d81569afd51718ace2f32..112e44b18bfd090bffa5f5ee04bd3d1d8021abba 100644 --- a/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst +++ b/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst @@ -3,7 +3,7 @@ Microchip FPGA Tools Installation Guide ######################################### -Instructions for installing the Microchip FPGA tools on a Ubuntu 20.04 desktop. +Instructions for installing the Microchip FPGA tools on a Ubuntu 20.04 or Ubuntu 22.04 desktop. .. important:: @@ -14,7 +14,9 @@ Instructions for installing the Microchip FPGA tools on a Ubuntu 20.04 desktop. Make sure people know about the alternative and we provide links to details on that before we send them down this process. -Install Libero 2023.2 +Create a folder named Microchip in your /home folder + +Install Libero 2023.2, 2024.1 or 2024.2 into this folder, using 2024.2 as an example ************************ - Download installer from the `Microchip's fpga and soc design tools section <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions>`_. @@ -22,28 +24,26 @@ Install Libero 2023.2 .. code-block:: - unzip Libero_SoC_v2023.2_lin.zip - - cd Libero_SoC_v2023.2_lin/ + unzip Libero_SoC_v2024.2_lin.zip ./launch_installer.sh .. important:: Do not use the default location suggested by the Libero installer. - Instead of /usr/local/Microchip/Libero_SoC_v2023.2 install into ~/Microchip/Libero_SoC_v2023.2 + Instead of /usr/local/Microchip/Libero_SoC_v2024.2 install into ~/Microchip/Libero_SoC_v2024.2 Run the post installation script which will install missing packages: .. code-block:: - sudo /home/<USER-NAME>/Microchip/Libero_SoC_v2023.2/Logs/req_to_install.sh + sudo /home/$USER/Microchip/Libero_SoC_v2024.2/Logs/req_to_install.sh No need to run the FlashPro hardware installation scripts. This will be taken care of as part of the SoftConsole installation. Install SoftConsole 2022.2 *************************** -- Download intaller from `Microchip website <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/soc-fpga/softconsole>`_. +- Download installer from `Microchip website <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/soc-fpga/softconsole>`_. .. code-block:: @@ -63,7 +63,14 @@ Perform the post installation steps as described in the html file opened when yo Install the Libero licensing daemon ************************************ -Download the 64 bit Licensing Daemons from the `Microchip's daemons section <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/licensing>`_ +Download the latest 64 bit Licensing Daemons from the `Microchip's fpga and soc design tools section <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions>`_ + +* `Linux_Licensing_Daemon_11.19.6.0_64-bit.tar.gz <https://ww1.microchip.com/downloads/secure/aemdocuments/documents/fpga/media-content/FPGA/daemons/Linux_Licensing_Daemon_11.19.6.0_64-bit.tar.gz>`_ +* `Windows_Licensing_Daemon_11.19.6.0_64-bit.zip <https://ww1.microchip.com/downloads/secure/aemdocuments/documents/fpga/media-content/FPGA/daemons/Windows_Licensing_Daemon_11.19.6.0_64-bit.zip>`_ + + +Older Daemon downloads can be found at `Microchip's daemons section <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/licensing>`_ + * `Linux_Licensing_Daemon_11.16.1_64-bit.tar.gz <https://ww1.microchip.com/downloads/aemdocuments/documents/fpga/media-content/FPGA/daemons/Linux_Licensing_Daemon_11.16.1_64-bit.tar.gz>`_ * `Windows_Licensing_Daemon_11.16.1_64-bit.zip <https://ww1.microchip.com/downloads/aemdocuments/documents/fpga/media-content/FPGA/daemons/Windows_Licensing_Daemon_11.16.1_64-bit.zip>`_ @@ -75,7 +82,7 @@ Copy the downloaded file to the Microchip directory within your home directory a cd ~/Microchip - tar -xvf Linux_Licensing_Daemon_11.16.1_64-bit.tar.gz + tar -xvf Linux_Licensing_Daemon_11.19.6.0_64-bit.tar.gz Install the Linux Standard Base: @@ -99,28 +106,63 @@ Request a Libero Silver license A MAC address looks something like 12:34:56::78:ab:cd when you use the "ip address" command to find out its value on your Linux machine. However, you need to enter it as 123456abcd in this dialog box. -You will get an email with a license.dat file. Copy it into the ~/Microchip/license directory. Edit the License.dat file to replace the <put.hostname.here> string with... localhost. +You will get an email with a License.dat file. Copy it into the ~/Microchip/license directory. Replace `<put.hostname.here>` in `License.dat` with `localhost` and add Linux_Licensing_Daemon as the path to the daemons. + +The top of your license file should look something like this after editing. Your daemon files should be located in the Linux_Licensing_Daemon folder inside the Microchip folder. + +.. code-block:: text + + SERVER localhost 001584731680 1702 + DAEMON actlmgrd Linux_Licensing_Daemon/actlmgrd + # Starting Libero SOC v2024.2, customers are recommended ... + # DAEMON mgcld Linux_Licensing_Daemon/mgcld + DAEMON saltd Linux_Licensing_Daemon/saltd + VENDOR snpslmd Linux_Licensing_Daemon/snpslmd + Execute tool setup script *************************** Download the script: -.. literalinclude:: ./setup-microchip-tools.sh +.. literalinclude:: setup-microchip-tools.sh :caption: Libero environment and license setup script :language: bash -:download:`setup-microchip-tools.sh <./setup-microchip-tools.sh>` +:download:`setup-microchip-tools.sh <setup-microchip-tools.sh>` + +Details: + +You can create a folder named FPGA-Tools-Setup and store the file there, although this is not required, as long as it is inside the Microchip folder. + +You shouldn't need to edit the script, as long as you have installed Libero inside a folder that follows the Libero_SoC_vXXXX.X format, or if you have multiple Libero versions installed and want to select a preferred one to use. Source the script: .. code-block:: + sudo chmod +x setup-microchip-tools.sh + . ./setup-microchip-tools.sh .. important:: - Do not forget the leading dot. It matters. You will need to run this every time you restart your machine. + Do not forget the leading dot. It matters. You will need to run this every time you restart your machine. + +Optionally, add this to the end of your `~/.bashrc` file to avoid running it each time on startup. + +First, open `~/.bashrc`: + +.. code-block:: bash + + nano ~/.bashrc + +Then, add the following lines at the end: + +.. code-block:: bash + + cd /home/$USER/Microchip/ + . ./setup-microchip-tools.sh You can then start Libero to open an existing Libero project. diff --git a/boards/beaglev/fire/demos-and-tutorials/setup-microchip-tools.sh b/boards/beaglev/fire/demos-and-tutorials/setup-microchip-tools.sh index ccfb3207610a8e371084ce09aa46b6aad12e5f23..9fd6e7e34bd7336232e9907ef05143310bc98f50 100755 --- a/boards/beaglev/fire/demos-and-tutorials/setup-microchip-tools.sh +++ b/boards/beaglev/fire/demos-and-tutorials/setup-microchip-tools.sh @@ -1,20 +1,50 @@ #!/bin/bash +# Gets Libero version + +dir=$(pwd) +while [[ "$dir" != "/" ]]; do + for subdir in "$dir"/*/; do + if [[ $subdir =~ Libero_SoC_v([0-9]+\.[0-9]+)/ ]]; then + Libero_ver="${BASH_REMATCH[1]}" + break 2 + fi + done + dir=$(dirname "$dir") +done + + +#Set preferred Libero version here if needed +#Libero_ver=2023.2 + +echo "Using Libero version:" $Libero_ver + +# Check if Libero_ver was set; if not, print an error and exit +if [[ -z "$Libero_ver" ]]; then + echo "Error: No directory found matching the pattern 'Libero_SoC_vXXXX.Y/'" + return 1 +fi + #=============================================================================== # Edit the following section with the location where the following tools are -# installed: +# installed if they aren't in the default location: # - SoftConsole (SC_INSTALL_DIR) # - Libero (LIBERO_INSTALL_DIR) # - Licensing daemon for Libero (LICENSE_DAEMON_DIR) #=============================================================================== + export SC_INSTALL_DIR=/home/$USER/Microchip/SoftConsole-v2022.2-RISC-V-747 -export LIBERO_INSTALL_DIR=/home/$USER/Microchip/Libero_SoC_v2023.2 +export LIBERO_INSTALL_DIR=/home/$USER/Microchip/Libero_SoC_v$Libero_ver export LICENSE_DAEMON_DIR=/home/$USER/Microchip/Linux_Licensing_Daemon export LICENSE_FILE_DIR=/home/$USER/Microchip/license +export SMARTHLS_INSTALL_DIR=$LIBERO_INSTALL_DIR/SmartHLS-$Libero_ver/SmartHLS #=============================================================================== # The following was tested on Ubuntu 20.04 with: -# - Libero 2023.2 +# - Libero 2023.2 and 2024.1 +# - SoftConsole 2022.2 +# It was also tested on Ubuntu 22.04 with: +# - Libero 2024.2 # - SoftConsole 2022.2 #=============================================================================== @@ -28,8 +58,11 @@ export FPGENPROG=$LIBERO_INSTALL_DIR/Libero/bin64/fpgenprog # Libero # export PATH=$PATH:$LIBERO_INSTALL_DIR/Libero/bin:$LIBERO_INSTALL_DIR/Libero/bin64 -export PATH=$PATH:$LIBERO_INSTALL_DIR/Synplify/bin -export PATH=$PATH:$LIBERO_INSTALL_DIR/Model/modeltech/linuxacoem +export PATH=$PATH:$LIBERO_INSTALL_DIR/SynplifyPro/bin +export PATH=$PATH:$LIBERO_INSTALL_DIR/ModelSimPro/modeltech/linuxacoem +export PATH=$PATH:$SMARTHLS_INSTALL_DIR/bin +export PATH=$PATH:$SMARTHLS_INSTALL_DIR/swtools/binutils/riscv-gnu-toolchain/bin + export LOCALE=C export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu:$LD_LIBRARY_PATH