Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

Can I use the Nios II Eclipse S/W Debugger if I don't have the quartus project?

Altera_Forum
Honored Contributor II
1,141 Views

I have working Nios S/W and a .elf file (and my source code). And I have a working FPGA. 

 

The H/W designers developed the FPGA under Linux, in a completely different environment. 

I wrote my Nios S/W under Windows, using command line tools. 

I have a way to load and run my S/W and I can use the 12.1 Nios II System Console to communicate via JTAG. 

But up to now, I haven't needed to use the debugger (I relied on printfs). 

 

Is there a way to use the Nios debugger without a quartus project file? I can't see a way in the Nios Eclipse environment to simply attach to my running Nios code (other than at the lowest level, using the System Console to stop and examine registers via JTAG). Everything in the Eclipse environment wants me to start out with a project, which I don't have. 

 

Or failing that, exactly what quartus files do I need to locate to populate a project folder for this to work? 

Or failing that, is there a tutorial somewhere on how to set up gdb or ddd to use the JTAG connection, etc.?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
64 Views

The direct GDB part is easy; see the nios2-gdb-server example in Chapter 4 of the "Embedded Design Handbook" (page 4-11 of the current PDF on the website). 

 

As far as eclipse goes, assuming you're using SDK generated makefiles for APP/BSP, I do something like this: 

- start eclipse with a blank workspace (no other projects in it) 

- File->Import->NIOS II ... -> Import custom makefile for NIOS...... 

- navigate to the BSP directory 

- give the new project a name name 

- finish the dialogs 

- repeat the Import... this time for the APP directory 

 

After that you can rebuild the software and download through the GUI. 

 

If you're not using NIOS SDK makefiles / normal build procedure, this wouldn't work.
Altera_Forum
Honored Contributor II
64 Views

I used the first solution you suggested and was able to get gdb working with my code. 

Thanks!
Reply