Add sketch project configuration file support

Continuing the discussion from Copy current sketch info:

Trying to get the Arduino IDE to somehow devulge the necessary information to rebuild a sketch is something that has been requested since 2013 (that's the oldest reference I've found).

In the 1.x IDE, there was at least some settings.txt file one could copy, but since the 2.0 IDE, they hid those settings in a database or whatever this directory of binary blobs is.

This has been requested numerous times here and elsewhere, but it looks like the programmers simply have no interest in making things easier for people like me who use several different boards (at the moment I have five different boards on my table, but I've used several dozen over the last years). And each time I change a board I have to walk all over the settings and fix them manually. While ANY other IDE I've ever used has a seperate and movable project configuration file somewhere, with the Arduino IDE being the only exception I ever met.

Settings.txt doesn't contain any of the information that I'm talking about (or the context necessary to compile a sketch.)

For some time I've been using Geany as my IDE and its project files to store the compile & upload options for arduino-cli. Each sketch gets its own project file, and once I've customized the command lines for the sketch, they're forever associated with that particular sketch. I can even have multiple project files for the same sketch if I need more than one set of options. F8 to compile, F9 to upload, and F5 to open the serial monitor. Granted, it doesn't have all the bells and whistles of the official IDE, but its serves my simple needs sufficiently.

OK, then I misinterpreted those posts. Sorry for that.

I'm just amazed that a topic that a) makes a lot of sense and b) has been requested numerous times for more than 10 years now, simply has not been touched by the developers, despite a lot of ideas floating around in the community how this could be implemented.

There are two things...

One is the feature I requested here, that there be some sort of "copy current settings for forum or "customer service""

The other is preserving the settings associated with a particular sketch, so that loading that sketch loads all of the appropriate settings. This is the one that has been previously requested, but it's more complicated and more problematic (for instance, serial ports do change, and I might recompile for a different board as a test - is that supposed to be permanent, or should it remember the old settings.)

I guess they are related. The first is a sort-of stepping stone that might make it easier to implement the second...

The other is preserving the settings associated with a particular sketch, so that loading that sketch loads all of the appropriate settings.

Yes, and there have been numerous smart solutions to this problem. It's just that the developers don't want to use them. The default stock answer seems to be "wontfix". When a simple popup at loading time "There are project settings embedded in the source comments. Shall I use them?" would save 99% of the problems involved - You can turn down the offer and set whatever things you want instead, you can leave out settings like which serial port to use (which I would generally do because this would not work anyway when opening a project under different OSses). That are the solutions I've found several times over in the forums and on the web in general, reaching back about ten years. They made sense back then and now.

This was the one big thing I hoped for when I upgraded from 1.8 to 2.x. That was the topic that mattered.

Being able to dump all relevant settings ("for customer service") so I can drop them into a comment header and reconstitute the IDE manually after loading a project is a workaround for a problem that should not exist in the first place.

For my current project involving several dozen boards I found a simple solution: I switched to a different build system. Maybe Arduino has found a reasonable amount of professionalism the next time I take a look at small board projects. 3.x, maybe?

I have split the discussion of the distinct subject of project configuration file support from the original topic.

Hi @treczoks. Support for project configuration via "profiles" has been added to the official Arduino CLI development tool:

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

(GitHub is down for me right now, so if the link isn't loading for you, try again later)

The same feature has not been added to Arduino IDE, but if you are comfortable working with command line tools then maybe this feature will be useful to you.

Meaning "it has not been added yet" or "it will stay a feature of the CLI environment, and will not been added to the GUI in the forseeable future"?

IIRC, the CLI tools basically are the backend of the IDE, so why are they stopping at a 95% solution for such a problem? The information needed to fill in such a file is there in the IDE, all that is needed is a function to dump the IDE settings into such a file. Which would be an important first step. There obviously is enough project file parsing done for the CLI tools that it works, why-oh-why not using this to feed the GUI? Why stopping half a step before giving a long-wanted feature to the users?

Or is that something that is still in active development, and all we have to do is wait? Hopefully not another ten years.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.