Using EMUD Pins With Pickit3

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Using EMUD Pins With Pickit3

Herbert Graf-5
Hello all,

stupid question, but how do I use the EMUD/EMUC pins for debug?

I have a dsPIC30F3013 on a board. I've connected a Pickit3 to it and can
successfully program it and debug it using PGD/PGC.

I'm using MPLABX. Unfortunately, for my application I can't use the
PGC/PGD pins for debug since I need to use the I2C block on this part.

So, I've enabled EMUD2/EMUC2 in the config settings. I can't seem to
figure out how to get MPLABX to seperate the build/program/debug stages.
I need to since to program I have the Pickit3 plugged into the PGD/PGC
pins, and then for debug I have to plug into the other pins.

I've done some searching and I'm going over the Pickit3 and MPLABX
manuals, but so far nothing is catching my eye.

I hope someone here can point me to how to do this?

Thanks, TTYL

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Chetan Bhargava
There are multiple emud and emuc on that device so you can use the
alternate ones.


Chetan Bhargava


On Fri, Aug 3, 2012 at 2:39 PM, Herbert Graf <[hidden email]> wrote:

> Hello all,
>
> stupid question, but how do I use the EMUD/EMUC pins for debug?
>
> I have a dsPIC30F3013 on a board. I've connected a Pickit3 to it and can
> successfully program it and debug it using PGD/PGC.
>
> I'm using MPLABX. Unfortunately, for my application I can't use the
> PGC/PGD pins for debug since I need to use the I2C block on this part.
>
> So, I've enabled EMUD2/EMUC2 in the config settings. I can't seem to
> figure out how to get MPLABX to seperate the build/program/debug stages.
> I need to since to program I have the Pickit3 plugged into the PGD/PGC
> pins, and then for debug I have to plug into the other pins.
>
> I've done some searching and I'm going over the Pickit3 and MPLABX
> manuals, but so far nothing is catching my eye.
>
> I hope someone here can point me to how to do this?
>
> Thanks, TTYL
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Chetan Bhargava
Look at this:
http://ww1.microchip.com/downloads/en/DeviceDoc/70071E.pdf

Page 9 - Register 24-7: FICD: In-Circuit Debugger Configuration Register

Chetan Bhargava


On Fri, Aug 3, 2012 at 4:55 PM, Chetan Bhargava <[hidden email]> wrote:

> There are multiple emud and emuc on that device so you can use the
> alternate ones.
>
>
> Chetan Bhargava
>
>
> On Fri, Aug 3, 2012 at 2:39 PM, Herbert Graf <[hidden email]> wrote:
>> Hello all,
>>
>> stupid question, but how do I use the EMUD/EMUC pins for debug?
>>
>> I have a dsPIC30F3013 on a board. I've connected a Pickit3 to it and can
>> successfully program it and debug it using PGD/PGC.
>>
>> I'm using MPLABX. Unfortunately, for my application I can't use the
>> PGC/PGD pins for debug since I need to use the I2C block on this part.
>>
>> So, I've enabled EMUD2/EMUC2 in the config settings. I can't seem to
>> figure out how to get MPLABX to seperate the build/program/debug stages.
>> I need to since to program I have the Pickit3 plugged into the PGD/PGC
>> pins, and then for debug I have to plug into the other pins.
>>
>> I've done some searching and I'm going over the Pickit3 and MPLABX
>> manuals, but so far nothing is catching my eye.
>>
>> I hope someone here can point me to how to do this?
>>
>> Thanks, TTYL
>>
>> --
>> http://www.piclist.com PIC/SX FAQ & list archive
>> View/change your membership options at
>> http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Herbert Graf-5
Hello Chetan,

I have done that.

