Using AVR programmer V2.1 with Microchip Studio (Solved)

Hi, All:

Microchip Studio (AKA Atmel Studio 7), latest version, is configured for the STK500 programmer by default, to use COM5 on Windows (I’m using Win 10).

I’m trying to program a test “blink” application on a board with an ATmega328P, using the AVR programmer V2.1. Since it came up as COM ports 16 (serial) and 17 (programming) on my system, in Studio I configured a new version of the STK500 with COM17 (Tools > Add target).

However, when I attempt to program the device, I get a message “failed to open \.\COM5 Error 0x2”

I’ve done plenty of googling, and tried every imaginable menu to wean Microchip Studio from trying to access COM5, without success.

Windows seems to think that COM5 is taken, but COM5 does not show up in Device Manager. I tried renaming COM17 to COM5 using Windows, but that led to the same error message, although now COM5 does show up in Device Manager.

Incidentally, I had no problem connecting to the programmer V2.1 and reading fuses using the original Atmel version of Studio 7, but would like to have the later Microchip version running as well.

Suggestions appreciated!

Solved: uninstalled everything related/reinstalled first the old version of Atmel Studio, configured it for COM17, checked that it was functional, uninstalled it, reinstalled Microchip Studio, and now it sees the programmer on COM17 (and works). If there is a better way of removing an “existing” programming tool (like the ghost of COM5), I have not yet found it.

Hi, Jim!

Glad you resolved the issue; thanks for letting us know!

You should be able to use the “Available Tools” window to modify existing tools, like changing their COM ports. (If you do not already know, you can find the “Available Tools” window under the View menu.)

By the way, whenever you change a COM port using the Device Manager, you should unplug and replug the device so that the computer re-recognizes it.

Let us know if you continue to have problems or run into the same issue later on.

- Amanda

Hi, Amanda:

I tried that, but there was no option to remove the STK500 tool associated with COM5 and I was unable to change the com port.

It let me create another STK500 tool associated with COM17, but I was apparently unable to access that tool, even after selecting it.

That problem has also gone away with reinstallation, and the disappearance of the mysterious STK500/COM5 tool, so I doubt anyone will be able to recreate the problem on demand.