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++
12603 Discussions

NIOS II Gen2 Hardware Breakpoints broken?

Altera_Forum
Honored Contributor II
2,280 Views

It appears that there may be an issue with NIOS II Gen2 Hardware Breakpoints. 

 

On a MAX10 device, I have my program text in UFM, and Hardware Breakpoints set to 4 (using Quartus Prime 5.1.1). However, when attempting to debug this, the Eclipse debugger complains that it can't set the breakpoint, or break on main() -- it seems Eclipse wants to set a soft breakpoint in UFM flash memory rather than use the hardware breakpoint capability that has been configured in QSYS. I tried many different variations of the Gen2 core (e.g. flash accelerator enable/disable, cache on/off, etc.) but no joy. It's not clear to me if the Eclipse NIOS debugger V2 beta needs to used or not. At any rate, I've been able to confirm that the NIOS2 Gen2 program at least runs correctly out of UFM, but it can not be single stepped nor stopped on a hardware breakpoint. I replaced the Gen2 core with a NIOS II legacy core, and the hardware breakpoint became functional -- joy! So it appears that the issue is with the Gen2 core -- any insights or additional info would be appreciated, thanks. 

 

-Tom Rosenbauer
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,077 Views

Tom, 

Can you set the data triggers to 4 as well? Please re-generate RTL and recompile in Quartus. 

The issue was that the debugger reads the data triggers value to determine the hardware breakpoints. Previously, for the classic/legacy core the debug level 2 and above have the same hardware breakpoints and data triggers.
0 Kudos
Altera_Forum
Honored Contributor II
1,077 Views

Mike, 

 

Thanks for the quick response and suggestion -- setting the data trigger to the same value as the hardware breakpoint stopped Eclipse from complaining during the debug load. However, still no joy -- after the debug load completes, I see that the program is going through the usual start() sequence and loading my main(), and blowing right through the main() and other breakpoints that I've set. When I pause the processor, I've landed in the exit() while(1) spin loop without hitting any of the main() entry or other manual breakpoints. I've tried both the Nios II Hardware debugger and the Nios II Hardware v2 (beta) with similar results.  

 

Other than not being able to hit breakpoints and step through the program, it appears that everything else is working as expected, although I might try adding some additional LED blink tests to my Hello World test program. 

 

I might also try some other Gen2 variations, like removing the flash accelerator when I return to the office in a couple of days. If you can think of anything else to try, that would be very much appreciated -- thanks. 

 

-Tom Rosenbauer
0 Kudos
Altera_Forum
Honored Contributor II
1,077 Views

Did you validate that the breakpoints are set as hardware breaks? I thought we can differentiate between soft and hard breaks but maybe I am wrong. 

 

Did your design meet timing?
0 Kudos
Altera_Forum
Honored Contributor II
1,077 Views

The NIOS II Gen2 hardware breakpoints are now functional - joy! I created a brand new Hello World application and BSP and used the v2 (beta) debugger, which was the only other significant change I made in addition to keeping the number of hardware and data breakpoints the same. Perhaps there was some internal Eclipse setting that got corrupted in my original application and BSP due to either the inconsistent breakpoint settings, or switching back and forth between the legacy and gen2 cores. 

 

Thanks again to Altera Teacher MikeSouze, for his insight into making the correct gen2 breakpoint settings -- very much appreciated. 

 

-Tom Rosenbauer
0 Kudos
Reply