How can I use the compiler directive for PICKIT4?
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
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.
post edited by davekw7x - 2018/08/11 12:09:26