espressif / esptool

Espressif SoC serial bootloader utility
https://docs.espressif.com/projects/esptool
GNU General Public License v2.0
5.6k stars 1.39k forks source link

What to do, if "Wrong boot mode detected (0x13)! (ESPTOOL-801)" appears on mac #949

Closed fft1010 closed 9 months ago

fft1010 commented 10 months ago

Problem with flashing ESP on Mac solved

The problem was two folded 1.) I had a project, where another hardware was connected to the ESP32. It seems, that this always put the ESP32 out of the programming mode. I disconnected it, and now it worked.

2.) The flashing that works for me on my Mac:

run the needed esptool.pc command, e.g.

esptool.py --port /dev/tty.SLAB_USBtoUART --before no_reset --baud 115200 flash_id

When you hit [ENTER] esptool.py tries to connect and prints "..." (dots) During printing press RESET button than BOOT button on the ESP32 than release RESET Button but KEEP pressing the BOOT button until die esptool.py gets the connection and the dots stop producing. THAN you can release the BOOT button.

I had to do this for every command that I wanted to send to the ESP32.

If the esptool.py gives up too fast for you, than add

--connect-attempts 15

so that the line above looks like

esptool.py --port /dev/tty.SLAB_USBtoUART --connect-attempts 15 --before no_reset --baud 115200 flash_id

Sorry, as I am a newbe I needed the pressing and releasing that clear, and the hardware connection was also a bummer for me. But again: Thanks for this great tool; this "documentation" is my very small support for this project.

thank you Juergen

Jason2866 commented 10 months ago

Not an esptool.py issue. Either your connected esp32 has a defect or your MAC software setup is screwed. Using a Mac too, everything works as described in the docs.

dobairoland commented 9 months ago

Your steps could be simplified just to hold the BOOT button, start esptool and hold it until esptool gets trough the connection phase.

The issue looks related to your board and hardware connections. I don't think anything can be done on the esptool side for this.

Here you can read about automatic bootloader selection: https://docs.espressif.com/projects/esptool/en/latest/esp32/advanced-topics/boot-mode-selection.html#automatic-bootloader. This is what you need to get to work without manually pushing any buttons during flashing.

fft1010 commented 9 months ago

Hi @Jason2866 and @dobairoland , I noticed that I did not fully understand the way when the ESP is in download mode. What puzzled me was, that I could "see" the "waiting for DL" in the terminal, but if I started esptool.py it did not do nothing. Colclusion: Basically it way my newbe fault, but I hope the description above can help others. No "bug", but I do not know how to change this from "bug" to something more senseful.

thanks Juergen