CLI on Linux - location of 'hex' file?

Hello,
when using CLI on Linux, what is the location for the hex file generated by CLI?

I'm asking because I want to use the KATE editor to compile and upload a Sketch using the external tools feature in KATE.
Thanks

Wherever you've pointed --output-dir to in your arduino-cli compile command.

1 Like

Hi @domify80. As @van_der_decken already pointed out, you can specify a path for the folder under which the file will be saved by using the --output-dir flag:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_compile/#options

However, note that Arduino CLI's upload command will automatically find the file in the default location if you just provide the path of the sketch. So it should not be necessary for you to use this flag as long as you are using Arduino CLI to upload the sketch as well as compiling it.

1 Like

Thanks for your reply.
I think the term 'default location' is a little bit ambiguous in this context.
Is the default location the location from where I opened the Sketch or is it the location where the CLI is located?
What if I just created a sketch in the editor, what is then the 'default location'
Thanks for further clarification.

The default location is a temporary folder used to store the artifacts from the sketch build.

For example:

/home/per/.cache/arduino/sketches/48A3A304F19E30F8DF40CCBABF0C93E9/FooSketch.ino.hex

Quite interesting. A bunch of files are located there.

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