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

EDS on Quartus 19.1 on Windows , linker error

JVano
Beginner
3,207 Views

Building Hello_World Sample, with minimum NIOSII system, internal memory. I get this error:

 

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

Perhaps some missing semicolon in the parameter of the linker call for " -msys-lib=" ?

In the console , the nios2-elf-g++.exe call looks like :

 

nios2-elf-g++.exe -'C:/Users/acer/Documents/mpython/hard/fpga/hello_world/SOFTWARE/sopc_hello_world_bsp/linker.x' -msys-crt0='C:/Users/acer/Documents/mpython/hard/fpga/hello_world/SOFTWARE/sopc_hello_world_bsp/obj/HAL/src/crt0.o' -msys-lib= -LC:/Users/acer/Documents/mpython/hard/fpga/hello_world/SOFTWARE/sopc_hello_world_bsp -msmallc -Wl,-Map=sopc_hello_world.map  -Os -g -Wall  -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o sopc_hello_world.elf obj/default/hello_world_small.o -lm -msys-lib=m

 

Using EDS & Quartus 17.1 works perfectly, without linking error.

 

 

Somebody know how to fix it ?

 

thank you

0 Kudos
11 Replies
EricMunYew_C_Intel
Moderator
3,109 Views

Hi, Juan

 

Do you mean the same design, it works in Quartus 17.1, but it failed in Quartus 19.1 ?

 

Thanks.

 

Eric

0 Kudos
JVano
Beginner
3,109 Views

Hello Eric:

 

Yes, works on Quartus 17.1 but failed on Quartus 19.1 , i forgot to say both are LITE Edition.

 

0 Kudos
DrPingy
Beginner
3,109 Views

I had the same problem by upgrate a projekt from quartus18.1 to 20.1.

It is a MAX 10 project with the standard edition.

Correct is -msys-lib=hal_bsp

I have changed in make file

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

to

APP_LDFLAGS += -msys-lib=$(SYS_LIB)

Than it works fine.

Please change only this line.

EricMunYew_C_Intel
Moderator
3,052 Views

Hi, Juan


Can you elaborate which OS you are running and the environment ?


Thanks.


Eric


0 Kudos
EricMunYew_C_Intel
Moderator
3,052 Views

Hi, Juan


On the other hand, can you try not to open the Nios Eclipse tool from Quartus or Platform Designer.

Can you try to launch the Nios Eclipse standalone tool and load the .sopcinfo and check if you can create the hello world ?


Below is for your reference.

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


Thanks.


Eric




0 Kudos
EricMunYew_C_Intel
Moderator
3,046 Views

Hi, Juan


Did you manage to open up Nios SBT as standalone tool and build your hello world example ?


Again, try not to open Nios SBT tool from Quartus or Platform Designer.


Thanks.


Eric



0 Kudos
EricMunYew_C_Intel
Moderator
3,016 Views

Hi, Juan


Is your problem resolved ?


Can we close the case ?


Thanks.


Eric


0 Kudos
EricMunYew_C_Intel
Moderator
2,997 Views

Hi, Juan


Is your problem resolved ? And can we close the case ?


Thanks.


Eric


0 Kudos
bpere15
Novice
2,878 Views

Hi I had the same issue and tried your solution of changing the Makefile and it sucessfully compiled. However, when I tired to run the software on the hardware I get this error now:

wsl make all
Info: Building /mnt/c/Users/Reza/Desktop/work_fpga_folder/hard_reset_test/software/hard_reset_desktop_test4_bsp/
make --no-print-directory -C /mnt/c/Users/Reza/Desktop/work_fpga_folder/hard_reset_test/software/hard_reset_desktop_test4_bsp/
[BSP build complete]
Info: Creating hard_reset_desktop_test4.objdump
nios2-elf-objdump.exe --disassemble --syms --all-header --source hard_reset_desktop_test4.elf >hard_reset_desktop_test4.objdump
nios2-elf-objdump.exe: can't disassemble for architecture UNKNOWN!

Makefile:1022: recipe for target 'hard_reset_desktop_test4.objdump' failed
make: *** [hard_reset_desktop_test4.objdump] Error 1
make: *** Deleting file 'hard_reset_desktop_test4.objdump'

 

help please

Cache_miss
Beginner
2,634 Views

 

 

Setup:

Windows 10

WSL 1

Quartus Lite 20.1

 

 

I am evaluating MAX10 Nios II Developement Kit vs Xilinx MicroBlaze

Finding a recent introduction to get up and running quickly was difficult.   I used:

https://www.intel.com/content/dam/altera-www/global/en_US/uploads/4/45/Hello_World_Lab_Manual_MAX10.pdf

The project fails when trying to generate the ELF in SBT Eclipse as instructed on page 39 with the following error:

nios2-elf-g++.exe -T'E:/Projects/devkit_hello_world/software/hello_world_sw_bsp/linker.x' -msys-crt0='E:/Projects/devkit_hello_world/software/hello_world_sw_bsp/obj/HAL/src/crt0.o' -msys-lib= -LE:/Projects/devkit_hello_world/software/hello_world_sw_bsp -msmallc -Wl,-Map=hello_world_sw.map -Os -g -Wall -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global -o hello_world_sw.elf obj/default/hello_world_small.o -lm -msys-lib=mReached the end of the guide and ran into this error

nios2-elf-g++.exe: error: missing argument to '-msys-lib='
Makefile:1010: recipe for target 'hello_world_sw.elf' failed
make: *** [hello_world_sw.elf] Error 1

I changed the following line in the Makefile:

ifneq ($(CRT0),)
APP_LDFLAGS += -msys-crt0='$(call adjust-path-mixed,$(CRT0))'
endif
ifneq ($(SYS_LIB),)
APP_LDFLAGS += -msys-lib=$(call adjust-path-mixed,$(SYS_LIB))
endif

To:

ifneq ($(CRT0),)
APP_LDFLAGS += -msys-crt0='$(call adjust-path-mixed,$(CRT0))'
endif
ifneq ($(SYS_LIB),)
APP_LDFLAGS += -msys-lib=$(BSP_SYS_LIB)
endif

 

This allows SBT to generate a ELF but when downloaded to the target the software doesn't work. There is little chance it is a runtime issue given that I'm following the example outlined in the documentation.  I believe there is an issue during the build as documented in the thread.

Yes, I am aware of and have properly setup WSL 1 as directed in: https://www.intel.com/content/altera-www/global/en_us/index/support/support-resources/knowledge-base/tools/2019/how-do-i-install-the-windows--subsystem-for-linux---wsl--on-wind.html

 

Please advise.

 

 

0 Kudos
Reply