Page 1 of 2

Breakpoints not working

Posted: Sun Apr 11, 2010 8:00 pm
by v8dave
Hi all,

I have a simple test application just now and I can't get the debugger to stop at break points. The code is compiled as debug and I can see the debugger starting but it just carries on even if I insert break points.

Am I missing something in my build?

Cheers,
Dave...

Re: Breakpoints not working

Posted: Sun Apr 11, 2010 11:03 pm
by yevgenit
Sometimes, the compiler flag -gdwarf-2 disappears.

At Navigator window, right-click on name of your project.
In the context menu, select Properties.
At Properties window, select C/C++ Build, then Settings, then tab Tool Settings, then GNU C Compiler.
Verify, that the compiler command line includes: -gdwarf-2

The generic way of restoring the default project setting is to create the new project, verify the breakpoints are operating, and then import your own source files.

Re: Breakpoints not working

Posted: Sun Apr 11, 2010 11:50 pm
by yevgenit
Verify, the compiler command line has the following include (for mod5270):
-I"C:\nburn\mod5270\include"

Re: Breakpoints not working

Posted: Mon Apr 12, 2010 1:32 am
by v8dave
All of the above is correct for my MOD5234.

I'll create a new project and try it that way. This is just some test code so no big issue to go this extra step.

Dave...

Re: Breakpoints not working

Posted: Mon Apr 12, 2010 2:33 am
by v8dave
OK, I created a new project with defaults only and still it won't debug the breakpoints.

I have recently upgraded to the latest Rel24 RC2 and suspect this may be the issue.

Dave...

Re: Breakpoints not working

Posted: Mon Apr 12, 2010 7:29 am
by yevgenit
My wizard-generated simple project has breakpoint feature fully operational.
I use Rel24_rc2.

Re: Breakpoints not working

Posted: Mon Apr 12, 2010 7:41 pm
by v8dave
Can you set breakpoints in UserMain?

I had it working yesterday at one point with the same project but it is not consistent and I can't breakpoint anything before the while loop in UserMain.

Dave...

Re: Breakpoints not working

Posted: Tue Apr 13, 2010 12:56 am
by yevgenit
My mentioned simple project has correctly operational breakpoints in UserMain() function before the while loop.
The source code is at http://forum.embeddedethernet.com/viewt ... ?f=7&t=676 ( Post subject: Ignoring ACK during master send without peripheral slave ack
PostPosted: 08 Apr 2010, 17:29)
If you need, the project files can be sent as well.

Verify check of "Network debug" while generation of the example project with NetBurner wizard.

Re: Breakpoints not working

Posted: Tue Apr 13, 2010 4:17 am
by v8dave
Hi there,

Yes, network debugging was checked and the code to enable the debugger is called within UserMain. I have a printf to confirm this.

Is strange that I can set some parts to breakpoint but others can not.!!

Dave...

Re: Breakpoints not working

Posted: Tue Apr 13, 2010 6:04 am
by mhoyt
Dave, try putting a delay after the call to InitializeNetworkGDB_and_Wait(), like this:

Code: Select all

  InitializeNetworkGDB_and_Wait();
  OSTimeDly (TICKS_PER_SECOND * 2);
I ran into this problem not long after I started using the Netburner a few months ago. I haven't investigated it any further, as the simple delay fixed the problem for me. I had noticed that breakpoints deep in the code worked, and placing breakpoints during runtime also worked, but not breakpoints appearing shortly after the InitializeNetworkGDB call.

--Mike