Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12590 Discussions

Required $SOPC_KIT_NIOS2 Environmental Variable is not set

MHahn4
New Contributor I
2,633 Views

Hi,

 

I'm trying to get the Nios II Eclipse toolchain to work on a Windows 10 machine. But the New Project wizard (File -> New -> Nios II Application and BSP from Template) does fail with the error:

 

Executing: wsl ./create-this-app --no-make (C:\some\directory\projectname\qsys\software\test_software) Required $SOPC_KIT_NIOS2 Environmental Variable is not set!

I've set the SOPC_KIT_NIOS2 variable to "C:\intelFPGA_pro\19.2\nios2eds" both on Windows and the WSL Linux (Ubuntu 18.04 LTS) and also in the Eclipse settings (C/C++ -> Build -> Environment). But the error still occurs.

 

Did I miss something?

 

Or is there a way to set the Nios II toolchain to use Cygwin instead of wsl?

 

Thanks

 

 

Edit:

I could narrow the problem to the wsl command:

bash -c "echo $SOPC_KIT_NIOS2"

outputs the environment variable correctly, but

wsl echo $SOPC_KIT_NIOS2

can't find it. Sadly the generated scripts use the wsl command...

 

How can this be resolved?

0 Kudos
1 Solution
MHahn4
New Contributor I
2,267 Views

Found the answer:

 

Created a new environment variable in Windows:

 

Name: WSLENV

Value: SOPC_KIT_NIOS2/p

 

After restarting Eclipse and Quartus it worked.

View solution in original post

2 Replies
MHahn4
New Contributor I
2,268 Views

Found the answer:

 

Created a new environment variable in Windows:

 

Name: WSLENV

Value: SOPC_KIT_NIOS2/p

 

After restarting Eclipse and Quartus it worked.

malcolm_locke
Beginner
1,730 Views

Great :). I have no idea how you worked this out but it worked for me 

0 Kudos
Reply