I have several goals in learning about this...
One of them is finding where the source code is compiled to before it is uploaded to the device... Arduino Uno or EXP32.
Here are the questions:
1 - Clicking the "Verify" Icon on the Arduino IDE causes the source code to compile but not upload to the device... correct?
2 - Where on a Windows 10 PC would the code compile to... which folder?
3 - Where on a Linux Mint machine would the code compile to?
One of my other goals is to alternately use the espTools utility to upload the "binary blob" to an esp32 DevKit v4 board... or whatever.
My mistake. You need to turn on verbose reporting for upload to see what you are looking for. Turn off the verbose output for compilation to make things clearer and look for a line like this
OK I did that but it seems my Arduino IDE is using espTools and not avrdude.
When I installed espTools did I accidentally tell the Arduino IDE to us it instead of avrdude?
Also, is the file name I'm looking for a filename.bin or filename.hex?
(I see a filename.bin but not a filename.hex in the folder that "I think" the Arduino IDE is compiling to...)
No, you are using an ESP processor and not surprisingly that does not use avrdude to upload the code
However, all is not lost. In the Sketch menu of the IDE you will see an option to Export the compiled binary file which is an option that I have never needed to use
OK, that was a good tip... and education on avrdude and esptool
The exported file ended up (I think) in...
C:\Users\user-01\Documents\Arduino\esp32 code by me\esp32_blink_3pins
with a file name of...
esp32_blink_3pins.ino.esp32.bin
And the source file is in the same folder named...
esp32_blink_3pins.ino
Does that seem right?
And, fyi, among my goals here is to learn how to upload a compiled program to the esp32 using espTool... just so you know where I'm headed. I relatively new to both Arduino and esp32 thus the inquiries.
Thanks for the help.
I have found that in Windows, the IDE creates a bunch of files in a Temp folder that we don't have control over. Here is a sketch I compiled yesterday for example.
This location may be hidden, so you may have to unhide it to see the files.
The .hex will be moved to the Sketch folder with the "Sketch:Export compiled binary" command.
I depends on which file format the uploader tool requires. AVRDUDE requires a .hex file, so that is why the Arduino AVR Boards platform configures the build system to produce a .hex file.
esptool requires a .bin file, so that is why the esp32 boards platform configures the build system to produce a .bin file.
When you do a Sketch > Export compiled Binary in the Arduino IDE, the compiled binary is copied from the build folder to the sketch folder. Two binaries are copied; the standard binary, and a binary that has been merged with the bootloader file (identified by the .with_bootloader in the filename).
Two recipes affect how Export compiled Binary works:
recipe.output.tmp_file: Defines the binary's filename in the build folder.
recipe.output.save_file: Defines the filename to use when copying the binary file to the sketch folder.
However, you could still consider it undocumented since the fact that you can set build properties in preferences.txt is not documented. That deficiency is tracked here: