Go Down

Topic: Prog328P - Arduino/STK500 mini uploader for ATmega328P (Read 78 times) previous topic - next topic

robert rozee

i've written a small command-line utility (7k when compressed) designed to upload .hex files created by the Arduino IDE to an Arduino board containing an ATmega328P or similar processor. the program does NOT use AVRDUDE like many similar programs, and is quite limited in its scope. the intention is to provide a simple utility small enough that it can be emailed along with compiled code (.hex file) to an inexperienced user who just wants to update the content of an Arduino board without needing to download/install the full Arduino IDE or AVRDUDE (on its own around 2mb).

see the included README.txt file for more details.


the complete package, including Win32 executable can be downloaded from here:

https://github.com/robert-rozee/Prog328P


there is a "Download ZIP" button on the right side of the page, about halfway down. i would welcome feedback on how useful folks find the program, the limitations, and any bugs.


cheers,
rob   :-)

robtillaart

#1
Jul 26, 2015, 08:49 pm Last Edit: Jul 26, 2015, 09:05 pm by robtillaart
quick look:

1) if the nr of arguments is not ok the code should also have a exit(-1).
  That makes it easier to use in a BAT file and checking %errorlevel%

2) You might check that argv[1] ends on ".hex" sort of signature check.

3) you might put some code in function to get a better overview of the flow
  int status = checkParameters();
  if (status != 0) ....exit();

  int status = readFile2Mem(...) ;
  if (status != 0) ....exit();

  int status = copyMem2Arduino(...) ;
  if (status != 0) ....exit();

my 2 cents,
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up