Nios II Eclipse report error when run the mem_init_generate command
i am working on a project with a Nios II inside C4 FPGA, which uses on chip memory as the RAM.
so after i build the project, i still need to run make targets-->Build -->mem_init_generate to generate the initialzation HEX file for the on chip RAM.
this works well so far.
but yesterday i must renew my laptop per the requirement from the company, and then i need to re-install the same tool chain: Quartus 21.1, WSL 18.04 on windows, CDT 8.8.1.
i believe i have done all steps per instructions, and the project can be built without error. but when i try to generate the HEX file, it reported below error.(I copied all information in the console window in case it helps)
please help me on this, thank you.
-----------------------------------
wsl make mem_init_generate
Info: Building /mnt/c/myproject/force_assist/G4_force_assisted_OTS_FPGA/01_project/software/OTS_power_assist_bsp/
make --no-print-directory -C /mnt/c/myproject/force_assist/G4_force_assisted_OTS_FPGA/01_project/software/OTS_power_assist_bsp/
[BSP build complete]
Post-processing to create mem_init/program_ram.hex...
elf2hex.exe OTS_power_assist.elf 0x00020000 0x0002bfff --width=32 --little-endian-mem --create-lanes=0 mem_init/program_ram.hex
Post-processing to create mem_init/hdl_sim/program_ram.dat...
elf2dat --infile=OTS_power_assist.elf --outfile=mem_init/hdl_sim/program_ram.dat \
--base=0x00020000 --end=0x0002bfff --width=32 \
--little-endian-mem --create-lanes=0
/mnt/c/intelFPGA/21.1/nios2eds/bin/elf2dat: 2: .: Can't open /bin/sh_pl.sh
/mnt/c/myproject/force_assist/G4_force_assisted_OTS_FPGA/01_project/software/OTS_power_assist_bsp/mem_init.mk:301: recipe for target 'mem_init/hdl_sim/program_ram.dat' failed
make: *** [mem_init/hdl_sim/program_ram.dat] Error 2
Hi
Could you try adding a new environment variable below :
Name: WSLENV
Value: SOPC_KIT_NIOS2/p
Regards
Jingyang, Teh