Hi guys!
So I had the very same issue with quartus 15.0.
I have dug in and found out the culprit.
As you can see in my process monitor screenshot, make is calling the bash command, which leads to spawning wsl, which is obviously false, as the cygwin bash should be called.
So there is the file, if you have installed to the default location: C:\altera\15.0\ip\altera\alt_mem_if\alt_mem_if_tcl_packages\gen\uniphy_gen.tcl
It generates a Makefile, which is looking like this on my side:
MC_MACROS := -DAC_ROM_USER_ADD_0=0_0000_0000_0000 -DAC_ROM_USER_ADD_1=0_0000_0000_1000 -DAC_ROM_MR0=0001001010001 -DAC_ROM_MR0_CALIB= -DAC_ROM_MR0_DLL_RESET=0001101010000 -DAC_ROM_MR1=0000001000000 -DAC_ROM_MR1_OCD_ENABLE= -DAC_ROM_MR2=0010000001000 -DAC_ROM_MR3=0000000000000 -DAC_ROM_MR0_MIRR=0001000101001 -DAC_ROM_MR0_DLL_RESET_MIRR=0001010101000 -DAC_ROM_MR1_MIRR=0000000100000 -DAC_ROM_MR2_MIRR=0010000010000 -DAC_ROM_MR3_MIRR=0000000000000 -DQUARTER_RATE=0 -DHALF_RATE=0 -DFULL_RATE=1 -DNON_DES_CAL=0 -DAP_MODE=0 -DGUARANTEED_READ_BRINGUP_TEST=0 -DMEM_ADDR_WIDTH=13 -DHARD_PHY=1
.PHONY : all
all : hex
.PHONY : hex
hex : elf
C:/altera/15.0/quartus/../nios2eds/bin/elf2hex --base=0x10000 --end=0x137ff --create-lanes=0 --width=32 --record=4 --input=sequencer/sequencer.elf --output=../CHRC_qsys_ddr3_control_s0_sequencer_mem.hex
.PHONY : elf
elf : setup
$(MAKE) -C sequencer_bsp clean altera_nios2_qsys_hal_driver_ASM_LIB_SRCS=HAL/src/crt0.S hal_C_LIB_SRCS=HAL/src/alt_main.c hal_C_LIB_SRCS+=HAL/src/alt_load.c altera_nios2_qsys_hal_driver_C_LIB_SRCS=HAL/src/altera_nios2_qsys_irq.c altera_nios2_qsys_hal_driver_C_LIB_SRCS+=HAL/src/alt_icache_flush_all.c altera_nios2_qsys_hal_driver_C_LIB_SRCS+=HAL/src/alt_dcache_flush_all.c
$(MAKE) -C sequencer clean all altera_nios2_qsys_hal_driver_ASM_LIB_SRCS=HAL/src/crt0.S hal_C_LIB_SRCS=HAL/src/alt_main.c hal_C_LIB_SRCS+=HAL/src/alt_load.c altera_nios2_qsys_hal_driver_C_LIB_SRCS=HAL/src/altera_nios2_qsys_irq.c altera_nios2_qsys_hal_driver_C_LIB_SRCS+=HAL/src/alt_icache_flush_all.c altera_nios2_qsys_hal_driver_C_LIB_SRCS+=HAL/src/alt_dcache_flush_all.c
.PHONY : setup
setup : mc
ifeq ($(wildcard sequencer_bsp/Makefile),)
C:/altera/15.0/quartus/../nios2eds/sdk2/bin/nios2-bsp hal sequencer_bsp .. --default_sections_mapping sequencer_mem --use_bootloader DONT_CHANGE
endif
ifeq ($(wildcard sequencer/Makefile),)
C:/altera/15.0/quartus/../nios2eds/sdk2/bin/nios2-app-generate-makefile --bsp-dir sequencer_bsp --app-dir sequencer --elf-name sequencer.elf --set OBJDUMP_INCLUDE_SOURCE 1 --set APP_CFLAGS_DEFINED_SYMBOLS -DSTACK_POINTER=0x137f0 --set APP_CFLAGS_OPTIMIZATION \"-Os --param max-inline-insns-single=1000 -fno-zero-initialized-in-bss\" --set APP_CFLAGS_WARNINGS \"-Winline -Wall\" --src-files sequencer.c sequencer.h tclrpt.c tclrpt.h sequencer_auto_ac_init.c sequencer_auto_inst_init.c
endif
.PHONY : mc
mc :
ifeq ($(wildcard sequencer_mc),sequencer_mc)
C:/altera/15.0/quartus/bin64/uniphy_mcc -ac_code sequencer_mc/ac_rom.s -inst_code sequencer_mc/inst_rom.s -ac_rom ../CHRC_qsys_ddr3_control_s0_AC_ROM.hex -inst_rom ../CHRC_qsys_ddr3_control_s0_inst_ROM.hex -header sequencer/sequencer_auto.h -vheader ../sequencer_auto_h.sv -ac_rom_init sequencer/sequencer_auto_ac_init.c -inst_rom_init sequencer/sequencer_auto_inst_init.c $(MC_MACROS)
endif
.PHONY : gui
gui : setup
eclipse-nios2
As you see it makes a call to this file: C:/altera/15.0/quartus/../nios2eds/sdk2/bin/nios2-bsp
Which on the other hand starts with the shebang:
#!/bin/bash
So the solution is to modify this file: C:\altera\15.0\ip\altera\alt_mem_if\alt_mem_if_tcl_packages\gen\uniphy_gen.tcl
By me it is line 3776
Original:
puts $fh "\t$qdir/../nios2eds/sdk2/bin/nios2-bsp hal sequencer_bsp .. --default_sections_mapping sequencer_mem --use_bootloader DONT_CHANGE"
Modified one:
puts $fh "\t$qdir/bin64/cygwin/bin/bash.exe $qdir/../nios2eds/sdk2/bin/nios2-bsp hal sequencer_bsp .. --default_sections_mapping sequencer_mem --use_bootloader DONT_CHANGE"
We just added the part:
$qdir/bin64/cygwin/bin/bash.exe to tell the makefile it should explicitly call the shell script via the cygwin shell.
I think this method could possible be applied to all versions which suffer from the same problem because of an existing wsl installation.
This makes a call to the 64 bit cygwin, so if you have winx64, it should work.
Shame on intel, that their official support page does not give this exact workaround:
https://www.intel.com/content/www/us/en/programmable/support/support-resources/knowledge-base/emif/2018/error--cannot-find-sequencer-elf.htmlCheers!