Skip to content

Commit

Permalink
CI: add esp32p4-function-ev board in wokwi
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Nov 4, 2024
1 parent 3241ffa commit 5d67c7c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/wokwi/diagram-esp32p4.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"version": 1,
"author": "Uri Shaked",
"editor": "wokwi",
"parts": [
{ "type": "board-esp32-p4-preview", "id": "esp", "top": -17.23, "left": -16.04, "attrs": {} }
],
"connections": [
["esp:TX", "$serialMonitor:RX", "", []],
["esp:RX", "$serialMonitor:TX", "", []]
],
"serialMonitor": { "display": "terminal" },
"dependencies": {}
}
"version": 1,
"author": "Uri Shaked",
"editor": "wokwi",
"parts": [
{ "type": "board-esp32-p4-function-ev", "id": "esp", "top": 0, "left": 0,
"attrs": {
"flashSize": "16",
"psramSize": "32"
}
}
],
"connections": [
["esp:37", "$serialMonitor:RX", "", []],
["esp:38", "$serialMonitor:TX", "", []]
],
"serialMonitor": { "display": "terminal" },
"dependencies": {}
}
1 change: 1 addition & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ const riscv_targets = &[_]std.Target.Query{
.cpu_model = .{ .explicit = &std.Target.riscv.cpu.esp32p4 },
.os_tag = .freestanding,
.abi = .eabihf,
.cpu_features_sub = std.Target.riscv.featureSet(&.{ .zca, .zcb, .zcmt, .zcmp }),
},
};
const xtensa_targets = &[_]std.Target.Query{
Expand Down
3 changes: 2 additions & 1 deletion cmake/zig-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ if(CONFIG_IDF_TARGET_ARCH_RISCV)
set(TARGET_CPU_MODEL "generic_rv32+m+a+c+zicsr+zifencei")
elseif(CONFIG_IDF_TARGET_ESP32P4)
string(REGEX REPLACE "-none" "-eabihf" ZIG_TARGET ${ZIG_TARGET})
set(TARGET_CPU_MODEL "esp32p4")
# (zca, zcb, zcmt, zcmp) are not supported on ESP32-P4-Function-EV-Board (crash application)
set(TARGET_CPU_MODEL "esp32p4-zca-zcb-zcmt-zcmp")
else()
set(TARGET_CPU_MODEL "generic_rv32+m+c+zicsr+zifencei")
endif()
Expand Down
2 changes: 1 addition & 1 deletion wokwi.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[wokwi]
version = 1
firmware = "build/flasher_args.json"
elf = "build/zig-sample-idf.elf"
firmware = "build/zig-sample-idf.bin"

0 comments on commit 5d67c7c

Please sign in to comment.