Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16595 Discussions

nios2 eclipse 19.4 - Compilation error: nios2-elf-cc: command not found

TSege1
Beginner
3,820 Views

Hi All,

I Am using nios2 eclipse 19.4 (Quartos prime pro).

I installd WSL according to nios2 software handbook.

 

When i trying to compile BSP with small C library option, i get the error:

nios2-elf-cc: command not found 

 

build-newlib.log file attached 

thanks

 

 

 

0 Kudos
16 Replies
EricMunYew_C_Intel
Moderator
3,789 Views

Hi, Tamir


Would you mind to forward your design to me for replication ?

May I know which Linux you are using ? which wsl you installed etc. ?


Thanks.


Eric


0 Kudos
TSege1
Beginner
3,768 Views

Hi Eric,

My OS is  Windows 10 Pro, OS build 18362.1016

WSL version - Ubuntu 18.04 LTSWSL 1.  installed according to "Nios® II Software Developer
Handbook" version 20.2

the "Drag and drop" feature isn't support  .sopcinfo file uploading, is there another way i can send you the file? 

I think you can reproduce the problem with any .sopcinfo (version19.4) you going to use.

I am trying to Build a simple "Hello World" project.

 

Thanks,

Tamir

0 Kudos
EricMunYew_C_Intel
Moderator
3,748 Views

Hi Tamir,


Can you try to find a new computer to install or remove NiosII EDS and reinstall it? May you try newer 20.1 or 20.2.


You can try below manually.

 

1. install WSL for windows

i. https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/nios2/n2sw_nii5v2gen2.pdf (chapter 2.1)

 Note: Windows 10 build version 16215.0 or higher is the recommended operating system version.

ii. After installation has successfully completed, launch Ubuntu 18.04.

iii. Install additional distro packages required for Nios II EDS using the following commands:

 a. sudo apt install wsl

 b. sudo apt install doc2unix

 c. sudo apt install make

 

before"sudo apt install wsl"

run:

sudo apt-get update

 

2. install nios2 eclipse folder

https://www.intel.com/content/altera-www/global/en_us/index/support/support-resources/knowledge-base/tools/2019/why-does-the-nios--ii-not-installed-after-full-installation-of-t.html


Eric


0 Kudos
TSege1
Beginner
3,702 Views

Hi Eric,

I Tried it for 3 times, still not working.

 

thanks

0 Kudos
TSege1
Beginner
3,703 Views

Hi Eric,

I tried it before and it's not help.

Thanks

0 Kudos
EricMunYew_C_Intel
Moderator
3,730 Views

Hi, Tamir


Is your problem resolved ?


Eric



0 Kudos
EricMunYew_C_Intel
Moderator
3,699 Views

Hi, Tamir


May I know are you installing wsl 1 or 2 ?


Eric


0 Kudos
TSege1
Beginner
3,694 Views
0 Kudos
EricMunYew_C_Intel
Moderator
3,688 Views

Hi, Tamir


Would you mind to install QPro 20.2 ?


Thanks.


Eric


0 Kudos
TSege1
Beginner
3,674 Views

Hi Eric,

Also not working in 20.02

Please see Attached files.

 

Thanks,

Oren

0 Kudos
EricMunYew_C_Intel
Moderator
3,624 Views

Hi, Tamir


Can you try below workarounds.


#1 

Open a NIOS2 command shell

try and make an NIOS2 application

You get the following error: nios2-elf-gcc.exe: error: CreateProcess: No such file or directory 

To resolve this you need run the following command prior to calling make, "export WSLENV=PATH/l:${WSLENV}"

#2

With the above fix you can compile all the files but the link fails: 

  nios2-elf-g++.exe: error: missing argument to '-msys-lib='

To resolve this you need to modify the application Makefile and change the following line:

  APP_LDFLAGS += -msys-lib=$(call adjust-path-mixed,$(SYS_LIB)) to APP_LDFLAGS += -msys-lib=$(SYS_LIB)

In adjust-path-mixed should not be used in this case as SYS_LIB is a name of a library not a PATH to the library

#3

The final problem is that from eclipse debugging fails with the following error:

wslpath: /mnt/f/main_clean/Software/omni_ip/projects/wfm_ss/example/wfm/wfm_app/wfm.elf.srec: No such file or directory

wslpath: /mnt/f/main_clean/Software/omni_ip/projects/wfm_ss/example/wfm/wfm_app/wfm.elf.srec: No such file or directory

Using cable "USB-BlasterII [USB-1]", device 1, instance 0x01

Pausing target processor: OK

Restarting target processor

rm: cannot remove '/mnt/f/main_clean/Software/omni_ip/projects/wfm_ss/example/wfm/wfm_app/wfm.elf.srec': No such file or directory

To resolve this problem the Application Makefile must be modified again with the following change:

BUILD_PRE_PROCESS := to BUILD_PRE_PROCESS := touch $(ELF).srec



Thanks.


Eric



0 Kudos
TSege1
Beginner
3,559 Views

Hi,

 

Step #1 and #2 fixed the compilation error.

I will try step #3 in the next few days and  post the answer.

 

thanks,

tamir

0 Kudos
TSege1
Beginner
3,478 Views

Hi,

#3 didn't help with Eclipse debugging problem.
please see  attached  file - eclipse_19.4_debugg_error_message.png

thanks,
Tamir




0 Kudos
EricMunYew_C_Intel
Moderator
3,593 Views

Hi, Tamir


Is your problem resolved ?


Eric




0 Kudos
Reply