Please correct AVR board packages documentation

Hi,

I am aware that you have more important things to do than writing documentation. Maybe you can still find time to correct the AVR section.

https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-board-manager/

AVR

The AVR board package comes pre-installed when you download the Arduino IDE, so if you have one of these boards - Great! You're already done and won't need to install it yourself. You can, however, still find it in the board manager if you want to change what version of the board package you have installed. For detailed instructions on how to do this, follow the steps above.

The AVR board packages are not included in the IDE download as described. Only after plugging in a Uno, Mega etc. a message for the installation is displayed, then downloaded and installed. No board packages are included out of the box.

Tested with Windows .zip file. Created a portable folder after unpacking. Observed during all processes what was in folder
C:\Users\xyz\AppData\Local
respectively
C:\Users\xyz\AppData\Local\Arduino15
and what happens.

Mine were as well as esp32. I just installed IDE1 on a Pi.

Hmm. When I installed the IDE on a fresh VM, and let it start the IDE after the installation finished (the default behavior), it went and installed the AVR board package including drivers and compilers/etc automatically, even though there were no boards at all connected.

I uninstalled (including deletion of the AppData folders) to try to see if this would happen if I didn't let the installed autorun, and instead left it to later, but apparently there are hidden pieces left behind (the drivers?) that prevent the auto-install. So the 2nd time I installed the IDE, it did NOT install the AVR board package.

The best place to report this is using https://www.arduino.cc/en/contact-us.

This link gives (most of) the directories that are involved: https://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer#boards.

I have shortcuts for the following directories

C:\Users\bugge\.arduinoIDE
C:\Users\bugge\AppData\Local\Arduino15
C:\Users\bugge\AppData\Roaming\arduino-ide
C:\Users\bugge\AppData\Local\arduino
C:\Users\bugge\AppData\Roaming\Arduino IDE

Ah. I "assumed" that since most of the data was in AppData\Local, there wouldn't also be stuff in Roaming. Silly me.
If I delete those as well, and re-install, the first invocation of the IDE does indeed download the packages:

Downloading packages
arduino:arduinoOTA@1.3.0
arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7
arduino:avrdude@6.3.0-arduino17
arduino:avr@1.8.6
Installing arduino:arduinoOTA@1.3.0
Configuring tool.
arduino:arduinoOTA@1.3.0 installed
Installing arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7
Configuring tool.
arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7 installed
Installing arduino:avrdude@6.3.0-arduino17
Configuring tool.
arduino:avrdude@6.3.0-arduino17 installed
Installing platform arduino:avr@1.8.6
Configuring platform.
Platform arduino:avr@1.8.6 installed
Downloading LiquidCrystal@1.0.7
LiquidCrystal@1.0.7
Installing LiquidCrystal@1.0.7
Installed LiquidCrystal@1.0.7
Downloading Servo@1.2.2
Servo@1.2.2
Installing Servo@1.2.2
Installed Servo@1.2.2
Downloading Stepper@1.1.3
Stepper@1.1.3
Installing Stepper@1.1.3
Installed Stepper@1.1.3
Downloading TFT@1.0.6
TFT@1.0.6
Installing TFT@1.0.6
Installed TFT@1.0.6
Downloading Arduino_BuiltIn@1.0.0
Arduino_BuiltIn@1.0.0
Installing Arduino_BuiltIn@1.0.0
Installed Arduino_BuiltIn@1.0.0
Downloading Keyboard@1.0.6
Keyboard@1.0.6
Installing Keyboard@1.0.6
Installed Keyboard@1.0.6
Downloading Mouse@1.0.1
Mouse@1.0.1
Installing Mouse@1.0.1
Installed Mouse@1.0.1
Downloading Ethernet@2.0.2
Ethernet@2.0.2
Installing Ethernet@2.0.2
Installed Ethernet@2.0.2
Downloading Firmata@2.5.9
Firmata@2.5.9
Installing Firmata@2.5.9
Installed Firmata@2.5.9
Downloading SD@1.3.0
SD@1.3.0
Installing SD@1.3.0
Installed SD@1.3.0

It is this one in particular that you must delete in order to clear the stored flag that tells Arduino IDE it has already performed the first run installations:

