Is there a tool to program Microchip PIC's from command line?
Programming Microchip PIC from command line
Mar 04, 2008
16 Replies
Which command line?
-- Ray
My host OS is Windows.
I use MPLAB with HI-TECH C for programming PICs. My programmer/debugger is MPLAB ICD 2.
One day I decided that I had enough of MPLAB IDE and made a script to compile my project from command line. That works nice. Now if I could only have a command-line tool that will program (write binary code to) the target device, I will be really well set up.
Regards, Nickolai Leschov
formatting link
has PIC programmers that can run automated from the command line. Make sure that you get one that can program your particular processor.
Thad
Thank you. But it seems like those will not be useful for me. My processors are surface mounted and need to be in-curcuit programmed
Nickolai
We have command batch compile/program for AVR/ARM, but no PIC yet. We are sick of point and click and IDE in general. Graphical interface looks good for beginners, but most will outgrow it. Unfortunately, manufacturers/tool makers are not listening.
The Xilinx tools are nice that way (or at least were as of version V or so). The tools themselves are a collection of command-line utilities, and the IDE is just a front-end. Moreover, it doesn't take too long using the IDE to stumble across the log file (handily presented in a window) that shows you all the commands that were invoked to build your firmware.
That made it all _very_ easy to put the whole build process into a makefile, including downloading to the chip. I ended up just using the IDE for simulations, and for occasional editing when I was doing a mix of simulation and in-the-real testing.
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com
Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
... snip ...
That sounds refreshingly sane.
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]:
Try the download section.
As a PIC man for 30 years I would only use Microchip programmers.
These all run from MPLAB.
I use picp,
formatting link
which can run a picstart plus from the command line. Works well.
Paul Probert
I suspect that you can build a cable to go from their programmer to your board and work that way, but give them a call/email to make sure.
Thad
The three programmers listed on this page are driven by command-line tools.
formatting link
-- Dave Tweed
Microchip gives you a command line programmer. BUT, not for the ICD2, just the regular programmers.
Can you please specify more exactly where can I find it.
I might switch to one of those regular programmers if they can program my devices in-system. I heard of some them can [1]. I thought of switching to third-party programmer in future [2], but if it is from Microchip - maybe I'll use it instead.
[1] MPLAB PM3 Universal Device Programmer
formatting link
[2] USBProg PIC Programmer, suggested by David Tweed
formatting link
formatting link
It is part of the MPLAB installation. There is a separate program only interface program. It is supposed to have a command line.
formatting link
You might be talking about the utilities I see in MPLAB8\MPLAB IDE\Programmer Utilities there I see folders called "PM3Cmd", "Procmd", and "Visual Procmd". As far as I understand, they are for the Microchip PM3 programmer, which we don't have yet.
Can I program my chips in-curcuit from the command line with my MPLAB ICD2 ? Does anyone do it?
..
y ?I am using the PM3 programmer to programme in circuit using the PM3Cmd and a SD MMC card to stor the code, buti am having problems loading the code to the programmer from the card!!!!
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required