Skip to content

Commit 5630778

Browse files
committed
esp8266: Update docs for esptool 1.2.1/SDK 2.0 (--flash_size=detect).
1 parent 933198c commit 5630778

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

docs/esp8266/tutorial/intro.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ device before putting on new MicroPython firmware.
5454

5555
Currently we only support esptool.py to copy across the firmware. You can find
5656
this tool here: `<https://github.com/themadinventor/esptool/>`__, or install it
57-
using pip::
57+
using pip (at least version 1.2.1 is required)::
5858

5959
pip install esptool
6060

@@ -69,7 +69,7 @@ Using esptool.py you can erase the flash with the command::
6969

7070
And then deploy the new firmware using::
7171

72-
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=8m 0 esp8266-2016-05-03-v1.8.bin
72+
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-2016-05-03-v1.8.bin
7373

7474
You might need to change the "port" setting to something else relevant for your
7575
PC. You may also need to reduce the baudrate if you get errors when flashing
@@ -80,7 +80,7 @@ For some boards with a particular FlashROM configuration (e.g. some variants of
8080
a NodeMCU board) you may need to use the following command to deploy
8181
the firmware (note the ``-fm dio`` option)::
8282

83-
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=8m -fm dio 0 esp8266-2016-05-03-v1.8.bin
83+
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dio 0 esp8266-2016-05-03-v1.8.bin
8484

8585
If the above commands run without error then MicroPython should be installed on
8686
your board!
@@ -138,6 +138,8 @@ after it, here are troubleshooting recommendations:
138138
* If lower baud rate didn't help, you may want to try older version of
139139
esptool.py, which had a different programming algorithm::
140140
pip install esptool==1.0.1
141+
This version doesn't support ``--flash_size=detect`` option, so you will
142+
need to specify FlashROM size explicitly (in megabits).
141143

142144
* The ``--flash_size`` option in the commands above is mandatory. Omitting
143145
it will lead to a corrupted firmware.

esp8266/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ $ make deploy
7070
```
7171
This will use the `esptool.py` script to download the images. You must have
7272
your ESP module in the bootloader mode, and connected to a serial port on your PC.
73-
The default serial port is `/dev/ttyACM0`, flash mode is `qio` and flash size is `8m`.
74-
To specify other values, use, eg:
73+
The default serial port is `/dev/ttyACM0`, flash mode is `qio` and flash size is
74+
`detect` (auto-detect based on Flash ID). To specify other values, use, eg (note
75+
that flash size is in megabits):
7576
```bash
76-
$ make PORT=/dev/ttyUSB0 FLASH_MODE=qio FLASH_SIZE=8m deploy
77+
$ make PORT=/dev/ttyUSB0 FLASH_MODE=qio FLASH_SIZE=32m deploy
7778
```
7879

79-
The image produced is `firmware-combined.bin`, to be flashed at 0x00000.
80+
The image produced is `build/firmware-combined.bin`, to be flashed at 0x00000.
8081

8182
First start
8283
-----------

0 commit comments

Comments
 (0)