I successfully installed all of the pertinent files to run ESP32 on my iMac. I had no issue with the install and all ESP32 sketches run without error. I mention this for one reason: I think I did this install before I upgraded this iMac to OSX Monterey.
After this I purchased a 16" MBPro which came with OSX Monterey installed. I installed all of the ESP32 files as I believe I did with the iMac. However, the MBPro gets the following compiler error:
bash: /Users/myname/Documents/Arduino/hardware/espressif/esp32/tools/esptool/esptool: No such file or directory
Whether or not this is a Monterey issue I have no idea. Here is a grab of the Arduino tools folder:
This installation method should only be used by developers and beta testers of the ESP32 boards platform. Everyone else should use the Boards Manager installation method. This will ensure all the necessary files are installed in the correct places.
My recommendation is to remove the manually installed copy and use the Boards Manager installed copy instead:
Select File > Quit from the Arduino IDE menus if it is running.
Please be very careful when deleting things from your computer. When in doubt, back up!
Start the Arduino IDE.
Select the appropriate ESP32 board from the Tools > Board menu in the Arduino IDE.
Now try compiling your sketch again. The error should not occur this time.
This URL is outdated. Espressif changed the URL a long time ago and stopped maintaining the file at the old location. So the old URL will cause Boards Manager to install an outdated version (1.0.6) of the ESP32 Boards Platform.
In case you want to update to the modern version, I'll provide instructions:
Copy the URL shown under the "Stable release link" section of that page.
Select File > Preferences from the Arduino IDE menus.
Replace the old URL in the "Additional Boards Manager URLs" field with the URL you copied from the installation instructions in the previous step.
Click the OK button.
You will now see a "Downloading index: ..." notification at the bottom right corner of the IDE window. Wait for that notification to close.
Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
Scroll down through the list of boards platforms until you see the "esp32 by Espressif Systems" entry. Hover the mouse pointer over that entry.
You will now see an "INSTALL" button appear at the bottom of the entry. Click the button to update the platform to the latest version (currently 2.0.5).
Well, I did as you instructed but sadly, nothing seemed to work. So I copied the stable release link from the Espressif site and added that to the IDE/Preferences/Additional Boards Manager URLs and that did not work. I failed to document that error message, but it did not upload the data as it should have.
I bounced back and forth from IDE v1.8.xx to v2 trying various things. I also rebooted my MBPro several times as well. Again, nothing worked. I could find no reference to ESP32-Espressif in the library of either IDE version which I found odd.
Note. My board is the Adafruit Feather ESP32 V2. I had this board connected during all of this.
Then suddenly an update message appeared at the bottom of the IDE v2 pane. I chose ‘install all’ and while it was installing all of these updates I saw reference to ‘esptool’ which gave me hope.
This took a few minutes, but when done my sketch compiled perfectly. I believe I am now good to go.
Question (time permitting): There are no files in my espressif folder. The Arduino files on my iMac are very different and all esp32 sketches compile perfectly as well. I fail to understand this so if you can shed some light on this that would be great. Perhaps some of these files are invisible?
After weeks of trial and error, I happy to finally have this issue resolved. Thanks for your help.
First of all, the platform name is "esp32 by Espressif Systems". Second, it is not a library, it is a boards platform. So you will only see it in Boards Manager, which is where boards platforms are managed. You will not see it in Library Manager, where libraries are managed.
You are welcome to delete the espressif folder at this path if you like:
It is possible you had multiple platforms (i.e., ESP8266) installed under this folder, so I instructed you to delete the ESP32 platform specifically to keep things simple. But the empty folder is completely unnecessary so it can be safely deleted.
It also won't cause any harm, so you are free to leave it if you like.
The /Users/myname/Documents/Arduino/hardware/ is the location for manually installed boards platforms. Arduino Boards Manager installs platforms to a completely different location, here:
Once again, I am indebted to you for your help and knowledge.
Yes, the 'esp32 by Espressif Systems' is indeed a boards platform. This was a blatant oversight on my part. I stand corrected. Thank you for pointing out my schoolboy mistake.
It is obvious that I have been reading all of the wrong internet info for setting up my esp32 system. I am much enlightened now thanks to your excellent guidance.
However, I believe that I am still not on Arduino terra firma for this reason: As a double-check prior to responding to your comments, I launched the v2 IDE on my MBPro. I wanted to modify the BLINK sketch I ran yesterday to verify that all was in working order. I got an error noting that I had not selected a port. I opened the Tools pallette to do just that and saw that I had no way to set the port. See images below: