diff --git a/Kconfig b/Kconfig index f4187c68d..11e5a8f3f 100644 --- a/Kconfig +++ b/Kconfig @@ -62,7 +62,6 @@ menu "LVGL configuration" config LV_MEM_SIZE_KILOBYTES int "Size of the memory used by `lv_mem_alloc` in kilobytes (>= 2kB)" - range 2 128 default 32 depends on !LV_MEM_CUSTOM diff --git a/src/lv_conf_kconfig.h b/src/lv_conf_kconfig.h index 7742fe77b..56e0b7d78 100644 --- a/src/lv_conf_kconfig.h +++ b/src/lv_conf_kconfig.h @@ -38,6 +38,10 @@ extern "C" { *******************/ #ifdef CONFIG_LV_MEM_SIZE_KILOBYTES +# if(CONFIG_LV_MEM_SIZE_KILOBYTES < 2) +# error "LV_MEM_SIZE >= 2kB is required" +# endif + # define CONFIG_LV_MEM_SIZE (CONFIG_LV_MEM_SIZE_KILOBYTES * 1024U) #endif