Hi all,
I will have to push a program to many Uno ("massive" products). I'm looking for a solution to do that without IDE. To be clear, I want to push the binary without open the IDE to avoid errors like code deletion, etc.
Someone have an idea knowing that we work with Linux and/or Mac Os?
Thanks in advance. Bruno
pert
March 15, 2020, 9:47am
2
You can use the same command line tool the Arduino IDE uses: AVRDUDE .
Try this:
(In the Arduino IDE) File > Preferences
Check the box next to "Show verbose output during: upload".
Click the "OK" button.
Do an upload to an Uno.
After the upload finishes, examine the contents of the black console pane at the bottom of the Arduino IDE window. There you will find the avrdude command the Arduino IDE generated to upload the compiled binary to the Uno. You can copy and modify that command as you like.
The download URLs for the executables and configuration file of Arduino's version of AVRDUDE for the various operating systems can be found here:
https://downloads.arduino.cc/packages/package_index.json
The latest version:
{
"name": "avr-gcc",
"version": "7.3.0-atmel3.6.1-arduino5",
"systems": [
{
"size": "34462042",
"checksum": "SHA-256:f4acd5531c6b82c715e2edfa0aadb13fb718b4095b3ea1aa1f7fbde680069639",
"host": "arm-linux-gnueabihf",
"archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-arduino5-arm-linux-gnueabihf.tar.bz2",
"url": "http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-arm-linux-gnueabihf.tar.bz2"
},
{
"size": "39381972",
"checksum": "SHA-256:dd9c70190be370a44fb47dab1514de6d8852b861dfa527964b65c740d8d50c10",
"host": "aarch64-linux-gnu",
"archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-arduino5-aarch64-pc-linux-gnu.tar.bz2",
"url": "http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-aarch64-pc-linux-gnu.tar.bz2"
},
{
"size": "38492678",
"checksum": "SHA-256:f48706317f04452544ab90e75bd1bb193f8af2cb1002f53aa702f27202c1b38f",
"host": "x86_64-apple-darwin14",
"archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-apple-darwin14.tar.bz2",
"url": "http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-apple-darwin14.tar.bz2"
},
{
"size": "53727984",
"checksum": "SHA-256:6d4a5d089a36e5b5252befc73da204555b49e376ce7577ee19ca7f028b295830",
"host": "i686-mingw32",
"archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-arduino5-i686-w64-mingw32.zip",
"url": "http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-i686-w64-mingw32.zip"
},
{
"size": "38710087",
"checksum": "SHA-256:2ff12739d7ed09688d6b3c2c126e8df69b5bda1a07ab558799f0e576571e0e1d",
"host": "i686-linux-gnu",
"archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-arduino5-i686-pc-linux-gnu.tar.bz2",
"url": "http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-i686-pc-linux-gnu.tar.bz2"
},
{
"size": "39114120",
"checksum": "SHA-256:3effed8ffa1978b6e4a46f1aa2acc629e440b4d77244f71f9b79a916025206fb",
"host": "x86_64-linux-gnu",
"archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-pc-linux-gnu.tar.bz2",
"url": "http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"
}
]
}
avrdude -v -patmega328p -carduino -P/dev/ttyUSB0 -Uflash:w:/path/to/hex/hexfile.ino.hex:i
.. it's basicly the same line you see in the console when flashing from IDE
Many thanks all for your replies. Bruno