Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
USB MultiLink: Can't break on a simple breakpoint
Bob P. Aug 11, 2016 at 02:36 PM (14:36 hours)
Staff: Takao Y.

  • Using USB Multilink, Rev C, for an MC9S08QB8 device. Have some simple statements that initialize some registers at the start of main.c.  When I invoke the debugger (in CodeWarrior 10.6.4), it puts me at my first instruction.  I have a breakpoint set about five instructions later (in those simple register assignment statements).  The breakpoint is clearly marked in the margin next to the statement where I set the breakpoint, and also in the Disassembly window on that same line of code.  There is also a breakpoint listed in the Breakpoint list window for that same line of code.  If I start execution by clicking on the Resume button, execution does not stop at the breakpoint.  My LED on my target board blinks periodically as it should when running normally, which means that the program is executing interrupts properly.

    I would think that the execution should stop at this breakpoint.

    If I remove all breakpoints, then place a breakpoint in the middle of that Timer interrupt routine, it doesn't break there, either.

    How involved is the Multilink Interface in determining breakpoints? What might cause breakpoints to be ignored?




    Comments

  • Greetings,

    How odd, the breakpoints should work just fine. Now remember that the HCS08 architecture only has the ability to hold one breakpoint at a time. So if you have multiple, then it may skip any latter breakpoints you created. Make sure you are working with one breakpoint at a time and see if you run into issues.

    If that is the only breakpoint and then the next thing is to do a sanity check. Create a brand new project within Codewarrior and without making any code or setting changes you want to start a debug session. Place a breakpoint at the i++ for loop and see if you are able to hit it.


    Takao Yamada

    • Found out that I can set hardware or software breakpoints, and I was trying to set software breakpoints ... but this is only possible if the code is running from RAM, not Flash, because the breakpoint instruction gets replaced by an illegal operation code for software breakpoints.  Then when execution breaks at that point, the debugger checks its software breakpoint table and replaces the illegal instruction with the original instruction.  Can't do that (easily) in Flash.

      And yes, I verified that my little HC08 has only the one hardware breakpoint register. So now at least I know my limitations.

      Thanks!

Add comment


   Want to comment? Please login or create a new PEMicro account.







© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement