I'm using a PE Micro USB Multilink Interface module to connect to my target. Also using CodeWarrior 10.6.4 on a Windows7 laptop.
I have been having troubles breaking at breakpoints, so I placed a breakpoint right near the start of my program (see attached JPG).
When I invoke the debugger, the source comes up in the left window/panel and the debugger is sitting at Line 69. As you can see, I have a breakpoint set at Line 73 (breakpoint seen in left panel and also in Disassembly panel to the right). Also, the Line 73 breakpoint is shown in the "Breakpoints" panel in the lower right. I assume that the checkmark next to the green dot in the listings means that this is an "approved" and possible breakpoint.
So, at this point, I click on the "Resume" icon (green triangle just under "Run" in top menu). Execution does not stop at the breakpoint. An LED on my target board blinks as it does when the program is executing after startup of the program, meaning it is executing code and issuing timer interrupts.
Any ideas on why I can't break at breakpoints that I set?
Solved! Go to Solution.
Hi Bob,
In your screeshot I see that your breakpoint type is 'software' and not 'hardware' as I assume you are running the code in FLASH and not in RAM?
Have you changed the default breakpoint type to software instead of hardware?
Erich
Erich:
THANK YOU!! I think when I was having another problem, I was looking around in the various settings and I think I changed that setting. When I change it back to a hardware breakpoint, it breaks there! It breaks no matter where I place the single breakpoint.
However, if I place multiple breakpoints, it seems to only break at the most recent breakpoint that it did break at -- not a new breakpoint set ALSO a few instructions before that breakpoint. Is there a limit on the number of breakpoints allowed?
Hi Bob,
keep in mind that the HCS08 only as a limited number of hardware breakpoints (two or three if I remember correctly). So if you set more, only a subset can be applied on the hardware.
Erich
Thanks for the info on hardware vs. software breakpoints.
Yes, my little micro has only ONE hardware breakpoint register, so it only sets the one compare address. Must be that I have to delete that breakpoint before I can set another one. Good to know, and I'll check all of my processors in the future to see how many hardware breakpoint registers they have to know my capabilities.
Thanks!
Also, what's the difference between a hardware and software breakpoint, other than the names? What good is a software breakpoint if it doesn't seem to do anything?
Hi Bob,
have a read here: https://mcuoneclipse.com/2012/07/29/software-and-hardware-breakpoints/
Erich
Hi Bob,
In your screeshot I see that your breakpoint type is 'software' and not 'hardware' as I assume you are running the code in FLASH and not in RAM?
Have you changed the default breakpoint type to software instead of hardware?
Erich