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:
committed by
GitHub
parent
5fef25fb13
commit
473fb673bd
@@ -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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user