Due to a problem in the Quartus® Prime Pro Edition Software version 23.1, you might see the error above when using the commands in the readme files (readme.txt in the main Quartus® project directory and under reg_readme) to build the BSP file for the Agilex™ 7 - Nios® II-EMIF-PIO Design. This is because the file includes incorrect commands for creating the BSP, building the software sources, and downloading the .elf file.
To work around this problem in the Quartus® Prime Pro Edition Software version 23.1, refer to the corrected set of commands below:
c. To create software app with HAL OS, run the following commands in the terminal:
> nios2-bsp-create-settings --settings software/nios2_bsp/settings.bsp --type HAL --sopc nios2_niosv_fm/nios2_niosv_fm.sopcinfo --bsp-dir software/nios2_bsp --script installer location../../bsp-set-defaults.tcl --cpu-name=nios2_gen2_0
> nios2-bsp-update-settings --bsp-dir ./software/nios2_bsp/ --script bsp-update-ocm-linker.tcl --settings ./software/nios2_bsp/settings.bsp
> nios2-bsp-generate-files --settings sw/nios2_bsp/settings.bsp --bsp-dir sw/nios2_bsp
> nios2-app-generate-makefile --bsp-dir sw/nios2_bsp --src-dir sw/nios2_app --app-dir sw/nios2_app
> make -C sw/nios2_app
d. Hardware Validation
- Program the generated sof and then download the elf file on the board
> quartus_pgm --cable=1 -m jtag -o 'p;ready_to_test/<top_level_entity_name>.sof'
- Download the elf file on the board
> nios2-download --cable=1 -g ready_to_test/<>.elf
- Verify the output on the terminal by using the following command in the terminal:
> nios2-terminal --cable=1