pull/6416/merge
Francois Gervais 2024-03-16 09:05:15 +08:00 zatwierdzone przez GitHub
commit a5cdcffb93
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 44 dodań i 0 usunięć

Wyświetl plik

@ -156,6 +156,50 @@ $ make BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM_OCT
```
Alternative: Building the firmware with Docker
----------------------------------------------
If you are already using Docker or don't mind setting it up, it is actually
possible to build the firmware using the official Espressif images.
Using this method, none of the previous steps are required.
1. Go at the root of micropython's project and run:
```bash
$ docker run --rm -it -v $(pwd):/project -w /project \
--user $(id -u):$(id -g) -v /etc/group:/etc/group -v /etc/passwd:/etc/passwd \
--device /dev/ttyUSB0:/dev/ttyUSB0 espressif/idf:v3.3.2 bash
```
Notes: \
a. The uid and gid are passed in so the resulting compilation artifacts belong
to your user. \
b. The `group` and `passwd` files are mapped inside simply so your prompt and
other things refering to uid/gid look beautiful. It can safely be omitted. \
c. The serial device is mapped inside so `make deploy` works.
2. Build the MicroPython cross-compiler
```bash
$ cd mpy-cross
$ make mpy-cross
$ cd -
```
3. Build MicroPython e.g. the TinyPICO port
```bash
$ cd ports/esp32/
$ make BOARD=TINYPICO PYTHON2=python
```
4. Flash the MicroPython firmware
```bash
$ make BOARD=TINYPICO PYTHON2=python deploy
```
Getting a Python prompt on the device
-------------------------------------