CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ICD 2 and MPLAB debug problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Hans Wedemeyer
Guest







ICD 2 and MPLAB debug problem
PostPosted: Fri Aug 01, 2003 11:37 pm     Reply with quote

Installed the ICD 2 using USB and with MPBLAB 6.3 and PCWH V3.17
It all function just fine until I try to debug.

I loaded an old set of files and added

#device ICD=TRUE

Then compiled it from within in MPLAB and compiles OK (at least it reports no errors)

When I start the debugger, this message appears...

ICD0083: Target not in debug mode, unable to perform operation

So, what else do I need to do to put my target into debug mode...

I thought adding #device ICD=TRUE and recompiling was all that is needed !

Some where on this forum someone had a similar problem and a suggestion to add DEBUG to the fuses was suggested. I ddi that and still got the same error.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516583
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 12:00 am     Reply with quote

Make sure that you don't have the WDT setup in the fuses.
It can also mean that MPLAB is having trouble communicating with the ICD.

:=Installed the ICD 2 using USB and with MPBLAB 6.3 and PCWH V3.17
:=It all function just fine until I try to debug.
:=
:=I loaded an old set of files and added
:=
:=#device ICD=TRUE
:=
:=Then compiled it from within in MPLAB and compiles OK (at least it reports no errors)
:=
:=When I start the debugger, this message appears...
:=
:=ICD0083: Target not in debug mode, unable to perform operation
:=
:=So, what else do I need to do to put my target into debug mode...
:=
:=I thought adding #device ICD=TRUE and recompiling was all that is needed !
:=
:=Some where on this forum someone had a similar problem and a suggestion to add DEBUG to the fuses was suggested. I ddi that and still got the same error.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516584
Hans Wedemeyer
Guest







Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 9:09 am     Reply with quote

:=Make sure that you don't have the WDT setup in the fuses.

It is set to NOWDT
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516590
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 9:45 am     Reply with quote

A few suggestions from Microchip:

Make sure you power ICD2 first, then target.
Target not in debug mode indicates that the ICD2 cannot talk to the debug code that is on the target board device. This could be caused by capacitance on MCLR or resistors/capacitors on RB6/RB7. Also, if the oscillator isn't working, you'll see this problem.

Also, check your configuration bits. If you config write protect is enabled, you will also get this error message.


:=:=Make sure that you don't have the WDT setup in the fuses.
:=
:=It is set to NOWDT
:=
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516593
john cutler



Joined: 06 Sep 2003
Posts: 82
Location: Hot Tub, California

View user's profile Send private message

Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 9:49 am     Reply with quote

Did you look at Project build options and check the "compile for ICD box"?
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516595
Hans Wedemeyer
Guest







Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 10:09 am     Reply with quote

:=A few suggestions from Microchip:
:=
:=Make sure you power ICD2 first, then target.
:=Target not in debug mode indicates that the ICD2 cannot talk to the debug code that is on the target board device. This could be caused by capacitance on MCLR or resistors/capacitors on RB6/RB7. Also, if the oscillator isn't working, you'll see this problem.
:=
:=Also, check your configuration bits. If you config write protect is enabled, you will also get this error message.
:=
:=
:=:=:=Make sure that you don't have the WDT setup in the fuses.
:=:=
:=:=It is set to NOWDT
:=:=
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516597
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 10:30 am     Reply with quote

Have you tried to do something simple like toggle an LED or output pin while the device is not in debug mode to verify that the micro is running?


:=:=A few suggestions from Microchip:
:=:=
:=:=Make sure you power ICD2 first, then target.
:=:=Target not in debug mode indicates that the ICD2 cannot talk to the debug code that is on the target board device. This could be caused by capacitance on MCLR or resistors/capacitors on RB6/RB7. Also, if the oscillator isn't working, you'll see this problem.
:=:=
:=:=Also, check your configuration bits. If you config write protect is enabled, you will also get this error message.
:=:=
:=:=
:=:=:=:=Make sure that you don't have the WDT setup in the fuses.
:=:=:=
:=:=:=It is set to NOWDT
:=:=:=
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516599
Hans Wedemeyer
Guest







Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 11:02 am     Reply with quote

<font face="Courier New" size=-1>Yes the circuit runs the code if I program it using the PicStart plus.

When I try to program using ICD 2 this message appears:

ICDWarn0014: Watchdog Timer cannot be enabled when Background Debug is enabled. Disable Watchdog Timer?

