IMPORTANT: Upgrade to esptool.py 1.2.1

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

IMPORTANT: Upgrade to esptool.py 1.2.1

Post by pfalcon » Mon Nov 07, 2016 10:49 pm

For the upcoming 1.8.6 release, use of the latest esptool 1.2.1 is required:
  • If you use esp-open-sdk, you don't need to do anything if you followed last notice of required upgrade http://forum.micropython.org/viewtopic. ... 689#p14850 . However, I'd recommend to rebuild to make sure you didn't miss earlier upgrade and get everyone on the actual 1.2.1, not pre-release.
  • Otherwise, if you installed just esptool.py, upgrade using "pip install esptool"
  • If you use any other flashing utility, which is not officially supported and you do this on your own risk and under self-support, please be sure to set the exact flash size of your module.
Rationale of the changes: MicroPython previously supported flash size auto-detection on first boot, so you could just use 8mbit size with esptool.py. With ESP8266 SDK2.0 this is no longer possible, auto-detection was moved to esptool.py instead.

Note that auto-detection works only for standard flash sizes supported for ESP8266, i.e. up to 4Mbyte.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
mcauser
Posts: 392
Joined: Mon Jun 15, 2015 8:03 am

Re: IMPORTANT: Upgrade to esptool.py 1.2.1

Post by mcauser » Sun Nov 13, 2016 11:08 pm

Thanks Paul!
The auto-detect PR for those interested.

Esptool.py is now supported by Espressif and lives at https://github.com/espressif/esptool, previously https://github.com/themadinventor/esptool

mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

Re: IMPORTANT: Upgrade to esptool.py 1.2.1

Post by mianos » Mon Nov 14, 2016 7:25 am

The auto-detect update is fantastic if you have a few boards. (Like me, I buy all of them :) )

torwag
Posts: 207
Joined: Fri Dec 13, 2013 9:25 am

Re: IMPORTANT: Upgrade to esptool.py 1.2.1

Post by torwag » Wed Nov 16, 2016 4:53 pm

Argh, I was hoping that the 1.2 relase gets finally python3 support.
Seems, they moved that over to the 1.3 milestone.
Thus, Arch Linux users still have to patch the file to explicitly call python2.

ceres
Posts: 1
Joined: Sat Nov 19, 2016 12:51 pm

Re: IMPORTANT: Upgrade to esptool.py 1.2.1

Post by ceres » Sat Nov 19, 2016 12:59 pm

I'm unable to flash my ESP8266 with esptool.py 1.2.1

Following error appears:
> esptool.py --port /dev/tty.SLAB_USBtoUART --baud 460800 write_flash --flash_size=detect -fm dio 0 esp8266-20161110-v1.8.6.bin
esptool.py v1.2.1
Connecting...
Auto-detected Flash size: 32m
Running Cesanta flasher stub...

A fatal error occurred: Invalid head of packet ('\xf8')

I've tried also the latest esptool.py (1.3-dev) and I get a similar fatal error. Flashing a previous version of the firmware also fails. However, erasing flash works with both versions of esptool.py.

Any ideas?

torwag
Posts: 207
Joined: Fri Dec 13, 2013 9:25 am

Re: IMPORTANT: Upgrade to esptool.py 1.2.1

Post by torwag » Thu Dec 08, 2016 6:42 pm

ceres wrote:I'm unable to flash my ESP8266 with esptool.py 1.2.1

Following error appears:
> esptool.py --port /dev/tty.SLAB_USBtoUART --baud 460800 write_flash --flash_size=detect -fm dio 0 esp8266-20161110-v1.8.6.bin
Rather late answer sorry, but did you try a lower serial baud rate? Many people report that baudrates above 115200 fails.

weldeng
Posts: 31
Joined: Thu Sep 15, 2016 12:47 am

Re: IMPORTANT: Upgrade to esptool.py 1.2.1

Post by weldeng » Fri Dec 16, 2016 5:58 pm

pfalcon wrote:For the upcoming 1.8.6 release, use of the latest esptool 1.2.1 is required:

[*] Otherwise, if you installed just esptool.py, upgrade using "pip install esptool"
I am trying to upgrade my version of esptool per your instructions above so that I may upgrade to 1.8.6 firmware. I get the following messsage from the command prompt in windows:


C:\Python27\Scripts>pip install esptool
Requirement already satisfied (use --upgrade to upgrade): esptool in c:\python27\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): pyserial in c:\python27\lib\site-packages (from esptool)
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Python27\Scripts>

weldeng
Posts: 31
Joined: Thu Sep 15, 2016 12:47 am

Re: IMPORTANT: Upgrade to esptool.py 1.2.1

Post by weldeng » Sat Dec 17, 2016 2:29 am

weldeng wrote:
pfalcon wrote:For the upcoming 1.8.6 release, use of the latest esptool 1.2.1 is required:

[*] Otherwise, if you installed just esptool.py, upgrade using "pip install esptool"
I am trying to upgrade my version of esptool per your instructions above so that I may upgrade to 1.8.6 firmware. I get the following messsage from the command prompt in windows:


C:\Python27\Scripts>pip install esptool
Requirement already satisfied (use --upgrade to upgrade): esptool in c:\python27\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): pyserial in c:\python27\lib\site-packages (from esptool)
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Python27\Scripts>

The following appears to have worked


"pip install esptool==1.2.1"

Post Reply