From c7a207215884ce43b5ba76deee4bae65e677075c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:25:25 +0000 Subject: [PATCH 01/11] Add display config for 4D Systems Gen4-ESP32-70CT (7-inch 800x480) Agent-Logs-Url: https://github.com/KMK0815/lvgl_micropython/sessions/8553218a-35a2-4a6a-ad35-2a4f0092ee71 Co-authored-by: KMK0815 <42606060+KMK0815@users.noreply.github.com> --- .../Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 84 +++++++++++++++++++ display_configs/Gen4-ESP32-70CT/board.json | 6 ++ 2 files changed, 90 insertions(+) create mode 100644 display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml create mode 100644 display_configs/Gen4-ESP32-70CT/board.json diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml new file mode 100644 index 00000000..30c01199 --- /dev/null +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -0,0 +1,84 @@ +[MCU.esp32] +BOARD = "ESP32_GENERIC_S3" +BOARD_VARIANT = "SPIRAM_OCT" +flash_size = 16 +enable_jtag_repl = 'n' +enable_cdc_repl = 'n' +enable_uart_repl = 'y' +uart_repl_bitrate = 115200 + + +[RGBBus.display_bus] +data0 = 8 +data1 = 3 +data2 = 46 +data3 = 9 +data4 = 1 +data5 = 5 +data6 = 6 +data7 = 7 +data8 = 15 +data9 = 16 +data10 = 4 +data11 = 45 +data12 = 48 +data13 = 47 +data14 = 21 +data15 = 14 +hsync = 39 +vsync = 41 +de = 40 +pclk = 42 +freq = 18000000 +hsync_front_porch = 1 +hsync_back_porch = 32 +hsync_pulse_width = 50 +hsync_idle_low = false +vsync_front_porch = 1 +vsync_back_porch = 33 +vsync_pulse_width = 1 +vsync_idle_low = true +de_idle_high = false +pclk_idle_high = false +pclk_active_low = true + + +[I2C.Bus.i2c_bus] +host = 0 +scl = 18 +sda = 17 +freq = 400000 + + +[I2C.Device.indev_device] +bus = "i2c_bus" +dev_id = "ft5x06.I2C_ADDR" +reg_bits = "ft5x06.BITS" + + +[RGBDisplay.display] +data_bus = "display_bus" +display_width = 800 +display_height = 480 +backlight_pin = 2 +color_space = "lv.COLOR_FORMAT.RGB565" + + +[display.set_power] +params = [true] + + +[display.init] +params = [] + + +[FT5x06.indev] +device = "indev_device" + + +[display.set_backlight] +params = [100] + + +[task_handler.TaskHandler] +params=[] diff --git a/display_configs/Gen4-ESP32-70CT/board.json b/display_configs/Gen4-ESP32-70CT/board.json new file mode 100644 index 00000000..8e6cb20f --- /dev/null +++ b/display_configs/Gen4-ESP32-70CT/board.json @@ -0,0 +1,6 @@ +{ + "mcu": "esp32s3", + "product": "gen4-ESP32-70CT (7\" 800x480 Capacitive Touch Display Module)", + "url": "https://4dsystems.com.au/products/gen4-esp32-70ct/", + "vendor": "4D Systems" +} From 90db6aea7d2cb7bf1a947b222fcb2e811b4da729 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:26:28 +0000 Subject: [PATCH 02/11] Add comment clarifying asymmetric hsync/vsync polarity in Gen4-ESP32-70CT config Agent-Logs-Url: https://github.com/KMK0815/lvgl_micropython/sessions/8553218a-35a2-4a6a-ad35-2a4f0092ee71 Co-authored-by: KMK0815 <42606060+KMK0815@users.noreply.github.com> --- display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml index 30c01199..4046be0a 100644 --- a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -33,6 +33,8 @@ freq = 18000000 hsync_front_porch = 1 hsync_back_porch = 32 hsync_pulse_width = 50 +# hsync_idle_low defaults to false; vsync_idle_low is explicitly true per the +# official 4D Systems GFX4dESP32 library panel timing specification. hsync_idle_low = false vsync_front_porch = 1 vsync_back_porch = 33 From a338bf2f32d090c3bf55852fa96c48de1a291c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=B6ppchen=20-=20Protronic=20GmbH?= Date: Mon, 20 Apr 2026 09:02:27 +0000 Subject: [PATCH 03/11] Add README for 4D Systems gen4-ESP32-70CT configuration --- display_configs/Gen4-ESP32-70CT/README.md | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 display_configs/Gen4-ESP32-70CT/README.md diff --git a/display_configs/Gen4-ESP32-70CT/README.md b/display_configs/Gen4-ESP32-70CT/README.md new file mode 100644 index 00000000..abae325f --- /dev/null +++ b/display_configs/Gen4-ESP32-70CT/README.md @@ -0,0 +1,44 @@ +# 4D Systems gen4-ESP32-70CT (LVGL MicroPython) + +This configuration targets the 4D Systems gen4-ESP32-70CT (800x480 capacitive touch). + +- Board info: `display_configs/Gen4-ESP32-70CT/board.json` +- TOML config: `display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml` + +## Build + +Run from the repository root: + +```bash +python3 make.py esp32 --toml=display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +``` + +## Build + Flash in one step + +If the board is connected, you can build and flash directly: + +```bash +python3 make.py esp32 --toml=display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml deploy +``` + +Optional explicit serial settings: + +```bash +python3 make.py esp32 --toml=display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml PORT=/dev/ttyACM0 BAUD=921600 deploy +``` + +Notes: +- `PORT` can be omitted. The build script will try to auto-detect the ESP32 port. +- If multiple ESP32 devices are connected, the script will ask which one to flash. + +## Flash later (manual) + +If you build without `deploy`, the script prints an exact flash command at the end under: + +- `To flash firmware:` + +Run that printed command to flash later. + +## Common issue + +Do not use `--board-config` with GNU make. For this project, board presets are selected with `--toml=...`. From 3d980afa40aba1de16b23777f6d26c28883374d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=B6ppchen=20-=20Protronic=20GmbH?= Date: Mon, 20 Apr 2026 11:30:49 +0000 Subject: [PATCH 04/11] Update I2C device configuration for FT5x46 and enhance README build instructions --- display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 6 +++--- display_configs/Gen4-ESP32-70CT/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml index 4046be0a..1fd401fb 100644 --- a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -54,8 +54,8 @@ freq = 400000 [I2C.Device.indev_device] bus = "i2c_bus" -dev_id = "ft5x06.I2C_ADDR" -reg_bits = "ft5x06.BITS" +dev_id = "ft5x46.I2C_ADDR" +reg_bits = "ft5x46.BITS" [RGBDisplay.display] @@ -74,7 +74,7 @@ params = [true] params = [] -[FT5x06.indev] +[FT5x46.indev] device = "indev_device" diff --git a/display_configs/Gen4-ESP32-70CT/README.md b/display_configs/Gen4-ESP32-70CT/README.md index abae325f..63f5376c 100644 --- a/display_configs/Gen4-ESP32-70CT/README.md +++ b/display_configs/Gen4-ESP32-70CT/README.md @@ -10,7 +10,7 @@ This configuration targets the 4D Systems gen4-ESP32-70CT (800x480 capacitive to Run from the repository root: ```bash -python3 make.py esp32 --toml=display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +python make.py esp32 clean BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT --toml=display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml INDEV=ft5x46 ``` ## Build + Flash in one step From 19d48290fb1afe23ba99e212a824d0d5095e1939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=B6ppchen=20-=20Protronic=20GmbH?= Date: Mon, 20 Apr 2026 11:52:36 +0000 Subject: [PATCH 05/11] Adjust pixel clock frequency for improved signal stability and update README with troubleshooting tips --- .../Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 2 +- display_configs/Gen4-ESP32-70CT/README.md | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml index 1fd401fb..a9c2bffe 100644 --- a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -29,7 +29,7 @@ hsync = 39 vsync = 41 de = 40 pclk = 42 -freq = 18000000 +freq = 12000000 hsync_front_porch = 1 hsync_back_porch = 32 hsync_pulse_width = 50 diff --git a/display_configs/Gen4-ESP32-70CT/README.md b/display_configs/Gen4-ESP32-70CT/README.md index 63f5376c..1c9cffe6 100644 --- a/display_configs/Gen4-ESP32-70CT/README.md +++ b/display_configs/Gen4-ESP32-70CT/README.md @@ -42,3 +42,16 @@ Run that printed command to flash later. ## Common issue Do not use `--board-config` with GNU make. For this project, board presets are selected with `--toml=...`. + +## Troubleshooting (unstable / rolling image) + +If the picture looks unstable (for example text appears to "run through" the panel), this is usually RGB timing related. + +- This preset uses a conservative pixel clock (`freq = 12000000`) for better signal stability on ESP32-S3 RGB panels. +- If your panel is still unstable, toggle `pclk_active_low` in `Gen4-ESP32-70CT.toml` (`true` <-> `false`) and rebuild. + +Rebuild command: + +```bash +python make.py esp32 clean BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT --toml=display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml INDEV=ft5x46 +``` From c5051cc1a006c3f1ae2f85d20cf93e39345892e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=B6ppchen=20-=20Protronic=20GmbH?= Date: Mon, 20 Apr 2026 14:15:45 +0000 Subject: [PATCH 06/11] Add calibration parameters for FT5x46 touch input device --- .../Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml index a9c2bffe..8a47c34f 100644 --- a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -77,6 +77,33 @@ params = [] [FT5x46.indev] device = "indev_device" +[indev._cal.alphaX] +value = -0.011764519 + +[indev._cal.betaX] +value = 2.176436 + +[indev._cal.deltaX] +value = -4.7288592 + +[indev._cal.alphaY] +value = 2.270234 + +[indev._cal.betaY] +value = 0.0066771596 + +[indev._cal.deltaY] +value = 11.731292 + +[indev._cal.mirrorX] +value = false + +[indev._cal.mirrorY] +value = false + +[indev._cal.save] +params = [] + [display.set_backlight] params = [100] From 02a04c6b41f93c64c9a2ca260cdce21c8ac72ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=B6ppchen=20-=20Protronic=20GmbH?= Date: Tue, 21 Apr 2026 08:29:04 +0200 Subject: [PATCH 07/11] Add PowerShell script for remote firmware build and flashing process --- flash_from_codevm.ps1 | 68 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 flash_from_codevm.ps1 diff --git a/flash_from_codevm.ps1 b/flash_from_codevm.ps1 new file mode 100644 index 00000000..525f0400 --- /dev/null +++ b/flash_from_codevm.ps1 @@ -0,0 +1,68 @@ +param( + [string]$BuildCommand = 'python3 make.py esp32 clean BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT --toml=display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml INDEV=ft5x46', + [switch]$SkipBuild = $true, + [switch]$SkipDownload = $false, + [switch]$SkipFlash = $false, + [switch]$SkipRepl = $false +) + +$ErrorActionPreference = 'Stop' + +$remoteHost = 'kmk0815@codevm' +$remoteProjectDir = '/home/kmk0815/work/micropython/lvgl_micropython' +$remoteFile = "${remoteHost}:$remoteProjectDir/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin" +$localFile = Join-Path $PSScriptRoot 'lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin' +$flachPort = 'COM10' +$port = 'COM11' + +Write-Host "[1/4] Running remote build on codevm..." +if (-not $SkipBuild) { + $remoteBuildCmd = @( + "cd $remoteProjectDir", + $BuildCommand + ) -join ' && ' + ssh $remoteHost $remoteBuildCmd + if ($LASTEXITCODE -ne 0) { + throw "Remote build failed with exit code $LASTEXITCODE" + } +} else { + Write-Host "[1/4] Skipping remote build." +} + +Write-Host "[2/4] Downloading firmware via scp..." +if (-not $SkipDownload) { + scp $remoteFile $localFile + if ($LASTEXITCODE -ne 0) { + throw "scp failed with exit code $LASTEXITCODE" + } +} else { + Write-Host "[2/4] Skipping firmware download." +} + +if ((-not $SkipFlash) -and (-not (Test-Path $localFile))) { + throw "Firmware file not found after download: $localFile" +} + +Write-Host "[3/4] Flashing firmware with esptool..." +if (-not $SkipFlash) { + esptool --chip esp32s3 -p $flachPort -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m --erase-all 0x0 $localFile + if ($LASTEXITCODE -ne 0) { + throw "esptool failed with exit code $LASTEXITCODE" + } +} else { + Write-Host "[3/4] Skipping flashing." +} + +Write-Host "[4/4] Opening REPL via plink..." +if (-not $SkipRepl) { + try { + plink.exe -serial $port -sercfg 115200,8,n,1,N + if ($LASTEXITCODE -ne 0) { + Write-Warning "plink exited with code $LASTEXITCODE. Download and flash are already done." + } + } catch { + Write-Warning "plink returned an error. Download and flash are already done." + } +} else { + Write-Host "[4/4] Skipping REPL startup." +} From 4f09f6eb2d2803e4b483e283926e0efc1ac17d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=B6ppchen=20-=20Protronic=20GmbH?= Date: Tue, 21 Apr 2026 11:17:14 +0200 Subject: [PATCH 08/11] Update pixel clock frequency and pclk_active_low setting for improved signal stability --- display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 4 ++-- display_configs/Gen4-ESP32-70CT/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml index 8a47c34f..35c81eaf 100644 --- a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -29,7 +29,7 @@ hsync = 39 vsync = 41 de = 40 pclk = 42 -freq = 12000000 +freq = 10000000 hsync_front_porch = 1 hsync_back_porch = 32 hsync_pulse_width = 50 @@ -42,7 +42,7 @@ vsync_pulse_width = 1 vsync_idle_low = true de_idle_high = false pclk_idle_high = false -pclk_active_low = true +pclk_active_low = false [I2C.Bus.i2c_bus] diff --git a/display_configs/Gen4-ESP32-70CT/README.md b/display_configs/Gen4-ESP32-70CT/README.md index 1c9cffe6..c5f74468 100644 --- a/display_configs/Gen4-ESP32-70CT/README.md +++ b/display_configs/Gen4-ESP32-70CT/README.md @@ -47,8 +47,8 @@ Do not use `--board-config` with GNU make. For this project, board presets are s If the picture looks unstable (for example text appears to "run through" the panel), this is usually RGB timing related. -- This preset uses a conservative pixel clock (`freq = 12000000`) for better signal stability on ESP32-S3 RGB panels. -- If your panel is still unstable, toggle `pclk_active_low` in `Gen4-ESP32-70CT.toml` (`true` <-> `false`) and rebuild. +- This preset uses a conservative pixel clock (`freq = 10000000`) for better signal stability on ESP32-S3 RGB panels. +- This preset defaults to `pclk_active_low = false`. If your panel is still unstable, toggle `pclk_active_low` in `Gen4-ESP32-70CT.toml` (`true` <-> `false`) and rebuild. Rebuild command: From bde5a421d4235b1af09a5ce541596f209da26897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=B6ppchen=20-=20Protronic=20GmbH?= Date: Tue, 21 Apr 2026 10:56:05 +0000 Subject: [PATCH 09/11] chore: clean up empty code change sections in the changes log --- .../Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 14 +++--- lib/lv_conf.h | 44 ++++++++++++++++--- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml index 35c81eaf..189f44f7 100644 --- a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -2,6 +2,8 @@ BOARD = "ESP32_GENERIC_S3" BOARD_VARIANT = "SPIRAM_OCT" flash_size = 16 +# Reserve a larger app slot for LVGL + drivers on S3 builds. +partition_size = 4194304 enable_jtag_repl = 'n' enable_cdc_repl = 'n' enable_uart_repl = 'y' @@ -78,22 +80,22 @@ params = [] device = "indev_device" [indev._cal.alphaX] -value = -0.011764519 +value = -0.047662752 [indev._cal.betaX] -value = 2.176436 +value = 2.1567396 [indev._cal.deltaX] -value = -4.7288592 +value = -8.058709 [indev._cal.alphaY] -value = 2.270234 +value = 2.3196948 [indev._cal.betaY] -value = 0.0066771596 +value = 0.03381479 [indev._cal.deltaY] -value = 11.731292 +value = -7.7237816 [indev._cal.mirrorX] value = false diff --git a/lib/lv_conf.h b/lib/lv_conf.h index 4f97f728..f2c0e4ee 100644 --- a/lib/lv_conf.h +++ b/lib/lv_conf.h @@ -26,7 +26,7 @@ #define MICROPY_CACHE_SIZE 0 #endif #ifndef MICROPY_COLOR_DEPTH - #define MICROPY_COLOR_DEPTH 32 + #define MICROPY_COLOR_DEPTH 16 #endif #ifndef MICROPY_FLOAT #define MICROPY_FLOAT 0 @@ -159,13 +159,19 @@ extern void *mp_lv_roots; /*Align the start address of draw_buf addresses to this bytes*/ #define LV_DRAW_BUF_ALIGN 4 +/*Using matrix for transformations. + *Requirements: + `LV_USE_MATRIX = 1`. + The rendering engine needs to support 3x3 matrix transformations.*/ +#define LV_DRAW_TRANSFORM_USE_MATRIX 0 + /* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode * it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks. * "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers * and can't be drawn in chunks. */ /*The target buffer size for simple layer chunks.*/ -#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ +#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (128 * 1024) /*[bytes]*/ /* The stack size of the drawing thread. * NOTE: If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more. @@ -190,6 +196,7 @@ extern void *mp_lv_roots; #define LV_DRAW_SW_SUPPORT_L8 1 #define LV_DRAW_SW_SUPPORT_AL88 1 #define LV_DRAW_SW_SUPPORT_A8 1 + #define LV_DRAW_SW_SUPPORT_I1 1 /* Set the number of draw unit. * > 1 requires an operating system enabled in `LV_USE_OS` @@ -237,8 +244,13 @@ extern void *mp_lv_roots; #define LV_USE_VGLITE_BLIT_SPLIT 0 #if LV_USE_OS - /* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */ - #define LV_USE_VGLITE_DRAW_ASYNC 1 + /* Use additional draw thread for VG-Lite processing.*/ + #define LV_USE_VGLITE_DRAW_THREAD 1 + + #if LV_USE_VGLITE_DRAW_THREAD + /* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */ + #define LV_USE_VGLITE_DRAW_ASYNC 1 + #endif #endif /* Enable VGLite asserts. */ @@ -249,6 +261,11 @@ extern void *mp_lv_roots; #define LV_USE_DRAW_PXP 0 #if LV_USE_DRAW_PXP + #if LV_USE_OS + /* Use additional draw thread for PXP processing.*/ + #define LV_USE_PXP_DRAW_THREAD 1 + #endif + /* Enable PXP asserts. */ #define LV_USE_PXP_ASSERT 0 #endif @@ -282,6 +299,10 @@ extern void *mp_lv_roots; */ #define LV_VG_LITE_GRAD_CACHE_CNT 32 + /* VG-Lite stroke maximum cache number. + */ + #define LV_VG_LITE_STROKE_CACHE_CNT 32 + #endif /*======================= @@ -486,6 +507,13 @@ extern void *mp_lv_roots; /* Use `float` as `lv_value_precise_t` */ #define LV_USE_FLOAT MICROPY_FLOAT +/*Enable matrix support + *Requires `LV_USE_FLOAT = 1`*/ +#define LV_USE_MATRIX 0 + +/*Include `lvgl_private.h` in `lvgl.h` to access internal data and functions by default*/ +#define LV_USE_PRIVATE_API 0 + /*================== * FONT USAGE *===================*/ @@ -705,7 +733,7 @@ extern void *mp_lv_roots; #define LV_USE_THEME_SIMPLE 1 /*A theme designed for monochrome displays*/ -#define LV_USE_THEME_MONO 0 +#define LV_USE_THEME_MONO 1 /*================== * LAYOUTS @@ -723,10 +751,13 @@ extern void *mp_lv_roots; /*File system interfaces for common APIs */ +/*Setting a default driver letter allows skipping the driver prefix in filepaths*/ +#define LV_FS_DEFAULT_DRIVE_LETTER '\0' + /*API for fopen, fread, etc*/ #define LV_USE_FS_STDIO 0 #if LV_USE_FS_STDIO - #define LV_FS_STDIO_LETTER 'A' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ + #define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ #define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ #define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ #endif @@ -981,6 +1012,7 @@ extern void *mp_lv_roots; #define LV_SDL_INCLUDE_PATH #define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/ #define LV_SDL_BUF_COUNT 1 /*1 or 2*/ + #define LV_SDL_ACCELERATED 1 /*1: Use hardware acceleration*/ #define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/ #define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/ #define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/ From 55766bef6944b8b14a9c9c3ce58698fbf97c08d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:25:28 +0000 Subject: [PATCH 10/11] Initial plan From 44c44f33e8324394d033aa789d7f4433d05bbc1a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:27:33 +0000 Subject: [PATCH 11/11] revert: undo commit bde5a421 (clean up empty code change sections) Agent-Logs-Url: https://github.com/protronic/lvgl_micropython/sessions/2c0196ac-ef2a-4d94-ad95-d5603168ae63 Co-authored-by: KMK0815 <42606060+KMK0815@users.noreply.github.com> --- .../Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml | 14 +++--- lib/lv_conf.h | 44 +++---------------- 2 files changed, 12 insertions(+), 46 deletions(-) diff --git a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml index 189f44f7..35c81eaf 100644 --- a/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml +++ b/display_configs/Gen4-ESP32-70CT/Gen4-ESP32-70CT.toml @@ -2,8 +2,6 @@ BOARD = "ESP32_GENERIC_S3" BOARD_VARIANT = "SPIRAM_OCT" flash_size = 16 -# Reserve a larger app slot for LVGL + drivers on S3 builds. -partition_size = 4194304 enable_jtag_repl = 'n' enable_cdc_repl = 'n' enable_uart_repl = 'y' @@ -80,22 +78,22 @@ params = [] device = "indev_device" [indev._cal.alphaX] -value = -0.047662752 +value = -0.011764519 [indev._cal.betaX] -value = 2.1567396 +value = 2.176436 [indev._cal.deltaX] -value = -8.058709 +value = -4.7288592 [indev._cal.alphaY] -value = 2.3196948 +value = 2.270234 [indev._cal.betaY] -value = 0.03381479 +value = 0.0066771596 [indev._cal.deltaY] -value = -7.7237816 +value = 11.731292 [indev._cal.mirrorX] value = false diff --git a/lib/lv_conf.h b/lib/lv_conf.h index f2c0e4ee..4f97f728 100644 --- a/lib/lv_conf.h +++ b/lib/lv_conf.h @@ -26,7 +26,7 @@ #define MICROPY_CACHE_SIZE 0 #endif #ifndef MICROPY_COLOR_DEPTH - #define MICROPY_COLOR_DEPTH 16 + #define MICROPY_COLOR_DEPTH 32 #endif #ifndef MICROPY_FLOAT #define MICROPY_FLOAT 0 @@ -159,19 +159,13 @@ extern void *mp_lv_roots; /*Align the start address of draw_buf addresses to this bytes*/ #define LV_DRAW_BUF_ALIGN 4 -/*Using matrix for transformations. - *Requirements: - `LV_USE_MATRIX = 1`. - The rendering engine needs to support 3x3 matrix transformations.*/ -#define LV_DRAW_TRANSFORM_USE_MATRIX 0 - /* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode * it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks. * "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers * and can't be drawn in chunks. */ /*The target buffer size for simple layer chunks.*/ -#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (128 * 1024) /*[bytes]*/ +#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ /* The stack size of the drawing thread. * NOTE: If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more. @@ -196,7 +190,6 @@ extern void *mp_lv_roots; #define LV_DRAW_SW_SUPPORT_L8 1 #define LV_DRAW_SW_SUPPORT_AL88 1 #define LV_DRAW_SW_SUPPORT_A8 1 - #define LV_DRAW_SW_SUPPORT_I1 1 /* Set the number of draw unit. * > 1 requires an operating system enabled in `LV_USE_OS` @@ -244,13 +237,8 @@ extern void *mp_lv_roots; #define LV_USE_VGLITE_BLIT_SPLIT 0 #if LV_USE_OS - /* Use additional draw thread for VG-Lite processing.*/ - #define LV_USE_VGLITE_DRAW_THREAD 1 - - #if LV_USE_VGLITE_DRAW_THREAD - /* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */ - #define LV_USE_VGLITE_DRAW_ASYNC 1 - #endif + /* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */ + #define LV_USE_VGLITE_DRAW_ASYNC 1 #endif /* Enable VGLite asserts. */ @@ -261,11 +249,6 @@ extern void *mp_lv_roots; #define LV_USE_DRAW_PXP 0 #if LV_USE_DRAW_PXP - #if LV_USE_OS - /* Use additional draw thread for PXP processing.*/ - #define LV_USE_PXP_DRAW_THREAD 1 - #endif - /* Enable PXP asserts. */ #define LV_USE_PXP_ASSERT 0 #endif @@ -299,10 +282,6 @@ extern void *mp_lv_roots; */ #define LV_VG_LITE_GRAD_CACHE_CNT 32 - /* VG-Lite stroke maximum cache number. - */ - #define LV_VG_LITE_STROKE_CACHE_CNT 32 - #endif /*======================= @@ -507,13 +486,6 @@ extern void *mp_lv_roots; /* Use `float` as `lv_value_precise_t` */ #define LV_USE_FLOAT MICROPY_FLOAT -/*Enable matrix support - *Requires `LV_USE_FLOAT = 1`*/ -#define LV_USE_MATRIX 0 - -/*Include `lvgl_private.h` in `lvgl.h` to access internal data and functions by default*/ -#define LV_USE_PRIVATE_API 0 - /*================== * FONT USAGE *===================*/ @@ -733,7 +705,7 @@ extern void *mp_lv_roots; #define LV_USE_THEME_SIMPLE 1 /*A theme designed for monochrome displays*/ -#define LV_USE_THEME_MONO 1 +#define LV_USE_THEME_MONO 0 /*================== * LAYOUTS @@ -751,13 +723,10 @@ extern void *mp_lv_roots; /*File system interfaces for common APIs */ -/*Setting a default driver letter allows skipping the driver prefix in filepaths*/ -#define LV_FS_DEFAULT_DRIVE_LETTER '\0' - /*API for fopen, fread, etc*/ #define LV_USE_FS_STDIO 0 #if LV_USE_FS_STDIO - #define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ + #define LV_FS_STDIO_LETTER 'A' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ #define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ #define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ #endif @@ -1012,7 +981,6 @@ extern void *mp_lv_roots; #define LV_SDL_INCLUDE_PATH #define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/ #define LV_SDL_BUF_COUNT 1 /*1 or 2*/ - #define LV_SDL_ACCELERATED 1 /*1: Use hardware acceleration*/ #define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/ #define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/ #define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/