My latest fuses
#FUSES H4,NOPROTECT,NOWDT,PUT,BROWNOUT,NOLVP,DEBUG,NOWRTC,NOWRT,NOEBTRB,NOCPB,NOEBTR

Which includes NOWDT so why is MPLAB telling me it is ENABLED... !

I found the setting page for configuration bits and disbaled the WDT and all the memory that was write protected.
I then recompiled and the WDT got enabled again...
Looks like MPLAB is not using the fuses line..
</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516600
Hans Wedemeyer
Guest







ignore this bad post...
PostPosted: Sat Aug 02, 2003 11:21 am     Reply with quote

<font face="Courier New" size=-1>:=Have you tried to do something simple like toggle an LED or output pin while the device is not in debug mode to verify that the micro is running?
:=
:=
:=:=:=A few suggestions from Microchip:
:=:=:=
:=:=:=Make sure you power ICD2 first, then target.
:=:=:=Target not in debug mode indicates that the ICD2 cannot talk to the debug code that is on the target board device. This could be caused by capacitance on MCLR or resistors/capacitors on RB6/RB7. Also, if the oscillator isn't working, you'll see this problem.
:=:=:=
:=:=:=Also, check your configuration bits. If you config write protect is enabled, you will also get this error message.
:=:=:=
:=:=:=
:=:=:=:=:=Make sure that you don't have the WDT setup in the fuses.
:=:=:=:=
:=:=:=:=It is set to NOWDT
:=:=:=:=</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516601
Steve H.
Guest







Fuse order....
PostPosted: Sat Aug 02, 2003 11:47 am     Reply with quote

In older versions of the compiler the order in which the fuses appears made a difference to the compiler. I used to have to fiddle with the order to make the compiler actually parse the lines correctly!

I wonder if this "Feature" is back?

Steve H.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516603
Hans Wedemeyer
Guest







Re: Fuse order....
PostPosted: Sat Aug 02, 2003 11:58 am     Reply with quote

:=I wonder if this "Feature" is back?

Just think of how many different permutation for all the PIC18 fuses...

At least when I use the HEX file in MPLAB for the PicStart plus it correctly sets all items.

I hope you are wrong about this... :-)

Hans W


Who ever programmed the Configuration bits option in MPLAB 6.3 is a sorry SOB, and must be a person that enjoys inflicting pain on others... First it has a hidden UI... and then there is a drop down list box for each item. I don't think they teach anything to these new programmers about Radio buttons for On/Off arrrrrrrgh ! I hate this new flat style UI it is so crappy..
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516604
Hans Wedemeyer
Guest







Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 4:05 pm     Reply with quote

Yes that is cheked.
It appears as if MPLAB is not picking up the "fuses"

with

#FUSES H4,NOPROTECT,NOWDT,PUT,BROWNOUT,NOLVP,DEBUG,NOWRTC,NOWRT,NOEBTRB,NOCPD,NOCPB,NOEBTR

The WDT should be OFF, yet MPLAB sets it to Enabled each time I compile! It also Enables write protection for all the memory yet the fuses should tell it to Disable protection... !

I'm coming to the conclusion it's something to do with the interface between CCS and MPLAB...
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516611
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: ICD 2 and MPLAB debug problem
PostPosted: Sat Aug 02, 2003 7:11 pm     Reply with quote

I would bet the problem is in CCS. I do this daily with MPLAB and the C18 compiler with no problems.

:=Yes that is cheked.
:=It appears as if MPLAB is not picking up the "fuses"
:=
:=with
:=
:=#FUSES H4,NOPROTECT,NOWDT,PUT,BROWNOUT,NOLVP,DEBUG,NOWRTC,NOWRT,NOEBTRB,NOCPD,NOCPB,NOEBTR
:=
:=The WDT should be OFF, yet MPLAB sets it to Enabled each time I compile! It also Enables write protection for all the memory yet the fuses should tell it to Disable protection... !
:=
:=I'm coming to the conclusion it's something to do with the interface between CCS and MPLAB...
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516613
Hans Wedemeyer
Guest







Found the problem
PostPosted: Sun Aug 03, 2003 10:15 am     Reply with quote

<font face="Courier New" size=-1>PCWH V3.17 is ignoring the $fuses when interfacing to MPLAB
I regressed to V3.169 and MPLAB and ICD2 works just fine..
</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516628
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group