The docker image espressif/esp-matter:latest_idf_v5.2.1
is very large(15gb), but has everything required for building the projects. View the image at docker.
To start, install the required vscode extensions. With ctrl+shift+p
search for Dev Containers: Rebuild and Reopen in Container
To pass the usb device to the container on a windows host we can use usbipd
The DevContainer has runargs where we can pass the device to the container with: "--device=/dev/ttyACM0" Connecting the ESP32 to the container in this way allows us to program, monitor the device over UART. With the ESP32S3 we can also use the /dev/ttyACM0 device to debug over JTAG.
Use the esp-idf extension to build the project set in postCreateCommand
devcontainer.json line 28.
It is also possible to open up a terminal and issue commands like idf.py build
This folder is mounted by the devcontainer at /workspaces/{$THIS_FOLDER_NAME}
.
Add your project or example to this this folder and change the path for the "postCreateCommand": "echo \"bash -c /opt/esp/entrypoint.sh && cd /workspaces/{$THIS_FOLDER_NAME}\" >> /etc/bash.bashrc ",
devcontainer.json line 28.