This issue may be seen in the Intel® Quartus® Prime Pro Edition Software version 21.3 and later when subsequently downloading and running the Nios® V software on the same Nios V hardware system.
This is due to HAL or C runtime library not being initialized properly during the 2nd download.
To work around the problem, follow the steps below:
- Edit the niosv-download source code (<Intel Quartus Prime>/niosv/bin/niosv-download-files/main.py) with the bolded argument.
# Run GDB to load the program.
GDB = 'riscv-none-embed-gdb'
gdb = GDB
gdb_args = [
gdb, '-batch',
'-ex', 'set arch riscv:rv32',
'-ex', 'set remotetimeout 60',
'-ex', f'target extended-remote localhost:{gdb_port}',
'-ex', 'load',
'-ex', 'set $mstatus &= ~(0x00000088)',
elf_file,
]
- Invoke the GDB server with the argument below when downloading the Nios V software using OpenOCD and GDB server.
-ex ‘set $mstatus &= ~(0x00000088)’
This problem is scheduled to be fixed in a future release of the Intel® Quartus® Prime Pro Edition Software.