AVR Pocket Programmer with Arduino 2.0.3

Has anyone been able to get an AVR Pocket Programmer to work with Arduino 2.0.3? It works fine with Arduino v1, but with 2.0 I can't even get it to recognize the port that the programmer is attached to. I'm using Minicore to program an ATMEGA328P.

Are there programmers that you have had work with 2.0.3. I'm not tied to the pocket programmer.

Hi @athiker

The "AVR Pocket Programmer" doesn't create a port, so this is normal and expected. You only need to select the correct programmer in the IDE: Tools > Programmer > USBtinyISP (or "USBtinyISP (slow)" if the target chip is configured for a slow clock rate).

So please don't worry about the lack of a port and go right ahead with programming the ATmega328P as usual. If you have some problem when you try that, come back here with a detailed description of the problem and we'll help you out.

Your topic has been moved to the dedicated IDE 2.0 section of the forum.

I tried uploading blink to a working Uno and get this. I also tried using USBtinyISP slow with no change.

Using board '328' from platform in folder: C:\Users\Mike - Ellen\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.1
Using core 'MCUdude_corefiles' from platform in folder: C:\Users\Mike - Ellen\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.1
Detecting libraries used...
"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\MiniCore\\hardware\\avr\\2.2.1\\cores\\MCUdude_corefiles" "-IC:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\MiniCore\\hardware\\avr\\2.2.1\\variants\\standard" "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF\\sketch\\Blink.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\MiniCore\\hardware\\avr\\2.2.1\\cores\\MCUdude_corefiles" "-IC:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\MiniCore\\hardware\\avr\\2.2.1\\variants\\standard" "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\MiniCore\\hardware\\avr\\2.2.1\\cores\\MCUdude_corefiles" "-IC:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\MiniCore\\hardware\\avr\\2.2.1\\variants\\standard" "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Mike - Ellen\AppData\Local\Temp\arduino-core-cache\core_f24b4b41f824a3b0f4d9a019719535b9.a
Linking everything together...
"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino.elf" "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF\\sketch\\Blink.ino.cpp.o" "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/..\\arduino-core-cache\\core_f24b4b41f824a3b0f4d9a019719535b9.a" "-LC:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF" -lm
"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino.elf" "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino.eep"
"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino.elf" "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino.hex"
cmd /C echo. && "C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objdump" --disassemble --source --line-numbers --demangle --section=.text "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino.elf" > "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino_atmega328p_16000000L.lst"
 

"C:\\Users\\Mike - Ellen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\Mike - Ellen\\AppData\\Local\\Temp\\arduino-sketch-26AB4C4A6FBD197ED0C6FB65CB29B2FF/Blink.ino.elf"
Sketch uses 1030 bytes (3%) of program storage space. Maximum is 32768 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude warning: cannot open USB device: Permission denied
avrdude error: cannot find USBtiny device (0x1781/0xc9f)
avrdude error: unable to open programmer usbtiny on port usb
Failed programming: uploading error: exit status 1

I can reproduce the error. I found it is specific to the version of the AVRDUDE upload tool used by MiniCore, as previously reported here:

The solution provided in that issue thread is to replace the "libusb-win32" driver recommended in SparkFun's installation instructions with the "WinUSB" driver.

Two options for doing that were mentioned:

  • "Zadig"
  • "Windows Device Manager

I often recommend Zadig for other driver installation tasks, but I discovered that the project maintainer has recently heavily monetized the website and it is infested with scam "download button" ads that might trick the visitor into downloading malware:

So I can no longer recommend people to visit that website.

Fortunately it seems the Windows Device Manager option is actually superior in this case because you don't even need to install any other software to do it. The instructions are provided here:

I only ran into one problem. This step is not correct (at least on my Windows 11 system):

  • From the list Manufacturer select Microsoft.

It should be:

  • From the list Manufacturer select WinUsb Device.

image

The downside I discovered of changing to the "WinUsb" driver is this causes the programmer to no longer be recognized when you use it with a board of the "Arduino AVR Boards" platform selected:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

The reason is that the "Arduino AVR Boards" platform uses the older version of the AVRDUDE upload tool than MiniCore.

I just tried switching the programmer's driver to libusbK and found it now works with MiniCore and "Arduino AVR Boards" both. Unfortunately this takes us back to Zadig because I haven't yet identified an alternative for easily installing the driver.

The person who recommended WinUSB in the MiniCore bug report is actually the maintainer of libusbK so I don't know what to make of that :man_shrugging:

Libusbk worked perfectly. Thanks so much for figuring this out.

You are welcome. I'm glad it is working now. I always have great results with libusbK.

Regards,
Per

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