I don't find Arduino IDE v2.x core code source files, where can I find them ?
PS : With Arduino v1.8.19 under Windows, I can find the following folder "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" which contains main.cpp and Arduino.h
I have well a "C:\Users\username\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" folder.
I'm using portable version of v2.x series instead of the v1.8.19, I don't know where code source files are located with portable versions.
This is a bit strange, the "1.8.6" sub-folder, I didn't installed this version on my computer by memory.
What exactly are you looking for, it sounds like you want the source to the IDE, tool chain, and built in libraries. All that is in Github somewhere, there is a search bar.
I'm looking for the arduino core source files location for Arduino IDE v2.x series (especially portable versions). As example, where can I find main.cpp and Arduino.h files ?
The source to the various cores are on github. Why do you want them? Unless you are cloning all or some of the Arduino ecosystem, you don;t need them to build an Arduino app.
It would really help if you could explain why you think you need them.
Maybe the following will help you understand. I did a screen grab of all the main.cpp and arduino.h files on my laptop in the Arduino ecosystem.
That's the version of the board, not the IDE. On this Linux box, the Arduino15 directory is instead ~/.arduino15, but all the files are in the same relative position
~/.arduino15/packages$ ls -1d */hardware/*/*
arduino/hardware/avr/1.8.6
arduino/hardware/renesas_uno/1.3.2
esp32/hardware/esp32/3.0.7
esp8266/hardware/esp8266/3.1.2
m5stack/hardware/esp32/2.1.1
Thanks for the answer.
So, the portable version is not truely portable if some files are copied on the Windows OS partition.
Is there a way to store them in the "Portable folder" (where all files are unzipped in a new sub-folder) and specify the new "access path" for a right loading by Arduino IDE ?
My goal is having a real portable folder of each portable version and avoid any common files between each version. It could be also useful to compare any updates between 2 different versions.
A couple other paths are also configurable by the file:
directories.downloads: The path where Arduino IDE stores the archive files that are downloaded when you install a library via Library Manager or a platform via Boards Manager.
By default, these files are stored at the following path:
c:\Users\<username>\AppData\Local\Arduino15
directories.user: The path of the Arduino IDE "sketchbook" folder, where libraries installed via Library Manager are stored, as well as being a convenient place to store your sketches. You can also configure this path via Arduino IDE's "Preferences" dialog (accessed via File > Preferences).
directories.builtin.libraries: The path where Arduino IDE stores some fundamental libraries, which are automatically installed on the first run after a fresh installation.
By default, these files are stored at the following path:
Note that there is no way to configure the location of the arduino-cli.yaml configuration file. So even if you configure a custom path via directories.data key in the file, all Arduino IDE 2.x installations will use that same path.
The workaround would be to change the file to point to each of the separate paths as needed. This file is written in the common YAML language, so it is fairly easy to set up scripts to modify the file automatically.
The arduino-cli.yaml configuration file can be generated and the data in the file adjusted using the arduino-cli config commands:
@ptillisch
I can see there are also other files as settings.json in the C:\Users\username\.arduinoIDE folder.
Is there a way to specify this .arduinoIDE folder in a new location on the "Portable Arduino IDE folder" ?
Unfortunately, no. This path is hardcoded in the Arduino IDE source code. The only way to configure a different location would be to change the path of the user folder (c:\Users\<username>) in the Windows settings.
It should be nice to have a new tab location in the File -> Preferences... window to store the main application paths as .arduinoIDE and Arduino15 folders and then sub-folders currently defined in the arduino-cli.yaml file.