Skip to content

Commit cfeca74

Browse files
fix(esp_lvgl_port): Add support for LVGL 9.2 and above
1 parent fb106df commit cfeca74

16 files changed

+70
-12
lines changed

components/esp_lvgl_port/CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Changelog
22

3+
[Unreleased]
4+
5+
- Added SIMD support also for LVGL 9.2 and above
6+
7+
## 2.6.2
8+
9+
- Changed minimum IDF version to IDF5.1
10+
11+
## 2.6.1
12+
13+
### Features
14+
- Added option to place LVGL task stack to external RAM
15+
- Fixed callback for RGB display for IDF6
16+
17+
### Fixes
18+
- Register button callbacks only if encoder_enter is set https://github.com/espressif/esp-bsp/pull/571/files
19+
20+
## 2.6.0
21+
22+
### Features
23+
- Scaling feature in touch
24+
- Added support for PPA rotation in LVGL9 (available for ESP32-P4)
25+
326
## 2.6.2
427

528
- Changed minimum IDF version to IDF5.1

components/esp_lvgl_port/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ endif()
3535

3636
if("${lvgl_ver}" STREQUAL "")
3737
message("Could not determine LVGL version, assuming v9.x")
38-
set(lvgl_ver "9.0.0")
38+
set(lvgl_ver "9.1.0") # With 9.1 we assume support for SIMD acceleration
3939
endif()
4040

4141
# Select folder by LVGL version
@@ -85,10 +85,9 @@ if("usb_host_hid" IN_LIST build_components)
8585
list(APPEND ADD_LIBS idf::usb_host_hid)
8686
endif()
8787

