Hi - is there any way to save the board configuration when saving a project.
I have lots of different boards (mostly esp32 variants c3s, s3s, but some nanos etc) and each project is often tied to a particular board (pin configs, display types etc)
I doubt it would be hard to add some import/export/autoread on load ?
Thanks in advance.
Hi @mikeaubury . Arduino IDE already stores the board configuration. It will use the configuration you had the last time a given sketch was open in Arduino IDE the next time you open the sketch.
This configuration data is stored separately from the sketch. This approach does impose some limitations on the feature:
Although the feature is generally perfectly sufficient for the average user, it doesn't meet the more advanced and niche requirement of being able to distribute the configuration along with the sketch (which could be useful in the case where you want to provide automatic board configuration for the users you share a sketch with).
In addition, the configuration data is keyed to the sketch by the sketch path. This means that if you manually (i.e., not via Arduino IDE) move the sketch to a different location on your hard drive, Arduino IDE will not restore the previous configuration the next time you open the sketch and you will need to manually configure the board once more (after which Arduino IDE will again remember it).
The Arduino IDE developers are tracking the request for being able to store the configuration data alongside the sketch here:
opened 07:28PM - 23 Jun 13 UTC
type: enhancement
topic: code
Enable the use of some meta-comment in the code so that the appropriate board is… automatically selected for that code.
### Additional context
#### Additional requests
- https://github.com/arduino/arduino-ide/issues/2438#issuecomment-2120033445
- https://github.com/arduino/arduino-ide/issues/2438#issuecomment-2120033459
- https://github.com/arduino/arduino-ide/issues/2438#issuecomment-2120033464
- https://github.com/arduino/arduino-ide/issues/2438#issuecomment-2120033760
- https://github.com/arduino/arduino-ide/issues/2438#issuecomment-2120033766
- https://github.com/arduino/arduino-ide/issues/2438#issuecomment-2282917817
- https://github.com/arduino/arduino-ide/issues/81
- https://github.com/arduino/arduino-ide/issues/1892
- https://github.com/arduino/arduino-ide/issues/1892#issuecomment-1457192512
- https://github.com/arduino/Arduino/issues/3228
- https://github.com/arduino/Arduino/issues/3459
- https://github.com/arduino/Arduino/issues/4950
- https://github.com/arduino/Arduino/issues/5121
- https://github.com/arduino/Arduino/issues/5232
- https://github.com/arduino/Arduino/issues/5308
- https://github.com/arduino/Arduino/issues/6294
- https://github.com/arduino/Arduino/issues/6490
- https://github.com/arduino/Arduino/issues/7324
- https://github.com/arduino/Arduino/issues/7327
- https://github.com/arduino/Arduino/issues/7337
- https://github.com/arduino/Arduino/issues/7339
- https://github.com/arduino/Arduino/issues/7746
- https://github.com/arduino/Arduino/issues/10175
- https://github.com/arduino/Arduino/issues/10462
- https://github.com/arduino/Arduino/issues/11304
- https://github.com/arduino/arduino-ide/issues/81
- https://github.com/arduino/Arduino/issues/11753
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/1
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/3
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/7
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/11
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/16
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/19
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/20
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/21
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/22
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/24
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/28
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/30
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/31
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/33
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/35
- https://forum.arduino.cc/t/board-settings-in-ino-file/343215/43
- https://forum.arduino.cc/t/setting-partition-for-a-project/699061
- https://forum.arduino.cc/t/store-board-info-in-ino-file-and-automatically-load/466878
- https://forum.arduino.cc/t/running-preload-script/506108
- https://forum.arduino.cc/t/save-board-selection-with-sketch/523805
- https://forum.arduino.cc/t/ide-parameters/557892
- https://forum.arduino.cc/t/associating-the-project-with-the-processor-important/670725
- https://forum.arduino.cc/t/feature-request-board-selection/941360
- https://forum.arduino.cc/t/defining-board-type-in-sketch/1203965/1
- https://forum.arduino.cc/t/defining-board-type-in-sketch/1203965/17
- https://forum.arduino.cc/t/saving-micro-controller-config-to-sketch/1300406
- https://forum.arduino.cc/t/can-i-just-swap-preferences-txt-to-switch-board-projects/1343878
- https://forum.arduino.cc/t/save-board-config-with-project/1408907
#### Related
- https://github.com/arduino/arduino-cli/issues/2554
- https://github.com/arduino/arduino-ide/issues/2573
and here:
opened 01:25AM - 21 Nov 24 UTC
type: enhancement
topic: code
### Describe the request
Sharing Arduino IDE sketches between users is pretty h… andicapped right now, because the [`sketch.yaml` project file](https://arduino.github.io/arduino-cli/dev/sketch-project-file/) isn't yet supported in the IDE, and there is no way to share the settings that are manually configured in the "Tools" menus. This is in spite of the fact that I've already configured the sketchbook location to the root of my GitHub repository's sandbox.
The first MVP behavior wouldn't even need to support multiple build profiles or provide any additional user interface. It could be as simple as:
1. If the sketch `.ino` has a `sketch.yaml` file next to it, and
2. if the `sketch.yaml` explicitly defines a default profile, then
3. load & save all platform properties to/from the default profile
4. load & save all board properties to/from the default profile's FQBN
5. load & save all library installations to/from the default profile
### Describe the current behavior
#### Board Selection
When opening a sketch Arduino IDE does select the board, custom board options, and port according to the selections the user had the last time that sketch was open. However, this data is stored separately from the sketch, which causes two problems:
- There is no way to share that configuration along with the sketch
- If the path of the sketch is changed, the configuration data is disassociated from the sketch (the data is keyed to the sketch path)
#### Dependencies Management
Library and platforms can only be managed globally. There is no way to control dependencies on a per-sketch basis.
This results in the frustrating situation where a working project can be broken at any time simply by installing a library for use with another project.
The users must resort to inefficient and complex measures to control dependencies. For example, they may vendor library dependencies inside the sketch, which [may require modifications to the library source code](https://github.com/arduino/arduino-cli/issues/1255#issuecomment-476540604) and makes updates inconvenient.
Per-sketch dependencies management is also the root motivation for the majority of the many users passionately requesting the implementation of a portable mode (https://github.com/arduino/arduino-ide/issues/122). For most applications, use of a portable IDE installation for project dependencies management is inferior to the build profiles system, so assuming the effort for this proposal is approximately equal or lesser, the finite development resources would be more effectively investing into adding support for build profiles than to implementing portable mode.
### Arduino IDE version
2.3.4-nightly-20241120
### Operating system
All
### Operating system version
Any
### Additional context
#### Additional requests
- https://github.com/arduino/arduino-ide/issues/2573#issuecomment-3079568498
- https://github.com/arduino/arduino-ide/issues/150#issuecomment-830714850
- https://github.com/arduino/arduino-ide/issues/424
- https://github.com/arduino/arduino-ide/issues/2736
- https://github.com/arduino/Arduino/issues/11106
- https://github.com/arduino/arduino-cli/issues/2818
- https://arduino.stackexchange.com/questions/8651/loading-local-libraries
- https://forum.arduino.cc/t/ide-parameters/557892/5
- https://forum.arduino.cc/t/missing-old-ide-features/698280
- https://forum.arduino.cc/t/portable-is-not-honored/850853
- https://forum.arduino.cc/t/arduino-ide-2-0-portable/1031833/10
- https://forum.arduino.cc/t/arduino-ide-2-0-portable/1031833/11
- https://forum.arduino.cc/t/arduino-ide-2-00-and-lilygo-t-display-esp-s3-black-screen/1036875/21
- https://forum.arduino.cc/t/how-do-i-include-a-library-in-a-sketch-directory/1079812/4
- https://forum.arduino.cc/t/is-there-a-way-to-automatically-install-all-libraries-used-by-a-project/1165621
- https://forum.arduino.cc/t/how-to-save-relevant-library-for-the-future/1211416
- https://forum.arduino.cc/t/managing-library-versions-over-multiple-projects/1242941
- https://forum.arduino.cc/t/local-libraries/1259854/1
- https://forum.arduino.cc/t/local-libraries/1259854/10
- https://forum.arduino.cc/t/why-cant-the-ino-file-remember-which-libraries-and-linbrary-versions-were-used-by-that-sketch/1303387
- https://forum.arduino.cc/t/board-and-library-update-issues-causing-breaking-changes/1317643
- https://forum.arduino.cc/t/library-folder-names-irremote-in-particular/1326254
- https://forum.arduino.cc/t/project-libraries-and-dependencies-automatically-to-one-package-for-export/1339096
- https://forum.arduino.cc/t/arduino-library-question/1349706
- https://forum.arduino.cc/t/how-to-force-arduino-ide-to-use-particular-library/1351795/1
- https://forum.arduino.cc/t/how-to-force-arduino-ide-to-use-particular-library/1351795/13
- https://forum.arduino.cc/t/release-control-in-ide-2-x-x/1369830
- https://forum.arduino.cc/t/defining-board-type-and-add-sketch-folder/1382328
- https://forum.arduino.cc/t/lost-configurations-and-nagging/1399729
- https://forum.arduino.cc/t/per-project-libraries-in-ide-2-3-6/1401685
- https://forum.arduino.cc/t/how-to-create-a-complete-portable-sketch/1405328
- https://forum.arduino.cc/t/save-board-config-with-project/1408907
#### Related
- https://github.com/arduino/arduino-ide/issues/122
- https://github.com/arduino/arduino-ide/issues/2438
- https://github.com/arduino/Arduino/issues/4936
- https://github.com/arduino/arduino-cli/issues/1255
- https://github.com/arduino/arduino-cli/issues/1256 / https://github.com/arduino/arduino-builder/pull/223
### Issue checklist
- [x] I searched for previous requests in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [x] I verified the feature was still missing when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [x] My request contains all necessary details
If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject: