-
-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config file to accept command options #1229
Comments
@RalphCorderoy A great example is how Sayanee Basu uses Arduino CLI with a Makefile In the description you also find links to the demos she runs. |
Sure, but one day you need to do something unusual and different and have to use the command line and then I have to manually enter a 143 character FQBN just do do something one off. The command line is all well and good, but I would like a settings file for build options... like other similar platforms do |
Thanks, @ubidefeo, but I already have a Makefile with targets to build the hex, tags, prog, clean, etc., all of which can use the Makefile's $(BOARD_NAME) I've set when running arduino-cli. The problem comes, as @jockm says, when wanting to do ad hoc arduino-cli runs at the shell rather than the canned Makefile commands, perhaps because some different options want to be given. |
There are plans to store some information in the It would greatly help if you outlined your workflow, maybe there is already a way to do what you want to do but I need more information to be sure. On a side note the |
@silvanocerza If the arduino-cli.yaml can live in the sketch directory, then conceptually it isn't just global configuration. There is no practical reason it can't be used for sketch level settings. Indeed I have always assumed there was global one and the local one would override the specific settings present. Putting sketch level settings there makes sense, without the need to add another file to the directory |
You assumed correctly, if the
We have a plan to store Sketch configurations, part of that plan is outlined in the build profiles RFC. |
Yes that was clear from what was previously said in this issue. I was arguing that you don't need another file. I was giving feedback |
It can, but note there is no special treatment of the configuration file in that location. The configuration file is handled the same when it is in the sketch folder as when it is in any other folder. Other parts of Arduino CLI do give special treatment to the sketch folder in that it uses the current working directory as the default sketch path argument. So it is convenient to run Arduino CLI commands from the sketch folder, and when you do that a configuration file in the sketch folder will be used. But Arduino CLI commands also might be ran from any arbitrary location, specifying the sketch path as an argument to the command. It is possible that this loading of the configuration file from the current working directory might be problematic: #758 |
Hi @RalphCorderoy, we added the sketch project file which should solve your problem. |
It's tedious writing
--fqbn ...
. I have a arduino-cli.yaml in the current directory but it only accepts a few options. A cmd section could have have subsections for each subcommand and within those each would be a subcommand's option, e.g. cmd.compile.fqbn. This would allow per-sketch settings to be stored under Git unlike environment variables. And if a file is sourced to set the environment then forgetting to do it causes problems whereas the local arduino-cli.yaml is always present.The text was updated successfully, but these errors were encountered: