I'm using an AVRISP mkII programmer to flash an Atmega 328p MCU. Not an Arduino, this is my design.
I'm using avrdude which came with WinAVR. I don't have Atmel studio installed, and I'm using Windows 7.
The command I am running is:
avrdude -p m328p -c avrisp -P usb -B 15.625 -U flash:w:firmware.hex:a -U lfuse:w:0xd6:m -U hfuse:w:0xd8:m -U efuse:w:0x07:m
The error I get is:
avrdude: ser_open(): can't open device "usb": The system cannot find the file specified
I have installed the drivers. AVRISP mkII shows up under LibUSB-Win32 in device manager.
I have tried using a bunch of other names for the port to no avail. The weird thing is that I used the same setup last year and it worked fine. I reinstalled WinAVR and that's when it stopped working. I am using the same boards as last year, so I know they work, and I even tried another computer.
Best Answer
Figured out the problem. The command needs to be: avrdude -p m328p -c avrispmkII -P usb -B 15.625 -U flash:w:firmware.hex:a -U lfuse:w:0xd6:m -U hfuse:w:0xd8:m -U efuse:w:0x07:m It now uses the usb port.