88-
# Include SIMD assembly source code for rendering, only for (9.1.0 <= LVG_version < 9.2.0) and only for esp32 and esp32s3
89-
if((lvgl_ver VERSION_GREATER_EQUAL "9.1.0") AND (lvgl_ver VERSION_LESS "9.2.0"))
88+
# Include SIMD assembly source code for rendering, only for LVGL_version >= 9.1.0 and only for esp32 and esp32s3
89+
if((lvgl_ver VERSION_GREATER_EQUAL "9.1.0"))
9090
if(CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32S3)
91-
message(VERBOSE "Compiling SIMD")
9291
if(CONFIG_IDF_TARGET_ESP32S3)
9392
file(GLOB_RECURSE ASM_SRCS ${PORT_PATH}/simd/*_esp32s3.S) # Select only esp32s3 related files
9493
else()

components/esp_lvgl_port/include/esp_lvgl_port_lv_blend.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ extern "C" {
1818
#warning "esp_lvgl_port_lv_blend.h included, but CONFIG_LV_DRAW_SW_ASM_CUSTOM not set. Assembly rendering not used"
1919
#else
2020

21+
#include "lvgl.h"
22+
23+
/**
24+
* LVGL 9.2 changed the blending API compared to 9.1
25+
* The types were moved to lv_draw_sw_blend_private.h
26+
* and the leading underscore from type names was removed
27+
*/
28+
#if __has_include("draw/sw/blend/lv_draw_sw_blend_private.h")
29+
#include "draw/sw/blend/lv_draw_sw_blend_private.h"
30+
#define _lv_draw_sw_blend_fill_dsc_t lv_draw_sw_blend_fill_dsc_t
31+
#define _lv_draw_sw_blend_image_dsc_t lv_draw_sw_blend_image_dsc_t
32+
#endif
33+
2134
/*********************
2235
* DEFINES
2336
*********************/

examples/display_lvgl_demos/main/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
set(LV_DEMO_DIR "")
2-
set(LV_DEMOS_SOURCES "")
3-
if(CONFIG_LV_USE_DEMO_BENCHMARK)
4-
list(APPEND LV_DEMO_DIR ../managed_components/lvgl__lvgl/demos)
5-
file(GLOB_RECURSE LV_DEMOS_SOURCES ${LV_DEMO_DIR}/*.c)
6-
endif()
7-
81
idf_component_register(
92
SRCS "main.c" ${LV_DEMOS_SOURCES}
103
INCLUDE_DIRS "." ${LV_DEMO_DIR})

examples/display_lvgl_demos/partitions.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
33
nvs, data, nvs, 0x9000, 0x6000,
44
phy_init, data, phy, 0xf000, 0x1000,
5-
factory, app, factory, 0x10000, 0x160000,
5+
factory, app, factory, 0x10000, 0x200000,

examples/display_lvgl_demos/sdkconfig.bsp.esp-box

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
CONFIG_IDF_TARGET="esp32s3"
55
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
6+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
67
CONFIG_COMPILER_OPTIMIZATION_PERF=y
78
CONFIG_PARTITION_TABLE_CUSTOM=y
89
CONFIG_SPIRAM=y
@@ -15,7 +16,9 @@ CONFIG_FREERTOS_HZ=1000
1516
CONFIG_LV_MEM_SIZE_KILOBYTES=48
1617
CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM=y
1718
CONFIG_LV_FONT_MONTSERRAT_12=y
19+
CONFIG_LV_FONT_MONTSERRAT_14=y
1820
CONFIG_LV_FONT_MONTSERRAT_16=y
21+
CONFIG_LV_FONT_MONTSERRAT_24=y
1922
CONFIG_LV_USE_DEMO_WIDGETS=y
2023
CONFIG_LV_USE_DEMO_BENCHMARK=y
2124
CONFIG_LV_USE_DEMO_STRESS=y

examples/display_lvgl_demos/sdkconfig.bsp.esp-box-3

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
CONFIG_IDF_TARGET="esp32s3"
55
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
6+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
67
CONFIG_COMPILER_OPTIMIZATION_PERF=y
78
CONFIG_PARTITION_TABLE_CUSTOM=y
89
CONFIG_SPIRAM=y
@@ -15,7 +16,9 @@ CONFIG_FREERTOS_HZ=1000
1516
CONFIG_LV_MEM_SIZE_KILOBYTES=48
1617
CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM=y
1718
CONFIG_LV_FONT_MONTSERRAT_12=y
19+
CONFIG_LV_FONT_MONTSERRAT_14=y
1820
CONFIG_LV_FONT_MONTSERRAT_16=y
21+
CONFIG_LV_FONT_MONTSERRAT_24=y
1922
CONFIG_LV_USE_DEMO_WIDGETS=y
2023
CONFIG_LV_USE_DEMO_BENCHMARK=y
2124
CONFIG_LV_USE_DEMO_STRESS=y

examples/display_lvgl_demos/sdkconfig.bsp.esp-box-lite

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
CONFIG_IDF_TARGET="esp32s3"
55
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
6+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
67
CONFIG_COMPILER_OPTIMIZATION_PERF=y
78
CONFIG_PARTITION_TABLE_CUSTOM=y
89
CONFIG_SPIRAM=y
@@ -15,7 +16,9 @@ CONFIG_FREERTOS_HZ=1000
1516
CONFIG_LV_MEM_SIZE_KILOBYTES=48
1617
CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM=y
1718
CONFIG_LV_FONT_MONTSERRAT_12=y
19+
CONFIG_LV_FONT_MONTSERRAT_14=y
1820
CONFIG_LV_FONT_MONTSERRAT_16=y
21+
CONFIG_LV_FONT_MONTSERRAT_24=y
1922
CONFIG_LV_USE_DEMO_WIDGETS=y
2023
CONFIG_LV_USE_DEMO_BENCHMARK=y
2124
CONFIG_LV_USE_DEMO_STRESS=y

examples/display_lvgl_demos/sdkconfig.bsp.esp32_p4_function_ev_board

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CONFIG_FREERTOS_HZ=1000
1111
CONFIG_BSP_DISPLAY_LVGL_AVOID_TEAR=y
1212
CONFIG_BSP_DISPLAY_LVGL_DIRECT_MODE=y
1313
CONFIG_LV_FONT_MONTSERRAT_12=y
14+
CONFIG_LV_FONT_MONTSERRAT_14=y
1415
CONFIG_LV_FONT_MONTSERRAT_16=y
1516
CONFIG_LV_FONT_MONTSERRAT_24=y
1617
CONFIG_LV_USE_DEMO_WIDGETS=y

examples/display_lvgl_demos/sdkconfig.bsp.esp32_s2_kaluga_kit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
CONFIG_IDF_TARGET="esp32s2"
55
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
6+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
67
CONFIG_COMPILER_OPTIMIZATION_PERF=y
78
CONFIG_PARTITION_TABLE_CUSTOM=y
89
CONFIG_SPIRAM=y
@@ -14,7 +15,9 @@ CONFIG_FREERTOS_HZ=1000
1415
CONFIG_LV_MEM_SIZE_KILOBYTES=48
1516
CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM=y
1617
CONFIG_LV_FONT_MONTSERRAT_12=y
18+
CONFIG_LV_FONT_MONTSERRAT_14=y
1719
CONFIG_LV_FONT_MONTSERRAT_16=y
20+
CONFIG_LV_FONT_MONTSERRAT_24=y
1821
CONFIG_LV_USE_DEMO_WIDGETS=y
1922
CONFIG_LV_USE_DEMO_BENCHMARK=y
2023
CONFIG_LV_USE_DEMO_STRESS=y

0 commit comments

Comments
 (0)