ARDUINO IDE 2.0 looking for esptool.py in the wrong directory

Hi,
after installing the final version of Arduino IDE, I stumbled in a weird behaviour. Most of times, not all but a good 90%, when compiling a sketch, from blink to a barometer web server, for an ESP32, it gives me the following error message:

Compilation error: fork/exec /Users/username/Documents/Arduino/hardware/espressif/esp32/tools/esptool/esptool: no such file or directory.

Please note that the old Arduino IDE 1.8.19 works like a charm and I can upload whatever sketch to my ESP Dev Board.
I was expecting IDE 2.0 to look for the esptool.py in the subdirectories of Arduino 15.
The weirdest thing is that, sometimes , rarely though , compilation ends well and I can upload.
Is anybody capable to help me? I'd really love to move to IDE 2.0
Many thanks in advance
regards

Hi @Fabri54. Thanks for your report.

I can see that you did a manual installation (AKA "Git installation") of the ESP32 boards platform to your sketchbook at this location:

/Users/username/Documents/Arduino/hardware/espressif/esp32/

From your expectation that it would look in the Arduino15 folder, I will assume that you also installed the platform via the Arduino IDE's Boards Manager.

If so, you will find that there are two ESP32 items under the Tools > Board menu in the Arduino IDE. One of these will have a "(in Sketchbook)" suffix. The one you installed via Boards Manager will be the one without that suffix. So make sure to select the board from that section of the menu.

The manual boards platform installation is intended to be done only for the purpose of beta testing or development. Everyone else should use the stable and easily maintainable Boards Manager installation instead. So if you aren't doing beta testing or development on the ESP32 boards platform I recommend you to delete this folder to avoid any further confusion:

/Users/username/Documents/Arduino/hardware/espressif/esp32

Please let me know if you have any questions or problems while following those instructions.

My apologies as I forgot three things :

  1. I'm running the ARDUINO IDE 2.0 under Mac OS Monterey 12.6 and the IDE has been installed using the .dmg package. No manual installation at all.
  2. The same applies to the boards, Arduino, ESP32 and ESP8266 have been installed using the board manager.
  3. In my /Users/Documents/Arduino folder there are only the libraries, the sketches and a data sheet folder which I created for my convenience. There is no ESP32 folder. This latter is under Arduino 15, with all the proper subfolders, esptool included.
    I'm really baffled

The Arduino IDE installation method is not relevant to this problem.

Note that it would be a hardware/espressif/esp32 folder, not ESP32.

But if that is not present then this is unexpected indeed.

I'm going to ask you to post some additional information that might help us to identify the problem.

:exclamation: NOTE: These instructions will not solve the problem. They are only intended to possibly gather some more information about the problem, which might provide a clue that leads to a solution.

Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: ☐ compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to fail.
  6. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
  7. Open a forum reply here by clicking the Reply button.
  8. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  9. Press Ctrl+V.
    This will paste the compilation output into the code block.
  10. Move the cursor outside of the code tags before you add any additional text to your reply.
  11. Click the Reply button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the "Upload" icon (image) on the post composer toolbar:
    image
  6. Select the .txt file you saved.
  7. Click the Open button.
  8. Click the Reply button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

OK, I'm dumb.
There was indeed an "hardware" folder inside the /Documents/Arduino folder and I followed your instructions the previous post, including deleting this latter "hardware" folder. I can now compile and upload any test sketch, from blink to wifiscan. Tomorrow I'll try with something more complex I'm working on but I don't see reasons for not working.
One thing I don't understand is what the heck does that "hardware" folder inside /Documents/Arduino as I don't recall any manual installation from Git.
Definitely, I'm becoming old
Many thanks for your help

You are welcome. I'm glad you were able to find it and that it is working as expected now.

The IDE never puts anything under this folder. It always installs boards platforms to the Arduino15 folder.

Over the years, I have observed quite a few people who aren't doing any beta testing or development of the platform to have done this installation unnecessarily. My theory is it was caused by the way the installation instructions are formatted. Previously, the manual installation instructions sort of looked like another step in a single set of installation instructions rather than a separate alternative set of instructions. So I think people performed the Boards Manager instructions and then just kept on going through the (significantly less friendly) manual instructions.

I see that they now have an "Installing using PlatformIO" section between the Boards Manager and manual installations. Hopefully that will serve as a separator of sorts as it should maybe be a bit more clear that that section is not applicable to Arduino IDE users?

It is surprising because the manual installation process seems like something that would be memorable due to its significant complexity and inconvenience. Perhaps not so much for someone who is already very accustomed to working with Git, the file system, and the command line though.

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