Article ID: 000089966 Content Type: Troubleshooting Last Reviewed: 04/04/2023

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

Environment

    Intel® Quartus® Prime Pro Edition
BUILT IN - ARTICLE INTRO SECOND COMPONENT
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.

Related Products

This article applies to 4 products

Intel Agilex® 7 FPGAs and SoC FPGAs
Intel® Arria® 10 FPGAs and SoC FPGAs
Intel® Stratix® 10 FPGAs and SoC FPGAs
Intel® Cyclone® 10 GX FPGA

1