diff --git a/env_support/rt-thread/lv_rt_thread_port.c b/env_support/rt-thread/lv_rt_thread_port.c index 97027f08a..98a1439b5 100644 --- a/env_support/rt-thread/lv_rt_thread_port.c +++ b/env_support/rt-thread/lv_rt_thread_port.c @@ -31,7 +31,7 @@ extern void lv_port_indev_init(void); extern void lv_user_gui_init(void); static struct rt_thread lvgl_thread; -static rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE]; +static ALIGN(8) rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE]; #if LV_USE_LOG static void lv_rt_log(const char *buf) diff --git a/env_support/rt-thread/squareline/README.md b/env_support/rt-thread/squareline/README.md new file mode 100644 index 000000000..e55796b6c --- /dev/null +++ b/env_support/rt-thread/squareline/README.md @@ -0,0 +1,4 @@ +This folder is for LVGL SquareLine Studio + +SquareLine Studio can automatically put the generated C files into `ui` folder, so that rt-thread will automatically detect them; or, as a user, you can move the generated C files into `ui` folder manually. + diff --git a/env_support/rt-thread/squareline/SConscript b/env_support/rt-thread/squareline/SConscript new file mode 100644 index 000000000..89a509973 --- /dev/null +++ b/env_support/rt-thread/squareline/SConscript @@ -0,0 +1,13 @@ +from building import * + +cwd = GetCurrentDir() +group = [] +src = [] +CPPPATH =[] + +src += Glob(cwd + '/ui/*.c') +CPPPATH += [cwd+'/ui'] + +group = group + DefineGroup('LVGL-SquareLine', src, depend = ['PKG_USING_LVGL_SQUARELINE'], CPPPATH = CPPPATH) + +Return('group') diff --git a/env_support/rt-thread/squareline/ui/lv_ui_entry.c b/env_support/rt-thread/squareline/ui/lv_ui_entry.c new file mode 100644 index 000000000..838b53c9f --- /dev/null +++ b/env_support/rt-thread/squareline/ui/lv_ui_entry.c @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2006-2022, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2022-05-13 Meco Man First version + */ + +#ifdef __RTTHREAD__ + +void lv_user_gui_init(void) +{ + extern void ui_init(void); + ui_init(); +} + +#endif /* __RTTHREAD__ */