If this occurs while the BSP/Application build has completed without error, the cause may be that the working directory of the Nios II SBT project has been inherited from an older version of the project.
Create a new working directory for Nios II SBT (.metadata RemoteSystemsTempFiles file is the information file for the working directory of SBT, so re-designate the working directory as a new one and create a new .metadata RemoteSystemsTempFiles file)
Please create a new SBT Project in the new working directory. (Run "Nios II Application and BSP from Template")
If you have not inherited from a previous version or if the above does not solve the problem, it may be due to the frequency of the TCK in the Intel® FPGA Download Cable II (formerly USB Blaster II).
If you are using the Download Cable II, try lowering the frequency by referring to the following.
(Reference) Try changing the TCK frequency of USB-Blaster™ II
https://www.macnica.co.jp/business/semiconductor/articles/intel/130581/
There is also a possibility that a stack overflow is occurring.
Please debug with reference to the following contents.
How to detect stack overflow in Nios® II SBT for Eclipse
--------------------
Category: Nios® II
Tools: Nios® II EDS
Devices: -