GitXplorerGitXplorer
S

esp-idf-devcontainer

public
6 stars
3 forks
0 issues

Commits

List of commits on branch main.
Unverified
e8aa75381268aafbce9348f5eab18650f55b5311

Update .devcontainer/devcontainer.json

aadolfogc committed 2 years ago
Verified
f3cc83d420f6127f9577689561bd8dc283d67d72

Merge pull request #2 from ivancmz/add_c_cpp_extension

SSergioGasquez committed 2 years ago
Unverified
17a791c7202eef679d9df81aea8cbeb80120f1ff

Add C/C++ extension and c_cpp_properties.json

committed 2 years ago
Unverified
a54cfb8a10cad7904d7ea7ff95078f5d346e0bd0

Update debug session name

SSergioGasquez committed 3 years ago
Unverified
e9f2310c8be68e1cca13c1d3a446eb17b49efa25

Fix typos

SSergioGasquez committed 3 years ago
Unverified
034b4e2aac669fb3f16c80a481ce0ca5e45a20dd

Remove zip files

SSergioGasquez committed 3 years ago

README

The README file for this repository.

esp-idf-devcontainer

This repository is a Dev Container version of espressif/esp-idf-template that supports:

For instructions on how to integrate dev containers to existing repositories, see this section.

Espressif IDF extension is already configured in the Dev Container and can be used for configuring and building the project but flashing with the extension is not possible.

Quick Start

Setup

Before opening the Dev Container, please set up your desired configuration:

  1. Choose ESP_BOARD and ESP_IDF_VERSION on .devcontainer/devcontainer.json and .gitpod.Dockerfile.
  2. Choose ESP_BOARD on run-wokwi.sh and flash.sh
  3. If you want to use some parts in Wokwi and want to use a custom Wokwi project, update WOKWI_PROJECT_ID on run-wokwi.sh.

    Note

    If no project is specified the selected chip will be used.

  4. If you want to have debugging support with IDE, select the proper gdbpath in launch.json

After setting the repository, run the Dev Container, see instructions:

  • Gitpod: Gitpod does not require any special setup, it only requires an account which can be created with Bitbucket, GitLab or GitHub.
  • VS Code Dev Containers: See installation and the quick start sections.
  • GitHub Codespaces: The user needs to be part of the Codespaces beta or the repository must live under an organization.

Build

  • UI approach:
    • Use the build button from the extension in the status bar.
  • Terminal approach:
    idf.py build

Flash

  • UI approach:
    • From the Command Palette (Ctrl-Shift-P or Cmd-Shift-P) run the Tasks: Run Task command and select Build & Flash.
    • From UI: Press Build & Flash on the left side of the Status Bar.
  • Terminal approach:
    ./flash.sh
    
  • Use idf.py (idf.py -p PORT [-b BAUD] flash) from the host device.
  • Use Adafruit ESPTool:
    1. Open the Adafruit ESPTool flashing tool.
    2. Choose the desired baudrate.
    3. Connect to the serial port of the ESP board.
    4. Upload the generated binary.
  • Any alternative flashing method from host machine.

Wokwi Simulator

Warning

ESP32-S3 is not available in Wokwi

  • UI approach:

    • From UI: Press Build & Run Wokwi Simulation on the left side of the Status Bar.
    • From the Command Palette (Ctrl-Shift-P or Cmd-Shift-P) run the Tasks: Run Test Task command
    • With Ctrl-Shift-, or Cmd-Shift-,

      Note

      This Shortcut is not available in Gitpod by default.

    • From the Command Palette (Ctrl-Shift-P or Cmd-Shift-P) run the Tasks: Run Task command and select Build & Run Wokwi Simulation.
  • Terminal approach:

    bash wokwi/run-wokwi.sh

Warning

The simulation will pause if the browser tab is in the background.This may affect the execution, specially when debuging.

Debuging with Wokwi

Wokwi offers debugging with GDB.

  • UI approach:
    1. Run the Wokwi Simulation
    2. Go to Run and Debug section of the IDE (Ctrl-Shift-D or Cmd-Shift-D)
    3. Start Debugging (F5)

    ** Note **

    If using another target be sure to modify gdbpath of .vscode/launch.json.

  • Terminal approach:
    $HOME/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb build/app-template.elf -ex "target remote localhost:9333"

    ** Note **

    If using another target be sure to update the command, use gdbpath propierty of .vscode/launch.json as reference.

Integrating devcontainer in existing repositories

  • For Dev Container support in VS Code and GH Codespaces:
    • Copy the .devcontainer folder to your repository.
  • For Dev Container support in Gitpod:
    • Copy the .gitpod.yml and .gitpod.Dockerfile files to your repository.
  • For task and debugging integration:
    • Copy .vscode folder.
    • Copy build.sh, flash.sh, run-wokwi.sh files.