Forum Discussion
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:
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.