Knowledge Base Article

Why does the Nios® V software fail to run after consecutive niosv-download commands on the same Nios V hardware?

Description

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.

Resolution

To work around the problem, follow the steps below:

  1. 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,

 

]

  1. 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.

Updated 2 months ago
Version 3.0
No CommentsBe the first to comment