Hot!PICKit 4 debug variable #define

Page: < 12 Showing page 2 of 2
Author
LaoMa
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2017/08/01 21:39:42
  • Location: 0
  • Status: offline
Re: PICKit 4 debug variable #define 2018/08/09 23:09:28 (permalink)
0
Thanks Jeff,
 
I will wait, there is not anything I can do ...
Meantime, to do not change too much the code, I will add some conditional code in the first of include filesSmile: Smile
 
#21
Jim Nickerson
User 452 _
  • Total Posts : 4997
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Re: PICKit 4 debug variable #define 2018/08/10 06:38:53 (permalink)
0
LaoMa
I will wait, there is not anything I can do …

Maybe there is SOMETHING you can do.
In my "D:\Documents\MpLabX5.00\PIC16F1704.X\nbproject\configurations.xml" dir ( your path may vary )

    <conf name="PIC16F1704" type="2">
      <toolsSet>
        <developmentServer>localhost</developmentServer>
        <targetDevice>PIC16F1704</targetDevice>
        <targetHeader></targetHeader>
        <targetPluginBoard></targetPluginBoard>
        <platformTool>pk4hybrid</platformTool>
        <languageToolchain>XC8</languageToolchain>
        <languageToolchainVersion>1.41</languageToolchainVersion>
        <platform>3</platform>
      </toolset>

In some of my projects I use a pre build step to parse the xml file, extract some of the lines, create an h file to include in my project as documentation.
One could look for the platformTool and ….
 
post edited by Jim Nickerson - 2018/08/10 06:40:53
#22
davekw7x
Entropy++
  • Total Posts : 1455
  • Reward points : 0
  • Joined: 2012/01/16 12:01:07
  • Location: Left Coast, USA
  • Status: offline
Re: PICKit 4 debug variable #define 2018/08/11 11:32:23 (permalink)
+1 (1)
LaoMa
How can I use the compiler directive for PICKIT4?

mad_c
...
The compiler team was asked to refrain from adding support for the ICD4/PICkit 4 debugger option,



To the OP: I have never, personally, needed anything like this, but the following occurs to me as I follow this thread:
 
Now that we have an explanation, instead of agonizing over when/if the command option for PICkit 4 will be added to MPLABX (and/or to the documentation), how about just defining a macro of your own for each of your configurations?
 
That way, you can continue with your testing methodology and not have to wait. (And, once implemented, you don't have to worry about whether future versions of vendor tools will change or make their somewhat obscure definitions go away.)
 
Pick something descriptive (and don't use any leading underscore character(s) that might make your definition get confused with present or future MPLABX or XC8 stuff).
 
So, if you have a configuration that uses a PICkit 3, just define, say, USING_PK3, in the properties for that configuration.
 
You have a configuration that uses a PICkit 4, then define USING_PK4 in the properties for that configuration.
 
Then in your code you will have #ifdef USING_PICKIT3 or whatever...
 
Actually, I can't imagine writing code that would be different depending on whether it's a 3 or a 4, so, maybe in both the PK3 and PK4 configurations, just define USING_PICKIT or some such thing, and use this in your preprocessor conditionals.
 
Regards,

Dave
 
post edited by davekw7x - 2018/08/11 12:09:26

Attached Image(s)


Sometimes I just can't help myself...
#23
LaoMa
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2017/08/01 21:39:42
  • Location: 0
  • Status: offline
Re: PICKit 4 debug variable #define 2018/08/12 19:06:56 (permalink)
0
Thanks,
 
it is not exactly I intended, but I do know it will work fine.
Fortunately, I have finished debugging  in these days.... (I should never say that, Marphy's law!) so for the moment I changed only the #pragma directives to disable WDOG if Debug.
 
Maybe for the next project I have to do, the IDE will be settled already.
 
Smile: Smile
#24
Page: < 12 Showing page 2 of 2
Jump to:
© 2018 APG vNext Commercial Version 4.5