8

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
Alumashka
  • 393
  • 1
  • 3
  • 12
  • 1
    Google finds three sets of instructions very quickly. – Ignacio Vazquez-Abrams Dec 08 '15 at 18:52
  • 2
    Would you care to share at least exact search query for poor person who are not as smart as you? – Alumashka Dec 08 '15 at 18:59
  • http://git.linformatronics.nl/gitweb/?p=makefile;a=summary – jippie Dec 08 '15 at 18:59
  • 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? – Alumashka Dec 08 '15 at 19:10
  • let me Google that for you comments run afoul of the be nice policy, please don't use them. Better to provide a link an answer or nothing at all thanks – Voltage Spike Jun 11 '20 at 05:56
  • For reference, in the Arduino IDE's [preferences.txt file](https://docs.arduino.cc/hacking/software/Preferences), change `build.verbose` and `upload.verbose` to `true` to cause the IDE to print out what commands it's using. – 10762409 Jun 19 '22 at 00:18

1 Answers1

9

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
    
Vladislav Ivanov
  • 271
  • 2
  • 10
  • 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! – Alumashka Dec 08 '15 at 19:11
  • Yes, definitely works. Sorry for delay I've kicked about setting proper port, chip and path to config file. Thanks once more! – Alumashka Dec 08 '15 at 19:59