chipKIT® Development Platform

Inspired by Arduino™

Tools for uploading hex file without MPIDE

Created Tue, 27 Dec 2011 14:10:25 +0000 by Jacob Christ


Jacob Christ

Tue, 27 Dec 2011 14:10:25 +0000

Does anyone know of tools for uploading a hex file to a board without using MPIDE?

I would like to send a hex file to a customer and give them the ability to upload without sending the whole project.

Jacob


KurtE

Tue, 27 Dec 2011 15:16:18 +0000

I wonder if you can do it with something like avrdude?

Kurt


EmbeddedMan

Tue, 27 Dec 2011 15:20:44 +0000

I believe that the IDE just uses a command line tool - I believe AVRDUDE - to do the uploading. You should be able to just call that with a batch file or something.

*Brian


Jacob Christ

Tue, 27 Dec 2011 17:36:30 +0000

I'm aware of avrdude, I guess I should have been more clear. I was hoping that there is some easy to use GUI tool out there.

Jacob


EmbeddedMan

Tue, 27 Dec 2011 17:56:40 +0000

Well, isn't the definition of an easy to use GUI tool : "MPIDE"?

Just kidding. Seriously, I understand what you're asking for.

I've never used it, but what about [url]http://sourceforge.net/projects/avrdude-gui/[/url]

*Brian


Jacob Christ

Tue, 27 Dec 2011 20:29:40 +0000

Well, isn't the definition of an easy to use GUI tool : "MPIDE"?

I wish MPIDE could be used to upload hex files without compiling, that would be easy!

[url]http://sourceforge.net/projects/avrdude-gui/[/url]

This is almost exactly what I was looking for. I say almost because it looks like some configuration required since chipKIT targets are not listed.

Thanks Brian!

Jacob


Jacob Christ

Wed, 28 Dec 2011 05:51:13 +0000

I got the avrdude-gui tool to work here is how:

  1. Downloaded avrdude-gui and unzipped.
  2. Replaced avrdude.exe that came with it with the avrdude.exe that is in MPIDE:

mpide-0022-windows-20110822\hardware\tools\avr\bin\avrdude.exe

Also needed to grap the libusb0.dll from the same location and place it into the avrdude-gui dir.

  1. Replaced the avrdude.conf file with the avrdude.conf that is in MPIDE:

mpide-0022-windows-20110822\hardware\tools\avr\etc\avrdude.conf

  1. The GUI program only recognizes the first 3 COM ports so I had to remap my Uno32 to COM2.

  2. Dropped my hex file into the avrdude-gui dir.

  3. Ran the program and selected the following parameters (for Uno32):

Target Device: 32MX320F128H Programmer: stk500v2 Flash: my_hex_file.hex

  1. Clicked the Flash Program button.

Whala

Jacob

whala: a bastardized english version of the French word "voila" meaning "there it is" Often used by morons in an attempt to sound more intelligent than they actually are.


MGLSOFT

Wed, 28 Dec 2011 11:22:44 +0000

STK500 program any PIC32 ??


EmbeddedMan

Wed, 28 Dec 2011 12:51:35 +0000

Jacob,

Very, very sweet. Thanks for digging into this and getting it to work.

Maybe we can submit a feature request to Rick to add a menu item to the next MPIDE version for programming a raw HEX file? The trick, of course, is that each board could potentially have it's own unique HEX file for a given sketch. So you'd have to be really careful.

*Brian


slayer1991

Sat, 21 Jan 2012 21:21:19 +0000

I'd like to see a more in-depth guide on how to set MPLAB x and how to compile the hex file, how to make sure it doesn't kill the bootloader and how to upload it with avrdude :D I wish I don't have to buy a pickit 3 to do that..

Stefan.


Jacob Christ

Sun, 22 Jan 2012 00:47:29 +0000

You know what would be a nice project for someone with some free time? To create an application for the chipKIT that turns into a programmer for the pic.

Jacob


EmbeddedMan

Sun, 22 Jan 2012 16:26:09 +0000

I wonder if the code found here: [url]http://dangerousprototypes.com/forum/viewtopic.php?f=38&t=3477[/url] would be adaptable to chipKIT?

*Brian


dancc

Fri, 03 Feb 2012 15:35:09 +0000

I'd like to see a more in-depth guide on how to set MPLAB x and how to compile the hex file, how to make sure it doesn't kill the bootloader and how to upload it with avrdude :D I wish I don't have to buy a pickit 3 to do that.. Stefan.

This is just what I was thinking


dancc

Sat, 04 Feb 2012 14:57:51 +0000

Many thanks to EmbeddedMan/Brian. See this thread: http://chipkit.cc/forum/viewtopic.php?f=17&t=824


Jacob Christ

Tue, 17 Apr 2012 06:58:05 +0000

I'd like to see a more in-depth guide on how to set MPLAB x and how to compile the hex file, how to make sure it doesn't kill the bootloader and how to upload it with avrdude :D I wish I don't have to buy a pickit 3 to do that.. Stefan.

Hmmm, the bootloader should protect itself from erasing itself. If it doesn't this should be reported as a bug in github. Do you know for sure that this can happen?

Jacob