DEKI/ENGINE 文档
deki-esp32-integration 0.19.0
Deki 包参考
deki-esp32-integration

ESP32 平台 HAL:通过 ESP-IDF SDMMC 使用 SD 卡、FATFS 文件系统、串口命令,以及内存和文件系统的设置。

仓库:github.com/dekiengine/deki-esp32-integration · 最新版本:0.19.0 · 需要引擎 0.19.0 或更高版本 · 依赖:deki-wifi, deki-ble, deki-http, deki-i2s, deki-uart, deki-i2c, deki-gpio, deki-sdcard, deki-rendering

使用 DekiEditor --packages-add deki-esp32-integration <project> 或通过包管理器安装。引擎自身的组件和 C++ API 见 Deki 文档。

在编辑器中显示为 **ESP32 Integration**。

组件

组件 类别 说明
ESP32QemuDisplaySetup ESP32 HAL 打开 Espressif QEMU 的屏幕,无需开发板即可运行固件构建。
ESP32SerialSetup ESP32 HAL 通过 ESP32 的串口响应编辑器的命令。

功能开关

可以从构建中去掉的部分。带有 define 的功能通过该 define 开关,其余的随其组件一起被剥离。

功能 define 默认值
Memory DEKI_FEATURE_ESP32_MEMORY_SETUP 开
File System DEKI_FEATURE_ESP32_FILE_SYSTEM_SETUP 开
Serial Commands DEKI_FEATURE_ESP32_SERIAL_SETUP 开
SD Card (ESP-IDF) DEKI_FEATURE_ESP32_SD 开
GPIO (ESP-IDF) DEKI_FEATURE_ESP32_GPIO 开
I²C (ESP-IDF) DEKI_FEATURE_ESP32_I2C 开
UART (ESP-IDF) DEKI_FEATURE_ESP32_UART 开
I²S (ESP-IDF) DEKI_FEATURE_ESP32_I2S 开
S3 SIMD Blit Kernels DEKI_FEATURE_ESP32_BLIT_SIMD 开
WiFi STA + scan (ESP-IDF) DEKI_FEATURE_ESP32_WIFI 开
BLE (NimBLE) DEKI_FEATURE_ESP32_BLE 开
QEMU Display DEKI_FEATURE_ESP32_QEMU_DISPLAY 开
HTTPS client (ESP-IDF) DEKI_FEATURE_ESP32_HTTP 开

组件参考

ESP32QemuDisplaySetup

打开 Espressif QEMU 的屏幕,无需开发板即可运行固件构建。

检视器中的名称:ESP32 QEMU 显示屏设置 · 类别:ESP32 HAL · 类型:DekiEsp32::ESP32QemuDisplaySetup

属性 类型 默认值 约束 说明
width int32 320 1 到 4096 屏幕的宽度,单位为像素。
height int32 240 1 到 4096 屏幕的高度,单位为像素。
format enum "RGB565" RGB565, ARGB8888 屏幕的像素格式。游戏以此格式渲染。

ESP32SerialSetup

通过 ESP32 的串口响应编辑器的命令。

检视器中的名称:ESP32 串口设置 · 类别:ESP32 HAL · 类型:DekiEsp32::ESP32SerialSetup

属性 类型 默认值 约束 说明
baudRate int32 115200 9600 到 921600 串口波特率

更新日志

更新日志为英文。

0.19.0

Changed

  • minEngine 0.19.0: built against engine 0.19.0, whose component metadata records the package each class is in. A build of this package from before does not load and is rebuilt.

Added

  • Japanese, Simplified Chinese and Korean: editor/lang/ja.json, zh.json and ko.json translate the names, tooltips and enum values this package's components show in the Inspector.
  • The package's editor text goes through the editor's translation (Tr), so it shows in the editor's language. Needs the editor release that adds Localization.h; raise minEngine to it when releasing.

0.18.2

Added

  • Frame statistics over serial: the line DEKI:STATS is answered with the frames per second and the average frame, update, render and present times over the last second, and the free internal and external memory, for the editor's device_stats.
  • Screen capture over serial: the firmware answers the line DEKI:SCREENSHOT on its console with the frame on screen (base64, with a CRC), for the editor's device_screenshot. Started at boot (DekiESP32HALInitSystem, PACKAGE_HAS_SYSTEM_INIT); a USB Serial/JTAG console is read from its FIFO, a UART one through stdin. A frame takes about a second to send; the game waits for it, and that second is not counted as frame time, so nothing timed jumps ahead.
  • DEKI:PROFILE turns on deki-rendering's render profiler and then reports where the render time went since the request before, per component type. DEKI:SCENE <guid> opens that scene, for measuring each scene without pressing through the game.

Changed

  • minEngine 0.18.2: the frame statistics read the engine's GetLastFrameTimings.
  • ESP32-S3 builds use 64-byte data cache lines, which make a frame in PSRAM quicker to draw and send. The cache stays 32 KB: 64 KB takes 32 KB more of internal RAM, which a scene with many sprites ran out of.

Fixed

  • A UART ignored its baudRate and ran at 9600. Only the key baud was read, and deki-gps and the components name it baudRate, so a GPS sending at 38400 (the T-Deck Plus's) was never understood. Both keys are read.
  • A console reply's last bytes stayed on the board until the next reply pushed them out, so device_stats said the board did not answer. The USB Serial/JTAG console sends what it holds when flushed, and a flush made while the packet before is still going out is lost; it is now made again once the console takes it.
  • A flash with no port named (MCP's deploy_build, the CLI) picks one: the only serial port there is, or, with several, the first that answers as an ESP32. It failed with "No board found" even with a board plugged in.
  • Windows: an installed esptool showed as not installed. The editor unpacks its archive straight into espressif/esptool, and the toolchain definition looked for esptool.exe a folder deeper.
  • Windows: ESP-IDF's setup and builds work on a machine with no Python of its own. The Python component was python.org's embeddable build, which has no venv, ensurepip or pip, so ESP-IDF's install.bat could not create its environment; and nothing put it on PATH, so install.bat and export.bat found only the Microsoft Store's stub and stopped with 9009. It is now the Python Software Foundation's full portable build (the python package on nuget.org, pinned by SHA-256), on PATH for install.bat (pathEntries, which needs the editor that reads them) and for export.bat in every build. An installed copy of the old one shows as not installed; install it again.
  • The build's PATH is set in one set: a second set PATH=...PATH%... on the same cmd line expands PATH% to the value before the first and dropped what it added.
  • A flash with no board connected, or with a refused port, fails with the reason ("No board found on a serial port..."). It used to stop without a result, so the build status stayed "Flashing firmware..." for good.

更早的版本:CHANGELOG.md


由包的反射数据生成(引擎 0.19.0)。属性名就是场景文件中使用的键。重命名后会保留别名(兼容性)。