diff --git a/tests/lib/gui/lvgl/boards/stm32h747i_disco_stm32h747xx_m7.conf b/tests/lib/gui/lvgl/boards/stm32h747i_disco_stm32h747xx_m7.conf new file mode 100644 index 00000000000..3557d3cd511 --- /dev/null +++ b/tests/lib/gui/lvgl/boards/stm32h747i_disco_stm32h747xx_m7.conf @@ -0,0 +1,6 @@ +CONFIG_FS_LITTLEFS_FC_HEAP_SIZE=2048 +CONFIG_MAIN_STACK_SIZE=2048 + +CONFIG_DUMMY_DISPLAY=n + +CONFIG_NOCACHE_MEMORY=y diff --git a/tests/lib/gui/lvgl/boards/stm32h747i_disco_stm32h747xx_m7.overlay b/tests/lib/gui/lvgl/boards/stm32h747i_disco_stm32h747xx_m7.overlay new file mode 100644 index 00000000000..3361cd6be94 --- /dev/null +++ b/tests/lib/gui/lvgl/boards/stm32h747i_disco_stm32h747xx_m7.overlay @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&sdmmc1 { + sdmmc { + compatible = "zephyr,sdmmc-disk"; + }; +}; + +/delete-node/ &storage_partition; + +&flash0 { + partitions { + partition@ff800 { + reg = <0x000ff800 DT_SIZE_K(2)>; + }; + }; +}; + +/ { + fstab { + compatible = "zephyr,fstab"; + lfs1: lfs1 { + compatible = "zephyr,fstab,littlefs"; + read-size = <32>; + prog-size = <32>; + cache-size = <256>; + lookahead-size = <64>; + block-cycles = <512>; + partition = <&storage_partition>; + mount-point = "/lfs1"; + }; + }; +}; + +&mt25ql512ab1 { + partitions { + storage_partition: partition@0 { + reg = <0x0 DT_SIZE_M(64)>; + label = "storage"; + }; + }; +}; diff --git a/tests/lib/gui/lvgl/prj_blk.conf b/tests/lib/gui/lvgl/prj_blk.conf new file mode 100644 index 00000000000..18dac1f386f --- /dev/null +++ b/tests/lib/gui/lvgl/prj_blk.conf @@ -0,0 +1,10 @@ +CONFIG_DISK_DRIVERS=y +CONFIG_DISK_ACCESS=y + +CONFIG_FS_LITTLEFS_BLK_DEV=y + +CONFIG_FS_LITTLEFS_FC_HEAP_SIZE=2048 +CONFIG_MAIN_STACK_SIZE=2048 + +CONFIG_FLASH=n +CONFIG_FLASH_MAP=n diff --git a/tests/lib/gui/lvgl/src/main.c b/tests/lib/gui/lvgl/src/main.c index 2c2e0641bd3..6475e63ddd0 100644 --- a/tests/lib/gui/lvgl/src/main.c +++ b/tests/lib/gui/lvgl/src/main.c @@ -71,8 +71,6 @@ ZTEST(lvgl_screen, test_add_delete_screen) lv_scr_load(new_screen); - lv_task_handler(); - lv_obj_t *act_screen = lv_scr_act(); zassert_equal_ptr(act_screen, new_screen, "New screen not active"); @@ -81,8 +79,6 @@ ZTEST(lvgl_screen, test_add_delete_screen) lv_obj_del(new_screen); - lv_task_handler(); - act_screen = lv_scr_act(); zassert_equal_ptr(act_screen, default_screen, "Default screen not active"); @@ -96,8 +92,6 @@ ZTEST_USER(lvgl_fs, test_add_img) lv_img_set_src(img, IMG_FILE_PATH); lv_obj_align(img, LV_ALIGN_CENTER, 0, 0); - - lv_task_handler(); } diff --git a/tests/lib/gui/lvgl/testcase.yaml b/tests/lib/gui/lvgl/testcase.yaml index f878a4c4363..db356ec5569 100644 --- a/tests/lib/gui/lvgl/testcase.yaml +++ b/tests/lib/gui/lvgl/testcase.yaml @@ -2,35 +2,88 @@ common: tags: - display - gui - platform_allow: - - native_posix/native/64 - - native_sim/native/64 - - native_sim - integration_platforms: - - native_sim tests: - libraries.gui.lvgl: {} + libraries.gui.lvgl: + platform_allow: + - native_posix/native/64 + - native_sim/native/64 + - native_sim + integration_platforms: + - native_sim libraries.gui.lvgl.dynamic.heap.libc: filter: CONFIG_FULL_LIBC_SUPPORTED extra_configs: - CONFIG_REQUIRES_FULL_LIBC=y - CONFIG_LV_Z_BUFFER_ALLOC_DYNAMIC=y - CONFIG_LV_Z_MEM_POOL_HEAP_LIB_C=y + platform_allow: + - native_posix/native/64 + - native_sim/native/64 + - native_sim + integration_platforms: + - native_sim libraries.gui.lvgl.dynamic.pool.sys_heap: extra_configs: - CONFIG_LV_Z_BUFFER_ALLOC_DYNAMIC=y - CONFIG_LV_Z_MEM_POOL_SYS_HEAP=y - CONFIG_LV_Z_MEM_POOL_SIZE=98304 + platform_allow: + - native_posix/native/64 + - native_sim/native/64 + - native_sim + integration_platforms: + - native_sim libraries.gui.lvgl.16bit: extra_configs: - CONFIG_LV_COLOR_DEPTH_16=y + platform_allow: + - native_posix/native/64 + - native_sim/native/64 + - native_sim + integration_platforms: + - native_sim libraries.gui.lvgl.8bit: extra_configs: - CONFIG_LV_COLOR_DEPTH_8=y + platform_allow: + - native_posix/native/64 + - native_sim/native/64 + - native_sim + integration_platforms: + - native_sim libraries.gui.lvgl.mono: extra_configs: - CONFIG_LV_COLOR_DEPTH_1=y + platform_allow: + - native_posix/native/64 + - native_sim/native/64 + - native_sim + integration_platforms: + - native_sim libraries.gui.lvgl.16bit.swap: extra_configs: - CONFIG_LV_COLOR_DEPTH_16=y - CONFIG_LV_COLOR_16_SWAP=y + platform_allow: + - native_posix/native/64 + - native_sim/native/64 + - native_sim + integration_platforms: + - native_sim + libraries.gui.lvgl.stm32h747i_disco_m7: + platform_allow: stm32h747i_disco/stm32h747xx/m7 + extra_args: + - SHIELD=st_b_lcd40_dsi1_mb1166 + tags: + - shield + libraries.gui.lvgl.stm32h747i_disco_m7_blk: + platform_allow: stm32h747i_disco/stm32h747xx/m7 + extra_configs: + - CONFIG_SDMMC_STM32_HWFC=y + - CONFIG_NOCACHE_MEMORY=y + - CONFIG_DUMMY_DISPLAY=n + extra_args: + - SHIELD=st_b_lcd40_dsi1_mb1166 + - OVERLAY_CONFIG=prj_blk.conf + tags: + - shield