• 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

13 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 3787
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    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 : 6174
    • 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 : 6174
    • 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 : 27644
    • 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
    anth
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2017/07/28 12:51:30
    • Location: UK
    • Status: offline
    Re: Single stepping exits debugger 2020/05/25 23:47:09 (permalink)
    +1 (1)
    I have just encountered the same problem on a machine that never had this problem but suddenly started yesterday. Im pleased I found this thread, but would be helpful if there was any instruction as to how "deleting the IDE caches has cleared the issue".
     
    Ive tried : "Delete the MPLAB X Persistence and Cache directories on your machine Go to MPLAB X IDE >> Help >> About, and note down the Persistence and Cache Directory paths. Close the IDE; access the directories and delete the contents. Restart the IDE without importing previous settings" - but this didnt work.
     
    This is happening on several target hardware with different processors, the environment has been stable for weeks, no changes made, this issue just suddenly started happening. Still occurs with PICKIT3, PICKIT4, UsbStarterKit.
     MPLAB X 5.20, dsPIC33EV128GM104 and dspIC33EP512MU810, Win8.1.
     
    Ive tried : Removing MPLAB X software. Re-installing it 5.20. - but this didnt work, but I noticed that the metadata must have been preserved since it remembered all my settings. hmmmm....
     
    Also tried: "www microchipdeveloper com/mplabx:persistence-data"
    "C:\Users\<username>\AppData\Roaming\mplab_ide\dev\v5.20"
    "To "reset" MPLAB X to its default state, simply delete all the files inside the version directory (where version is something like "1.80"). However, if for some reason you want to go back to the "troubled" state, just save the contents of the version directory somewhere else. Putting them back into version later will restore the settings that were saved in those files."
     
    This Worked! (although all settings are now removed, so going through the pain of setting up the IDE again). 
     
     
    post edited by anth - 2020/05/26 00:38:29
    #14
    Jump to:
    © 2020 APG vNext Commercial Version 4.5