Update docs to provide more details

This commit is contained in:
Norman ALIE
2023-10-30 11:52:12 +01:00
Unverified
parent 00bde7e7ec
commit a1cd3cf052
2 changed files with 92 additions and 21 deletions

View File

@@ -2,22 +2,50 @@
# Building in Docker
### Prerequisities
- only Docker
- Linux platform
- Docker
- Repository clone (refer to [README.md](/README.md))
No need to install ESP-IDF or anything else. All commands should be run in a project root.
No need to install ESP-IDF or anything else. All commands should be run in project root folder.
## menuconfig
## Configure, Build and Flash
### Start an interactive IDF environnement
In this interactive shell you can run menuconfig, build, flash and monitor command.
```
docker run --rm -it -v .:/project -w /project espressif/idf:v4.3.1 idf.py menuconfig
docker run --rm -it -v .:/project -w /project -v /dev:/dev --privileged espressif/idf:v4.3.5
```
## Build
### Configure
Then in your docker interactive shell, start by configuring for your platform. More info about the config in [README.md](/README.md#config).
```
docker run --rm -it -v .:/project -w /project espressif/idf:v4.3.1 idf.py build
idf.py menuconfig
```
Save with `<s>` and exit with `<q>`.
### Build, flash and monitor:
```
idf.py build flash monitor
```
<span style="color: orange">If idf.py can't access to USB devices, try to restart your docker interactive shell in sudo.</span>
### Exit
Exit IDF monitor mode: `<Ctrl+]>`
Exit docker interactive shell: `exit`
## Specific actions
If you want to execute a specific command or to generate a reusable .bin file.
### menuconfig
```
docker run --rm -it -v .:/project -w /project espressif/idf:v4.3.5 idf.py menuconfig
```
## Flash
### Build
```
docker run --rm -it -v .:/project -w /project espressif/idf:v4.3.5 idf.py build
```
### Flash
Mapping of serial port to container is not simple in windows but you can merge all generated `bin` files into single firmware and flash the firmware manually using some windows tool.
- [ESP Tool web flasher](https://espressif.github.io/esptool-js/)
- [ESP32 Flash Download tool](https://www.espressif.com/en/support/download/other-tools)
@@ -42,6 +70,8 @@ docker run
-it // runs interactive terminal
-v .:/project // maps current directory to /project in container
-w /project // sets working directory inside a container to /project
-v /dev:/dev // maps devices directory to acces USB and Serial devices inside docker
--privileged // grants docker rights to acces host devices
espressif/idf:v4.3.5 // image name + version
idf.py menuconfig // run menuconfig
```