Insight Debugger for Nios2

Showing results for 
Search instead for 
Did you mean: 

Insight Debugger for Nios2

Insight Debugger for Nios2



For those who do not want to use Eclipse for your Nios2 debugging needs and prefer a debugger you can launch from the command line, Insight may be a good solution. Insight 6.1 was inluded in all the Nios2 release the were based upon the gnu 3.xx version.  In 10.1 Altera switch to a later release 4.1.2. By default GNU 4.xx does not include Insight.   However insight 6.8 can be downloaded from the web patched and build for the nios. The instruction below show you how to do it.


The GNU Insight build does not work with 3.81 of the make tool. It will die when compiling bfd/dwarf2.c. This is due to a parameter which must be quoted. Versions 3.80 and 3.82 work. To see which version you have type

             make -version

in a Nios2 command shell.  If the version is 3.81 it is probably the make in the nios2eds path. To check type

            which make

There are 2 make.exe in the quartus installs One in $SOPC_KIT_NIOS2/bin/gnu/H-i686-mingw32/bin/make and $QUARTUS_ROOT_DIR/bin/cygwin/bin. The default path uses the make.exe from the nios2eds path ahead of of the cygwin path. To use the other make.exe simply rename the make.exe in the offending path -- but don't forget to change it back. Or you can change the paths temporarily. With the correct make.exe you are read to build.

ES: I was not successful with this and I just had to call /usr/bin/make to force the correct version.

ES: Note: I am no longer able to compile insight on Quartus 12.1. It appears that some of the cygwin components may have upgrades and the tcl support is no longer building.


Building Insight

Create a new directory i.e. "Insight" and download the source to it.

Note: any directory name will be fine just avoid spaces and special chars in the path name

The patches have been tested with Insight-6.8a and insight-6.8-1a

Open a nios2 command shell and change the directory to the "Insight" directory and un-tar the downloaded file

          tar xvjf insight-6.8(-1)a.tar.bz2       (-1 is only used with the 6.8-1 source)

this will create an insight-6.8* subdirectory

         cd insight-6.8

copy the to the insight-6.8* subdirectory and unzip. This will create a nios2-insight6.8_patches sub folder. Make sure that you didn't accidentally create and extra fold.  

        cd nios2-insight6.8_patches 



A list of patched and moved files should appear with no errors

      cd ../../

Go back up two levels so back to the "Insight" directory type the following commands

     mkdir build

      .../insight-6.8a/configure --target=nios2-elf


ES: I just went back to the main insight-6.8a directory and called ./configure --target=nios2-elf

ES: As noted above, from the insight-6.8a directory, I called /usr/bin/make instead of make to launch the correct version

ES: This worked for me in Quartus 11, but no longer works in Quartus 12

    make install

 This will build and install the tools at $quartus_rootdir/bin/cygwin/usr/local/bin

to run Insight place the nios2-debug1 script somwhere in the the path like 


There is already a nios2-debug script so 1 one was appended to the end

Note: remove the .txt from the nios2-debug you download from this site. 

Now you are ready to run.  From the directory where the elf is located run

nios2-debug1 <project>.elf

if you are using ucsoii and you want thread awareness

nois2-debug1 -ucosii <project>.elf




File:Nios2 insight-6.8

File:InsightQuartus12 1


To Do

Create binarys that be installed.

Learn how to install in different directories.

Version history
Last update:
‎07-27-2020 03:09 PM
Updated by: