Bienvenido a todos, Rust se ha convertido en una solución para diversos sectores del desarrollo de software y la tecnología, en especial para los sistemas embebidos, esta es una prueba del simulador Wokwi usando el ESP32-S3 con un display ILI9341 conectado por SPI, es una aplicacion bare metal no-std, para más detalle visita Rust on ESP Community. Espero que te sirva como guía de aprendizaje y pueda ayudarte al máximo para que te abra las puertas a nuevas oportunidades como desarrollador de Rust Embedded🦀.
This repository offers Dev Containers supports for:
- Gitpod
- "Open in Gitpod" button
- VS Code Dev Containers
- GitHub Codespaces
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
. Further customization of the Dev Container can
be achived, see .devcontainer.json reference.
When using Dev Containers, some tooling to facilitate building, flashing and simulating in Wokwi is also added.
-
Terminal approach:
scripts/build.sh [debug | release]
If no argument is passed,
release
will 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-P
orCmd-Shift-P
) run theTasks: Run Build Task
command. Terminal
->Run Build Task
in the menu.- With
Ctrl-Shift-B
orCmd-Shift-B
. - From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Task
command and selectBuild
. - From UI: Press
Build
on the left side of the Status Bar.
- From the Command Palette (
Note
When using GitHub Codespaces, we need to make the ports public, see instructions.
-
Terminal approach:
-
Using
flash.sh
script:scripts/flash.sh [debug | release]
If no argument is passed,
release
will be used as default
-
-
UI approach:
- From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Task
command and selectBuild & Flash
. - From UI: Press
Build & Flash
on the left side of the Status Bar.
- From the Command Palette (
-
Any alternative flashing method from host machine.
The Dev Container includes the Wokwi Vs Code installed, hence you can simulate your porjects by:
- Press
F1
- Run
Wokwi: Start Simulator
For more information and details on how use the Wokwi extension, see Getting Started and Debugging your code Chapter of the Wokwi documentation.
Warning
ESP32-C2 is not supported in Wokwi yet.
Warning
Gitpod does not, yet, support Wokwi extension hence Wokwi simulation is not available in Gitpod
wokwi-server
is part of the Gitpod image so you can run:
wokwi-server --chip <chip> <pathToElf>
If you want to run your binary in a custom Wokwi project:
wokwi-server --chip <chip> --id <projectId> <pathToElf>
Warning
The simulation will pause if the browser tab is in the background.This may affect the execution, specially when debuging.
Wokwi offers debugging with GDB.
-
Terminal approach:
$HOME/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gdb target/xtensa-esp32s3-espidf/debug/esp32_s3_with_ili9341 -ex "target remote localhost:9333"
-
UI approach:
- Run the Wokwi Simulation in
debug
profile - Go to
Run and Debug
section of the IDE (Ctrl-Shift-D or Cmd-Shift-D
) - Start Debugging by pressing the Play Button or pressing
F5
- Choose the proper user:
esp
when using VS Code or GitHub Codespacesgitpod
when using Gitpod
- Run the Wokwi Simulation in