Sudden upload problem

I have been using Arduino IDE and a DIY programmer (with an Arduino Nano) to upload code to ATmega and ATTiny microcontrollers for years. My latest IDE version was 2.3.5.

I usually install updates automatically. Today when I was working on a new sketch there has been some new updates available and I selected the button “Install Automatically” and continued my work. Then as I tried to upload the code to the microcontroller (an ATTiny85) a got an error message.

I tried to uninstall the IDE and install the latest version (2.3.7) but the problem persisted. I can compile the code but I cannot upload it to my device.

I have restarted the computer thinking that there can be a Windows problem but nothing changed.

This is my hardware folder.

Everything was OK until a couple of minutes ago and now I’m stuck.

Need your help. Thank you very much.

Did you update the ATtinyCore library specifically?

This actually sounds like a comms problem between the programmer (Nano) and the AT Tiny chip.

  • make sure all of the pins on the ZIF are properly seated
  • make sure there is a solid connection between the Nano pins and the ZIF connector pins and that nothing is shorted
  • just to test the Nano, selecting that board in the board manager, can you upload and run the blink sketch?

Since your ATTinyCore was updated today to 1.5.2, I would suggest rolling that core back to the previous version and trying again.

I deleted and reinstalled ATTinyCore from my backup. Didn’t change anything.

All electrical and mechanical connections have been double checked.

Probably the Nano is faulty because I cannot upload any sketch to it. So I tried a fresh Nano. I was able to upload the ArduinoISP sketch. But now I am getting this error when I try to upload code to the ATTiny.

Programmer 'arduinoasispatmega32u4' not found

ATTinyCore has not been udated.

Really? The directory date shown in your hardware folder image suggests otherwise.

Good luck figuring it out.

I deleted the ATTinyCore folder and replaced it from my backup during troubleshooting because I thought the problem may be a corrupted file in this folder. So the directory date is of course today.

Did you by any chance select 'Arduino as ISP (ATmega32u4)' instead of just 'Arduino as ISP'?

Have you tried testing your first Nano after removing it from the breadboard?

Thank you for your comments and help.

I tested the old Nano and now it works fine. I have selected Arduino as ISP (ATMega32u4) because I think this was what I have been using. This assumption was a mistake. I should select Arduino as ISP (ATTiny Core)!!! I’m sorry.

Arduino Boards was version 1.8.6 in my system and during my work today it has been updated to 1.8.7 which was the cause of the problems.

Reverting to 1.8.6 and selecting Arduino as ISP (ATTiny Core) solved all problems. Tried updating the boards file to 1.8.7 and the problem returned.

So there must be a problem with the latest Arduino Boards version. But I don’t know how to report this. Additionally I tried to disable automatic update checks and couldn’t find it either.

If you beleive that its an AVR library problem, then you can report it by raising an issue on the developper Github here:

https://github.com/arduino/ArduinoCore-avr/issues

Hi @sumeryamaner.

Background

The ATTinyCore boards platform uses the AVRDUDE uploader tool.

The "Arduino AVR Boards" platform also uses AVRDUDE.

Each platform can specify the tool dependencies that Boards Manager will install along with the platform. In addition to causing the installation of those tools, this will also cause Arduino IDE to use the tools when a board of that platform is selected.

The 1.8.7 of the "Arduino AVR Boards" platform specifies a dependency on version 8.0.0-arduino1 of AVRDUDE. This is an update from version 1.8.6 of "Arduino AVR Boards", which instead specifies a dependency on AVRDUDE version 6.3.0-arduino17.

Version 1.5.2 ofATTinyCore specifies a dependency on version 6.3.0-arduino18 of AVRDUDE:

Explanation

That information is specified in the package index file used to install the platform via Boards Manager. So Arduino IDE will only have this information if you use that installation method. You did not use Boards Manager to install ATTinyCore. You instead did a manual installation. This means that, on your system, Arduino IDE doesn't have any information about which version of AVRDUDE should be used when working with the boards of the ATTinyCore platform. In this case, Arduino IDE uses the newest version of the tool that happens to be installed on your computer.

When you have Arduino AVR Boards 1.8.6 installed, that incidental AVRDUDE version is 6.3.0-arduino17. When you have Arduino AVR Boards 1.8.7 installed, that incidental AVRDUDE version is instead 8.0.0-arduino1.

