diff --git a/README.md b/README.md index cce7e733..5f4f62e1 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ New here? The [newcomer's guide](docs/newcomers.md) explains the model; the `vst3-engine`), and `webassembly/` (`pydevices`, with the `wasmbridge` module and a Fetch-backed `requests`), and `esp32/`: the sdkconfig fragments and partition table every esp32 or every chip gets, and the few - board variants of ours (`ESP32_GENERIC_S3` `LCD_7` and `T_EMBED`, + board variants of ours (`ESP32_GENERIC_S3` `LCD_4_3`, `LCD_7` and `T_EMBED`, `ESP32_GENERIC_P4` `WIFI6_DEV_KIT` and `WIFI6_DEV_KIT_H2`). - [`scripts/exercise_build.sh`](scripts/exercise_build.sh) — builds every desktop port and two esp32 boards from a bare clone, checks the failure paths, and writes a report of diff --git a/docs/newcomers.md b/docs/newcomers.md index 7c9bc33c..0bf684df 100644 --- a/docs/newcomers.md +++ b/docs/newcomers.md @@ -176,7 +176,7 @@ on top. Add `--modules` to any of these: | Waveshare ESP32-P4-WIFI6-Touch-LCD-4B | `--port esp32 --board ESP32_GENERIC_P4 --variant PRE_REV3_C6_WIFI --flash 32MB` | | Another ESP32-P4 board, chip revision 3 or later, with an ESP32-C6 for Wi-Fi | `--port esp32 --board ESP32_GENERIC_P4 --variant C6_WIFI --flash 16MB` | | Waveshare ESP32-S3-Touch-LCD-7 | `--port esp32 --board ESP32_GENERIC_S3 --variant LCD_7 --flash 8MB` | -| Waveshare ESP32-S3-Touch-LCD-4.3 | `--port esp32 --board ESP32_GENERIC_S3 --variant SPIRAM_OCT --flash 8MB` | +| Waveshare ESP32-S3-Touch-LCD-4.3 | `--port esp32 --board ESP32_GENERIC_S3 --variant LCD_4_3 --flash 8MB` | | LilyGO T-Embed S3 | `--port esp32 --board ESP32_GENERIC_S3 --variant T_EMBED --flash 16MB` | | WT32-SC01 Plus | `--port esp32 --board ESP32_GENERIC_S3 --flash 16MB` | | Raspberry Pi Pico (RP2040) | `--port rp2 --board RPI_PICO` (not `--modules all`: see [The model](#the-model)) | @@ -185,7 +185,7 @@ on top. Add `--modules` to any of these: A new board usually needs no file at all: pick the upstream board and variant that match its chip and PSRAM, and give `--flash` its flash size. Make a variant of ours only for settings that really are that board's, like the -LCD-7's cache sizes; see [esp32 settings](#esp32-settings) below. +LCD-7's and LCD-4.3's cache sizes and tick; see [esp32 settings](#esp32-settings) below. ## Flash it diff --git a/modules.lock b/modules.lock index 2133aa89..8dbda777 100644 --- a/modules.lock +++ b/modules.lock @@ -17,7 +17,7 @@ # build that has lvgl-micropython fetches it at this commit into # modules/.lvgl-bindings (a sibling checkout is linked there instead) and # hands it to lvgl-micropython, whose own LVGL_BINDINGS_COMMIT then goes unused. -audiodsp https://github.com/PyDevices/audiodsp.git 6773b91b4e014e1a3bba8b28e000ac95e75251df +audiodsp https://github.com/PyDevices/audiodsp.git 6042745509790bd8940c7630090cc6938f1df89d lvgl-bindings https://github.com/PyDevices/lvgl-bindings.git 7740c2fae0daa10992f5f8fe54acf670a70e2d3b lvgl-micropython https://github.com/PyDevices/lvgl-micropython.git 48937fcd87e574488178997e2bafe73d9bf02240 pygraphics https://github.com/PyDevices/pygraphics.git 2d7ca35847db78d450428cdc0cb5aa69ab81c809 diff --git a/scripts/release_firmware.py b/scripts/release_firmware.py index 7d43703b..1226045a 100755 --- a/scripts/release_firmware.py +++ b/scripts/release_firmware.py @@ -68,7 +68,7 @@ board="ESP32_GENERIC_S3", variant="LCD_7", flash="8MB", modules="all", chip="esp32s3", offset=0, kind="esp32", deps="idf"), dict(id="mp-s3-lcd43", label="ESP32-S3-Touch-LCD-4.3", interpreter="micropython", port="esp32", - board="ESP32_GENERIC_S3", variant="SPIRAM_OCT", flash="8MB", modules="all", + board="ESP32_GENERIC_S3", variant="LCD_4_3", flash="8MB", modules="all", chip="esp32s3", offset=0, kind="esp32", deps="idf"), dict(id="mp-s3-tembed", label="LilyGO T-Embed S3", interpreter="micropython", port="esp32", board="ESP32_GENERIC_S3", variant="T_EMBED", flash="16MB", modules="all", diff --git a/variants/esp32/ESP32_GENERIC_S3/LCD_4_3/mpconfigvariant.cmake b/variants/esp32/ESP32_GENERIC_S3/LCD_4_3/mpconfigvariant.cmake new file mode 100644 index 00000000..d6dd17bf --- /dev/null +++ b/variants/esp32/ESP32_GENERIC_S3/LCD_4_3/mpconfigvariant.cmake @@ -0,0 +1,3 @@ +# Upstream's octal-PSRAM variant, unchanged. This board's own settings are the +# sdkconfig beside this file, which build_mp.py appends last. +include(${MICROPY_BOARD_DIR}/mpconfigvariant_SPIRAM_OCT.cmake) diff --git a/variants/esp32/ESP32_GENERIC_S3/LCD_4_3/sdkconfig b/variants/esp32/ESP32_GENERIC_S3/LCD_4_3/sdkconfig new file mode 100644 index 00000000..ed225ed8 --- /dev/null +++ b/variants/esp32/ESP32_GENERIC_S3/LCD_4_3/sdkconfig @@ -0,0 +1,25 @@ +# Waveshare ESP32-S3-Touch-LCD-4.3: the tuning that is this board's alone, on +# top of every S3's (variants/esp32/sdkconfig.esp32s3). CircuitPython's build +# for this board carries the same three cache settings and a 1 ms tick; the +# LCD-7 variant has all four. +# +# lv_test_timer's frame rate on the board (`kit` run, median of three): +# port defaults 10.4 fps +# caches only 11.7 +# 1 ms tick only 17.7 +# both, as below 17.7 (16.6 averaged over the whole run, 9.3 +# with the defaults) + +# 1 ms tick. DotClockFramebuffer.refresh() waits for the panel to take the new +# frame buffer by polling with vTaskDelay(1), and at the port's 100 Hz that is +# a 10 ms sleep: every LVGL present spent 30 ms there, 14-16 ms with this. +CONFIG_FREERTOS_HZ=1000 + +# Caches sized for LVGL. Its code runs from flash and its objects and +# framebuffers live in PSRAM, which the RGB scanout is streaming from at the +# same time; with the port's 16 KB instruction cache, 32 KB data cache and +# 32-byte lines, LVGL's draw work took 16 ms of a frame and takes 9 ms with +# these. They take 48 KB of internal RAM. +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y +CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB=y +CONFIG_ESP32S3_DATA_CACHE_64KB=y