Forum Discussion
Hi
Your suggestions is what I did in first place but the error remain
You should change the line 37 in ${_ACDS_ROOT}/nios2eds/sdk2/bin/nios2-bsp from
if [[ $uname =~ "Microsoft" ]]; then
into
if [[ $uname =~ "Microsoft" || $uname =~ "microsoft" ]]; then
On my machine uname will return
uname = '4.19.104-microsoft-standard'
then the nios2-bsp script will be able to execute line 451
nios2-bsp-update-settings$windows_exe --settings "$settings_pname" --bsp-dir $bsp_dir --so
($windows_exe will be set correctly)
This get ride of the first execution error and the scripts can move forward.
Now the scripts encounter the following error in the "Generate HDL log"
Error: s0: Cannot find sequencer/sequencer.elf
Which seems to be related to
WARNING: The BSP persisted OS version "9.1" is not available. The default latest BSP version will be used instead. WARNING: The BSP being loaded used OS version "9.1". The BSP version "20.1" will be used instead. Makefile:515: Warning: SOPC File C:/Users/StefanThorlacius/AppData/Local/Temp/alt8456_4792771601944741470.dir/0533_s0_gen/qsys_pre_compile/pre_compile.sopcinfo could not be found. make[2]: nios2-elf-gcc: Command not found make[2]: *** [obj/HAL/src/alt_dcache_flush_all.o] Error 127 make[1]: *** [../sequencer_bsp-recurs-make-lib] Error 2 make: *** [elf] Error 2
If above suggestion to nios2-bsp is correct then line 28 in ………./20.1/nios2eds nios2_command_shell.sh should be changed from
if [[ $uname =~ "Microsoft" ]]
to
if [[ $uname =~ "Microsoft" || $uname =~ "microsoft" ]]
as well
- SThor85 years ago
Occasional Contributor
Additional changes, I guess this come from that I have installed ubuntu as an App under windows.
Quartus have installed the tool chain under
…./intelFPGA/20.1/nios2eds/bin/gnu/H-x86_64-mingw32/binand because the latest release of windows, WSL 2 and the ubuntu installation the linux support is no longer identified as "Microsoft" but a true installation.
This will affect how .../intelFPGA/20.1/nios2eds/nios2_command_shell.sh sets up the path.
(around) line 160 in nios2_command_shell.sh it make a test
if grep -q Microsoft /proc/version; then if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-mingw32/bin fi else if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-pc-linux-gnu/bin fi fiBut becouse it now is identify the linux as a true distribution the H-x86_64-mingw32/bin directory is no longer identified, the if construction should be changed into
if grep -q Microsoft /proc/version; then if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-mingw32/bin fi else if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin elif [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-pc-linux-gnu/bin fi fiThe makefile will now find the gcc compiler, nios2-elf-gcc, which is used in the on the fly made Makefile (in my case)
/mnt/c/Users/StefanThorlacius/AppData/Local/Temp/alt8456_4792771601944741470.dir/1625_s0_gen/qsys_pre_compile/system_ddr3_s0_software
- SThor85 years ago
Occasional Contributor
Sadly I can not continue the investigation, the file /mnt/c/intelfpga/20.1/quartus/../nios2eds/sdk2/bin/nios2-app-generate-makefile.exe
is a binary and it is used in a auto generated makefile.
nios2-app-generate-makefile.exe creates the Makefile
/mnt/c/Users/........…./qsys_pre_compile/system_ddr3_s0_software/sequencer/MakefileThis Makefile is using the tool nios2-elf-gcc, which fails, my guess is that it is using nios2-elf-gcc instead of nios2-elf-gcc.exe.
It also seems it is using the path
C:/Users/............/Temp/alt8456_4792771601944741470.dir/............/qsys_pre_compile/pre_compile.sopcinfo
and not
/mnt/c/User/............/Temp/alt8456_4792771601944741470.dir/............/qsys_pre_compile/pre_compile.sopcinfo
So intel have to take over from here
Conclusion:1. In file nios2-bsp change the line
if [[ $uname =~ "Microsoft" ]]; then
into
if [[ $uname =~ "Microsoft" || $uname =~ "microsoft" ]]; then2. In file nios2_command_shell.sh change the line
if [[ $uname =~ "Microsoft" ]]; then
into
if [[ $uname =~ "Microsoft" || $uname =~ "microsoft" ]]; then3. In In file nios2_command_shell.sh change the lines
if grep -q Microsoft /proc/version; then if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-mingw32/bin fi else if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-pc-linux-gnu/bin fi fiinto
if grep -q Microsoft /proc/version; then if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-mingw32/bin fi else if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin elif [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin" ]; then env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin else env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-pc-linux-gnu/bin fi fi4. My guess, fix nios2-app-generate-makefile so it use nios2-elf-gcc.exe if H-x86_64-mingw32/bin installed
5. My guess, fix nios2-app-generate-makefile so it use the correct path to qsys_pre_compile/pre_compile.sopcinfo- KennyT_altera5 years ago
Super Contributor
I would assume that you have did the steps below:
1) uninstall Ubuntu* 18.04 (if you have one)
2) uninstall wsl
3) re-install wsl
4) download latest Ubuntu 18.04 from Microsoft Shop & install it
5) execute following on Ubuntu shell :
sudo apt-get update
sudo apt install wsl
sudo apt install dos2unix
sudo apt install make
sudo apt-get upgrade
Currently, which version of Ubuntu that you were using?