Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Debugging Legacy Mode

Altera_Forum
Honored Contributor II
1,158 Views

I want to run Insight to debug a NiosII Legacy build. OCI/JTAG is not one of the options in the debugging communications list. (only uart) Can someone please tell me how to do this. 

 

The Core (/s) has a JTAG debug module setup and nd program.srec acts like it is going to work (connects, seems to download), but gdb nevers comes up. (Progress: .....c then nothing) 

 

The other (less desirable) option is to debug/run Insight over the uart.  

 

Or can I add a JTAG Uart and use the IDE? 

 

What's the best practice here? 

 

Thanks, 

Ken
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
444 Views

Ok, here are some irritating bugs for those who have asked. Maybe it will save some time for someone. 

 

I found that I could n2d a small test program if I nb'd it and it created a program.elf file. So n2d test.elf works. 

 

But, when you build a program using the sample Makefile it creates an obj/ dir and puts most of the output in there, but the .elf file is actually named .out. n2d will not work with this file, so I coppied obj/program.out to ./program.elf. 

 

Now n2d program.elf exits immediately with "can't create /tmp/prog_setup.gdb - permission denied". So chmod -R /tmp and still no joy. (same error) 

 

Turns out the .elf file needs to be in the obj/ directory so the magic incantation is to create a obj/program.elf now... 

 

n2d obj/program.elf works! (note that nd obj/program.out used to work with NiosI) 

 

You can search and replace all .out with .elf in the Makefile to make it go easier. 

 

Ken
0 Kudos
Reply