• AVR Freaks

Hot!Single stepping exits debugger

Author
Alexmouse
New Member
  • Total Posts : 21
  • Reward points : 0
  • Joined: 2009/07/06 03:13:29
  • Location: UK
  • Status: offline
2019/07/05 07:50:17 (permalink)
0

Single stepping exits debugger

I've got a PIC16F18426 on the breadboard. I can program, erase & verify reliably with my ICD3. I can enter debug, and run to breakpoints, but any attempt to single-step through my code immediately exits debug mode.
Ideas?
MPLABX5.20, XC8 2.05
#1

12 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 2887
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: Single stepping exits debugger 2019/07/05 08:03:27 (permalink)
    +1 (1)
    "... exits debug mode.": expresses itself how ?
     
    Is the/some watchdog enabled ?

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    NorthGuy
    Super Member
    • Total Posts : 5536
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: online
    Re: Single stepping exits debugger 2019/07/05 08:17:48 (permalink)
    +1 (1)
    There are two kinds of single-stepping. Real single-stepping in assembler. Or single-stepping through lines of C code. Which one do you refer to?
    #3
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/05 08:34:47 (permalink)
    0
    Watchdog disabled.
    Not sure I understand fully, but I'd guess at single-stepping through lines of C code. F7 in MPLABX.
    #4
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/05 08:38:28 (permalink)
    0
    "... exits debug mode.": expresses itself how ?
     
    The debug function bar disappears. The bottom GUI bar reports "user program finished". This is inside a while(1) loop.
    #5
    NorthGuy
    Super Member
    • Total Posts : 5536
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: online
    Re: Single stepping exits debugger 2019/07/05 08:39:21 (permalink)
    +1 (1)
    Alex Barrett
    Watchdog disabled.
    Not sure I understand fully, but I'd guess at single-stepping through lines of C code. F7 in MPLABX.



    This is not a real single-stepping. It requires a free breakpoint. Do you have it?
    #6
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/05 08:50:33 (permalink)
    0
    Where do I find this information?
    There is at least one hardware breakpoint, which works.
    I tried the 'software breakpoints' option in the MPLABX project, it didn't help.
    This is an 'enhanced' PIC16, which I would assume means reasonable debug features?
    #7
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/05 08:56:34 (permalink)
    0
    I've just found a Microchip debugging presentation that suggests 1/3 hardware breakpoints, and no software breakpoints for PIC16?
    #8
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/05 09:05:24 (permalink)
    0
    Ah, found it, I have 3 hw breakpoints, 1 used and 2 free.
     
    #9
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/08 00:44:13 (permalink)
    0
    I've just tried it with RealICE instead of ICD3, exactly the same result. I can execute between breakpoints fine, but as soon as I try to single step, it drops out of debug.
    #10
    ric
    Super Member
    • Total Posts : 23163
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Single stepping exits debugger 2019/07/08 01:25:30 (permalink)
    +2 (2)
    Have you opened a Support Request? (you should)

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #11
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/08 01:41:51 (permalink)
    0
    I have an open ticket, but Microchip support aren't the quickest to help.
    One discovery, the problem does not happen on my development PC, only on the test bench PC.
    Both PCs are Win7 64 bit. Both are MPLABX 5.20.
    I need to trust the tools, flaky behaviour does not help.
    #12
    Alexmouse
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2009/07/06 03:13:29
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2019/07/08 02:31:31 (permalink)
    +1 (1)
    OK, credit due to Microchip support. Having determined that on three similar PCs only one, of course my test bench PC, exhibits the fault, deleting the IDE caches has cleared the issue. MPLABX is somewhat flaky, I see too many of these temperamental issues.
    #13
    Jump to:
    © 2019 APG vNext Commercial Version 4.5