Help with AVRDUDE.

I am trying to run avrdude from the cmd window so I can have a more detailed look at how my USBtinyisp is interacting with my atmel328P. The problem I am having is that when I use USBtinyISP with the Arduino IDE it works %20 of the time when I am trying to upload a sketch. When I try to upload the bootloader it works once on computer start up and never again. SO I am trying to use AVRDUDE directly (since Arduino seems to be just a GUI for avrdude anyway).

The problem I am having is that whenever I type avrdude into the cmd window the cmd gives me this message.

'avrdude' is not recognized as an internal or external command, operable program or batch file.

I have manually put a copy avrdude into the system 32 file so I know it is there. I have also fixed any path problem cmd might have by manually linking it to system 32 (with the proper addressing). I have no idea what to do now.

I know USBtinyisp with upload the bootloader and I know it can upload programs but the consistency of this is awful.

Thanks in advance.

Do this:

  • (In the Arduino IDE) File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Do an upload or burn bootloader process in the Arduino IDE
  • Examine the contents of the black console window at the bottom of the Arduino IDE window to find the AVRDUDE command (note that Burn Bootloader is done in two commands, the first sets the fuses, the second flashes the bootloader to the microcontroller). You can copy and paste that command to the command line and modify it as you like.

So is fixed the problem I was having with avrdude wanting to execute in word. Now windows is back to not recognizing the file type which is good. However whenever I run avrdude i have to type avrdude.conf. When this happens windows will try to ask me what program to run avrdude.conf in and never runs it as a line code program. How are any of you able to access avrdude from the command line?

If any of the paths have spaces in them then wrap them in quotes. For example:

"C:\Program Files (x86)\arduino-1.8.5\hardware\tools\avr/bin/avrdude" -C"C:\Program Files (x86)\arduino-1.8.5\hardware\tools\avr/etc/avrdude.conf" -v -patmega2560 -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m