Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/lvgl: Increase default LV_MEM_SIZE for 64 bit and enable tests for native64 #20846

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions pkg/lvgl/include/lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,20 @@
#define LV_MEM_CUSTOM 0
#if LV_MEM_CUSTOM == 0
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
#if IS_USED(MODULE_LVGL_EXTRA_THEME_DEFAULT_GROW)
# ifndef LV_MEM_SIZE
# define LV_MEM_SIZE (6U * 1024U) /*[bytes]*/
# endif
#else
# ifndef LV_MEM_SIZE
# define LV_MEM_SIZE (5U * 1024U) /*[bytes]*/
#ifndef LV_MEM_SIZE
# if (__SIZEOF_POINTER__ > 4)
/*64-bit platforms require additional space because a lot of pointers are stored on the lvgl heap.*/
# if IS_USED(MODULE_LVGL_EXTRA_THEME_DEFAULT_GROW)
# define LV_MEM_SIZE (9U * 1024U) /*[bytes]*/
# else
# define LV_MEM_SIZE (8U * 1024U) /*[bytes]*/
# endif
# else
# if IS_USED(MODULE_LVGL_EXTRA_THEME_DEFAULT_GROW)
# define LV_MEM_SIZE (6U * 1024U) /*[bytes]*/
# else
# define LV_MEM_SIZE (5U * 1024U) /*[bytes]*/
# endif
# endif
#endif

Expand Down Expand Up @@ -113,19 +120,19 @@
*-----------*/

/** Enable complex draw engine.
*Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/

Check warning on line 123 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define LV_DRAW_COMPLEX 1
#if LV_DRAW_COMPLEX != 0

/** Allow buffering some shadow calculation.
*LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`

Check warning on line 128 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
*Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
#define LV_SHADOW_CACHE_SIZE 0
#endif /*LV_DRAW_COMPLEX*/

/*Default image cache size. Image caching keeps the images opened.
*If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added)

Check warning on line 134 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
*With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.

Check warning on line 135 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
*However the opened images might consume additional RAM.
*0: to disable caching*/
#define LV_IMG_CACHE_DEF_SIZE 0
Expand All @@ -135,13 +142,13 @@
#define LV_GRADIENT_MAX_STOPS 2

/**Default gradient buffer size.
*When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.

Check warning on line 145 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
*LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
*If the cache is too small the map will be allocated only while it's required for the drawing.
*0 mean no caching.*/
#define LV_GRAD_CACHE_DEF_SIZE 0

/** Maximum buffer size to allocate for rotation. Only used if software rotation is enabled in the display driver.*/

Check warning on line 151 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define LV_DISP_ROT_MAX_BUF (10*1024)
/*-------------
* GPU
Expand All @@ -159,8 +166,8 @@
#define LV_USE_GPU_NXP_PXP 0
#if LV_USE_GPU_NXP_PXP
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS

Check warning on line 169 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.

Check warning on line 170 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
*/
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
Expand Down Expand Up @@ -208,8 +215,8 @@

/*Enable asserts if an operation is failed or an invalid data is found.
*If LV_USE_LOG is enabled an error message will be printed on failure*/
#define LV_USE_ASSERT_NULL 0 /**< Check if the parameter is NULL. (Very fast, recommended)*/

Check warning on line 218 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define LV_USE_ASSERT_MALLOC 0 /**< Checks is the memory is successfully allocated or no. (Very fast, recommended)*/

Check warning on line 219 in pkg/lvgl/include/lv_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define LV_USE_ASSERT_STYLE 0 /**< Check if the styles are properly initialized. (Very fast, recommended)*/
#define LV_USE_ASSERT_MEM_INTEGRITY 0 /**< Check the integrity of `lv_mem` after critical operations. (Slow)*/
#define LV_USE_ASSERT_OBJ 0 /**< Check the object's type and existence (e.g. not deleted). (Slow)*/
Expand Down
3 changes: 0 additions & 3 deletions tests/pkg/lvgl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ USEMODULE += lvgl_extra_layout_flex
USEMODULE += lvgl_extra_theme_default
USEMODULE += lvgl_extra_theme_default_dark

# blacklist native64 until https://github.com/RIOT-OS/riotdocker/pull/241 is resolved
BOARD_BLACKLIST += native64

include $(RIOTBASE)/Makefile.include

# SDL requires more stack
Expand Down
3 changes: 0 additions & 3 deletions tests/pkg/lvgl_touch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ USEMODULE += lvgl_extra_theme_default

USEMODULE += random

# blacklist native64 until https://github.com/RIOT-OS/riotdocker/pull/241 is resolved
BOARD_BLACKLIST += native64

include $(RIOTBASE)/Makefile.include

# SDL requires more stack
Expand Down
Loading