• AVR Freaks

Hot!Can program but not debug

Author
crosland
Super Member
  • Total Posts : 1936
  • Reward points : 0
  • Joined: 2005/05/10 10:55:05
  • Location: Warks, UK
  • Status: offline
2020/03/17 09:12:04 (permalink)
0

Can program but not debug

Specifically:
 

Script GetVersionDE failed with status Type = runScript, Script name = GetVersionDE, Status = 0xa00
.
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.

 
Everything worked yesterday with X 5.30
 
I've spent 3 hours so far trying to get it to work again. In desperation I upgraded to 5.35, to no avail.
 
Target is a 25K80 powered with 5V from a USB port, PK4 connected directly to appropriate pins, set for power from target.
 
I can program in X and the IPE, so I know the PGC/PGD connections and the target power are good.
 
The programmed device works as expected, so I know that the osc. config is correct (e.g. CAN bit rate timing is good).
 
That rules out the "most common causes".
 
I just cannot (today) get the debugger to work.
 
What are the "less common" causes?
#1

7 Replies Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 6654
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: Can program but not debug 2020/03/17 09:32:36 (permalink)
    0
    If your device has more than one set of PGC/PGD and the config bits are not set to these I have found it can be programmed but not debugged

    Attached Image(s)

    #2
    crosland
    Super Member
    • Total Posts : 1936
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Warks, UK
    • Status: offline
    Re: Can program but not debug 2020/03/17 10:36:08 (permalink)
    0
    Well, just like my previous PK4 issues, it started working again all on its own.
     
    Initially I was programming (successfully) and then immediately trying to debug.
     
    The final step, as reported in my OP was to program the target, disconnected the PK4, checked the app was running correctly (e.g. CAN bit rate as mentioned). I didn't initially try debugging again after this.
     
    Now it will debug.
     
    @Jim Nickersen Thanks, but I haven't changed any config bits between working, not working.
     
     
    #3
    shahidatiq
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2017/03/11 13:38:25
    • Location: 0
    • Status: offline
    Re: Can program but not debug 2020/04/07 15:14:32 (permalink)
    0
    I am facing the same problem I am using PICkit4 to debug my DSPIC33FJ32GS606 using MPLAB X IDE v5.25. I am using PGC1, PGD1 for communication and the same is selected for debugging purpose. I am using FRC as a clock source. However, I am unable to debug. Following error appears
     
    The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.
     
    However, If I just program my controller, there is no problem and the controller is programmed with PICkit4 and works well for all applications. If I use the simulator option to debug my program, debugging is fine in simulator mode.
     
    Can you please help in this regards 
    #4
    ric
    Super Member
    • Total Posts : 26942
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Can program but not debug 2020/04/07 15:26:08 (permalink)
    5 (1)
    FRC may be too slow for debugging.
    (Debug mode involves a lot of communication between PIC and PC, running at the oscillator sped you have selected)
    Could you try it with a faster internal clock?
     
    post edited by ric - 2020/04/07 15:27:18

    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!
    #5
    shahidatiq
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2017/03/11 13:38:25
    • Location: 0
    • Status: offline
    Re: Can program but not debug 2020/04/07 15:30:45 (permalink)
    0
    I am using FRC with PLL enabled to operate the device (DSPIC33FJ32GS606) at 40 MIPs. 40~50 MIPs is the maximum speed of this device.
    #6
    mpgmike
    Super Member
    • Total Posts : 418
    • Reward points : 0
    • Joined: 2014/01/23 17:27:06
    • Location: NJ
    • Status: offline
    Re: Can program but not debug 2020/04/07 16:07:19 (permalink)
    0
    ric
    FRC may be too slow for debugging.
    (Debug mode involves a lot of communication between PIC and PC, running at the oscillator sped you have selected)
    Could you try it with a faster internal clock?

    Had that issue trying to debug a PIC16F18426 @1 MHz Fosc.  PORTC = 0x00 when clearly one of the pins were high. It worked in the real world, even pretended to debug, but the values all came up 0's.
     
    edited for typo
    post edited by mpgmike - 2020/04/07 16:08:54

    I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
    #7
    ric
    Super Member
    • Total Posts : 26942
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Can program but not debug 2020/04/07 16:12:09 (permalink)
    0
    shahidatiq
    I am using FRC with PLL enabled to operate the device (DSPIC33FJ32GS606) at 40 MIPs. 40~50 MIPs is the maximum speed of this device.

    ok, that won't be the problem then.
    I just wanted to point out that the instruction rate of the PIC is relevant during debugging.

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