Defining Board Type and Add Sketch Folder

Hi, I'm new to the forum.

I wanted to know how I can export the Board configuration and its parameters for my development. The idea is to have a backup of these settings in case of machine changes or loss.
I keep my developments in the cloud, but not these specific configurations.

I have codes for at least 5 different types of Boards, which I use on several sometimes.

The relevant directories are mentioned in this article: https://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer#boards

However the settings (e.g. clock frequency) that you have for a specific board are not stored in there and they are not easily accessible.
I think that the easiest way to keep those is to compile a sketch with verbose output during compilation enabled and save the output to a text file. The beginning of the output

FQBN: SparkFun:avr:promicro
Using board 'promicro' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.13
Using core 'arduino' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_AVR_PROMICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x1b4f -DUSB_PID=0x9204 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SparkFun Pro Micro" -IC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\bugge\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.13\variants\promicro C:\Users\bugge\AppData\Local\arduino\sketches\B698ED3C3C782B74B12265782C57381F\sketch\Lichtset.lights.02.ino.cpp -o nul

It will tell you the board and the board package version (first three lines) and the frequency (somewhere in the last line).

The few lines near the end contain information about the used libraries; it's also elsewhere in the output (under *detecting libraries used).

Using library Bolder Flight Systems SBUS at version 8.1.4 in folder: C:\Users\bugge\OneDrive\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS 
Using library Servo at version 1.2.2 in folder: C:\Users\bugge\AppData\Local\Arduino15\libraries\Servo 
Using library ezLED at version 1.0.1 in folder: C:\Users\bugge\OneDrive\Documents\Arduino\libraries\ezLED 
1 Like

There's good information on libraries. However, some of the data is very ambiguous, and is handled internally by the IDE.
What I'm looking for is a way to configure it when opening a project, so that the Tools menu displays the exact data.

Just note the version of each board used in the relevant sketch comments. It is simple to roll back a board in the board manager.
For Tools settings, I would do a screen grab and store the image file also in the comments or something like that.

Hi @facundocesar. Arduino has created a tool named Arduino CLI, which provides the Arduino sketch development operations (e.g., compile, upload) via a command line interface. This tool is intended for use by advanced users and so provides some advanced capabilities that are not available when using Arduino IDE.

If you don't mind working with a command line tool, you might be interested in the "build profiles" feature of Arduino CLI. This allows you to define the exact board configuration and dependencies (boards platform, libraries) for your project:

https://arduino.github.io/arduino-cli/latest/sketch-project-file/#build-profiles

As for Arduino IDE, the developers are tracking the request for build profile support here:

If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:


:red_exclamation_mark: Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.


As was already explained, there is no capability such as what you are requesting for Arduino IDE 2.x at this time. Please keep in mind that you are talking about something that would only take a few seconds to configure manually. That work would only need to be performed once after each time you change the machine (or if you move the sketch to a new location on your current machine, as the board configuration data is keyed to the path of the sketch). So I really don't think the lack of an automagical solution is so terrible in this use case. Just make sure to clearly document the required configuration.