From 6ef197688f41e23271bfe0cfecf53d86dd480d22 Mon Sep 17 00:00:00 2001 From: Frederik Haxel Date: Thu, 29 Aug 2024 09:56:40 +0200 Subject: [PATCH] pkg/lvgl: Increase default LV_MEM_SIZE for 64 bit and enable tests for native64 --- pkg/lvgl/include/lv_conf.h | 21 ++++++++++++++------- tests/pkg/lvgl/Makefile | 3 --- tests/pkg/lvgl_touch/Makefile | 3 --- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pkg/lvgl/include/lv_conf.h b/pkg/lvgl/include/lv_conf.h index d81cd882b401..0eaf494033a2 100644 --- a/pkg/lvgl/include/lv_conf.h +++ b/pkg/lvgl/include/lv_conf.h @@ -65,13 +65,20 @@ extern "C" { #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 diff --git a/tests/pkg/lvgl/Makefile b/tests/pkg/lvgl/Makefile index 3da669da5588..590298f43bef 100644 --- a/tests/pkg/lvgl/Makefile +++ b/tests/pkg/lvgl/Makefile @@ -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 diff --git a/tests/pkg/lvgl_touch/Makefile b/tests/pkg/lvgl_touch/Makefile index 86e364e5f48b..fa72a4963698 100644 --- a/tests/pkg/lvgl_touch/Makefile +++ b/tests/pkg/lvgl_touch/Makefile @@ -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