Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-C6 - Add Wokwi Simulation #37

Closed
wants to merge 5 commits into from
Closed

Conversation

georgik
Copy link
Contributor

@georgik georgik commented Jul 22, 2024

The PR adds ESP32-C6 simulation to ESP32 projects. A developer can experience the simulation of the project directly in browser or a developer can work with Swift even without having real HW.

The following files were added to root of ESP projects:

  • wokwi.toml - points to UF2 binary within the project, so the simulator knows where to find the binary
  • diagram.json - contains description of HW connections for simulator to visualize it

A developer should build an UF2 binary image for the simulator using command:

idf.py uf2

A developer can open VS Code, Espressif IDE or CLion/JetBrains with Wokwi plugin and run the simulation.

Another option is to open the link directly from README which is pointing to release of the image and a developer can see the result in browser, including serial console output.

Example of the link: https://wokwi.com/experimental/viewer?diagram=https://raw.githubusercontent.com/georgik/swift-embedded-examples/feature/wokwi/esp32-led-blink-sdk/diagram.json&firmware=https://github.com/georgik/swift-embedded-examples/releases/download/v0.1/embedded-swift-esp32-c6-led-blink-sdk.uf2.bin

Topics to discuss before merging:

  • Binaries were uploaded to forked repo Releases. Do you prefere to upload it into official repo and change the links?
  • The same text about the simulation was added to both ESP32 projects. Would you recommend other method to share the simulator specific instructions?
  • The rgb lights in the simulator are not very visible, since Swift code is setting values from 0-16, I've created a request to change the baseline for simulation of those values, since it's perfectly visible on real HW.

I would appreciate your comments @rauhul, @kubamracek, @urish

Copy link
Collaborator

@rauhul rauhul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay reviewing this, I was out sick and then forgot!


Alternatively the project can be launched with pre-built binary in web browser:

[![ESP32-C6 Embedded Swift Example](assets/images/esp32-led-blink-sdk.webp)](https://wokwi.com/experimental/viewer?diagram=https://raw.githubusercontent.com/georgik/swift-embedded-examples/feature/wokwi/esp32-led-blink-sdk/diagram.json&firmware=https://github.com/georgik/swift-embedded-examples/releases/download/v0.1/embedded-swift-esp32-c6-led-blink-sdk.uf2.bin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update these paths to use URLs in-tree?

@rauhul
Copy link
Collaborator

rauhul commented Sep 26, 2024

@georgik any updates on this?

@georgik
Copy link
Contributor Author

georgik commented Nov 11, 2024

We have some new updates for this topic to make it even simpler. I will create new PR.

@georgik georgik closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants