Skip to content

Commit 0901e5a

Browse files
committed
update instructions on simulation by Wokwi
1 parent 4a54385 commit 0901e5a

File tree

8 files changed

+80
-65
lines changed

8 files changed

+80
-65
lines changed

.vscode/launch.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "esp32_c3_lcdkit - Wokwi GDB",
6+
"type": "cppdbg",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/build.esp32_c3_lcdkit/esp32-sdl3-swift-example.elf",
9+
"cwd": "${workspaceFolder}",
10+
"MIMode": "gdb",
11+
"miDebuggerPath": "${command:espIdf.getToolchainGdb}",
12+
"miDebuggerServerAddress": "localhost:3333"
13+
},
14+
{
15+
"name": "esp32_c6_devkit - Wokwi GDB",
16+
"type": "cppdbg",
17+
"request": "launch",
18+
"program": "${workspaceFolder}/build.esp32_c6_devkit/esp32-sdl3-swift-example.elf",
19+
"cwd": "${workspaceFolder}",
20+
"MIMode": "gdb",
21+
"miDebuggerPath": "${command:espIdf.getToolchainGdb}",
22+
"miDebuggerServerAddress": "localhost:3333"
23+
},
24+
{
25+
"name": "esp32_p4_function_ev_board - Wokwi GDB",
26+
"type": "cppdbg",
27+
"request": "launch",
28+
"program": "${workspaceFolder}/build.esp32_p4_function_ev_board/esp32-sdl3-swift-example.elf",
29+
"cwd": "${workspaceFolder}",
30+
"MIMode": "gdb",
31+
"miDebuggerPath": "${command:espIdf.getToolchainGdb}",
32+
"miDebuggerServerAddress": "localhost:3333"
33+
},
34+
]
35+
}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ idf.py @boards/esp32_c6_devkit.cfg menuconfig
6969
idf.py @boards/esp32_c6_devkit.cfg flash monitor
7070
```
7171

72+
### Run simulation in VS Code
73+
74+
- Build the project, to get binaries for simulation.
75+
- Install [Wokwi for VS Code](https://docs.wokwi.com/vscode/getting-started/).
76+
- Open file `boards/esp32_.../diagram.json`.
77+
- Click Play button to start simulation.
78+
- Click Pause button to freeze simulation and display states of GPIOs.
79+
7280
## Credits
7381

7482
- Graphical assets: https://opengameart.org/content/platformer-tiles

boards/esp32_c3_lcdkit/wokwi.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Reference: https://docs.wokwi.com/vscode/project-config
33
[wokwi]
44
version = 1
5-
firmware = 'build.esp32_c3_lcdkit/flasher_args.json'
6-
elf = 'build.esp32_c3_lcdkit/esp32-sdl3-swift-example.elf'
7-
gdbServerPort=3333
5+
firmware = '../../build.esp32_c3_lcdkit/flasher_args.json'
6+
elf = '../../build.esp32_c3_lcdkit/esp32-sdl3-swift-example.elf'
7+
# gdbServerPort=3333

boards/esp32_c6_devkit/diagram.json

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
{
2-
"version": 1,
3-
"author": "Juraj Michálek",
4-
"editor": "wokwi",
5-
"parts": [
6-
{
7-
"type": "board-esp32-c6-devkitc-1",
8-
"id": "esp",
9-
"top": -494.32,
10-
"left": -455.03
11-
},
12-
{
13-
"type": "wokwi-ili9341",
14-
"id": "lcd1",
15-
"top": -546.22,
16-
"left": -134.92
17-
}
18-
],
19-
"connections": [
20-
[ "esp:TX", "$serialMonitor:RX", "", [] ],
21-
[ "esp:RX", "$serialMonitor:TX", "", [] ],
22-
[ "esp:3V3", "lcd1:VCC", "green", [] ],
23-
[ "esp:GND.1", "lcd1:GND", "black", [] ],
24-
[ "esp:6", "lcd1:SCK", "blue", [] ],
25-
[ "esp:7", "lcd1:MOSI", "orange", [] ],
26-
[ "esp:20", "lcd1:CS", "red", [] ],
27-
[ "esp:21", "lcd1:D/C", "magenta", [] ],
28-
[ "esp:3", "lcd1:RST", "yellow", [] ],
29-
[ "lcd1:LED", "esp:3V3", "white", [] ]
30-
],
31-
"serialMonitor": { "display": "terminal" },
32-
"dependencies": {}
33-
}
2+
"version": 1,
3+
"author": "Juraj Michálek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-c6-devkitc-1",
8+
"id": "esp",
9+
"top": -494.32,
10+
"left": -455.03,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ili9341", "id": "lcd1", "top": -546.22, "left": -134.92, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp:TX", "$serialMonitor:RX", "", [] ],
17+
[ "esp:RX", "$serialMonitor:TX", "", [] ],
18+
[ "esp:3V3", "lcd1:VCC", "green", [ "v221.21", "h362.93" ] ],
19+
[ "esp:GND.1", "lcd1:GND", "black", [ "h-11.25", "v86.81", "h383.78" ] ],
20+
[ "esp:6", "lcd1:SCK", "blue", [ "h-40.05", "v240.41", "h460.59" ] ],
21+
[ "esp:7", "lcd1:MOSI", "orange", [ "h-30.45", "v221.21", "h441.39" ] ],
22+
[ "esp:20", "lcd1:CS", "red", [ "h16.45", "v173.21", "h278.18" ] ],
23+
[ "esp:21", "lcd1:D/C", "magenta", [ "h26.05", "v202.01", "h287.78" ] ],
24+
[ "esp:3", "lcd1:RST", "yellow", [ "h-20.85", "v134.81", "h412.58" ] ],
25+
[ "lcd1:LED", "esp:3V3", "white", [ "v86.22", "h-479.79", "v-288.41" ] ]
26+
],
27+
"serialMonitor": { "display": "terminal" },
28+
"dependencies": {}
29+
}

boards/esp32_c6_devkit/wokwi.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Reference: https://docs.wokwi.com/vscode/project-config
33
[wokwi]
44
version = 1
5-
firmware = 'build.esp32_c6_devkit/flasher_args.json'
6-
elf = 'build.esp32_c6_devkit/esp32-sdl3-swift-example.elf'
7-
gdbServerPort=3333
5+
firmware = '../../build.esp32_c6_devkit/flasher_args.json'
6+
elf = '../../build.esp32_c6_devkit/esp32-sdl3-swift-example.elf'
7+
# gdbServerPort=3333

boards/esp32_p4_function_ev_board/wokwi.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Reference: https://docs.wokwi.com/vscode/project-config
33
[wokwi]
44
version = 1
5-
firmware = 'build.esp32_p4_function_ev_board/flasher_args.json'
6-
elf = 'build.esp32_p4_function_ev_board/esp32-sdl3-swift-example.elf'
7-
gdbServerPort=3333
5+
firmware = '../../build.esp32_p4_function_ev_board/flasher_args.json'
6+
elf = '../../build.esp32_p4_function_ev_board/esp32-sdl3-swift-example.elf'
7+
# gdbServerPort=3333

diagram.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

wokwi.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)