• AVR Freaks

Helpful ReplyHot!The target device is not ready for debugging.

Page: < 12 Showing page 2 of 2
Author
NKurzman
A Guy on the Net
  • Total Posts : 18916
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: The target device is not ready for debugging. 2016/11/21 19:13:35 (permalink)
+1 (1)
Are you selecting a valid working oscillator configuration?
What pins is your debugger set to? Is it the same set that is set it the configuration words?
#21
Lawrence.Miller
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2014/08/03 17:15:08
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2016/11/22 09:47:26 (permalink)
0
Thanks for the replies. Yes, I did read the posts in this thread. I think I’m missing something more fundamental.
 
1. Created program to blink LED’s in release mode. Works.
2. Rebuilt in debug mode, no build errors, but got the error message.
 
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.
 
A review of the pins in document “6001320D.pdf” for PIC32MZ2048EFH144, pages 9~10, shows pins 35 and 36 as PGEC1 and PGED1, and 37 and 38 as PGEC2 and PGED2 respectively.
 
The Microchip Harmony Configurator (MHC) shows pins 35~38 were “Analog”, I changed to “Digital”. Still get error message.
 
Document “7005230B.pdf”, user guide for “PIC32 MZ with FPU Embedded Connectivity Starter Kit”, page 25, shows PIC32MZ PGED2/PGEC2 connected to the PIC24 on-board programmer.
 
It worked in release mode, why would the configuration need to change for debug mode? What configuration do I change?
---
Original message, with the version of the MHC and the PIC32MZ device ID revision added:
 
I have the issue with a “PIC32 MZ with FPU Embedded Connectivity Starter Kit”.
PIC32MZ2048EFH144
 
I select “Clean and Build for Debugging Main Project”. Build completes without errors.
 
I select “Program Device for Debugging Main Project”. Here is the error message at the end, which is in red text.
 
Programming/Verify complete
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.
 
Here are the versions of the software development tools.
 
MPLAB X IDE v3.45
XC32 v1.42
MHC v1.0.9.2
Harmony v1.09
 
PIC32MZ2048EFH144, device ID revision A1
Any ideas?
#22
qhb
Superb Member
  • Total Posts : 9999
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: The target device is not ready for debugging. 2016/11/22 12:30:55 (permalink) ☄ Helpfulby Lawrence.Miller 2016/11/22 14:26:23
+1 (1)
Lawrence.Miller
...
A review of the pins in document “6001320D.pdf” for PIC32MZ2048EFH144, pages 9~10, shows pins 35 and 36 as PGEC1 and PGED1, and 37 and 38 as PGEC2 and PGED2 respectively.

So you have two sets of debugging pins. It is your job to tell the PIC which pair to use via the CONFIG word setting. 
 

Document “7005230B.pdf”, user guide for “PIC32 MZ with FPU Embedded Connectivity Starter Kit”, page 25, shows PIC32MZ PGED2/PGEC2 connected to the PIC24 on-board programmer.
 
It worked in release mode, why would the configuration need to change for debug mode? What configuration do I change?

"Release mode" only has to program the chip, which can be done on either set of pins
"Debug mode" can only work via one set of pins, and you have to tell the PIC which set.
This is controlled by the "ICESEL" bits in the DEVCFG0 configuration word.
 
#23
Lawrence.Miller
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2014/08/03 17:15:08
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2016/11/22 14:32:52 (permalink)
0
Thanks qhb! Now MPLAB X programs the chip in debug mode.
 

"Release mode" only has to program the chip, which can be done on either set of pins
"Debug mode" can only work via one set of pins, and you have to tell the PIC which set.
This is controlled by the "ICESEL" bits in the DEVCFG0 configuration word.

 
 
#24
ScottSD
Starting Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2016/09/15 12:37:00
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2017/04/07 09:13:09 (permalink)
0
I had the same problem as Lawrence--I am just providing information here in case someone else is also seeing this.
 
I am using an Olimex development board  (PIC32-HMZ144), MPLABX v3.55 and Harmony Framework Configuration v2_02_00b.
 
I was able to program the PIC32 on the Olimex board with my ICD3 but was unable to debug it, and also got the message: 
Programming/Verify complete
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.
 

I had to change the ICELE setting (under DEVCFG0 ) in the Harmony Configurator to ICS_PGx2 and now debugging works like a charm. 
 
post edited by ScottSD - 2017/04/07 09:18:19
#25
bonmotwang@hotmail.com
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2018/11/30 09:02:18
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2019/04/24 13:20:46 (permalink)
0
I have spent several hours on this!!!
But it is because I pressed a button that I didn't know what it was for.
The button is beside download upload buttons. It is called "Hold in Reset". 
You want it in "Pause" icon. Not the other one!!!
If it is held in reset mode, you will be able to program but not debug, same message as the the first post describes.
 
#26
ocean_front_view
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2010/01/04 14:58:52
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2019/12/14 16:29:58 (permalink)
0
ugh just hit this issue too but my result was different. Had mplab setup to using a PIC24FJ64GC006 but the chip on the board had twice the memory. PIC24FJ128gC006. I could download all day long, just could not debug. Changed the chip type and all is great. As a side not I was also not able to toggle RB14 but can now. 
#27
CobraRGuy
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2012/03/31 22:00:33
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2020/03/05 13:24:25 (permalink)
0
 
 
post edited by CobraRGuy - 2020/03/05 16:24:10
#28
ric
Super Member
  • Total Posts : 28422
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: The target device is not ready for debugging. 2020/03/05 13:53:21 (permalink)
0
CobraRGuy
...
Please forgive me for not starting a new thread for this, but my issue is very closely related.
...

Please don't do this.
There are multiple things that can cause this problem, and hijacking someone else's topic just muddies the water for both you and them.
 

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!
#29
CobraRGuy
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2012/03/31 22:00:33
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2020/03/05 16:32:58 (permalink)
0
Deleting my post is not allowed, so the contents were deleted. I will re-post under a new topic. Thanks
#30
CobraRGuy
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2012/03/31 22:00:33
  • Location: 0
  • Status: offline
Re: The target device is not ready for debugging. 2020/03/05 16:41:08 (permalink)
0
I got my hand slapped for "hijacking" someone else's post, so I will post under a new topic. My apologies to anyone who was offended...
#31
Page: < 12 Showing page 2 of 2
Jump to:
© 2020 APG vNext Commercial Version 4.5