Comments on: Flashing MicroPython Firmware with esptool.py on ESP32 and ESP8266 https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sun, 01 Sep 2024 02:00:55 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Witchdoc59 https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-952972 Sun, 01 Sep 2024 02:00:55 +0000 https://randomnerdtutorials.com/?p=80239#comment-952972 When I run python -m esptool I get a message that No module named esptool
Trying to run pip install esptool a second time results in several messages that Requirement already satisfied.

]]>
By: ThonnyIDE https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-889851 Sat, 10 Feb 2024 15:54:54 +0000 https://randomnerdtutorials.com/?p=80239#comment-889851 Hello. Last night I reinstalled Thonny to the latest version 4.1.4. I downloaded the latest stable OTA firmware for both ESP32 and 8266 from the Espressif site and started uploading to the 8266 board. After finishing programming, Shell -ThonnyIDE- began typing out various characters at high speed and flashing LEDs at high frequency, and Thonny “hardened”. I had to open a new window – in the terminal with esptool.py erase everything. This happened with both ESP32 and 8266. I work in Debian 12, Python is 3.12, but both Debian and Python were with the previous version of Thonny. I’m not an IT, just a playing retiree who used to work with electronics. Thank you for your advice.

]]>
By: Eric Carter https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-874402 Sun, 26 Nov 2023 19:31:25 +0000 https://randomnerdtutorials.com/?p=80239#comment-874402 OK . Latest OS version on Raspberry Pi is Bookworm. Issuing the command
pip install esptool will result in error: externally-managed-environment.
There are various options to solve that and I elected to use
pipx install esptool
then make in available though the system path by
That all seems to work except instead of issuing the command esptool it seems to be necessary to issue command exptool.py. So the commands to erase the flash memory and install micropython on an 8266 for me were
esptool.py -p /dev/ttyUSB0 –chip esp8266 erase_flash
and
esptool.py -p /dev/ttyUSB0 –chip esp8266 write_flash –flash_mode dio –flash_size detect 0x0 ESP8266_GENERIC-20231005-v1.21.0.bin
where /dev/ttyUSB0 is the port and ESP8266_GENERIC-20231005-v1.21.0.bin the dowloaded firmware.
Hope that helps anyone who is trying to sort that out on a RPi or possibly on any other updated OS such as Ubuntu 23.10

]]>
By: Sara Santos https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-839331 Wed, 07 Jun 2023 20:44:47 +0000 https://randomnerdtutorials.com/?p=80239#comment-839331 In reply to Marc.

Hi.
After flashing micropython, if you want to get back using Arduino IDE, you just need to upload a new code using Arduino IDE.
It’s as simple as that.
Regards,
Sara

]]>
By: Marc https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-839317 Wed, 07 Jun 2023 18:36:53 +0000 https://randomnerdtutorials.com/?p=80239#comment-839317 Thank you very much for all your tutorials, those are incredible!

After I flash my board with MicroPyhton firmware, will it be possible to continue programming with Arduino IDE and c++ as before the flash, or I will need to flash back to “original firmware”?

]]>
By: Walt White https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-802235 Sun, 11 Dec 2022 15:55:06 +0000 https://randomnerdtutorials.com/?p=80239#comment-802235 Worked perfectly on my M5Stack Atom Lite. Thank you.

]]>
By: viral https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-776976 Sat, 20 Aug 2022 05:31:52 +0000 https://randomnerdtutorials.com/?p=80239#comment-776976 C:\Users\Admin>cd esptool.py
The system cannot find the path specified.
help me my esptool.py not run

]]>
By: Viktor https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-726688 Thu, 17 Feb 2022 06:16:02 +0000 https://randomnerdtutorials.com/?p=80239#comment-726688 For mac users in 2022, I came upon these problems:
1. I had a USB-C to USB converter between the computer and the board. With this setup Arduino couldn’t find the board.
I ended up buying a USB-C to USB-micro cord that solved the problem

I installed esptool on the wrong version of python

esp32 % python -m esptool
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named esptool
solved it with specifying the python number:
esp32 % python3.9 -m esptool

running python3.9 -m esptool –-chip esp32 erase_flash gave this error
esptool: error: argument operation: invalid choice: ‘–-chip’
I’m not sure how to send in arguments the correct way, but workaround is to remove it completely. ESPtool was able to identify the chip itself

python3.9 -m esptool erase_flash

esptool.py v3.2
Found 4 serial ports
Serial port /dev/cu.usbserial-0001
Connecting….
Detecting chip type… Unsupported detection protocol, switching and trying again…
Connecting….
Detecting chip type… ESP32

the section about finding the COM port looked different for me.
I can see /dev/cu.usbserial-0001 and also /dev/cu.SLAB_USBtoUART after installing the cp2102 driver

I ended up removing the -port argument completely and it ran successfully

python3.9 -m esptool write_flash -z 0x1000 esp32-20220117-v1.18.bin
esptool.py v3.2
Found 4 serial ports
Serial port /dev/cu.usbserial-0001
Connecting….
Detecting chip type… Unsupported detection protocol, switching and trying again…
Connecting…..
Detecting chip type… ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:b9:7e:e5:00:c0
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Flash will be erased from 0x00001000 to 0x0017cfff…
Compressed 1555136 bytes to 1022998…
Wrote 1555136 bytes (1022998 compressed) at 0x00001000 in 90.6 seconds (effective 137.4 kbit/s)…
Hash of data verified.

Leaving…
Hard resetting via RTS pin…

]]>
By: Sara Santos https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-726157 Mon, 14 Feb 2022 12:07:12 +0000 https://randomnerdtutorials.com/?p=80239#comment-726157 In reply to Sara Santos.

But check this discussion for more information:
https://www.esp32.com/viewtopic.php?t=4061
Regards,
Sara

]]>
By: Sara Santos https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/#comment-726156 Mon, 14 Feb 2022 12:06:12 +0000 https://randomnerdtutorials.com/?p=80239#comment-726156 In reply to imam.

Hi.
Usually, that error means that the memory is corrupted.
I would use another ESP32 board.
Regards,
Sara

]]>