• AVR Freaks

Hot!Trouble with debugger (18F47K42 Curiosity Nano)

Author
ThoWa
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/08/23 23:45:40
  • Location: 0
  • Status: offline
2019/09/14 02:35:58 (permalink)
0

Trouble with debugger (18F47K42 Curiosity Nano)

I'm using a Curiosity Nano PIC18F47K42 and MPLAB IDE X 5.25.
I have selected the "PIC18F47K42 Curiosity Nano (PKOB nano)" as debug tool.
 
Unfortunately I'm having trouble when debugging.
On starting the Debugger it halts on first line.
I can click step over/into 3-4 times, the the target is halted, but I cannot see the pursor any mor, meaning, I dont know which line is executed next.
 
 
 
 
#1

5 Replies Related Threads

    crennolet
    Super Member
    • Total Posts : 135
    • Reward points : 0
    • Joined: 2012/03/15 09:51:58
    • Location: 0
    • Status: offline
    Re: Trouble with debugger (18F47K42 Curiosity Nano) 2019/09/14 09:37:31 (permalink)
    0
    That indicates that your program is stuck at reset. Pull down the "Window" menu and then 'Target memory views' and 'Program memory.'
    You should then see your program stepping through instructions. That should give you some clues as to what's wrong.
    #2
    ThoWa
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2019/08/23 23:45:40
    • Location: 0
    • Status: offline
    Re: Trouble with debugger (18F47K42 Curiosity Nano) 2019/09/15 12:24:37 (permalink)
    0
    You are Right, in Program Memory I could see, that in each Step-in (or Step-over) an single assebmler instruction is executed.
    Is there is any setting to step through C Code rather stepping through assembler?
     
    #3
    ric
    Super Member
    • Total Posts : 23893
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Trouble with debugger (18F47K42 Curiosity Nano) 2019/09/15 13:14:00 (permalink)
    0
    ThoWa
    Is there is any setting to step through C Code rather stepping through assembler?

    That's what normal stepping in the C  source window does, but that's pointless if if it never gets to code representing your C code.

    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!
    #4
    crennolet
    Super Member
    • Total Posts : 135
    • Reward points : 0
    • Joined: 2012/03/15 09:51:58
    • Location: 0
    • Status: offline
    Re: Trouble with debugger (18F47K42 Curiosity Nano) 2019/09/16 06:18:29 (permalink)
    +1 (1)
    My own favorite methods for getting stuck at reset (actually getting reset over and over) are:
    1. enabling an interrupt and forgetting (or messing up in the attempt) to properly set up a handler.
    2. forgetting to disable the watchdog timer
    3. overrunning the call stack by using something like a recursive call.
     
    #5
    ric
    Super Member
    • Total Posts : 23893
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Trouble with debugger (18F47K42 Curiosity Nano) 2019/09/16 13:45:27 (permalink)
    0
    crennolet
    1. overrunning the call stack by using something like a recursive call.

    It's pretty hard to do that in XC8. Maybe possible if you select "software stack" mode, certainly won't happen in the default "compiled stack" mode. :)
     

    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!
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5