1
\$\begingroup\$

As I understand, I can use Arduino as ISP. Most instructions start with "load ArduinoISP from examples".

But then I want to load existing .hex file to the target chip. E.g.

AvrDude -> ArduinoBoard+ArduinoISP -> targetChip

And I fail miserably to find proper instructions though I believe this is possible and perhaps even already explained somewhere. I could not find instruction mainly because keywords yield instructions on many related but different topics.

I suspect that as Arduino uses avrdude I can sneak how it works when programming via ArduinoISP... At least I'm trying in this direction right now, but I would be glad if someone can help me to save the time.

UPD I've succeeded with the help of the answer below. The last thing to mention - I hate arduino's instruction for giving an image instead of specifying wiring. As I understand it is like:

  • pin 10 to reset
  • pin 11 to mosi
  • pin 12 to miso
  • pin 13 to sck
\$\endgroup\$
  • 1
    \$\begingroup\$ Google finds three sets of instructions very quickly. \$\endgroup\$ – Ignacio Vazquez-Abrams Dec 8 '15 at 18:52
  • \$\begingroup\$ Would you care to share at least exact search query for poor person who are not as smart as you? \$\endgroup\$ – Alumashka Dec 8 '15 at 18:59
  • \$\begingroup\$ git.linformatronics.nl/gitweb/?p=makefile;a=summary \$\endgroup\$ – jippie Dec 8 '15 at 18:59
  • 1
    \$\begingroup\$ No problem at all. Put "arduinoisp" into the search box and press Enter. \$\endgroup\$ – Ignacio Vazquez-Abrams Dec 8 '15 at 19:02
  • \$\begingroup\$ As I said it yields results to zounds of instructions on how to program target chip via ArduinoISP using Arduino IDE, writing separate sketch etc. I'm about something different, or am I wrong? \$\endgroup\$ – Alumashka Dec 8 '15 at 19:10
2
\$\begingroup\$

Assuming you already have a binary file for flashing, this page may help you. All you need to do is:

  1. Connect the Arduino with loaded ArduinoISP sketch to the target chip
  2. Run AVRDude. Make sure to specify a programmer type. Also note that ArduinoISP will work at lower serial speeds. Example:

    avrdude -p m328p -P /dev/ttyACM0 -c avrisp -b 19200 -U flash:w:release.hex
    
\$\endgroup\$
  • \$\begingroup\$ Oh yes, this line looks like exactly what I was searching for. I'll check it in a few minutes! I have no idea I should simply use "-c avrisp" for that case... Thank you very much! \$\endgroup\$ – Alumashka Dec 8 '15 at 19:11
  • \$\begingroup\$ Yes, definitely works. Sorry for delay I've kicked about setting proper port, chip and path to config file. Thanks once more! \$\endgroup\$ – Alumashka Dec 8 '15 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.