The problem is when I click "debug project" in MPLABX it automatically does a build, programs the device and starts the debug session. Since my program pins are different from my debug pins (I've set them that way) it always fails.

If I have the programmer plugged into the program pins the build happens, the program happens, and then it errors out saying it can't find the debug target.

If I have the programmer plugged into the debug pins, the build happens, the program fails, and it errors out there.

How, in MPLABX, can you separate the program and debug stages? I can't find a button that JUST starts the debug session?

Thanks, TTYL

On 2012-08-03, at 8:16 PM, Chetan Bhargava <[hidden email]> wrote:

> Look at this:
> http://ww1.microchip.com/downloads/en/DeviceDoc/70071E.pdf
>
> Page 9 - Register 24-7: FICD: In-Circuit Debugger Configuration Register
>
> Chetan Bhargava


--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Joe Wronski
I can't answer the specific question, but I share your pain.
I have learned that right clicking on the project in the left panel
enables some discrete operations, such as 'clean', rather than the menu
item "clean and build for debugging".    The pain comes when clicking
the "Debug main project" button insists on re-building regardless of the
state of the project and my environment has an issue where that build
requires a clean first.
Definitely some kinks to be ironed out there.
Joe W

On 8/4/2012 11:12 AM, Herbert Graf wrote:

> Hello Chetan,
>
> I have done that.
>
> The problem is when I click "debug project" in MPLABX it automatically does a build, programs the device and starts the debug session. Since my program pins are different from my debug pins (I've set them that way) it always fails.
>
> If I have the programmer plugged into the program pins the build happens, the program happens, and then it errors out saying it can't find the debug target.
>
> If I have the programmer plugged into the debug pins, the build happens, the program fails, and it errors out there.
>
> How, in MPLABX, can you separate the program and debug stages? I can't find a button that JUST starts the debug session?
>
> Thanks, TTYL
>
> On 2012-08-03, at 8:16 PM, Chetan Bhargava <[hidden email]> wrote:
>
>> Look at this:
>> http://ww1.microchip.com/downloads/en/DeviceDoc/70071E.pdf
>>
>> Page 9 - Register 24-7: FICD: In-Circuit Debugger Configuration Register
>>
>> Chetan Bhargava
>

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Chetan Bhargava
In reply to this post by Herbert Graf-5
Hi Herbert,

AFAIK, EMUD and EMUC pins allow programming of the part too. Although
I haven't worked on that exact PIC part, I am using PIC24EP64GP202 and
it has no PGC and PGD pins. I use EMUC and EMUD to program and debug
the part using pickit3.


Chetan Bhargava
http://microz.blogspot.com


On Sat, Aug 4, 2012 at 8:12 AM, Herbert Graf <[hidden email]> wrote:

> Hello Chetan,
>
> I have done that.
>
> The problem is when I click "debug project" in MPLABX it automatically does a build, programs the device and starts the debug session. Since my program pins are different from my debug pins (I've set them that way) it always fails.
>
> If I have the programmer plugged into the program pins the build happens, the program happens, and then it errors out saying it can't find the debug target.
>
> If I have the programmer plugged into the debug pins, the build happens, the program fails, and it errors out there.
>
> How, in MPLABX, can you separate the program and debug stages? I can't find a button that JUST starts the debug session?
>
> Thanks, TTYL
>
> On 2012-08-03, at 8:16 PM, Chetan Bhargava <[hidden email]> wrote:
>
>> Look at this:
>> http://ww1.microchip.com/downloads/en/DeviceDoc/70071E.pdf
>>
>> Page 9 - Register 24-7: FICD: In-Circuit Debugger Configuration Register
>>
>> Chetan Bhargava
>
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Chetan Bhargava
I found this http://ww1.microchip.com/downloads/en/devicedoc/93003A.pdf
It clearly describes your issue. Maybe you have to tweak MPLAB X settings.


Chetan Bhargava
http://microz.blogspot.com


On Sat, Aug 4, 2012 at 10:55 AM, Chetan Bhargava <[hidden email]> wrote:

> Hi Herbert,
>
> AFAIK, EMUD and EMUC pins allow programming of the part too. Although
> I haven't worked on that exact PIC part, I am using PIC24EP64GP202 and
> it has no PGC and PGD pins. I use EMUC and EMUD to program and debug
> the part using pickit3.
>
>
> Chetan Bhargava
> http://microz.blogspot.com
>
>
> On Sat, Aug 4, 2012 at 8:12 AM, Herbert Graf <[hidden email]> wrote:
>> Hello Chetan,
>>
>> I have done that.
>>
>> The problem is when I click "debug project" in MPLABX it automatically does a build, programs the device and starts the debug session. Since my program pins are different from my debug pins (I've set them that way) it always fails.
>>
>> If I have the programmer plugged into the program pins the build happens, the program happens, and then it errors out saying it can't find the debug target.
>>
>> If I have the programmer plugged into the debug pins, the build happens, the program fails, and it errors out there.
>>
>> How, in MPLABX, can you separate the program and debug stages? I can't find a button that JUST starts the debug session?
>>
>> Thanks, TTYL
>>
>> On 2012-08-03, at 8:16 PM, Chetan Bhargava <[hidden email]> wrote:
>>
>>> Look at this:
>>> http://ww1.microchip.com/downloads/en/DeviceDoc/70071E.pdf
>>>
>>> Page 9 - Register 24-7: FICD: In-Circuit Debugger Configuration Register
>>>
>>> Chetan Bhargava
>>
>>
>> --
>> http://www.piclist.com PIC/SX FAQ & list archive
>> View/change your membership options at
>> http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Herbert Graf-5
On Sat, 2012-08-04 at 11:29 -0700, Chetan Bhargava wrote:
> I found this http://ww1.microchip.com/downloads/en/devicedoc/93003A.pdf

That is exactly what I'm doing.


> Maybe you have to tweak MPLAB X settings.

And that is my question, which is not described in that pdf: how do you
get MPLABX to work with a hardware setup that doesn't use the PGD/PGC
pins for EMU?

Thanks, TTYL

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Herbert Graf-5
In reply to this post by Chetan Bhargava
On Sat, 2012-08-04 at 10:55 -0700, Chetan Bhargava wrote:
> Hi Herbert,
>
> AFAIK, EMUD and EMUC pins allow programming of the part too. Although
> I haven't worked on that exact PIC part, I am using PIC24EP64GP202 and
> it has no PGC and PGD pins. I use EMUC and EMUD to program and debug
> the part using pickit3.

On parts that have multiple EMUD/EMUC pairs (labelled EMUD1/EMUC1,
EMUD2/EMUC2, etc...) that is not the case.

The pair dedicated for programming is unchangable, and is shared by the
base EMUD/EMUC pair.

I can't believe nobody here has hit this issue before?

I'm beginning to think this is yet another omission in MPLABX, and piece
of software I'm quickly learning is REALLY crappy in the minds of many
MPLAB customers.

I might have to just do I2C by software and forgo using the hardware for
that. It sucks, but MCHIP has been making little missteps like this alot
lately, so I shouldn't be that surprised.

TTYL

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Herbert Graf-5
In reply to this post by Joe Wronski
On Sat, 2012-08-04 at 12:49 -0400, Joe Wronski wrote:
> I can't answer the specific question, but I share your pain.
> I have learned that right clicking on the project in the left panel
> enables some discrete operations, such as 'clean', rather than the menu
> item "clean and build for debugging".    The pain comes when clicking
> the "Debug main project" button insists on re-building regardless of the
> state of the project and my environment has an issue where that build
> requires a clean first.
> Definitely some kinks to be ironed out there.
> Joe W

Thanks for the hint. I had another look and you're right, there was a
context menu with more options. Unfortunately, the most obvious one,
labelled "Debug" STILL DOES A MAKE/PROGRAM!!???

MCHIP, seriously, are you that bone headed that the most simplest of
things is hard to figure out?

I'm really getting sorry I've gone back to PICs for this particular
project. MPLABX has been out for quite a while, I THOUGHT it would be at
least as capable as MPLAB8, seems it still isn't.

The grass is truly MUCH greener on the other side.

TTYL

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Using EMUD Pins With Pickit3

Chetan Bhargava
In reply to this post by Herbert Graf-5
>
> On parts that have multiple EMUD/EMUC pairs (labelled EMUD1/EMUC1,
> EMUD2/EMUC2, etc...) that is not the case.

Very true, that may be the reason they eliminated PGC/PGD on newer
parts. In one of my PIC24EP prototypes, I use EMUD3/EMUC3, I set
appropriate bits in FICD register and I can program and debug from the
same set of pins.


>
> The pair dedicated for programming is unchangable, and is shared by the
> base EMUD/EMUC pair.
>
> I can't believe nobody here has hit this issue before?
>
> I'm beginning to think this is yet another omission in MPLABX, and piece
> of software I'm quickly learning is REALLY crappy in the minds of many
> MPLAB customers.
>
> I might have to just do I2C by software and forgo using the hardware for
> that. It sucks, but MCHIP has been making little missteps like this alot
> lately, so I shouldn't be that surprised.

I'm also struggling with the i2c peripheral libraries provided by
MCHP. Their example is totally incorrect for the PIC24EP/dsPIC33
devices.

Some time ago I found a bug in C30 v3.30 compiler where I had to go
fix the header files for the parts I was using.
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist