Specifying the build path

I am used to adding a line to my Arduino preferences:

build.path=/tmp/Arduino1.8.13Build/

because I'm prone to wanting to look at the binaries and stuff, and /tmp/ArduinoBuild is a lot easier to type than something like /var/folders/gv/zn3wcml52jq0vvjnd95j8g6h0000gp/T/arduino-sketch-B144BD721CC82683132F91031308B78A/

How can I do something similar with ArduinoIDE 2.x ?

(I'm really missing "Portable" installs, as well. But there have been several requests for that already, so I hope work is going forward with that.)

Hi @westfw. Unfortunately I'm not aware of any easy way to do this when using Arduino IDE 2.x. The closest equivalent would be Sketch > Export Compiled Binary, which puts the binaries (but not the rest of the stuff) in the build subfolder of the sketch you are compiling for.

Arduino CLI does have the capability to specify the build folder, but it can't be set via the configuration file.

A detrimental result you would incur from setting a static build folder location when using Arduino IDE or even Arduino CLI directly is the loss of per-sketch caching. With the default settings, Arduino CLI creates a separate build folder for each sketch and reuses the compiled source files and library dependencies of the sketch if appropriate when you compile the sketch again later. Unlike Arduino IDE 1.x, the caches are preserved between IDE sessions, so the caches have long term benefits.

You have seen Arduino IDE 2.0 Portable ?

I do most of my poking around on AVR
I created a shell script wrapper for avr-objcopy.
It intercepts the command, creates a listing file, and symbol table for the image,
and also prints out the working directory.
If I need to look at things, I copy the working directory from the build output, start up a shell, then cd to to working directory by pasting the working directory.

--- bill

Arduino CLI does have the capability to specify the build folder
Hmm. So is ArduinoCLI going to continue to be supported (unlike the old IDE)?
I guess it's in use by other IDEs?

Ah. Is there a "clean build" option yet?
I haven't found build times to be much of a problem with the boards I use; I'd rather have the easy build directory. Oh well. :frowning:

It is the heart of Arduino IDE 2.x, Arduino Web Editor, Arduino IoT Cloud, Arduino Create Agent, Arduino Firmware Uploader, Arduino Language Server, arduino/compile-sketches, and several other essential official Arduino projects. So yes it will be supported.

Arduino CLI has one, yes. Just add the --clean flag to your arduino-cli compile command.

As for Arduino IDE, no. Most often when I see people ask for such a thing to be added, it turns out to be an "XY problem" in the end, where once we manage to get them to tell us what the "X" is we see there was no need for the "Y" of adding a "clean" element to the UI.

If you are concerned about an accumulation of caches in cases where the operating system isn't already clearing them, that is being worked on right now: