Forum Discussion
Yes, my path is correct, have you tested this on your Windows system yet?
Hi DLiu5,
Apologies and thanks for confirming your path is correct. I've tested on my Windows 11 pc with Windows Quartus 25.1.1 and I could observe 2 things
1. Error A: 'sopc-create-header-files' is not recognized as an internal or external command,
operable program or batch file.
or Error B: sopc-create-header-files: command not found
Depending on where the script is called (both in Nios V command shell), either in windows directory or WSL (via bash)
or Error C: Environment variable QUARTUS_ROOTDIR is empty. Do you have Quartus II installed?
Solution: ensure both Path are set correctly
i)QUARTUS_ROOTDIR="C:/altera_pro/25.1.1/quartus" ii)PATH="$QUARTUS_ROOTDIR/sopc_builder/bin:$PATH"
2.
Error A
Failed writing output file to /sopc-create-header-files.38.tmp.swinfo sopc-
create-header-files: sopcinfo2swinfo.exe --input=c:/my_de25_nano_workplace/my_first_qsys_system/qsys_top/qsys_top.sopcinfo --output=/sopc-create-header-files.38.tmp.swinfo failed
Solution: I suspect this is because the sopc-create-header-files script is using hardcoded /tmp/ folder (as per linux) but in WSL it still following Windows directory formatting.
Note: I edited the sopc-create-header-files script so that instead of using hardcoded /tmp/ folder, use the current working directory and convert the path into Windows directory format
1)
if [ "${_IS_WSL}" = "1" ]; then
swinfo_tmp_fname="$PWD/${PN}.$$.tmp.swinfo"
fi
2)
if [ "${_IS_WSL}" = "1" ]; then
swinfo_tmp_fname="$(adjust_path_mixed "$swinfo_tmp_fname")"
fi
In my terminal I'm using these commands (I do not have any path set in my windows environment variables so need to export each time terminal is launched)
bash
export QUARTUS_ROOTDIR="/mnt/c/altera_pro/25.1.1/quartus"
export PATH="$QUARTUS_ROOTDIR/sopc_builder/bin:$PATH"
sopc-create-header-files hps_subsys.sopcinfo
I will check with our factory team on this to confirm the solution and also any plans to change the script.
Thanks
Regards
Kian