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++

NIOS application build fail

Boondoggler
Beginner
1,854 Views

Hi,


I have recently created a NIOS II application for UART which has built and run correctly up until today. I have not made any changes other than to rebuild the release/debug app.


In fact all my apps now wont build in Eclipse (again no changes to settings or code have been made).


I am running Quartus Lite 20.1 using EDS (Eclipse Mars 4.5.2 release) to create the NIOS application.
The only thing I can see is different is that my Windows box updated to 2004 build between builds (I know there have been changes to WSL in this).


This is the output from the toolchain:


Info: Linking uart_int_app.elf
nios2-elf-g++.exe -T'C:/Users/xxx/Desktop/Quartus/DE0/UART/software/uart_int_app_bsp/linker.x' -msys-crt0='C:/Users/xxx/Desktop/Quartus/DE0/UART/software/uart_int_app_bsp/obj/HAL/src/crt0.o' -msys-lib= -LC:/Users/xxx/Desktop/Quartus/DE0/UART/software/uart_int_app_bsp -msmallc -Wl,-Map=uart_int_app.map -O0 -g -Wall -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global -o uart_int_app.elf obj/default/InterruptHandlerForUart.o obj/default/hello_world.o -lm -msys-lib=m
nios2-elf-g++.exe: error: missing argument to '-msys-lib='
Makefile:1011: recipe for target 'uart_int_app.elf' failed
make: *** [uart_int_app.elf] Error 1

Any ideas?

0 Kudos
10 Replies
Boondoggler
Beginner
1,817 Views

So, 

Rolling back to 18.1 (Cygwin based) version and importing the project works ok. Anyone else seeing this issue with v20?

0 Kudos
JET60200
New Contributor I
1,814 Views

"I have recently created a NIOS II application for UART which has built and run correctly up until today. I have not made any changes other than to rebuild the release/debug app."

 

Hi @Boondoggler , I'm interesting to your NIOS Application for UART ,  if possible, can you share it here for us for  reference.  3Tanks

0 Kudos
Boondoggler
Beginner
1,804 Views

Hi, really that's for another thread and doesn't answer my question. Unfotunately I can't give the source out.

The inspirations came from:

https://ralphexe.wordpress.com/2016/11/01/altera-uart-ip-core-using-de0-nano/

which the first part is useful but very basic, but is pretty standard adding UART to NIOS builds and this:

https://community.intel.com/t5/Nios-II-Embedded-Design-Suite/NiosII-Uart-Interrupt-Handler/td-p/84690

which gave me direction on creating my own. Or use DMA which requires working out the code to understand how many characters are in the Rx buffer. If so, this worth a read:

https://community.intel.com/t5/Programmable-Devices/Nios-Uart-And-Dma/td-p/15995

Also this is a useful source:

https://class.ece.uw.edu/469/peckol/index.html

0 Kudos
EricMunYew_C_Intel
Moderator
1,765 Views

Hi Boon,


Can you try to find a new computer to install or remove NiosII EDS and reinstall it?


You may 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
WaibKil
Beginner
1,744 Views

Hi,

I'm having similar issues, with all my pre-existing Nios project compiling but unable to run/debug and have tried those workarounds (and succesfully upgraded to wsl 2) and other solutions seen in previous post such as :

change

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

to 

APP_LDFLAGS += -msys-lib=hal_bsp

 

and manually making an project.elf.srec file with
BUILD_PRE_PROCESS := touch $(ELF).srec

 

but it still display the following errors :

wslpath: ./Found: No such file or directory
wslpath: ./Found.srec: No such file or directory

nios2-elf-objcopy.exe: supported targets: elf32-littlenios2 elf32-bignios2 elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin
wslpath: ./Found.srec: No such file or directory
Using cable "USB-BlasterII [USB-1]", device 1, instance 0x00
Pausing target processor: not responding.
Resetting and trying again: FAILED
Leaving target processor paused
rm: cannot remove './Found.srec': No such file or directory

 

So is there any other workaround you can think of ? I'm also interested in understanding what causes all this previously functioning project to stop working.

Any ideas would be welcome

Kindly,

Boondoggler
Beginner
1,721 Views

Hi Eric

I haven't seen any notification emails of new posts, so sorry for missing these. Currently working on v18 environment as all is well.

I will try your suggestions and post back shortly.

Thanks

BD

 

0 Kudos
EricMunYew_C_Intel
Moderator
1,663 Views

Hi, Boon


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



Eric


0 Kudos
EricMunYew_C_Intel
Moderator
1,641 Views

Hi, Boon


Is your problem resolved ?


Eric


0 Kudos
Reply