I want to copy the hex file in build output which is complied by CLI to another path in command prompt. At first, I have to know where the temporary directory for build output is.
How can I find where the variable temporary directory path for build ouput is? Or does CLI have a method the build output directory is fixed like in case Arduino IDE set the path by build.path value in preferences.txt?
Hi @comseong. You can set the build directory location via the arduino-cli compile --build-path
flag. However, if you only want the hex file, you might prefer to use arduino-cli compile --output-dir
instead.
If you want to make them convenient for the user to find, you can also use arduino-cli compile --export-binaries
, which will save them to the build
subfolder of the sketch.
You can learn about all of this here:
https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_compile/
1 Like
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.