# How do I load a hex file into a nano?

**URL:** <https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937>\
**Category:** Uploading\
**Created:** [February 22, 2025, 10:12pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937 "2025-02-22T22:12:02Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![matelot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/matelot/32/215225_2.png) [@matelot](https://forum.arduino.cc/u/matelot)\
**Post date:** [February 22, 2025, 10:12pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/1 "2025-02-22T22:12:02Z")

</div>

I am trying to load a hex file onto a nano.  
I am reading [arduino as ISP and arduino bootloaders](https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/#technical-aspects-of-programming).  
I have set my uno and nano up so the uno is the programmer and the nano the target. I think I have successfully loaded the bootloader onto my nano, just to test the wiring and connection.

Below the heading the page then says  
"Arduino ISP turns your Arduino into an in-circuit programmer to re-program AtMega chips.  
It stops at the bootloader and doesn't tell how to go any further.  
Is it possible to load hex files using this method and if so how do I do it?

---

<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:** [February 23, 2025, 5:17am UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/2 "2025-02-23T05:17:04Z")

</div>

Yes, it's possible.

First enable _Show verbose output during upload_ in _file → preferences_ in the IDE.  
Next I suggest that you first upload an innocent sketch like blink via ICSP. This will give you the avrdude command that is executed when uploading via ICSP. Below for a Windows system

```plaintext
"C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM4 -b19200 "-Uflash:w:C:\Users\bugge\AppData\Local\arduino\sketches\C2BB89089FBB8E1897B952FC31B78159/Blink.ino.hex:i"

```

After that you can run copy that command and run it from the command line replacing the name of the file by your hex-file like

```plaintext
"C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM4 -b19200 "-Uflash:w:pathTo\myHex:i"

```

It will overwrite the bootloader but that is not a problem; the only purpose of burning the bootloader is to set the fuses correctly for the 328P and that will be maintained.

---

<div class="post-metadata">

**Author:** ![matelot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/matelot/32/215225_2.png) [@matelot](https://forum.arduino.cc/u/matelot)\
**Post date:** [February 23, 2025, 1:55pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/3 "2025-02-23T13:55:50Z")

</div>

thank you sterretje,  
I am not quite sure about how to do this.  
I have enabled show verbose output during compile as well as upload and I am getting a long list of commands when I compile the blink sketch, none that include ones similar to your lines.

```arduino

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Bob\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Bob\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries P:\sketches\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10813 -build-path C:\Users\Bob\AppData\Local\Temp\arduino_build_496674 -warnings=none -build-cache C:\Users\Bob\AppData\Local\Temp\arduino_cache_860807 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Bob\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Bob\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries P:\sketches\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10813 -build-path C:\Users\Bob\AppData\Local\Temp\arduino_build_496674 -warnings=none -build-cache C:\Users\Bob\AppData\Local\Temp\arduino_cache_860807 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
Using board 'nano' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674\\sketch\\Blink.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Bob\AppData\Local\Temp\arduino_cache_860807\core\core_arduino_avr_nano_cpu_atmega328_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674/Blink.ino.elf" "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674\\sketch\\Blink.ino.cpp.o" "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674/..\\arduino_cache_860807\\core\\core_arduino_avr_nano_cpu_atmega328_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674" -lm
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674/Blink.ino.elf" "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674/Blink.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674/Blink.ino.elf" "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674/Blink.ino.hex"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Bob\\AppData\\Local\\Temp\\arduino_build_496674/Blink.ino.elf"
Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

```

I assume I have got your instructions wrong.  
I assume my hex file has to be in the same directory as the other files  
Where do I put this command so it loads the file into the nano?  
Is it loading 3 files avrdude, avrdude.conf and my hex file?

---

<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:** [February 23, 2025, 2:10pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/4 "2025-02-23T14:10:23Z")

</div>

It looks like you did not do an upload over ICSP. It's the menu _Sketch → Upload Using Programmer_. Sorry that I did not make that clear.

Your hex file is at the end of the command; it was (in my example) \*  
Blink.ino.hex\*. You only need to replace that by the full path to your hex file.

---

<div class="post-metadata">

**Author:** ![ShermanP](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@ShermanP](https://forum.arduino.cc/u/ShermanP)\
**Post date:** [February 23, 2025, 5:45pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/5 "2025-02-23T17:45:40Z")

</div>

Another approach would be to use Zak Kemble's AVRDudess, which is a GUI front end for AVRDude.

 ![AVRDudess](https://europe1.discourse-cdn.com/arduino/original/4X/c/3/b/c3bb52e24cc62e4b75f4976bbf3dc8986ff3088d.jpeg)

You would select Arduino as ISP as the Programmer, and select its COM port. Then at the upper right, select ATmega328P as the MCU. Enter the hex file you want to upload in the Flash box, and select Intel Hex as the Format. Then select Write, then Go.

The picture shows Bandgap.ino as my sketch, including the location of the file. I had to know the location. After Verifying your sketch in the IDE for the Nano and its appropriate old or new bootloader, but before shutting down the IDE, you will find the hex file in your AppData\Local\Temp\Arduino\_build\_xxxxxx.

Included in that folder is, in my case, the file Bandgap.ino.with\_bootloader.hex. I haven't ever tried it, but I think if you upload that file, you will have both your sketch and the bootloader, if that's what you want. So the question is - do you want the bootloader to still be there after you've uploaded your hex file?

I should add that this works for IDE v1.8. I don't know about v2.

AVRDudess can also be used to read and set the fuses, as shown in the picture, as well as read and write EEPROM data. It's quite a useful program.

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [February 23, 2025, 5:49pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/6 "2025-02-23T17:49:30Z")

</div>

If the object is simply to load a hex file into a Nano that has a bootloader on it, you don't need to use an ISP. Just `arduino-cli`.

```arduino
arduino-cli -tv upload -b arduino:avr:nano:cpu=atmega328 --input-file <your hex file here> --port <your port here>

```

---

<div class="post-metadata">

**Author:** ![matelot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/matelot/32/215225_2.png) [@matelot](https://forum.arduino.cc/u/matelot)\
**Post date:** [February 24, 2025, 12:44am UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/7 "2025-02-24T00:44:55Z")

</div>

Sorry gents I am still lost,  
I am going to repeat something I asked earlier,  
where do I put this command line?

---

<div class="post-metadata">

**Author:** ![mikedb](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mikedb/32/1098613_2.png) [@mikedb](https://forum.arduino.cc/u/mikedb)\
**Post date:** [February 24, 2025, 4:46am UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/8 "2025-02-24T04:46:05Z")

</div>

> [@matelot](#):
>
> Sorry gents I am still lost,

You don't use any other command lines .

Just click UPLOAD WITH PROGRAMMER.

Programmer = Arduino as ISP.

Do you use the Arduino IDE?

---

<div class="post-metadata">

**Author:** ![matelot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/matelot/32/215225_2.png) [@matelot](https://forum.arduino.cc/u/matelot)\
**Post date:** [February 25, 2025, 8:02pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/9 "2025-02-25T20:02:40Z")

</div>

mikedb, putting it in capitals doesn't make it any clearer and I assume it is 'upload _using_ programmer' in the sketch tab.  
I assume I have the 'arduinoISP' sketch in the UNO?  
Where do I put the lines `"C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM4 -b19200 "-Uflash:w:pathTo\myHex:i"`  
or at least my version of them so that the hex file goes into the nano?

---

<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:** [February 25, 2025, 8:07pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/10 "2025-02-25T20:07:11Z")

</div>

Command prompt (or trrminal in linux/mac).

---

<div class="post-metadata">

**Author:** ![matelot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/matelot/32/215225_2.png) [@matelot](https://forum.arduino.cc/u/matelot)\
**Post date:** [February 25, 2025, 10:29pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/11 "2025-02-25T22:29:27Z")

</div>

Thank you for bearing with me sterretje, I really would like to succeed with this.  
I am using windows 10 and the IDE version 2.3.4.  
I now have a hex file called nano\_file.hex in the c:directory (the root directory) and the other files avrdude.exe and avrdude.conf in the files pointed to in the following entry, now bearing in mind that some of the slashes are forward and some are back the same as yours in post 2 does this look about right

```arduino
C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude” “-CC:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf” -v -patmega328p -cstk500v1 -PCOM4 -b19200 "-Uflash:w: C:/nano_file.hex:i”

```

I think my COM is 20 but that will depend on which lead I use and hence which com port is connected so I will alter PCOM4 to PCOM20.  
Do I need the UNO set up connected to the computer on COM 20 if it is relevant with the ISP sketch in it, set to 'programmer Arduino as ISP' and the nano connected to the UNO via ISP?  
Or am I loading direct into the nano with no UNO connected?

---

<div class="post-metadata">

**Author:** ![ledsyn](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ledsyn/32/1203827_2.png) [@ledsyn](https://forum.arduino.cc/u/ledsyn)\
**Post date:** [February 26, 2025, 4:50am UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/12 "2025-02-26T04:50:47Z")

</div>

Remember a capacitor for your Uno after you uploaded the ISP sketch to it.

---

<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:** [February 26, 2025, 5:17am UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/13 "2025-02-26T05:17:33Z")

</div>

> [@matelot](#):
>
> Do I need the UNO set up connected to the computer on COM 20 if it is relevant with the ISP sketch in it, set to 'programmer Arduino as ISP' and the nano connected to the UNO via ISP?  
> Or am I loading direct into the nano with no UNO connected?

You need to upload the ArduinoISP sketch to the Uno using the IDE; use the Uno's COM port. That will make the Uno a programmer.  
Next you can run the avrdude command, again using the Uno's port.

---

<div class="post-metadata">

**Author:** ![matelot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/matelot/32/215225_2.png) [@matelot](https://forum.arduino.cc/u/matelot)\
**Post date:** [March 11, 2025, 10:41pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/14 "2025-03-11T22:41:30Z")

</div>

Sorry guys, I still can't get the dam thing to work.  
I have an Uno containing the Arduino ISP, a nano connected to pins 10,11,12 and 13 of the UNO into the isp socket of the nano and a capacitor inserted in the UNO reset as it should be.  
The full line I have been quoting above seemed to be too long for the command prompt so I have moved the /bin and the /etc directories down to the c: drive.  
I now have two directories in the root directory.  
/bin contains the 7 files that are present in the /bin directory when it is so far in the drive and the /etc directory contains avrdude.conf so I should be able to call it with  
"C:\bin\avrdude” -C "C:\etc/avrdude.conf” -v -patmega328p -cstk500v1 -PCOM10 -b19200 -Uflash:w: "C:/nano\_file.hex:i”  
The hex file to load is in the root directrory.  
When I put the instruction above in the command prompt and press enter I get

 ![avrdude](https://europe1.discourse-cdn.com/arduino/original/4X/7/5/d/75dd85d552b082fbe1378dce3b4d3d4876aad07e.png)  
I have tried changing the slashes \ for / and vice versa (does it matter which way round they are?) but with no improvement.  
Can you see what I am doing wrong?

---

<div class="post-metadata">

**Author:** ![ledsyn](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ledsyn/32/1203827_2.png) [@ledsyn](https://forum.arduino.cc/u/ledsyn)\
**Post date:** [March 11, 2025, 11:00pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/15 "2025-03-11T23:00:22Z")

</div>

Hehe, now I understand why it fails every time, you've mixed linux and windows directory structure.

Edit: Also when using paths in windows you never use / only   
Edit2: Apparently you can 🙃

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [March 11, 2025, 11:05pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/16 "2025-03-11T23:05:10Z")

</div>

The problem is caused by the use of "curly quotes" (`”`) in the command. You can use these characters in prose, but you should never use them in machine syntax. You must always use straight quotes `"` in that application.

Word processors often have a "smart quotes" feature where it will automatically use curly quotes. You must avoid ever using such word processors with command lines or code.

> [@matelot](#):
>
> I have tried changing the slashes \ for / and vice versa (does it matter which way round they are?

Probably not. Although `\` is the native Windows path separator, the POSIX `/` is also supported by Windows in most contexts.

---

<div class="post-metadata">

**Author:** ![matelot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/matelot/32/215225_2.png) [@matelot](https://forum.arduino.cc/u/matelot)\
**Post date:** [March 11, 2025, 11:34pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/17 "2025-03-11T23:34:14Z")

</div>

What do you mean by

> [@ledsyn](#):
>
> Hehe, now I understand why it fails every time, you've mixed linux and windows directory structure.

?  
I have altered the " to straight ones and it looks to have gone in?  
"C:\bin\avrdude" -C "C:\etc\avrdude.conf" -v -patmega328p -cstk500v1 -PCOM10 -b19200 -Uflash:w: "C:\nano\_file.hex:i"  
I have set up the test with 3 leds as shown in  
[https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/](https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/)  
that indicate a heartbeat, error and programming and they flashed so it looks as if it worked, I now have to try to build a bit more of the unit before I can confirm it.  
Thanks for the advice I do appreciate it and will return when I get some indication that it worked or otherwise.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [March 11, 2025, 11:45pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/18 "2025-03-11T23:45:35Z")

</div>

> [@matelot](#):
>
> it looks as if it worked

Great news!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 7, 2025, 11:46pm UTC](https://forum.arduino.cc/t/how-do-i-load-a-hex-file-into-a-nano/1356937/19 "2025-09-07T23:46:23Z")

</div>

Closed on September 7, 2025, 11:46pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