Or if you want to be surgical about it, you can reset the flag in the database (which is stored under that folder):

  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 "Toggle Developer Tools" command from the menu.
    You can scroll down through the list of commands to find it, or type the command name in the field.
    The developer tools panel will open in the Arduino IDE window.
  3. Select the "Application" tab from the bar at the top of the developer tools panel.
  4. Select Local storage > file:// from the "Storage" section of the navigation subpanel at the left side of the developer tools panel.
    You will see a list of the entries in Arduino IDE's local storage database in the main developer tools panel.
  5. Type theia:initializedLibsAndPackages in the "Filter" field at the top of the main developer tools panel.
  6. Double-click on the true value under the "Value" column of the theia:initializedLibsAndPackages key.
  7. Type false.
  8. Press the Enter key.

Now if you restart Arduino IDE, or even open a new window, you will see it performs the first run installations of the "Arduino AVR Boards" platform (machine identifier arduino:avr) and the "Arduino_BuiltIn" library (and more importantly, that library's dependencies).

Hello,

I only use portable IDE 1.x and “portable” IDE 2.x.
In the path
C:\Users\xyz\AppData\Roaming\Arduino IDE
there are only .log files.

I assume that if I open the folder
C:\Users\xyz\AppData\Local\Arduino15
or rename it, I can simulate a fresh “installation”.

I had only done a test to see how the IDE 2.x behaves when someone does a fresh installation. After that I realized that the description doesn't match how it behaves. It was about seeing what someone who has never seen an Arduino IDE before and is not familiar with it would expect. What is routine for us in handling the IDE cannot be taken for granted.

That's why I don't want to use any hidden developer tools. I wanted to find out how a fresh IDE 2.x behaves. You can see that in the path
C:\Users\Worker\AppData\Local\Arduino15\packages\
there is no board package. This does not correspond to the description. According to the description, at least the AVR board package should be present.

Or am I misunderstanding something?

That folder is not used in any way by Arduino IDE 1.x, so it is not relevant.

As for Arduino IDE 2.x, that is expected. This folder is dedicated to the storage of the logs generated while the IDE runs.

Only for some definitions of "fresh".

If you delete that folder, you will remove the following things:

  • boards platforms you installed via Boards Manager and the "Arduino AVR Boards" platform automatically installed on the first run
  • the "built-in" fundamental libraries that are installed on the first run
  • cached archive files from the platform and library installations

If that is all you wanted to "freshen", then mission accomplished. However, significant files are stored in other folders, so this will not achieve a true simulation of a fresh installation. We already have an example of that in this topic alone. If you wanted to simulate a "fresh" installation to test the automatic first run installation of the "Arduino AVR Boards" platform, deleting C:\Users\xyz\AppData\Local\Arduino15 would not be sufficient since the database file where the theia:initializedLibsAndPackages flag data is defined is stored in a different folder, and so you would find that deleting C:\Users\xyz\AppData\Local\Arduino15 will not cause Arduino IDE to perform that first run installation again.

Then you must delete the C:\Users\xyz\AppData\Roaming\arduino-ide folder.

Because you didn't clear the flag that tells Arduino IDE it already performed the automatic first run installation of the "Arduino AVR Boards" platform.

1 Like

Hi,

Thank you very much for the detailed explanation. :+1:
I have now understood it. You learn something new every day. :wink:

You are welcome.

This technique for simulating a fresh installation can be quite useful for those of us who provide support to the Arduino IDE users, or contribute to the development through beta testing. I find myself regularly deleting that C:\Users\xyz\AppData\Roaming\arduino-ide folder in the course of such work.

Hi,

exactly. By the way, it works exactly as you described. :wink:

Hi,

that brings me to another question. Is it possible to specify somewhere which additional board packages should be installed automatically, with a fresh IDE? For example, core for ESP8266, Arduino ESP32, Espressif ESP32 or what ever

So that you can provide a package so that everyone has the same starting condition and does not have to start looking for and installing board packages.
Maybe you can also do this with libraries that you want to have the same for everyone.

So that you can give everyone the same basic setting/basic installation of the IDE.

Does IDE 2.x now have a "portable" mode?
In my mind, anything that puts stuff in AppData is NOT "portable."

You would need to modify the source code:

The first run "built-in" libraries installation is implemented alongside that for the "Arduino AVR Boards" installation in the code I linked above.

No. In this case it just means that it's an unzipped zip (versus a real installation in Program Files).

Hi,

Thank you, as I see it, this will be a bigger job. :wink: