Skip to content

Commit c86075d

Browse files
committed
ports/esp32: Remove the --chip option from writing flash instructions.
esptool.py is smart enough to error out if you try to flash a .bin file that belongs to the wrong target SoC. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent 750532d commit c86075d

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

ports/esp32/boards/deploy.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,40 @@ If you are putting MicroPython on your board for the first time then you should
66
first erase the entire flash using:
77

88
```bash
9-
esptool.py --chip {mcu} erase_flash
9+
esptool.py erase_flash
1010
```
1111

12+
`esptool.py` will try to detect the serial port with the ESP32 automatically,
13+
but if this fails or there might be more than one Espressif-based device
14+
attached to your computer then pass the `--port` option with the name of the
15+
target serial port. For example:
16+
17+
```bash
18+
esptool.py --port PORTNAME erase_flash
19+
```
20+
21+
* On Linux, the port name is usually similar to `/dev/ttyUSB` or `/dev/ttyACM0`.
22+
* On Mac, the port name is usually similar to `/dev/cu.usbmodem01`.
23+
* On Windows, the port name is usually similar to `COM4`.
24+
1225
### Flashing
1326

1427
Then deploy the firmware to the board, starting at address {flash_offset}:
1528

1629
```bash
17-
esptool.py --chip {mcu} --baud 460800 write_flash {flash_offset} ESP32_BOARD_NAME-DATE-VERSION.bin
30+
esptool.py --baud 460800 write_flash {flash_offset} ESP32_BOARD_NAME-DATE-VERSION.bin
1831
```
1932

2033
Replace `ESP32_BOARD_NAME-DATE-VERSION.bin` with the `.bin` file downloaded from this page.
2134

22-
### Troubleshooting
23-
24-
`esptool.py` will try to detect the serial port with the ESP32 automatically. If
25-
detection is unsuccessful then you can check for the port name manually and then pass the
26-
`--port` option to esptool.py. For example:
35+
As above, if `esptool.py` can't automatically detect the serial port
36+
then you can pass it explicitly on the command line instead. For example:
2737

2838
```bash
29-
esptool.py --port PORTNAME --chip {mcu} --baud 460800 write_flash {flash_offset} ESP32_BOARD_NAME-DATE-VERSION.bin
39+
esptool.py --port PORTNAME --baud 460800 write_flash {flash_offset} ESP32_BOARD_NAME-DATE-VERSION.bin
3040
```
3141

32-
* On Linux, the port name is usually similar to `/dev/ttyUSB` or `/dev/ttyACM0`.
33-
* On Mac, the port name is usually similar to `/dev/cu.usbmodem01`.
34-
* On Windows, the port name is usually similar to `COM4`.
42+
### Troubleshooting
3543

3644
If flashing starts and then fails partway through, try removing the `--baud
3745
460800` option to flash at the slower default speed.

0 commit comments

Comments
 (0)