| .cargo | ||
| docs | ||
| scripts | ||
| secret | ||
| src | ||
| .gitignore | ||
| build.rs | ||
| Cargo.toml | ||
| rust-toolchain.toml | ||
| sdkconfig.defaults | ||
e_bike_tracker_device
Dev Containers
This repository offers Dev Containers supports for:
Note
In order to use Gitpod the project needs to be published in a GitLab, GitHub, or Bitbucket repository.
In order to use GitHub Codespaces the project needs to be published in a GitHub repository and the user needs to be part of the Codespaces beta or have the project under an organization.
If using VS Code or GitHub Codespaces, you can pull the image instead of building it
from the Dockerfile by selecting the image property instead of build in
.devcontainer/devcontainer.json.
When using Dev Containers, some tooling to facilitate building, flashing and simulating in Wokwi is also added.
Build
-
Terminal approach:
scripts/build.sh [debug | release]If no argument is passed,
releasewill be used as default -
UI approach:
The default build task is already set to build the project, and it can be used in VS Code and Gitpod:
- From the Command Palette (
Ctrl-Shift-PorCmd-Shift-P) run theTasks: Run Build Taskcommand. Terminal->Run Build Taskin the menu.- With
Ctrl-Shift-BorCmd-Shift-B. - From the Command Palette (
Ctrl-Shift-PorCmd-Shift-P) run theTasks: Run Taskcommand and selectBuild. - From UI: Press
Buildon the left side of the Status Bar.
- From the Command Palette (
Flash
Note
When using GitHub Codespaces, we need to make the ports public, see instructions.
-
Terminal approach:
-
Using
flash.shscript:scripts/flash.sh [debug | release]If no argument is passed,
releasewill be used as default
-
-
UI approach:
- From the Command Palette (
Ctrl-Shift-PorCmd-Shift-P) run theTasks: Run Taskcommand and selectBuild & Flash. - From UI: Press
Build & Flashon the left side of the Status Bar.
- From the Command Palette (
-
Any alternative flashing method from host machine.
Wokwi Simulation
When using a custom Wokwi project, please change the WOKWI_PROJECT_ID in
run-wokwi.sh. If no project id is specified, a DevKit for esp32 will be
used.
Warning
ESP32-S3 is not available in Wokwi
-
Terminal approach:
scripts/run-wokwi.sh [debug | release]If no argument is passed,
releasewill be used as default -
UI approach:
The default test task is already set to build the project, and it can be used in VS Code and Gitpod:
- From the Command Palette (
Ctrl-Shift-PorCmd-Shift-P) run theTasks: Run Test Taskcommand - With
Ctrl-Shift-,orCmd-Shift-,Note
This Shortcut is not available in Gitpod by default.
- From the Command Palette (
Ctrl-Shift-PorCmd-Shift-P) run theTasks: Run Taskcommand and selectBuild & Run Wokwi. - From UI: Press
Build & Run Wokwion the left side of the Status Bar.
- From the Command Palette (
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.
-
Terminal approach:
$HOME/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb target/xtensa-esp32-espidf/debug/e_bike_tracker_device -ex "target remote localhost:9333" -
UI approach:
- Run the Wokwi Simulation in
debugprofile - Go to
Run and Debugsection of the IDE (Ctrl-Shift-D or Cmd-Shift-D) - Start Debugging by pressing the Play Button or pressing
F5 - Choose the proper user:
espwhen using VS Code or GitHub Codespacesgitpodwhen using Gitpod
- Run the Wokwi Simulation in