# Programming arduino without ide or avrdude?

**URL:** <https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375>\
**Category:** Programming\
**Created:** [June 30, 2023, 5:38pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375 "2023-06-30T17:38:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [June 30, 2023, 5:38pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/1 "2023-06-30T17:38:53Z")

</div>

Hello, I’m just researching right now to see if it is possible to program an arduino Uno or leonardo board without having the arduino ide or avrdude? Just straight command line.

So my question is if you have a hex or bin file can I program an arduino in command line on windows without ide or avrdude?

I’m seeing a lot of mix results a lot of people say yes and a lot says no. I’m also seeing a lot of maybes. Not saying why though. Any help understanding what. I can do or not do without and arduino ide program.

Joseph

---

<div class="post-metadata">

**Author:** ![anon56112670](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon56112670](https://forum.arduino.cc/u/anon56112670)\
**Post date:** [June 30, 2023, 5:44pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/2 "2023-06-30T17:44:06Z")

</div>

> [@josephchrzempiec](#):
>
> Just straight command line.

avrdude _is_ command line.  
What's the actual problem here?

---

<div class="post-metadata">

**Author:** ![DVDdoug](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dvddoug/32/671533_2.png) [@DVDdoug](https://forum.arduino.cc/u/DVDdoug)\
**Post date:** [June 30, 2023, 5:50pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/3 "2023-06-30T17:50:30Z")

</div>

I don't have a solid answer but I'm pretty sure you'd need multiple commands and probably some kind of "script" (maybe Python or Java, etc.).

The IDE (and I assume AVRdude) is open source so you can "see" how the programming is done.

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [June 30, 2023, 5:56pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/4 "2023-06-30T17:56:35Z")

</div>

There is a no problem. What. I mean is there a way to program an arduino if you don’t have avrdude or arduino ide installed?

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [June 30, 2023, 5:57pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/5 "2023-06-30T17:57:57Z")

</div>

That is what I’m trying to figure out if it possible to program an arduino if you do not have arduino ide on avrdude installed?

If I have a hex or bin file already made.

---

<div class="post-metadata">

**Author:** ![oldcurmudgeon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/oldcurmudgeon/32/1280882_2.png) [@oldcurmudgeon](https://forum.arduino.cc/u/oldcurmudgeon)\
**Post date:** [June 30, 2023, 7:19pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/6 "2023-06-30T19:19:44Z")

</div>

You need something to format and send the data to the Arduino. Why don't you want the tools designed to do that?

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [June 30, 2023, 7:25pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/7 "2023-06-30T19:25:24Z")

</div>

> [@josephchrzempiec](#):
>
> That is what I’m trying to figure out if it possible to program an arduino if you do not have arduino ide on avrdude installed?

Yes it is

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [June 30, 2023, 7:26pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/8 "2023-06-30T19:26:50Z")

</div>

I’m setting up a temperature sensor in my brother place that also haves a webserver on it. I might need reprogram it for me. He knows nothing about arduino and might get confused. I’m just trying to get him the best way of programming it. Yes I do know the ide would be better.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [June 30, 2023, 7:27pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/9 "2023-06-30T19:27:52Z")

</div>

Yes it is.  
Try this, nothing to install

> **[GitHub - binaryupdates/xLoader: xLoader is an utility to program or flash HEX...](https://github.com/binaryupdates/xLoader)**
>
> xLoader is an utility to program or flash HEX file onto ATmega328 and other AVR Microcontrollers. - GitHub - binaryupdates/xLoader: xLoader is an utility to program or flash HEX file onto ATmega328...

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [June 30, 2023, 7:29pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/10 "2023-06-30T19:29:21Z")

</div>

Oh that looks easy enough for him to do. Thank you

Joseph

---

<div class="post-metadata">

**Author:** ![oldcurmudgeon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/oldcurmudgeon/32/1280882_2.png) [@oldcurmudgeon](https://forum.arduino.cc/u/oldcurmudgeon)\
**Post date:** [June 30, 2023, 9:36pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/11 "2023-06-30T21:36:15Z")

</div>

It appears to be a front end to avrdude.

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [June 30, 2023, 11:29pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/12 "2023-06-30T23:29:42Z")

</div>

Nope not at all. My brother doesn't code or program. But if I can make it a little easy for him to help me out then it will be better to help me too.

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [June 30, 2023, 11:34pm UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/13 "2023-06-30T23:34:05Z")

</div>

Hello, Thank you for that. I was wondering I don't see a option for a Leonardo. Is that possilbe to add that or use it?

---

<div class="post-metadata">

**Author:** ![gcjr](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/gcjr/32/314015_2.png) [@gcjr](https://forum.arduino.cc/u/gcjr)\
**Post date:** [July 1, 2023, 12:44am UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/14 "2023-07-01T00:44:04Z")

</div>

> [@josephchrzempiec](#):
>
> But if I can make it a little easy for him to help me out then it will be better to help me too.

it appears that an Arduino can be programmed thru the USB/Serial interface using some protocol that makes the bootloader recognize the program mode, accepts the .hex file contents and programs it into flash.

presumably you're asking what that protocol is and are proposing writing a replacement for avrdude which your brother would run from the command line of a PC instead of avrdude.

is this about right?

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [July 1, 2023, 1:14am UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/15 "2023-07-01T01:14:05Z")

</div>

I'm trying to find a program to where he can upload and program the arduino without having to open the sketch then go through all the boards, libraries like you normally do. just select the board and port as upload the hex or bin file and go.

That is all. I'm just trying to make it easy for him.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [July 1, 2023, 4:24am UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/16 "2023-07-01T04:24:42Z")

</div>

Can you supply him with a zip file that contains avrdude, the hex file and a batch file / shell script that executes the needed command(s). Your brother can extract the zip somewhere, double-click the batch file / script and it's done.

> [@josephchrzempiec](#):
>
> Leonardo

The batch file needs to contain a command (or a couple) to reset the Leonardo and the avrdude command to upload.

---

<div class="post-metadata">

**Author:** ![josephchrzempiec](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/josephchrzempiec/32/216668_2.png) [@josephchrzempiec](https://forum.arduino.cc/u/josephchrzempiec)\
**Post date:** [July 1, 2023, 4:35am UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/17 "2023-07-01T04:35:27Z")

</div>

That is interesting. I never did a batch file before. I will have to look into it. Thank you.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [July 1, 2023, 4:40am UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/18 "2023-07-01T04:40:31Z")

</div>

I have made a correction to my previous post; it's one command (or a couple) to reset the Leonardo and a second one for avrdude.

Noter:  
Reset is done by opening and closing the serial p[ort port with a baud rate of 1200 baud.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [July 1, 2023, 6:56am UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/19 "2023-07-01T06:56:59Z")

</div>

It's not my program.  
It may be possible to add the Leonardo but I don't have one to experiment with.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [July 1, 2023, 7:07am UTC](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375/20 "2023-07-01T07:07:36Z")

</div>

```plaintext
@echo off

REM 1 reset Leonardo
REM 2 upload using avrdude

REM reset-port is the normal port
set reset-port=com12
REM upload-port is the booloader port
set upload-port=com6

echo leonardo on %reset-port%
echo bootloader on %upload-port%

REM reset Leonardo
echo reset Leonardo
mode %reset-port% 1200 > nul
echo > %reset-port%

REM give it a bit of time to switch to bootloader
echo wait a bit
timeout /t 5 > nul

REM upload
echo upload
avrdude\bin\avrdude.exe -C"avrdude/etc/avrdude.conf" -patmega32u4 -cavr109 -P%upload-port% -b57600 -D "-Uflash:w:blink/build/arduino.avr.leonardo/Blink.ino.hex:i"

pause

```

Sorry for inconsistency in `\` and `/`. I had some problems initially with the avrdude command

Attached is a full zip to upload a modified blink. When you "export compiled binary" in the IDE, you will get a build directory in the sketch directory that contains the hex file. That is reflected in the attached zip; you can clean it out to only have the hex file in there (no sketch, no eep file etc)

[1143375\_dosUploadLeonardo.zip](https://forum.arduino.cc/uploads/short-url/pPHTQdPFO5SMPe5h8fuEE0EcfNG.zip) (360.6 KB)

Note:  
you'll obviously have to check (and adjust) the com ports in the batch file

[Next page](https://forum.arduino.cc/t/programming-arduino-without-ide-or-avrdude/1143375.md?page=2)
