Getting Start Install WSL

From Terasic Wiki

(Difference between revisions)
Jump to: navigation, search
(deme_batch execute error)
(13 intermediate revisions not shown)
Line 24: Line 24:
=Reference=
=Reference=
* Section 2.1 "Installing Windows Subsystem for Linux (WSL) on Windows" of [https://www.intel.com/content/www/us/en/programmable/documentation/lro1419794938488.html#puq1561069548076 Nios II Software Developer Handbook]
* Section 2.1 "Installing Windows Subsystem for Linux (WSL) on Windows" of [https://www.intel.com/content/www/us/en/programmable/documentation/lro1419794938488.html#puq1561069548076 Nios II Software Developer Handbook]
 +
 +
=Issues=
 +
== WSL2 ==
 +
If users install to '''WSL2''' version, they may encounter the following problems:
 +
 +
[[File:Wsl issue 01.png|700px]]
 +
 +
To check the version of WSL installed, users can enter in the Command Prompt window:
 +
 +
wsl -l -v
 +
 +
[[File:Wsl issue 02.png|400px]]
 +
 +
If the version of WSL is 2, you can enter the following command in the Command Prompt window to change the WSL version to 1.
 +
 +
wsl --set-version Ubuntu-18.04 1
 +
== deme_batch execute error ==
 +
 +
*Problem description:
 +
*:When executing deme_batch, the following error occurred
 +
 +
[[File:Wsl issue 03.png|700px]]
 +
 +
or
 +
 +
[[File:Wsl issue 06.jpg|500px]]
 +
 +
*Reason:
 +
*:Microsoft modified the behavior of wslpath, causing nios2-download to fail to resolve the path correctly
 +
*:reference: https://github.com/microsoft/WSL/issues/4908#issuecomment-642024969
 +
*Solution 1: Using intel's patch to fix this issue : https://www.intel.com/content/www/us/en/support/programmable/articles/000073953.html
 +
*Solution 2: Modify the nios2-download file
 +
# The location of the nios2-download file is in <Quartus installation location>\Quartus version\nios2eds\bin\. For example: c:\intelFPGA_pro\20.2\nios2eds\bin\
 +
# Find the content '''$(adjust_path_mixed $srecfile)''' in the '''nios2-download''' file, and add '''touch $srecfile''' in the previous line.
 +
#:
 +
#:[[File:Wsl issue 04.png|900px]]
 +
#Save file and try to execute the demo batch file again.
 +
 +
*Solution 3: Modify the .sh file in the demo batch foleder
 +
# Modify test.sh, add '''touch $project_elf.srec''' before nios2-download
 +
[[File:Wsl issue 05.png|700px]]

Revision as of 15:09, 14 December 2021

Starting with the Nios® II EDS in the Intel® Quartus® Prime Pro Edition software version 19.2 and Intel® Quartus® Prime Standard Edition software version 19.1, the Cygwin component in the Windows* version of Nios II EDS has been removed and replaced with Windows Subsystem for Linux(WSL)

Contents

Install Setps

  1. Open PowerShell as Administrator
    Wsl 002.png
  2. Run : Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    Wsl 003.png
  3. Restart your computer when prompted.
  4. Install the Linux Distribution on your Windows 10, Please install Ubuntu 18.04 LTS for WSL from the flowing link: Ubuntu 18.04 LTS
    Note: Windows* 10 build version 16215.0 or higher is the recommended operating system version.
  5. From the distro's page, select "Get"
    Wsl 004.png
  6. Now that your Linux distro is installed, you must initialize your new distro instance once, before it can be used. You will be prompted to create a new user account (and its password).
    Wsl 005.png
  7. Most distros ship with an empty/minimal package catalog. We strongly recommend regularly updating your package catalog, and upgrading your installed packages using your distro's preferred package manager. On Debian/Ubuntu, you use apt:
    sudo apt update && sudo apt upgrade
    Wsl 006.png
  8. Install additional distro packages required for Nios® II EDS using the following command:
    sudo apt install wsl
    sudo apt install dos2unix
    sudo apt install make
    Wsl 007.png
  9. Once the installation is complete, the WSL is installed.

Reference

Issues

WSL2

If users install to WSL2 version, they may encounter the following problems:

Wsl issue 01.png

To check the version of WSL installed, users can enter in the Command Prompt window:

wsl -l -v

Wsl issue 02.png

If the version of WSL is 2, you can enter the following command in the Command Prompt window to change the WSL version to 1.

wsl --set-version Ubuntu-18.04 1

deme_batch execute error

  • Problem description:
    When executing deme_batch, the following error occurred

Wsl issue 03.png

or

Wsl issue 06.jpg

  1. The location of the nios2-download file is in <Quartus installation location>\Quartus version\nios2eds\bin\. For example: c:\intelFPGA_pro\20.2\nios2eds\bin\
  2. Find the content $(adjust_path_mixed $srecfile) in the nios2-download file, and add touch $srecfile in the previous line.
    Wsl issue 04.png
  3. Save file and try to execute the demo batch file again.
  • Solution 3: Modify the .sh file in the demo batch foleder
  1. Modify test.sh, add touch $project_elf.srec before nios2-download

Wsl issue 05.png

Personal tools