amperka / ino

Command line toolkit for working with Arduino hardware
http://inotool.org
MIT License
1.08k stars 233 forks source link

upload using programmer #201

Open lesion opened 9 years ago

lesion commented 9 years ago

Is it possible to upload sketches using an external programmer like usbasp? I've tried with :

ino upload -p usbasp

without any success:

usbasp doesn't exist. Is Arduino connected?

Using it with avrdude directly it works:

avrdude -p usbasp -c m328p
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: safemode: Fuses OK (H:05, E:DE, L:FF)
avrdude done.

It works also using "File > Upload with programmer" in Arduino IDE. Any advice? Thank you.

nathanejohnson commented 9 years ago

It looks as though it inspects the boards.txt to decide what protocol it uses. You could copy the section for the m328p, write it as a new section with a different name, and set the protocol, then specify that new device name to ino upload and it should work. However, if your programmer requires an erase before loading, then you might want to look at pull request #207

vlachoudis commented 9 years ago

Any chance that this will be implemented