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
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -2,8 +2,8 @@
<index schemaVersion="1.0.0" xs:noNamespaceSchemaLocation="PackIndex.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
<vendor>LVGL</vendor>
<url>https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/</url>
<timestamp>2023-12-09</timestamp>
<timestamp>2024-01-22</timestamp>
<pindex>
<pdsc url="https://raw.githubusercontent.com/lvgl/lvgl/release/v8.3/env_support/cmsis-pack/" vendor="LVGL" name="lvgl" version="8.3.11"/>
<pdsc url="https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/" vendor="LVGL" name="lvgl" version="9.0.0"/>
</pindex>
</index>
</index>
+163 -91
View File
@@ -6,7 +6,7 @@
1. Copy the **lv_conf_template.h** to '**cmsis-pack**' directory
2. Set the macro protector to '1'
2. Set the macro protector to '1'
```c
...
@@ -34,117 +34,190 @@ remove the misleading guide above this code segment.
#ifndef LV_CONF_H
#define LV_CONF_H
#include <stdint.h>
#include "RTE_Components.h"
...
```
4. Remove macro definitions for
- LV_USE_GPU_STM32_DMA2D
- LV_USE_GPU_NXP_PXP
- LV_USE_GPU_NXP_VG_LITE
- LV_USE_GPU_SWM341_DMA2D
- LV_USE_GPU_ARM2D
- LV_USE_DEMO_WIDGETS
- LV_USE_DEMO_BENCHMARK
- LV_USE_IME_PINYIN
- LV_USE_PNG
- LV_USE_BMP
- LV_USE_SJPG
- LV_USE_GIF
- LV_USE_QRCODE
- LV_USE_FREETYPE
- LV_USE_TINY_TTF
- LV_USE_RLOTTIE
- LV_USE_FFMPEG
- LV_USE_OS
- LV_USE_FILE_EXPLORER
- LV_USE_DEMO_WIDGETS
- LV_USE_DEMO_KEYPAD_AND_ENCODER
- LV_USE_DEMO_BENCHMARK
- LV_USE_DEMO_RENDER
- LV_USE_DEMO_STRESS
- LV_USE_DEMO_MUSIC
- LV_USE_DEMO_FLEX_LAYOUT
- LV_USE_DEMO_MULTILANG
- LV_USE_DEMO_TRANSFORM
- LV_USE_DEMO_SCROLL
- LV_USE_DEMO_VECTOR_GRAPHIC
- LV_USE_DRAW_VGLITE
- LV_USE_DRAW_VG_LITE
- LV_USE_DRAW_PXP
- LV_USE_DRAW_SDL
- LV_USE_DRAW_ARM2D
- LV_USE_SNAPSHOT
- LV_USE_MONKEY
- LV_USE_GRIDNAV
- LV_USE_FRAGMENT
- LV_USE_IMGFONT
- LV_USE_MSG
- LV_USE_IME_PINYIN
5. Update macro `LV_ATTRIBUTE_MEM_ALIGN` and `LV_ATTRIBUTE_MEM_ALIGN_SIZE` to force a WORD alignment.
- LV_USE_LINUX_DRM
- LV_USE_TFT_ESPI
- LV_USE_ST7735
- LV_USE_ST7789
- LV_USE_ST7796
- LV_USE_ILI9341
5. Update `LV_LOG_PRINTF` to `1` and `LV_LOG_LEVEL` to `LV_LOG_LEVEL_USER`
6. Set `LV_FONT_MONTSERRAT_12`, `LV_FONT_MONTSERRAT_24` and `LV_FONT_MONTSERRAT_16` to `1` (So Widgets and Benchmark can be compiled correctly, this is for improving the out of box experience.)
7. Update macro `LV_ATTRIBUTE_MEM_ALIGN` and `LV_ATTRIBUTE_MEM_ALIGN_SIZE` to force a WORD alignment.
```c
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 4
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
#define LV_DRAW_BUF_STRIDE_ALIGN 4
#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
```
Update macro `LV_MEM_SIZE` to `(64*1024U)`.
Make sure `LV_MEM_SIZE` is no less than `(96*1024U)`.
Update macro `LV_FONT_MONTSERRAT_12` to `1`.
8. Remove following macro definitions in the `3rd party libraries` section:
Update macro `LV_FONT_MONTSERRAT_12` to `1`.
- \#define LV_USE_FS_STDIO 0
- \#define LV_USE_FS_POSIX 0
- \#define LV_USE_FS_WIN32 0
- \#define LV_USE_FS_FATFS 0
- #define LV_USE_FS_MEMFS 0
- \#define LV_USE_LODEPNG 0
- #define LV_USE_LIBPNG 0
- \#define LV_USE_BMP 0
- \#define LV_USE_RLE 0
- #define LV_USE_TJPGD 0
- #define LV_USE_LIBJPEG_TURBO 0
- \#define LV_USE_GIF 0
- \#define LV_USE_BARCODE 0
- \#define LV_USE_QRCODE 0
- \#define LV_USE_FREETYPE 0
- \#define LV_USE_TINY_TTF 0
- \#define LV_USE_RLOTTIE 0
- \#define LV_USE_FFMPEG 0
6. Update Theme related macros:
9. update the definition of following macros: `LV_USE_VECTOR_GRAPHIC`, `LV_USE_THORVE_INTERNAL` and `LV_USE_THORVE_EXTERNAL` as
```c
/*Enable Vector Graphic APIs*/
#ifndef LV_USE_VECTOR_GRAPHIC
# define LV_USE_VECTOR_GRAPHIC 0
/* Enable ThorVG (vector graphics library) from the src/libs folder */
# define LV_USE_THORVG_INTERNAL 0
/* Enable ThorVG by assuming that its installed and linked to the project */
# define LV_USE_THORVG_EXTERNAL 0
#endif
```
10. update the definition of following macros: `LV_USE_LZ4`, `LV_USE_LZ4_INTERNAL` and `LV_USE_LZ4_EXTERNAL` as
```c
/*Enable LZ4 compress/decompress lib*/
#ifndef LV_USE_LZ4
# define LV_USE_LZ4 0
/*Use lvgl built-in LZ4 lib*/
# define LV_USE_LZ4_INTERNAL 0
/*Use external LZ4 library*/
# define LV_USE_LZ4_EXTERNAL 0
#endif
```
11. Add the following code to `HAL SETTINGS`:
```c
#ifdef RTE_GRAPHICS_LVGL_USE_EXTRA_THEMES
/*A simple, impressive and very complete theme*/
#define LV_USE_THEME_DEFAULT 1
#if LV_USE_THEME_DEFAULT
/*0: Light mode; 1: Dark mode*/
#define LV_THEME_DEFAULT_DARK 0
/*1: Enable grow on press*/
#define LV_THEME_DEFAULT_GROW 1
/*Default transition time in [ms]*/
#define LV_THEME_DEFAULT_TRANSITION_TIME 80
#endif /*LV_USE_THEME_DEFAULT*/
/*A very simple theme that is a good starting point for a custom theme*/
#define LV_USE_THEME_BASIC 1
/*A theme designed for monochrome displays*/
#define LV_USE_THEME_MONO 1
#else
#define LV_USE_THEME_DEFAULT 0
#define LV_USE_THEME_BASIC 0
#define LV_USE_THEME_MONO 0
#endif
```
7. Update `LV_TICK_CUSTOM` related macros:
```c
/*Use a custom tick source that tells the elapsed time in milliseconds.
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
#ifdef __PERF_COUNTER__
#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM
extern uint32_t SystemCoreClock;
#define LV_TICK_CUSTOM_INCLUDE "perf_counter.h"
#define LV_TICK_CUSTOM_SYS_TIME_EXPR get_system_ms()
#endif /*LV_TICK_CUSTOM*/
#else
#define LV_TICK_CUSTOM 0
#if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
/*If using lvgl as ESP32 component*/
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
#endif /*LV_TICK_CUSTOM*/
#endif /*__PERF_COUNTER__*/
```
9. Remove all content in `DEMO USAGE` section but keep the following:
```c
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
#if LV_USE_DEMO_WIDGETS
#define LV_DEMO_WIDGETS_SLIDESHOW 0
#endif
/*Benchmark your system*/
#if LV_USE_DEMO_BENCHMARK
/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
#define LV_DEMO_BENCHMARK_RGB565A8 1
/*customize tick-get */
#if defined(__PERF_COUNTER__) && __PERF_COUNTER__
#define LV_GLOBAL_INIT(__GLOBAL_PTR) \
do { \
lv_global_init((lv_global_t *)(__GLOBAL_PTR)); \
extern uint32_t perfc_tick_get(void); \
(__GLOBAL_PTR)->tick_state.tick_get_cb = perfc_tick_get; \
} while(0)
#endif
```
10. Thoroughly remove the `3rd party libraries` section.
11. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
12. Replace the macro definition:
```c
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
```
with:
```c
#if !defined(LV_USE_DRAW_SW_ASM) && defined(RTE_Acceleration_Arm_2D)
/*turn-on helium acceleration when Arm-2D and the Helium-powered device are detected */
#if defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_HELIUM
#define LV_USE_DRAW_ARM2D 1
#endif
#endif
#ifndef LV_USE_DRAW_SW_ASM
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
#endif
```
13. Update macro `LV_PROFILER_INCLUDE`:
```c
#define LV_PROFILER_INCLUDE "src/misc/lv_profiler_builtin.h"
```
14. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
@@ -156,7 +229,7 @@ if [ `uname -s` = "Linux" ]
CMSIS_PACK_PATH="/home/$USER/.arm/Packs/ARM/CMSIS/5.7.0/"
PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
else
CMSIS_PACK_PATH="/C/Users/gabriel/AppData/Local/Arm/Packs/ARM/CMSIS/5.7.0"
CMSIS_PACK_PATH="/C/Users/$USER/AppData/Local/Arm/Packs/ARM/CMSIS/5.7.0"
PATH_TO_ADD="/C/Program Files (x86)/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
fi
[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
@@ -193,4 +266,3 @@ enter the following command:
```sh
./gen_pack.sh
```
+17 -12
View File
@@ -44,8 +44,8 @@ PACK_BUILD=build/
# alternative: specify directory names to be added to pack base directory
PACK_DIRS="
../../src
../../docs
../../demos
../../env_support/pikascript
"
@@ -53,7 +53,6 @@ PACK_DIRS="
PACK_BASE_FILES="
../../LICENCE.txt
../../README.md
../../README_zh.md
../../lvgl.h
lv_conf_cmsis.h
lv_cmsis_pack.txt
@@ -138,10 +137,6 @@ fi
mkdir -p ${PACK_BUILD}/examples
mkdir -p ${PACK_BUILD}/examples/porting
# Copy files into build base directory: $PACK_BUILD
# pdsc file is mandatory in base directory:
cp -f ./$PACK_VENDOR.$PACK_NAME.pdsc ${PACK_BUILD}
cp -f ../../examples/porting/* ${PACK_BUILD}/examples/porting
# directories
@@ -162,6 +157,13 @@ do
cp -f "$f" $PACK_BUILD/
done
# Copy files into build base directory: $PACK_BUILD
# pdsc file is mandatory in base directory:
cp -f ./$PACK_VENDOR.$PACK_NAME.pdsc ${PACK_BUILD}
cp -f ../../examples/porting/* ${PACK_BUILD}/examples/porting
cp -f ./lv_os_custom_c.txt ${PACK_BUILD}/src/osal/lv_os_custom.c
cp -f ./lv_os_custom_h.txt ${PACK_BUILD}/src/osal/lv_os_custom.h
mv "${PACK_BUILD}/lv_cmsis_pack.txt" "${PACK_BUILD}/lv_cmsis_pack.c"
# Run Schema Check (for Linux only):
@@ -188,16 +190,19 @@ fi
PACKNAME=`cat PackName.txt`
rm -rf PackName.txt
echo remove unrequired files and folders...
rm -rf $PACK_BUILD/demos/keypad_encoder
rm -rf $PACK_BUILD/demos/music
rm -rf $PACK_BUILD/demos/stress
rm -rf $PACK_BUILD/demos/widgets/screenshot1.gif
# echo apply patches...
# rm -rf $PACK_BUILD/demos/lv_demos.h
# cp -f ./lv_demos.h $PACK_BUILD/demos/
echo delete files...
find $PACK_BUILD/demos/ -type f -name "*.png" -delete
find $PACK_BUILD/demos/ -type f -name "*.gif" -delete
find $PACK_BUILD/demos/ -type f -name "*.gif" -delete
find $PACK_BUILD/demos/ -type f -name "*.ttf" -delete
find $PACK_BUILD/demos/ -type f -name "*.otf" -delete
find $PACK_BUILD/demos/ -type f -name "*.jpg" -delete
find $PACK_BUILD/demos/ -type f -name "*.fnt" -delete
# Archiving
# $ZIP a $PACKNAME
echo creating pack file $PACKNAME
@@ -27,9 +27,18 @@
#include "RTE_Components.h"
#include <time.h>
/*********************
#if defined(__PERF_COUNTER__) && __PERF_COUNTER__
# include "perf_counter.h"
#endif
#include <stdint.h>
#include <stddef.h>
#include "lv_global.h"
/*********************
* DEFINES
*********************/
#define state LV_GLOBAL_DEFAULT()->tick_state
/**********************
* TYPEDEFS
@@ -98,18 +107,33 @@
* GLOBAL FUNCTIONS
**********************/
/* only arm compilers will use microLib that doesn't implement time() */
#if defined(__MICROLIB)
/* When Arm Compilers using the MicroLib, provide an empty implementation for
* time() which is not included in the MicroLib
*/
#if defined(__IS_COMPILER_ARM_COMPILER__) && __IS_COMPILER_ARM_COMPILER__
# if defined(__MICROLIB)
__attribute__((weak))
_ARMABI time_t time(time_t * time)
{
return (time_t)(-1);
}
#endif
# endif
/* when people don't want to use src/extra */
__attribute__((weak))
void lv_extra_init(void)
# if defined(__PERF_COUNTER__) && __PERF_COUNTER__
/**
* Get the elapsed milliseconds since start up from perf_counter
* @return the elapsed milliseconds
*/
uint32_t perfc_tick_get(void)
{
return (uint32_t)get_system_ms();
}
# endif
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,120 @@
/**
* @file lv_os_custom.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_os.h"
#if LV_USE_OS == LV_OS_CUSTOM
#include "../misc/lv_types.h"
#include "../misc/lv_assert.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
lv_result_t lv_thread_init(lv_thread_t * thread, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size,
void * user_data)
{
LV_UNUSED(thread);
LV_UNUSED(callback);
LV_UNUSED(prio);
LV_UNUSED(stack_size);
LV_UNUSED(user_data);
LV_ASSERT(0);
return LV_RESULT_INVALID;
}
lv_result_t lv_thread_delete(lv_thread_t * thread)
{
LV_UNUSED(thread);
LV_ASSERT(0);
return LV_RESULT_INVALID;
}
lv_result_t lv_mutex_init(lv_mutex_t * mutex)
{
LV_UNUSED(mutex);
return LV_RESULT_OK;
}
lv_result_t lv_mutex_lock(lv_mutex_t * mutex)
{
LV_UNUSED(mutex);
return LV_RESULT_OK;
}
lv_result_t lv_mutex_lock_isr(lv_mutex_t * mutex)
{
LV_UNUSED(mutex);
return LV_RESULT_OK;
}
lv_result_t lv_mutex_unlock(lv_mutex_t * mutex)
{
LV_UNUSED(mutex);
return LV_RESULT_OK;
}
lv_result_t lv_mutex_delete(lv_mutex_t * mutex)
{
LV_UNUSED(mutex);
return LV_RESULT_OK;
}
lv_result_t lv_thread_sync_init(lv_thread_sync_t * sync)
{
LV_UNUSED(sync);
LV_ASSERT(0);
return LV_RESULT_INVALID;
}
lv_result_t lv_thread_sync_wait(lv_thread_sync_t * sync)
{
LV_UNUSED(sync);
LV_ASSERT(0);
return LV_RESULT_INVALID;
}
lv_result_t lv_thread_sync_signal(lv_thread_sync_t * sync)
{
LV_UNUSED(sync);
LV_ASSERT(0);
return LV_RESULT_INVALID;
}
lv_result_t lv_thread_sync_delete(lv_thread_sync_t * sync)
{
LV_UNUSED(sync);
LV_ASSERT(0);
return LV_RESULT_INVALID;
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif /*LV_USE_OS == LV_OS_CUSTOM*/
@@ -0,0 +1,43 @@
/**
* @file lv_os_custom.h
*
*/
#ifndef LV_OS_CUSTOM_H
#define LV_OS_CUSTOM_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#if LV_USE_OS == LV_OS_CUSTOM
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef int lv_mutex_t;
typedef int lv_thread_t;
typedef int lv_thread_sync_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
#endif /*LV_USE_OS == LV_OS_CUSTOM*/
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_OS_CUSTOM_H*/