The AVRDUDE configuration file used by ATTinyCore is designed for use with AVRDUDE version 6.3.0-arduino18. It is also compatible with AVRDUDE version 6.3.0-arduino17. Some breaking changes were made between versions 6.3.0-arduino18 and 8.0.0-arduino1 of AVRDUDE. These breaking changes resulted in an incompatibility with the configuration file used by ATTinyCore. This is the reason why you find that the upload fails when you have Arduino AVR Boards 1.8.7 installed.

Solutions

There are several solutions for the problem. I'll describe them below.

Use "Arduino AVR Boards" 1.8.6

You already discovered the workaround of rolling back your Arduino AVR Boards installation to version 1.8.6. This caused AVRDUDE 8.0.0-arduino1 to be uninstalled and the ATTinyCore-compatible AVRDUDE 6.3.0-arduino17 to be reinstalled.

If you are satisfied with this workaround, then you are all set. Arduino IDE will occasionally notify you that a new version of the boards platform is available, you'll need to refrain from accepting the offer that will cause an update back to the problematic version of the platform. If you find these notifications annoying, you can disable them via the advanced settings.

I'll provide instructions you can follow to do that:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
    A menu will appear on the editor toolbar:
  2. Select the "Preferences: Open Settings (UI)" command from the menu.
    ⓘ You can scroll down through the list of commands to find it or type the name in the field.
    A "Settings" tab will open in the Arduino IDE main panel.
  3. Type arduino.checkForUpdates in the "Search Settings" field of the "Settings" tab.
  4. Uncheck the box under the "Arduino: Check For Updates" setting.
  5. Close the Settings tab by clicking its X icon.

If you disable the automatic update check, make sure to periodically do a manual check for newer versions of Arduino IDE and your installed boards platforms and libraries.

You can check for new versions of Arduino IDE by selecting Help > Check for Arduino IDE Updates from the Arduino IDE menus.

You can check for new versions of boards platforms and libraries by the following procedure:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
  2. Select the "Arduino: Update Indexes" command from the menu.
    A notification will appear at the bottom right corner of the Arduino IDE window to indicate the progress of downloading the index files which provide Arduino IDE with the information about which versions of platforms and libraries are available.
  3. Wait for the index file download process to finish.
  4. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  5. Select "Updatable" from the "Type" menu in the Boards Manager view.
    A list of installed boards platforms for which updates are available will be listed.
  6. Click the "UPDATE" button on the entry for any platform you wish to update.
  7. Select Tools > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
  8. Select "Updatable" from the "Type" menu in the Library Manager view.
    A list of installed libraries for which updates are available will be listed.
  9. Click the "UPDATE" button on the entry for any library you wish to update.

Install ATTinyCore via Boards Manager

The root of the problem is the manual installation of ATTinyCore. If you instead install it via Boards Manager, then it can coexist with Arduino AVR Boards 1.8.7, no problem.

So unless you have a specific reason for using a manual installation of ATTinyCore, the best solution will be to remove that manual installation and replace it with a Boards Manager installation.

The valid reasons for using a manual installation of ATTinyCore:

  • You need to have the development version of the platform installed in order to contribute to the development of the platform or for beta testing.
  • You need some fixes or enhancements that are not present in the release version of the platform.

An alternative reason some might have for a manual installation is as a workaround for the unfortunate non-functional state of DrAzzy's official Boards Manager installation system due to their failure to maintain the website infrastructure it depends on. However, it is still possible to install ATTinyCore via Boards Manager. You can follow these instructions to work around the current non-functional state:

  1. Remove the manual installation of ATTinyCore by deleting the folder at the following path on your hard drive:
    G:\Belgeler\Arduino\hardware\ATTinyCore
    
    :warning: Please be careful when deleting things from your computer. When in doubt, back up!
  2. Click the following link:
    https://web.archive.org/web/20251012082117/https://azduino.com/bin/micronucleus/micronucleus-cli-2.5-azd1b-x86_64-mingw32.zip
    Your web browser will start a file download.
  3. Wait for the file download to finish.
  4. Use Windows File Explorer to copy the downloaded file to the folder at the following path on your hard drive:
    C:\Users\<username>\AppData\Local\Arduino15\
    
    (where <username> is your Windows username)
    • :red_exclamation_mark: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  5. Follow the official instructions to install ATTinyCore using Boards Manager:
    https://github.com/SpenceKonde/ATTinyCore/blob/v2.0.0-devThis-is-the-head-submit-PRs-against-this/Installation.md#boards-manager-installation:~:text=Boards%20Manager%20Installation

This has been the best, greatest, most comprehensive and most professional reply I have ever received on any forum. Thank you.

You are welcome. I'm glad if I was able to be of assistance.

Regards, Per