Update to LVGL 9.0.0 (#47)

- Updated LVGL from 8.3 to 9.0 (removed example/docs/demo folders)
- Updated esp_lvgl_port  to current status of the `lvgl9` branch on `esp-bsp`: https://github.com/espressif/esp-bsp/tree/lvgl9
- Updated all boards and drivers
- Removed `libs/lv_drivers` subproject as SDL is now supported by LVGL directly (although keyboard input seems broken)
- Updated `libs/lv_screenshot`
- Fixed the way `tt_statusbar` widget works due to behaviour change in LVGL
- Updated other lvgl code
This commit is contained in:
Ken Van Hoeylandt
2024-02-18 17:40:02 +01:00
committed by GitHub
parent 5fef25fb13
commit 473fb673bd
1630 changed files with 142517 additions and 182264 deletions
+5 -5
View File
@@ -12,8 +12,8 @@ port_src = Glob('*.c')
port_inc = [cwd]
group = group + DefineGroup('LVGL-port', port_src, depend = ['PKG_USING_LVGL'], CPPPATH = port_inc)
# check if .h or .hpp files exsit
def check_h_hpp_exsit(path):
# check if .h or .hpp files exists
def check_h_hpp_exists(path):
file_dirs = os.listdir(path)
for file_dir in file_dirs:
if os.path.splitext(file_dir)[1] in ['.h', '.hpp']:
@@ -28,7 +28,7 @@ for root, dirs, files in os.walk(lvgl_src_cwd):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c')) # add all .c files
if check_h_hpp_exsit(current_path): # add .h and .hpp path
if check_h_hpp_exists(current_path): # add .h and .hpp path
inc = inc + [current_path]
@@ -39,7 +39,7 @@ if GetDepend('PKG_LVGL_USING_EXAMPLES'):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c'))
if check_h_hpp_exsit(current_path):
if check_h_hpp_exists(current_path):
inc = inc + [current_path]
if GetDepend('PKG_LVGL_USING_DEMOS'):
@@ -49,7 +49,7 @@ if GetDepend('PKG_LVGL_USING_DEMOS'):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c'))
if check_h_hpp_exsit(current_path):
if check_h_hpp_exists(current_path):
inc = inc + [current_path]
LOCAL_CFLAGS = ''
@@ -13,36 +13,30 @@
#ifdef __RTTHREAD__
#include <lvgl.h>
#define LV_RTTHREAD_INCLUDE <rtthread.h>
#include LV_RTTHREAD_INCLUDE
/*=========================
MEMORY SETTINGS
STDLIB WRAPPER SETTINGS
*=========================*/
#ifdef RT_USING_HEAP
# define LV_MEM_CUSTOM 1
# define LV_MEM_CUSTOM_INCLUDE LV_RTTHREAD_INCLUDE
# define LV_MEM_CUSTOM_ALLOC rt_malloc
# define LV_MEM_CUSTOM_FREE rt_free
# define LV_MEM_CUSTOM_REALLOC rt_realloc
#define LV_USE_STDLIB_MALLOC LV_STDLIB_RTTHREAD
#endif
/*====================
HAL SETTINGS
*====================*/
#define LV_USE_STDLIB_STRING LV_STDLIB_RTTHREAD
#define LV_TICK_CUSTOM 1
#define LV_TICK_CUSTOM_INCLUDE LV_RTTHREAD_INCLUDE
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (rt_tick_get_millisecond()) /*Expression evaluating to current system time in ms*/
#ifdef PKG_LVGL_DISP_REFR_PERIOD
#define LV_DISP_DEF_REFR_PERIOD PKG_LVGL_DISP_REFR_PERIOD
#if LV_USE_FLOAT == 0
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_RTTHREAD
#endif
/*=======================
* FEATURE CONFIGURATION
*=======================*/
/*=================
* OPERATING SYSTEM
*=================*/
#define LV_USE_OS LV_OS_RTTHREAD
/*-------------
* Asserts
@@ -51,30 +45,20 @@
#define LV_ASSERT_HANDLER_INCLUDE LV_RTTHREAD_INCLUDE
#define LV_ASSERT_HANDLER RT_ASSERT(0);
/*-------------
* Others
*-----------*/
#define LV_SPRINTF_CUSTOM 1
#define LV_SPRINTF_INCLUDE LV_RTTHREAD_INCLUDE
#define lv_snprintf rt_snprintf
#define lv_vsnprintf rt_vsnprintf
#define LV_SPRINTF_USE_FLOAT 0
/*=====================
* COMPILER SETTINGS
*====================*/
#ifdef ARCH_CPU_BIG_ENDIAN
# define LV_BIG_ENDIAN_SYSTEM 1
#define LV_BIG_ENDIAN_SYSTEM 1
#else
# define LV_BIG_ENDIAN_SYSTEM 0
#define LV_BIG_ENDIAN_SYSTEM 0
#endif
#ifdef rt_align /* >= RT-Thread v5.0.0 */
# define LV_ATTRIBUTE_MEM_ALIGN rt_align(RT_ALIGN_SIZE)
#define LV_ATTRIBUTE_MEM_ALIGN rt_align(RT_ALIGN_SIZE)
#else
# define LV_ATTRIBUTE_MEM_ALIGN ALIGN(RT_ALIGN_SIZE)
#define LV_ATTRIBUTE_MEM_ALIGN ALIGN(RT_ALIGN_SIZE)
#endif
/*==================
@@ -82,7 +66,7 @@
*==================*/
#ifdef PKG_LVGL_USING_EXAMPLES
# define LV_BUILD_EXAMPLES 1
#define LV_BUILD_EXAMPLES 1
#endif
/*--END OF LV_RT_THREAD_CONF_H--*/
@@ -19,13 +19,17 @@
#include <rtdbg.h>
#ifndef PKG_LVGL_THREAD_STACK_SIZE
#define PKG_LVGL_THREAD_STACK_SIZE 4096
#define PKG_LVGL_THREAD_STACK_SIZE 4096
#endif /* PKG_LVGL_THREAD_STACK_SIZE */
#ifndef PKG_LVGL_THREAD_PRIO
#define PKG_LVGL_THREAD_PRIO (RT_THREAD_PRIORITY_MAX*2/3)
#define PKG_LVGL_THREAD_PRIO (RT_THREAD_PRIORITY_MAX*2/3)
#endif /* PKG_LVGL_THREAD_PRIO */
#ifndef PKG_LVGL_DISP_REFR_PERIOD
#define PKG_LVGL_DISP_REFR_PERIOD 33
#endif /* PKG_LVGL_DISP_REFR_PERIOD */
extern void lv_port_disp_init(void);
extern void lv_port_indev_init(void);
extern void lv_user_gui_init(void);
@@ -33,9 +37,9 @@ extern void lv_user_gui_init(void);
static struct rt_thread lvgl_thread;
#ifdef rt_align
rt_align(RT_ALIGN_SIZE)
rt_align(RT_ALIGN_SIZE)
#else
ALIGN(RT_ALIGN_SIZE)
ALIGN(RT_ALIGN_SIZE)
#endif
static rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE];
@@ -56,11 +60,13 @@ static void lvgl_thread_entry(void *parameter)
lv_port_indev_init();
lv_user_gui_init();
lv_tick_set_cb(&rt_tick_get_millisecond);
/* handle the tasks of LVGL */
while(1)
{
lv_task_handler();
rt_thread_mdelay(LV_DISP_DEF_REFR_PERIOD);
rt_thread_mdelay(PKG_LVGL_DISP_REFR_PERIOD);
}
}
@@ -4,8 +4,8 @@ cwd = GetCurrentDir()
src = Glob('*.c')
inc = [cwd]
# check if .h or .hpp files exsit
def check_h_hpp_exsit(path):
# check if .h or .hpp files exists
def check_h_hpp_exists(path):
file_dirs = os.listdir(path)
for file_dir in file_dirs:
if os.path.splitext(file_dir)[1] in ['.h', '.hpp']:
@@ -17,7 +17,7 @@ for root, dirs, files in os.walk(sls_src_cwd):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c')) # add all .c files
if check_h_hpp_exsit(current_path): # add .h and .hpp path
if check_h_hpp_exists(current_path): # add .h and .hpp path
inc = inc + [current_path]
group = DefineGroup('LVGL-SquareLine', src, depend = ['PKG_USING_LVGL_SQUARELINE'], CPPPATH = inc)