mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
feat: update the cmsis-pack to 0.8.3 (#3021)
* doc: add readme.md for cmsis-pack * feat: add benchmark to cmsis-pack * fix: force WORD alignment for enabling AC6 auto-vectorization * feat: add demo:widgets * fix: use the original lv_demos.h
This commit is contained in:
parent
773d50f0ac
commit
218d68e99d
Binary file not shown.
@ -36,8 +36,10 @@
|
||||
<repository type="git">https://github.com/lvgl/lvgl.git</repository>
|
||||
|
||||
<releases>
|
||||
<release date="2022-01-12" version="0.8.2" url="https://raw.githubusercontent.com/lvgl/lvgl/master/cmsis-pack/LVGL.lvgl.0.8.2.pack">
|
||||
<release date="2022-01-12" version="0.8.3" url="https://raw.githubusercontent.com/lvgl/lvgl/master/cmsis-pack/LVGL.lvgl.0.8.3.pack">
|
||||
- LVGL v8.1.0
|
||||
- Add benchmark
|
||||
- Add Demo:Widgets
|
||||
</release>
|
||||
</releases>
|
||||
|
||||
@ -291,7 +293,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief Enable LVGL */
|
||||
#define RTE_GRAPICS_LVGL
|
||||
#define RTE_GRAPHICS_LVGL
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@ -529,6 +531,53 @@
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
|
||||
<component Cgroup="lvgl" Csub="Benchmark" condition="LVGL-Essential">
|
||||
<description>Add the official benchmark.</description>
|
||||
<files>
|
||||
<!-- demos/benchmark -->
|
||||
<file category="sourceC" name="demos/benchmark/lv_demo_benchmark.c" />
|
||||
<file category="header" name="demos/benchmark/lv_demo_benchmark.h" />
|
||||
|
||||
<file category="sourceC" name="demos/benchmark/assets/img_benchmark_cogwheel_alpha16.c" />
|
||||
<file category="sourceC" name="demos/benchmark/assets/img_benchmark_cogwheel_argb.c" />
|
||||
<file category="sourceC" name="demos/benchmark/assets/img_benchmark_cogwheel_chroma_keyed.c" />
|
||||
<file category="sourceC" name="demos/benchmark/assets/img_benchmark_cogwheel_indexed16.c" />
|
||||
<file category="sourceC" name="demos/benchmark/assets/img_benchmark_cogwheel_rgb.c" />
|
||||
<file category="sourceC" name="demos/benchmark/assets/lv_font_bechmark_montserrat_12_compr_az.c.c" />
|
||||
<file category="sourceC" name="demos/benchmark/assets/lv_font_bechmark_montserrat_16_compr_az.c.c" />
|
||||
<file category="sourceC" name="demos/benchmark/assets/lv_font_bechmark_montserrat_28_compr_az.c.c" />
|
||||
|
||||
<file category="doc" name="demos/benchmark/README.md" />
|
||||
</files>
|
||||
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable demo:bencharmk */
|
||||
#define LV_USE_DEMO_BENCHMARK 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
|
||||
<component Cgroup="lvgl" Csub="Demo:Widgets" condition="LVGL-Essential">
|
||||
<description>Add the demo:widgets</description>
|
||||
<files>
|
||||
<!-- demos/widgets -->
|
||||
<file category="sourceC" name="demos/widgets/lv_demo_widgets.c" />
|
||||
<file category="header" name="demos/widgets/lv_demo_widgets.h" />
|
||||
|
||||
<file category="sourceC" name="demos/widgets/assets/img_clothes.c" />
|
||||
<file category="sourceC" name="demos/widgets/assets/img_demo_widgets_avatar.c" />
|
||||
<file category="sourceC" name="demos/widgets/assets/img_lvgl_logo.c" />
|
||||
</files>
|
||||
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable demo:widgets support */
|
||||
#define LV_USE_DEMO_WIDGETS 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
</bundle>
|
||||
</components>
|
||||
|
||||
|
119
cmsis-pack/README.md
Normal file
119
cmsis-pack/README.md
Normal file
@ -0,0 +1,119 @@
|
||||
# How to Create CMSIS-Pack
|
||||
|
||||
|
||||
|
||||
## STEP 1 Update 'lv_conf_cmsis.h'
|
||||
|
||||
1. Copy the **lv_conf_template.h** to '**cmsis-pack**' directory
|
||||
|
||||
2. Set the macro protector to '1'
|
||||
|
||||
```c
|
||||
...
|
||||
/* clang-format off */
|
||||
#if 1 /*Set it to "1" to enable content*/
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
3. Add including for '**RTE_Components.h**'
|
||||
|
||||
```c
|
||||
#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
|
||||
5. Update macro LV_ATTRIBUTE_MEM_ALIGN to force a WORD alignment.
|
||||
```c
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
|
||||
```
|
||||
6. Update Theme related macros:
|
||||
|
||||
```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. Thoroughly remove the 'DEMO USAGE' section.
|
||||
8. Thoroughly remove the '3rd party libraries' section.
|
||||
9. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
|
||||
|
||||
|
||||
|
||||
## STEP 2 Check, Update and Run the 'gen_pack.sh'
|
||||
|
||||
```sh
|
||||
if [ `uname -s` = "Linux" ]
|
||||
then
|
||||
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"
|
||||
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}"
|
||||
echo $PATH_TO_ADD appended to PATH
|
||||
echo " "
|
||||
```
|
||||
|
||||
|
||||
|
||||
### A. For Windows users
|
||||
|
||||
Update the '**CMSIS_PACK_PATH**' accordingly (Usually just replace the name gabriel with your own windows account name is sufficient.).
|
||||
|
||||
Update the '**PATH_TO_ADD**' to point to the installation folders of **7Zip** and **xmllint**.
|
||||
|
||||
Launch the git-bash and go to the cmsis-pack folder.
|
||||
|
||||
enter the following command:
|
||||
|
||||
```sh
|
||||
./gen_pack.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
### B. For Linux Users
|
||||
|
||||
Update '**PATH_TO_ADD**' if necessary.
|
||||
|
||||
go to the cmsis-pack folder.
|
||||
|
||||
enter the following command:
|
||||
|
||||
```sh
|
||||
./gen_pack.sh
|
||||
```
|
||||
|
@ -48,6 +48,7 @@ PACK_DIRS="
|
||||
../rt-thread
|
||||
../zephyr
|
||||
../cmake
|
||||
../demos
|
||||
"
|
||||
|
||||
|
||||
@ -190,6 +191,16 @@ 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/
|
||||
|
||||
# Archiving
|
||||
# $ZIP a $PACKNAME
|
||||
echo creating pack file $PACKNAME
|
||||
@ -217,6 +228,7 @@ echo "build of pack succeeded"
|
||||
echo "cleaning up ..."
|
||||
|
||||
rm -rf $PACK_BUILD
|
||||
|
||||
echo " "
|
||||
|
||||
echo Completed CMSIS-Pack Generation: `date`
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
#if 1 /*Set it to "1" to enable content*/
|
||||
|
||||
#ifndef LV_CONF_H
|
||||
#define LV_CONF_H
|
||||
@ -150,7 +151,7 @@
|
||||
*-----------*/
|
||||
|
||||
/*Use STM32's DMA2D (aka Chrom Art) GPU*/
|
||||
/*#define LV_USE_GPU_STM32_DMA2D 0 */
|
||||
|
||||
#if LV_USE_GPU_STM32_DMA2D
|
||||
/*Must be defined to include path of CMSIS header of target processor
|
||||
e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
@ -158,7 +159,7 @@
|
||||
#endif
|
||||
|
||||
/*Use NXP's PXP GPU iMX RTxxx platforms*/
|
||||
/*#define LV_USE_GPU_NXP_PXP 0 */
|
||||
|
||||
#if LV_USE_GPU_NXP_PXP
|
||||
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
|
||||
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS
|
||||
@ -169,13 +170,16 @@
|
||||
#endif
|
||||
|
||||
/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
|
||||
/*#define LV_USE_GPU_NXP_VG_LITE 0 */
|
||||
|
||||
|
||||
/*Use SDL renderer API*/
|
||||
#define LV_USE_GPU_SDL 0
|
||||
#if LV_USE_GPU_SDL
|
||||
#define LV_GPU_SDL_INCLUDE_PATH <SDL2/SDL.h>
|
||||
/*Texture cache size, 8MB by default*/
|
||||
#define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8)
|
||||
/*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/
|
||||
#define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6))
|
||||
#endif
|
||||
|
||||
/*-------------
|
||||
@ -287,12 +291,12 @@
|
||||
|
||||
/*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default).
|
||||
* E.g. __attribute__((aligned(4)))*/
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
|
||||
|
||||
/*Attribute to mark large constant arrays for example font's bitmaps*/
|
||||
#define LV_ATTRIBUTE_LARGE_CONST
|
||||
|
||||
/*Complier prefix for a big array declaration in RAM*/
|
||||
/*Compiler prefix for a big array declaration in RAM*/
|
||||
#define LV_ATTRIBUTE_LARGE_RAM_ARRAY
|
||||
|
||||
/*Place performance critical functions into a faster memory (e.g RAM)*/
|
||||
@ -339,7 +343,7 @@
|
||||
/*Demonstrate special features*/
|
||||
#define LV_FONT_MONTSERRAT_12_SUBPX 0
|
||||
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
|
||||
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Perisan letters and all their forms*/
|
||||
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/
|
||||
#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
|
||||
|
||||
/*Pixel perfect monospace fonts*/
|
||||
@ -522,31 +526,25 @@
|
||||
* Themes
|
||||
*----------*/
|
||||
|
||||
#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
|
||||
/*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
|
||||
/*0: Light mode; 1: Dark mode*/
|
||||
#define LV_THEME_DEFAULT_DARK 0
|
||||
|
||||
/*1: Enable grow on press*/
|
||||
#define LV_THEME_DEFAULT_GROW 1
|
||||
/*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*/
|
||||
/*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 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
|
||||
/*A theme designed for monochrome displays*/
|
||||
#define LV_USE_THEME_MONO 1
|
||||
|
||||
/*-----------
|
||||
* Layouts
|
||||
@ -562,66 +560,6 @@
|
||||
* 3rd party libraries
|
||||
*--------------------*/
|
||||
|
||||
#if 0 /*TODO: remove as a workaround */
|
||||
|
||||
/*File system interfaces for common APIs
|
||||
*To enable set a driver letter for that API*/
|
||||
#define LV_USE_FS_STDIO '\0' /*Uses fopen, fread, etc*/
|
||||
//#define LV_FS_STDIO_PATH "/home/john/" /*Set the working directory. If commented it will be "./" */
|
||||
|
||||
#define LV_USE_FS_POSIX '\0' /*Uses open, read, etc*/
|
||||
//#define LV_FS_POSIX_PATH "/home/john/" /*Set the working directory. If commented it will be "./" */
|
||||
|
||||
#define LV_USE_FS_WIN32 '\0' /*Uses CreateFile, ReadFile, etc*/
|
||||
//#define LV_FS_WIN32_PATH "C:\\Users\\john\\" /*Set the working directory. If commented it will be ".\\" */
|
||||
|
||||
#define LV_USE_FS_FATFS '\0' /*Uses f_open, f_read, etc*/
|
||||
|
||||
/*PNG decoder library*/
|
||||
#define LV_USE_PNG 0
|
||||
|
||||
/*BMP decoder library*/
|
||||
#define LV_USE_BMP 0
|
||||
|
||||
/* JPG + split JPG decoder library.
|
||||
* Split JPG is a custom format optimized for embedded systems. */
|
||||
#define LV_USE_SJPG 0
|
||||
|
||||
/*GIF decoder library*/
|
||||
#define LV_USE_GIF 0
|
||||
|
||||
/*QR code library*/
|
||||
#define LV_USE_QRCODE 0
|
||||
|
||||
/*FreeType library*/
|
||||
#define LV_USE_FREETYPE 0
|
||||
|
||||
#if LV_USE_FREETYPE
|
||||
/*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
|
||||
#define LV_FREETYPE_CACHE_SIZE (16 * 1024)
|
||||
#if LV_FREETYPE_CACHE_SIZE >= 0
|
||||
/* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
|
||||
/* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
|
||||
/* if font size >= 256, must be configured as image cache */
|
||||
#define LV_FREETYPE_SBIT_CACHE 0
|
||||
/* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
|
||||
/* (0:use system defaults) */
|
||||
#define LV_FREETYPE_CACHE_FT_FACES 0
|
||||
#define LV_FREETYPE_CACHE_FT_SIZES 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*Rlottie library*/
|
||||
#define LV_USE_RLOTTIE 0
|
||||
|
||||
/*FFmpeg library for image decoding and playing videos
|
||||
*Supports all major image formats so do not enable other image decoder with it*/
|
||||
#define LV_USE_FFMPEG 0
|
||||
#if LV_USE_FFMPEG
|
||||
/*Dump input information to stderr*/
|
||||
#define LV_FFMPEG_AV_DUMP_FORMAT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*-----------
|
||||
* Others
|
||||
@ -640,36 +578,8 @@
|
||||
/*Enable the examples to be built with the library*/
|
||||
#define LV_BUILD_EXAMPLES 1
|
||||
|
||||
/*===================
|
||||
* DEMO USAGE
|
||||
====================*/
|
||||
|
||||
/*Show some widget*/
|
||||
#define LV_USE_DEMO_WIDGETS 0
|
||||
#if LV_USE_DEMO_WIDGETS
|
||||
#define LV_DEMO_WIDGETS_SLIDESHOW 0
|
||||
#endif
|
||||
|
||||
/*Demonstrate the usage of encoder and keyboard*/
|
||||
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
|
||||
|
||||
/*Benchmark your system*/
|
||||
#define LV_USE_DEMO_BENCHMARK 0
|
||||
|
||||
/*Stress test for LVGL*/
|
||||
#define LV_USE_DEMO_STRESS 0
|
||||
|
||||
/*Music player demo*/
|
||||
#define LV_USE_DEMO_MUSIC 0
|
||||
#if LV_USE_DEMO_MUSIC
|
||||
# define LV_DEMO_MUSIC_SQUARE 0
|
||||
# define LV_DEMO_MUSIC_LANDSCAPE 0
|
||||
# define LV_DEMO_MUSIC_ROUND 0
|
||||
# define LV_DEMO_MUSIC_LARGE 0
|
||||
# define LV_DEMO_MUSIC_AUTO_PLAY 0
|
||||
#endif
|
||||
|
||||
/*--END OF LV_CONF_H--*/
|
||||
|
||||
#endif /*LV_CONF_H*/
|
||||
|
||||
#endif /*End of "Content enable"*/
|
||||
|
@ -15,11 +15,25 @@ extern "C" {
|
||||
*********************/
|
||||
#include "../lvgl.h"
|
||||
|
||||
#include "widgets/lv_demo_widgets.h"
|
||||
#include "benchmark/lv_demo_benchmark.h"
|
||||
#include "stress/lv_demo_stress.h"
|
||||
#include "keypad_encoder/lv_demo_keypad_encoder.h"
|
||||
#include "music/lv_demo_music.h"
|
||||
#if LV_USE_DEMO_WIDGETS
|
||||
#include "widgets/lv_demo_widgets.h"
|
||||
#endif
|
||||
|
||||
#if LV_USE_DEMO_BENCHMARK
|
||||
#include "benchmark/lv_demo_benchmark.h"
|
||||
#endif
|
||||
|
||||
#if LV_USE_DEMO_STRESS
|
||||
#include "stress/lv_demo_stress.h"
|
||||
#endif
|
||||
|
||||
#if LV_USE_DEMO_KEYPAD_AND_ENCODER
|
||||
#include "keypad_encoder/lv_demo_keypad_encoder.h"
|
||||
#endif
|
||||
|
||||
#if LV_USE_DEMO_MUSIC
|
||||
#include "music/lv_demo_music.h"
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
|
Loading…
x
Reference in New Issue
Block a user