Skip to content

Commit 2c4a93f

Browse files
committed
ports/esp32/README.md: Updated to match esp32
1 parent b94d831 commit 2c4a93f

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

ports/esp32/README.md

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ a task under FreeRTOS.
77

88
Supported features include:
99
- REPL (Python prompt) over UART0.
10-
- 16k stack for the MicroPython task and 64k Python heap.
10+
- 16k stack for the MicroPython task and 96k Python heap.
1111
- Many of MicroPython's features are enabled: unicode, arbitrary-precision
1212
integers, single-precision floats, complex numbers, frozen bytecode, as
1313
well as many of the internal modules.
14-
- Internal filesystem using the flash (currently 256k in size).
15-
- The machine module with basic GPIO and bit-banging I2C, SPI support.
14+
- Internal filesystem using the flash (currently 2M in size).
15+
- The machine module with GPIO, UART, SPI, software I2C, ADC, DAC, PWM,
16+
TouchPad, WDT and Timer.
17+
- The network module with WLAN (WiFi) support.
1618

1719
Development of this ESP32 port was sponsored in part by Microbric Pty Ltd.
1820

@@ -30,20 +32,36 @@ Follow the guide "Setting Up ESP-IDF", for Windows, Mac or Linux. You
3032
only need to perform up to "Step 2" of the guide, by which stage you
3133
should have installed the cross-compile and cloned the ESP-IDF repository.
3234

35+
If you are on a Windows machine then the
36+
[Windows Subsystem for Linux](https://msdn.microsoft.com/en-au/commandline/wsl/install_guide)
37+
is the most efficient way to install the ESP32 toolchain and build the project.
38+
If you use WSL then follow the
39+
[Linux guidelines](http://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html)
40+
for the ESP-IDF instead of the Windows ones.
41+
3342
Be advised that the ESP-IDF is still undergoing changes and only some
3443
versions are supported. To find which build is compatible refer to the line
3544
in the makefile containing the following:
3645
```
3746
ESPIDF_SUPHASH := <Current supported ESP-IDF commit hash>
3847
```
3948
After finishing "Step 2" you can roll back your current build of
40-
the ESP-IDF using:
49+
the ESP-IDF (and update the submodules accordingly) using:
4150
```
4251
$ git checkout <Current supported ESP-IDF commit hash>
52+
$ git submodule update --recursive
4353
```
4454
Note that you will get a warning when building the code if the ESP-IDF
4555
version is incorrect.
4656

57+
The Espressif ESP-IDF instructions above only install pyserial for Python 2,
58+
so if you're running Python 3 or a non-system Python you'll also need to
59+
install `pyserial` (or `esptool`) so that the Makefile can flash the board
60+
and set parameters:
61+
```bash
62+
$ pip install pyserial
63+
```
64+
4765
Once everything is set up you should have a functioning toolchain with
4866
prefix xtensa-esp32-elf- (or otherwise if you configured it differently)
4967
as well as a copy of the ESP-IDF repository.
@@ -83,9 +101,17 @@ this repository):
83101
$ make -C mpy-cross
84102
```
85103

104+
The ESP32 port has a dependency on Berkeley DB, which is an external
105+
dependency (git submodule). You'll need to have git initialize that
106+
module using the commands:
107+
```bash
108+
$ git submodule init lib/berkeley-db-1.xx
109+
$ git submodule update
110+
```
111+
86112
Then to build MicroPython for the ESP32 run:
87113
```bash
88-
$ cd esp32
114+
$ cd ports/esp32
89115
$ make
90116
```
91117
This will produce binary firmware images in the `build/` subdirectory
@@ -97,6 +123,13 @@ for your particular ESP32 module for how to do this. The serial port and
97123
flash settings are set in the `Makefile`, and can be overridden in your
98124
local `makefile`; see above for more details.
99125

126+
You will also need to have user permissions to access the /dev/ttyUSB0 device.
127+
On Linux, you can enable this by adding your user to the `dialout` group,
128+
and rebooting or logging out and in again.
129+
```bash
130+
$ sudo adduser <username> dialout
131+
```
132+
100133
If you are installing MicroPython to your module for the first time, or
101134
after installing any other firmware, you should first erase the flash
102135
completely:
@@ -118,7 +151,7 @@ You can get a prompt via the serial port, via UART0, which is the same UART
118151
that is used for programming the firmware. The baudrate for the REPL is
119152
115200 and you can use a command such as:
120153
```bash
121-
$ picocom /dev/ttyUSB0
154+
$ picocom -b 115200 /dev/ttyUSB0
122155
```
123156

124157
Configuring the WiFi and using the board
@@ -160,9 +193,9 @@ import machine
160193
antenna = machine.Pin(16, machine.Pin.OUT, value=0)
161194
```
162195

163-
164196
Troubleshooting
165197
---------------
166198

167-
* Continuous reboots after programming: Ensure FLASH_MODE is correct for your board (e.g. ESP-WROOM-32 should be DIO). Perform a `make clean`, rebuild, redeploy.
168-
199+
* Continuous reboots after programming: Ensure FLASH_MODE is correct for your
200+
board (e.g. ESP-WROOM-32 should be DIO). Then perform a `make clean`, rebuild,
201+
redeploy.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy