Mplab import buttons

Thread Starter

Dodgydave

Joined Jun 22, 2012
11,302
Is it possible to import a function onto the mplab screen, reason is i want to use an external programmer instead of pickit2, and there are no options to import an ".exe" function , only the hot keys, which cant be edited?

I know that i can use Pickit2v2 from the prog files setup, by clicking on my taskbar on the bottom of the screen as a shortcut.
 

ErnieM

Joined Apr 24, 2011
8,377
If you are just using a programmer outside of MPLAB then just use the programmer outside of MPLAB by opening the ".hex" file that MPLAB generated.

If your programmer doesn't "integrate" with MPLAB that is all you can do, but good thing Windows can run more then 1 program at a time.
 

tshuck

Joined Oct 18, 2012
3,534
I think you might be able to setup a post-build operation to launch your programming application and, if supported, supply the file as an argument to the program so it programs the device immediately...

I'm not at my computer to test this out. If I remember tonight, I'll take a whack at it...
 

Thread Starter

Dodgydave

Joined Jun 22, 2012
11,302
I think you might be able to setup a post-build operation to launch your programming application and, if supported, supply the file as an argument to the program so it programs the device immediately...

I'm not at my computer to test this out. If I remember tonight, I'll take a whack at it...
Ok, thanks...
 

tshuck

Joined Oct 18, 2012
3,534
Okay, I remembered, and it would appear to be possible...

Now, I wrote a very simple program to test this, just prints out the command lines to the console, but it should work the same for your application.

You are using MPLABX, right?

If so, right click your project-> Properties-> Building(on the left side) and where it has a checkbox reading, "Execute this line after build", enter:
call C:\[path to your program].exe ${ProjectDir}\\${ImagePath}
( make sure you check the checkbox)
Assuming the program takes a single command to run. You will probably need to put some identifier in front of
${ProjectDir}\\${ImagePath}
so you may just need something like:
-t${ProjectDir}\\${ImagePath}
provided -t is used to denote the .hex file.

Hope this helps....
 

Thread Starter

Dodgydave

Joined Jun 22, 2012
11,302
Thread like this one are why I recommend ONLY using a PICkit for programming when starting out.
Its a pickit2, but the pic wont programme even though its in the library, it says not compatable??, yet i can programme it using pickit2 2V6 app. Wierd....


Tried the shortcut button in the post or pre build and it dont work, never mind i will run it from pickitV2


Cheers....
 
Last edited:

tshuck

Joined Oct 18, 2012
3,534
It would have to be post-build as the .hex file isn't generated until after the build.

Some of the newer PICs cannot be programmed with the Pickit 2 from MPLAB and require the stand-alone application. This is normal. Just why it is that way, I have no idea...

Also, be aware that some of the newer PICs will be damaged if you connect Vpp directly to the Pickit...
 
Top