{"id":15417026,"url":"https://github.com/sergiogasquez/esp-rs-devcontainer","last_synced_at":"2025-04-19T14:34:38.892Z","repository":{"id":39637654,"uuid":"469822611","full_name":"SergioGasquez/esp-rs-devcontainer","owner":"SergioGasquez","description":"Container environment integrated with Visual Studio Code to develop applications for ESP boards using Rust","archived":false,"fork":false,"pushed_at":"2023-08-01T08:18:58.000Z","size":1471,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T08:43:35.460Z","etag":null,"topics":["embedded","esp32","esp8266","espressif","rust","vscode"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SergioGasquez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-14T16:45:55.000Z","updated_at":"2025-02-23T17:22:15.000Z","dependencies_parsed_at":"2024-10-21T15:40:21.151Z","dependency_job_id":null,"html_url":"https://github.com/SergioGasquez/esp-rs-devcontainer","commit_stats":{"total_commits":62,"total_committers":2,"mean_commits":31.0,"dds":"0.032258064516129004","last_synced_commit":"8a98b06e04dc4d9957b2ef5e243ff8133c31ebec"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Fesp-rs-devcontainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Fesp-rs-devcontainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Fesp-rs-devcontainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Fesp-rs-devcontainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SergioGasquez","download_url":"https://codeload.github.com/SergioGasquez/esp-rs-devcontainer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249715499,"owners_count":21315055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","esp32","esp8266","espressif","rust","vscode"],"created_at":"2024-10-01T17:14:27.502Z","updated_at":"2025-04-19T14:34:38.852Z","avatar_url":"https://github.com/SergioGasquez.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esp-rs-devcontainer\n\n\u003e **Warning**\n\u003e\n\u003e This repository is outdated and was only an initial PoC. If you want to use\n\u003e DevContainers in esp-rs, see\n\u003e [Using Dev Containers in the templates](https://esp-rs.github.io/book/writing-your-own-application/generate-project/index.html#using-dev-containers-in-the-templates)\n\u003e section of The Rust on ESP Book.\n\n\nThis repository offers template Dockerfiles for [Dev Containers](https://code.visualstudio.com/docs/remote/containers), with the\nenvironment needed to develop applications for [ESP boards using Rust](https://github.com/esp-rs),\nin VS Code, [Gitpod](https://www.gitpod.io/) and [GitHub Codespaces](https://docs.github.com/es/codespaces/developing-in-codespaces).\n\nFor instructions on how to integrate devcontainers to existing repositories, see\n[this section](#integrating-devcontainer-in-existing-repositories).\n\nThis repository is can be used as template repository.\n\n# Starting a new project\nUsing [cargo-generate](https://github.com/cargo-generate/cargo-generate) with one\nof the available tempaltes is the recommended way to start new projects:\n- [esp-idf-template](https://github.com/esp-rs/esp-idf-template): ESP-IDF Template\n  - `cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo`\n- [esp-template](https://github.com/esp-rs/esp-template): `no_std` template.\n  - `cargo generate https://github.com/esp-rs/esp-template`\n\nSee [project section of awesome-esp-rust](https://github.com/esp-rs/awesome-esp-rust#projects) for inspiration in other projects\n\n\n# Integrating devcontainer in existing repositories\n- For devcontainer support in VSCode and GH Codespaces:\n  - Copy the `.devcontainer` folder to your repository.Devcontainers in Gitpod:\n- For devcontainer support in Gitpod:\n  - Copy the `.gitpod.yml` and `.gitpod.Dockergile` files to your repository.\n    - For instructions about how to add a \"Open in Gitpod\" button, see their\n      [official documentation](https://www.gitpod.io/docs/getting-started#open-in-gitpod-button)\n- For task and debugging integration:\n  - Copy `.vscode` folder.\n  - Copy `build.sh`, `flash.sh`, `run-wokwi.sh` files.\nAfter copiying the desired files, go through the [Setup section](#setup)\n\n## Setup\nThe repository supports:\n-  [Gitpod](https://gitpod.io/)\n   - [\"Open in Gitpod\" button](https://www.gitpod.io/docs/getting-started#open-in-gitpod-button)\n-  [Vs Code Devcontainers](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-an-existing-folder-in-a-container)\n-  [GitHub Codespaces](https://docs.github.com/en/codespaces/developing-in-codespaces/creating-a-codespace)\n    \u003e **Note**\n    \u003e\n    \u003e In [order to use GitHub Codespaces](https://github.com/features/codespaces#faq)\n    \u003e the project needs to be published in a GitHub repository and the user needs\n    \u003e to be part of the Codespaces beta or have the project under an organization.\n    \u003e\n    \u003e When using GitHub Codespaces, we need to make the ports\n    \u003e public, [see instructions](https://docs.github.com/en/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#sharing-a-port).\n\nIf using VS Code or GitHub Codespaces, you can pull the image instead of building it\nfrom the Dockerfile by selecting the `image` property instead of `build` in\n`.devcontainer/devcontainer.json`. Further customization of the Dev Container can\nbe achived, see [.devcontainer.json reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference).\n\nBefore opening the Dev Container, address all the ToDos by searching for `TODO` in the project\nand update those fields.\n- `build.sh`: Update the ESP_BOARD\n- `flash.sh`: Update project path, ESP_BOARD and ESP_ELF\n- `run-wokwi.sh`: Update project path, ESP_BOARD and ESP_ELF\n- `launch.json`: Update executable path and GDB path\n\nBy now, the Dev Container should be ready to run and the environment should be ready\nto use.\n## Build\n- Terminal approach:\n\n    ```\n    ./build.sh  [debug | release]\n    ```\n    \u003e If no argument is passed, `release` will be used as default\n\n\n-  UI approach:\n\n    The default build task is already set to build the project, and it can be used\n    in VsCode and Gitpod:\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Build Task` command.\n    - `Terminal`-\u003e `Run Build Task` in the menu.\n    - With `Ctrl-Shift-B` or `Cmd-Shift-B`.\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Task` command and\n    select `Build`.\n    - From UI: Press `Build` on the left side of the Status Bar.\n\n## Flash\n\n- Terminal approach:\n  - Using `flash.sh` script:\n\n    ```\n    ./flash.sh [debug | release]\n    ```\n    \u003e If no argument is passed, `release` will be used as default\n\n- UI approach:\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Task` command and\n    select `Build \u0026 Flash`.\n    - From UI: Press `Build \u0026 Flash` on the left side of the Status Bar.\n\n\n## Wokwi Simulation\n\n\u003e **Warning**\n\u003e\n\u003e  ESP32-S3 is not available in Wokwi\n\n- Terminal approach:\n\n    ```\n    ./run-wokwi.sh [debug | release]\n    ```\n    \u003e If no argument is passed, `release` will be used as default.\n\n- UI approach:\n\n    The default test task is already set to build the project, and it can be used\n    in VsCode and Gitpod:\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Test Task` command\n    - With `Ctrl-Shift-,` or `Cmd-Shift-,`\n        \u003e Note: This Shortcut is not available in Gitpod by default.\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Task` command and\n    select `Build \u0026 Run Wokwi`.\n    - From UI: Press `Build \u0026 Run Wokwi` on the left side of the Status Bar.\n\n### Debuging with Wokwi\n\nWokwi offers debugging with GDB.\n\n- Terminal approach:\n    ```\n    $HOME/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb target/xtensa-esp32-espidf/release/brno-public-transport -ex \"target remote localhost:9333\"\n    ```\n    \u003e Update the previous command with your toolchain and project elf file.\n\n    \u003e [Wokwi Blog: List of common GDB commands for debugging.](https://blog.wokwi.com/gdb-avr-arduino-cheatsheet/?utm_source=urish\u0026utm_medium=blog)\n- UI approach:\n\n    Debug using with VsCode or Gitpod is also possible:\n    1. Run the Wokwi Simulation in `debug` profile.\n        \u003e Note that the simulation will pause if the browser tab is on the background.\n    2. Go to `Run and Debug` section of the IDE (`Ctrl-Shift-D or Cmd-Shift-D`).\n    3. Start Debugging (`F5`).\n    4. Choose the proper user:\n        - `esp` when using VsCode or GitHub Codespaces.\n        - `gitpod` when using Gitpod.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiogasquez%2Fesp-rs-devcontainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiogasquez%2Fesp-rs-devcontainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiogasquez%2Fesp-rs-devcontainer/lists"}