Skip to content

Path to esptool not discoverable due to post-release tool dependency bump #7923

Closed
@per1234

Description

@per1234

Board

All

Device Description

N/A

Hardware Configuration

N/A

Version

v2.0.7

IDE Name

Arduino IDE 1.8.19, 2.0.4, Arduino CLI 0.31.0

Operating System

All

Flash frequency

N/A

PSRAM enabled

yes

Upload speed

N/A

Description

The package index provides support for installation of the platform via the Arduino Boards Manager. In addition to the platform itself, Boards Manager also installs the tool dependencies that are defined in the release entry.

The package index data is also used by the Arduino development tools to expand the runtime.tools.TOOLNAME.path properties used in the command patterns defined in platform.txt to the paths of the tool dependencies installed on the user's computer.

The packages[*].platforms[*].toolsDependencies[*].version field for the esp32:esptool_py tool dependency of the 2.0.7 platform release was changed from 4.5 to 4.5.1:

50269f6

This causes compilation or upload to fail under the following conditions:

  • The user installed version 2.0.7 of the platform before the change was made to the package index.
  • The ESP32 package index URL is in their "Additional Boards Manager URLs" IDE preference.
  • The package index file has been updated on the user's computer (the Arduino development tools do this automatically).

Suggested Fix

Make a new release of the platform.

Workaround

The user can use Boards Manager to uninstall and then reinstall the platform:

Arduino IDE 1.x
  1. Select Tools > Board > Boards Manager from the Arduino IDE menus.
    A "Boards Manager" dialog will appear.
  2. Wait for the updates to finish, as shown by the messages printed at the bottom of the "Boards Manager" dialog.
  3. Scroll down through the list of boards platforms until you find the "esp32 by Espressif Systems" entry. Click on it.
    Some buttons will appear on the entry.
  4. Click the Remove button on the "esp32 by Espressif Systems" entry.
  5. Wait for the removal to finish.
  6. Click the Install button on the "esp32 by Espressif Systems" entry.
  7. Wait for the installation to finish.
  8. Click the Close button on the "Boards Manager" dialog.
Arduino IDE 2.x
  1. Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Scroll down through the list of boards platforms until you find the "esp32 by Espressif Systems" entry.
  3. Hover the mouse pointer over the "INSTALLED" label on the "esp32 by Espressif Systems" entry. You will now see it change to an "UNINSTALL" button.
  4. Click the "UNINSTALL" button.
  5. A confirmation dialog will appear. Click the "YES" button.
  6. Wait for the uninstallation to finish.
  7. Select "2.0.7" from the dropdown version menu at the bottom of the "esp32 by Espressif Systems" entry.
  8. Click the "INSTALL" button at the bottom of the "esp32 by Espressif Systems" entry.
  9. Wait for the installation to finish.

Additional reports

Sketch

void setup() {}
void loop() {}

Debug Message

Arduino IDE 2.x / Arduino CLI:

cmd /c IF EXIST "C:\\Users\\per\\Documents\\Arduino\\sketch_mar2a\\bootloader.bin" ( COPY /y "C:\\Users\\per\\Documents\\Arduino\\sketch_mar2a\\bootloader.bin" "C:\\Users\\per\\AppData\\Local\\Temp\\arduino-sketch-D4D9383D25724F4612E543EFB0213587\\sketch_mar2a.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\per\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.7\\variants\\esp32\\bootloader.bin" ( COPY "C:\\Users\\per\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.7\\variants\\esp32\\bootloader.bin" "C:\\Users\\per\\AppData\\Local\\Temp\\arduino-sketch-D4D9383D25724F4612E543EFB0213587\\sketch_mar2a.ino.bootloader.bin" ) ELSE ( /esptool.exe --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "C:\\Users\\per\\AppData\\Local\\Temp\\arduino-sketch-D4D9383D25724F4612E543EFB0213587\\sketch_mar2a.ino.bootloader.bin" "C:\\Users\\per\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.7\\tools\\sdk\\esp32\\bin\\bootloader_qio_80m.elf" ) )
'/esptool.exe' is not recognized as an internal or external command,
operable program or batch file.
        1 file(s) copied.

Arduino IDE 1.x:

___REMOVE___/esptool.exe --chip esp32 --port COM10 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 C:\Users\per\AppData\Local\Temp\arduino_build_839818/foo_bar.ino.bootloader.bin 0x8000 C:\Users\per\AppData\Local\Temp\arduino_build_839818/foo_bar.ino.partitions.bin 0xe000 C:\Users\per\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7/tools/partitions/boot_app0.bin 0x10000 C:\Users\per\AppData\Local\Temp\arduino_build_839818/foo_bar.ino.bin 
java.io.IOException: Cannot run program "___REMOVE___/esptool.exe": CreateProcess error=2, The system cannot find the file specified

Other Steps to Reproduce

  1. Use Boards Manager to install version 2.0.7 of the platform if it is not already installed:
    https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide
  2. If you have installed the platform after the time of the package index change, adequately simulate the conditions by exiting Arduino IDE and renaming the folder at the following path to 4.5:
    • Windows:
      C:\Users\<username>\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.5.1
      
      (where <username> is your Windows username)
    • Linux:
      ~/.arduino15/packages/esp32/tools/esptool_py/4.5.1
      
    • macOS:
      ~/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1
      
  3. Trigger an update of the package index:
    • Arduino IDE 1.x:
      1. Select Tools > Board > Boards Manager from the Arduino IDE menus.
        A "Boards Manager" dialog will appear.
      2. Wait for the updates to finish, as shown by the messages printed at the bottom of the "Boards Manager" dialog.
      3. Click the Close button on the "Boards Manager" dialog.
    • Arduino IDE 2.x:
      1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
      2. Select the "Arduino: Update Package Index" command from the menu.
      3. Wait for the "Downloading index: ..." notification to close.
  4. Select any ESP32 board from Arduino IDE's Tools > Board menu.
  5. Select a serial port from Arduino IDE's Tools > Port menu.
  6. Select Sketch > Upload from the Arduino IDE menus.

🐛 The process fails due to an incomplete path to esptool in the compilation or upload command.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions