Arduino IDE folder structure

I would like to know what the folder structure for the IDE is supposed to look like. From browsing around, it looks like there are about 5 different folders:

  1. C:\Program Files\Arduino\
  2. C:\Program Files (x86)\Arduino\
  3. C:\Users\xxxxxx\Documents\Arduino\
  4. C:\Users\xxxxxx\AppData\Local\arduino\
  5. C:\Users\xxxxxx\AppData\Roaming\arduino-ide\

Tthe folders contain folders like: drivers, hardware, tools, tools-builder Java, lib, libraries, examples, Documentation, ArduinoData, core, and sketches.

Is there any documentation that goes into detail on this structure?

I have been having problems with some sketches calling libraries that are not in the #include statements like:

loading library from c:\Users\xxxx\OneDrive\Documents\Arduino\Code\libraries\ELEGOO Smart Robot Car Kit V4.0 2024.01.30: invalid library: no header files found
loading library from c:\Users\xxxx\OneDrive\Documents\Arduino\Code\libraries\miniArm: invalid library: no header files found

I am thinking that some files are not in the right place.

I moved your topic to an appropriate forum category @doxrus2.

In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Hi @doxrus2.

That is not an accurate description of what is happening.

When you compile a sketch, Arduino IDE must scan the contents of the libraries subfolder of your "sketchbook" folder. This process is referred to as "library discovery". During that scan, if it finds any folders that do not contain a valid Arduino library, it displays this "invalid library: no header files found" warning.

The warnings do not indicate that your sketch is "calling" those libraries.

The reasons Arduino IDE warns you about this:

  • The "invalid library" may be the result of you incorrectly performing a manual installation of a library. In this case, the warning would help to understand why the manually installed library is not being recognized by Arduino IDE.
  • The more subfolders are present in the libraries folder, the longer the duration of the "library discovery" operation.

However, the presence of invalid libraries won't cause any real problems. The performance impact I mentioned above is insignificant for two additional folders. It would only become significant if you ended up with a large number of these pointless folders.

You can remove these subfolders from the c:\Users\xxxx\OneDrive\Documents\Arduino\Code\libraries folder to fix the warnings.

If you examine the contents of the folder and find there is nothing of value, then you can simply delete it.

If you find there is something of value, but not an Arduino library, then move the folder to some other location on your hard drive.

If you find the folder does contain an Arduino library you need, then you will need to fix the installation of the library. If this happens and you need help with fixing the installation, just let us known and we'll provide assistance.


You are also welcome to leave things as they are now and simply ignore these warnings. They might be a bit annoying though.

(1) is the folder of the Arduino IDE application installation.

(2) might be an installation of an old version of the Arduino IDE application.

(3) is your Arduino sketchbook folder. This is the location the Arduino IDE Library Manager installs libraries to (under the libraries subfolder). It is also a convenient place to store your sketches, as you can then access them via Arduino IDE's File > Sketchbook menu, and the SKETCHBOOK side panel.

(4) is the "Data Folder" used by the ancient <= 1.0.6 versions of Arduino IDE. The location of the "Data Folder" of modern versions of Arduino IDE is C:\Users\<username>\AppData\Local\Arduino15\ instead. Arduino IDE stores various files under this folder. The most significant use of the Arduino15 folder (but not the C:\Users\xxxxxx\AppData\Local\arduino\ folder is storage of the Arduino boards platforms you install via the Arduino IDE Boards Manager.

(5) is the "User Data Folder". Arduino IDE stores various data files under this folder.

Not really. If you have any specific questions about it, just let us know. However, you should be aware that these folders have absolutely nothing to do with the "invalid library: no header files found" warnings that concerned you.

Two observations. Many folks that try to use OneDrive have problems. The second is that the build process is complicated even for a +65 years experience OG like me. Some things are documented, some aren't because you don't need to know in order to build a project. I find those that try to 'fiddle' with the environment are always having problems and they are always user error.

You ain't seen nothing. I'm taking a Zephyr class and it's structure and build process is ... impressive (not in a good way :-( )

To add another folder for this list, Arduino IDE also stores settings and looks for optional plugins in ~/.arduinoIDE on Linux and MacOS. On Windows (which I don't really use) I believe the equivalent folder would be C:\Users\{username}\.arduinoIDE

MacOS also hides a BUNCH of Arduino stuff the others can see. (And use for debugging)

OneDrive has a habit of involving itself when it hasn't been invited.

And don't get me started on Windows "Updates"

The folder structure can be confusing on Windows. The “invalid library: no header files found” error usually means the library folder is missing the required .h or .hpp files.

I’d check those two library folders and also make sure your Arduino sketchbook location is correctly set, especially since you’re using OneDrive.

Nonsense.

BIG clue.

When you are ready, post all the code in code tags and include the verbose compile log in code tags so someone can point out what is wrong.