This article provides additional information on setting up Cygwin for the Altera® ( Intel® ) SoC FPGA development environment.
Introduction
Starting with SoC FPGA Embedded Development Suite (SoC EDS) version 19.1 for Windows, Cygwin is no longer included in the tool package and must be installed and setup separately.
This article describes how to set up the SoC EDS Embedded Command Shell environment on a development machine with Cygwin already installed, instead of the standard installation procedure. This is useful, for example, when installing multiple versions of version 19.1 or later on a single machine and you want to eliminate the waste of installing multiple Cygwin installations for each version.
Reference:
For standard installation instructions, please refer to the following article on this site, as well as information in the Altera® ( Intel® ) Knowledge Data Base (KDB).
- Installation instructions for using Nios® II SBT / SoC EDS with Quartus® Prime Pro ver 19.1 (In Japanese)
- KDB: How do I install Cygwin for SoCEDS?
Cygwin Locations
The standard installation procedure assumes that Cygwin is installed in the following locations
- For Standard Edition : C:\intelFPGA\<version>\embedded\host_tools\cygwin
- For Pro Edition: C:\intelFPGA_pro\<version>\embedded\host_tools\cygwin
If you use Cygwin installed in a location other than the above, you will need to edit the batch file for launching Embedded Command Shell.
Edit target:
- In case of Standard Edition: C:\intelFPGA\<version>\embedded\Embedded_Command_Shell .bat
- For Pro Edition: C:\intelFPGA_pro\<version>\embedded\Embedded_Command_Shell .bat
Edit contents:
Edit the path of bash.exe described in the last line of Embedded_Command_Shell.bat.
@ REM ######################################
@ REM # Launch cygwin soceds command shell
:run_soceds_command_shell
@ "%_SOCEDS_ROOT%host_tools/cygwin/bin/bash.exe" --login -c '"%_SOCEDS_ROOT%embedded_command_shell.sh" %*'
Before editing, the standard location ""%_SOCEDS_ROOT%host_tools/cygwin/bin/bash.exe"" is specified as shown above, so edit this part to match the location of Cygwin on the development machine.
For example, if Cygwin is installed directly under the C drive, rewrite as follows
@ "C:/cygwin/bin/bash.exe" --login -c '"%_SOCEDS_ROOT%embedded_command_shell.sh" %*'
This is all that is required to support the Cygwin location change.
Packages to be installed on Cygwin
The standard installation procedure installs the following packages in the Cygwin environment.
"make,gcc-core,gcc-g++, ncurses, inetutils, openssh, mosh, patch, flex, bison, tar, bzip2, zip, unzip, util-linux, git, subversion, vim, xxd, m4, wget, dos2unix, libintl devel, diffutils, libncurses-devel, iperf, xorg-server, xinit, mingw64-x86_64-gcc-core, mingw64-x86_64-gcc-g++, python2, bcrypt, ccrypt, libprocps8, tcsh"
Make sure that all of the above packages are installed in the Cygwin environment you will be using. If any of them are missing, download the installer ( setup-x86_64.exe ) from https://cygwin.com and re-setup the Cygwin environment.
After running the installer, the setup screen will proceed as shown below. On the "Select Packages" screen, you can check and edit the package installation status, and specify additional installation of missing packages.
Figure. Cygwin setup screen
Point:
In addition to the packages specified in the standard procedure, you can increase the number of commands that can be used on Embedded Command Shell by adding the packages you want to use on the above screen.
Conclusion
As we have shown, it is very easy to use Cygwin installed in a non-standard location for SoC EDS. There are only two points to keep in mind. After confirming that no packages are missing, simply change the path information of bash.exe when launching Shell.
This article is for SoC EDS, but the same method is applicable to the version of Nios® II SBT that uses Cygwin (not the newer Nios® II SBT that uses WSL).
Note:
The method described in this article differs from the manufacturer's recommended procedure. If you experience problems with the setup described in this article, please check with your environment set up according to the standard installation procedure.