13

I am working on an esp project and compiled my code by using the esp32s2 toolchain and created a binary that ready to run on a real device. But I don't have a real device to test my binary. Is there any simulator to simulate the ESP32-S2 chip or the ESP32 chip?

SayMyName
  • 461
  • 5
  • 17

3 Answers3

16

You can use Wokwi to simulate the ESP32, and soon also the ESP32-S2.The Wokwi is a free online simulator for electronics, and it runs in your browser. This means you can simulate code that interacts with 3rd-party sensors, display modules, LEDs and many other common parts. There's also initial support for WiFi simulation, and the developers are working on extending it to support connecting to any host on the internet (e.g. HTTPS/MQTT)

Simulator Examples

Arduino Examples

Blink

Seven segment counter

APA102 Color Cycles (TinyPico Board)

WiFi Scanning

MicroPython Examples

SSD1306 Example

NeoPixels

WiFi Scanning

ESP-IDF Examples

The following examples use the ESP-IDF functions. They are compiled using Arduino ESP32 Core:

Blink using FreeRTOS API

Binary LED counter using FreeRTOS tasks

GPIO button input + interrupts

https://docs.wokwi.com/guides/esp32

enter image description here enter image description here
enter image description here

MatthiasG
  • 4,434
  • 3
  • 27
  • 47
User323693
  • 261
  • 2
  • 5
  • Implementation of bouncing buttons looks missing :) – cly Jan 02 '22 at 22:54
  • 1
    @cly https://wokwi.com/arduino/projects/288681423014986248 here is the example for bouncing and debouncing Trick is to enable the debounce parameter in the diagram.json file... "bounce": "0" – User323693 Jan 03 '22 at 11:29
8

You can try QEMU from https://github.com/espressif/qemu or https://github.com/Ebiroll/qemu_esp32

Not sure if they are supporting ESP32-S2, but it seems to be working with ESP32.

ESP_Minatel
  • 106
  • 1
0

There's QEMU support for ESP32 and most recently added ESP32C3