Hi Forum!
I am new here and also new to ESP32. I have bought a LilyGO T-Display-S3 ESP32S3 and wanted to upload my first code.
I had problems to upload Code via Aruino IDE app on macOs 12.6 Monterey. I get the error
bash: /esptool: No such file or directory
exit status 127
Testing things and clicking to fast I accidently fired 'Burn Bootloader'. Now I am stuck at all, trying to reconnect to the board, loosing the port one second afte selecting it.
Is there a way to reset the board to factory settings after Burn Bootloader?
Thnx!
Juraj
March 2, 2023, 6:00am
2
there is no way Burn Bootloader could do anything
When connecting Port, Serial Monitor says "invalid header: 0xffffffff ", then connection is gone again.
Juraj
March 2, 2023, 2:57pm
6
Burn Bootloader is not applicable for esp32. there is no command behind it
so how could I put the device back into the factory state?
Juraj
March 3, 2023, 6:22am
8
it is not possible to get it out of factory state. the esp32 bootloader is in read-only memory
you problem is that the upload tool is missing on you computer
Its not missing. I installed esptools via pip and can connect via terminal to the device and read the flash successfully.
python3 -m esptool read_flash 0 0x400000 tmp.bin
downloads an image. (found this here - don't know why to use 0x400000)
I think I could use write_flash to fix this. Is there a basic bin file that would reset the flash to factory settings?
I also found this option: CONFIG_BOOTLOADER_FACTORY_RESET but don't know how to use it.
by the way: is there a link to any good knowledge about how microcontrollers and their development work? I need to know some basics.
Hi @headkit
This is caused by a change made to the ESP32 package index file:
opened 09:08AM - 03 Mar 23 UTC
closed 05:43PM - 21 Apr 23 UTC
Status: Pending
### 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](https://arduino.github.io/arduino-cli/latest/package_index_json-specification/) 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](https://arduino.github.io/arduino-cli/latest/platform-specification/#how-to-retrieve-tools-path-via-runtimetools-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`](https://arduino.github.io/arduino-cli/0.31/package_index_json-specification/#platforms-definitions:~:text=core%20archive%20file%29-,toolsDependencies,-%3A%20the%20tools%20needed) field for the `esp32:esptool_py` tool dependency of the 2.0.7 platform release was changed from `4.5` to `4.5.1`:
https://github.com/espressif/arduino-esp32/commit/50269f6ec02bb341d878ff57d7ea5fc8c9ac82fe
This causes compilation or upload to fail under the following conditions:
- The user installed version 2.0.7 of the platform before [the change](https://github.com/espressif/arduino-esp32/commit/50269f6ec02bb341d878ff57d7ea5fc8c9ac82fe) was made to the package index.
- The [ESP32 package index URL](https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json) 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.
1. Wait for the updates to finish, as shown by the messages printed at the bottom of the "**Boards Manager**" dialog.
1. 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.
1. Click the **<kbd>Remove</kbd>** button on the "**esp32 by Espressif Systems**" entry.
1. Wait for the removal to finish.
1. Click the **<kbd>Install</kbd>** button on the "**esp32 by Espressif Systems**" entry.
1. Wait for the installation to finish.
1. Click the **<kbd>Close</kbd>** 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.
1. Scroll down through the list of boards platforms until you find the "**esp32 by Espressif Systems**" entry.
1. 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.
1. Click the "**UNINSTALL**" button.
1. A confirmation dialog will appear. Click the "**YES**" button.
1. Wait for the uninstallation to finish.
1. Select "**2.0.7**" from the dropdown version menu at the bottom of the "**esp32 by Espressif Systems**" entry.
1. Click the "**INSTALL**" button at the bottom of the "**esp32 by Espressif Systems**" entry.
1. Wait for the installation to finish.
#### Additional reports
- https://github.com/arduino/Arduino/issues/11866
- https://forum.arduino.cc/t/t-display-s3-esp32s3-how-to-reset-to-factory-settings-after-burn-bootloader/1096636
- https://forum.arduino.cc/t/esptool-exe-is-not-recognized-as-an-internal-or-external-command-an-executable-program-or-batch-file/1096495
- https://forum.arduino.cc/t/esp32-s3-stuck-with-manual-uploading-resetting/1096945/3
- https://forum.arduino.cc/t/compilation-error-esptool-exe-not-recognized/1096550
- https://forum.arduino.cc/t/problem-latest-update-ide/1095897/5
### Sketch
```cpp
void setup() {}
void loop() {}
```
### Debug Message
**Arduino IDE 2.x** / **Arduino CLI**:
```text
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**:
```text
___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
1. 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**:
```text
C:\Users\<username>\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.5.1
```
(where `<username>` is your Windows username)
- **Linux**:
```text
~/.arduino15/packages/esp32/tools/esptool_py/4.5.1
```
- **macOS**:
```text
~/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1
```
1. 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.
1. Wait for the updates to finish, as shown by the messages printed at the bottom of the "**Boards Manager**" dialog.
1. Click the **<kbd>Close</kbd>** button on the "**Boards Manager**" dialog.
- **Arduino IDE 2.x**:
1. Press the <kbd>**Ctrl**</kbd>+<kbd>**Shift**</kbd>+<kbd>**P**</kbd> keyboard shortcut (<kbd>**Command**</kbd>+<kbd>**Shift**</kbd>+<kbd>**P**</kbd> for macOS users) to open the "Command Palette".
1. Select the "**Arduino: Update Package Index**" command from the menu.
1. Wait for the "**Downloading index: ...**" notification to close.
1. Select any ESP32 board from Arduino IDE's **Tools > Board** menu.
1. Select a serial port from Arduino IDE's **Tools > Port** menu.
1. 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
- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.
You can restore the platform to a functional state by uninstalling and then reinstalling it:
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 find the "esp32 by Espressif Systems " entry.
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.
Click the "UNINSTALL " button.
A confirmation dialog will appear. Click the "YES " button.
Wait for the uninstallation to finish.
Select "2.0.7 " from the dropdown version menu at the bottom of the "esp32 by Espressif Systems " entry.
Click the "INSTALL " button at the bottom of the "esp32 by Espressif Systems " entry.
Wait for the installation to finish.
thnx for your help.
I deinstalled and reinstalled as told. Using Arduino IDE 2.0.4 I still lose USB connection right after connecting port.
But with Arduino 1.8.19 I was able to upload the "Sprite_draw" example code to the system.
The instructions I shared above were only intended to fix the compilation error you experienced:
They are not expected to resolve the problem with the port.
Yes, of course. It was a good tip, thank you. One part of the puzzle is solved!
1 Like
If you need to restore the T-Display S3 go to the below link download the zip file and program the binaries with the ESP32S3 FLASH TOOL with the screenshot settings below.
system
Closed
October 27, 2023, 12:47pm
15
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.