I'm using quite a few different types of microcontrollers with the Arduino IDE (v 1.8.19). Several AVR-based boards, but also ESP32 and Arduino Due. Particularly the newer boards have a quite long set of options in the tool menu, as seen in this screen shot (for an ESP32-Dev module).
Each time I swap boards, the settings revert back to defaults and I have to remember updating them according to my needs. Is there a way to save the current IDE configuration, so that I can easily load all the settings I need for e.g. "ESP32"? When I haven't used a certain board for some time, I often even fail to remember exactly what settings I needed.
-
I didn't find a wayJuraj– Juraj ♦11/13/2022 20:20:10Commented Nov 13, 2022 at 20:20
-
@Juraj Thanks for trying. Maybe someone knows a way to backup a settings file or something. Because at least the IDE remembers the last settings.PMF– PMF11/13/2022 20:24:29Commented Nov 13, 2022 at 20:24
-
1even the IDE 2 doesn't have it. only the WebEditor and CLI have it arduino.github.io/arduino-cli/0.28/sketch-specification/…Juraj– Juraj ♦11/13/2022 20:33:22Commented Nov 13, 2022 at 20:33
-
2a workaround could be to define own board in boards.local.txt with all the settings predefinedJuraj– Juraj ♦11/13/2022 20:38:22Commented Nov 13, 2022 at 20:38
-
3One of the many reasons people switch to VS Code + platformIO plugin for Arduino programming. It configures the setting on each project with platformio.ini file.hcheung– hcheung11/15/2022 01:21:35Commented Nov 15, 2022 at 1:21
1 Answer 1
You can save and restore your board settings by using the preferences.txt
file, as Juraj mentioned. The settings for the selected board are stored in this file. You can find its location here.
For example, if you select "ESP32 Dev Module" and then close the IDE, preferences.txt
will include settings like:
board=esp32
...
custom_CPUFreq=esp32_240
(snip)
By backing up this file before switching boards and restoring it later, you can bring back your previous settings. Just make sure to close the IDE before modifying or replacing the file.
Hope this helps!
-
2