• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

LVGL.lvgl.8.3.7.packD11-Mar-20244.7 MiB

LVGL.lvgl.pdscD11-Mar-202439.9 KiB782518

LVGL.pidxD11-Mar-2024488 99

README.mdD11-Mar-20244 KiB160119

gen_pack.shD11-Mar-20245.4 KiB231148

lv_cmsis_pack.txtD11-Mar-20243.4 KiB11693

lv_conf_cmsis.hD11-Mar-202421.6 KiB648263

README.md

1# How to Create CMSIS-Pack
2
3
4
5## STEP 1 Update 'lv_conf_cmsis.h'
6
71. Copy the **lv_conf_template.h** to '**cmsis-pack**' directory
8
92. Set the macro protector to '1'
10
11```c
12...
13/* clang-format off */
14#if 1 /*Set it to "1" to enable content*/
15...
16```
17
18remove the misleading guide above this code segment.
19
20```c
21/*
22 * Copy this file as `lv_conf.h`
23 * 1. simply next to the `lvgl` folder
24 * 2. or any other places and
25 *    - define `LV_CONF_INCLUDE_SIMPLE`
26 *    - add the path as include path
27 */
28```
29
30
313. Add including for '**RTE_Components.h**'
32
33```c
34#ifndef LV_CONF_H
35#define LV_CONF_H
36
37#include <stdint.h>
38#include "RTE_Components.h"
39...
40```
41
424. Remove macro definitions for
43   - LV_USE_GPU_STM32_DMA2D
44   - LV_USE_GPU_NXP_PXP
45   - LV_USE_GPU_NXP_VG_LITE
46   - LV_USE_GPU_SWM341_DMA2D
47   - LV_USE_GPU_ARM2D
48   - LV_USE_IME_PINYIN
495. Update macro `LV_ATTRIBUTE_MEM_ALIGN` and `LV_ATTRIBUTE_MEM_ALIGN_SIZE`  to force a WORD alignment.
50```c
51#define LV_ATTRIBUTE_MEM_ALIGN_SIZE     4
52#define LV_ATTRIBUTE_MEM_ALIGN          __attribute__((aligned(4)))
53```
54Update macro `LV_MEM_SIZE` to `(64*1024U)`.
556. Update Theme related macros:
56
57```c
58#ifdef RTE_GRAPHICS_LVGL_USE_EXTRA_THEMES
59    /*A simple, impressive and very complete theme*/
60    #define LV_USE_THEME_DEFAULT 1
61    #if LV_USE_THEME_DEFAULT
62
63        /*0: Light mode; 1: Dark mode*/
64        #define LV_THEME_DEFAULT_DARK 0
65
66        /*1: Enable grow on press*/
67        #define LV_THEME_DEFAULT_GROW 1
68
69        /*Default transition time in [ms]*/
70        #define LV_THEME_DEFAULT_TRANSITION_TIME 80
71    #endif /*LV_USE_THEME_DEFAULT*/
72
73    /*A very simple theme that is a good starting point for a custom theme*/
74    #define LV_USE_THEME_BASIC 1
75
76    /*A theme designed for monochrome displays*/
77    #define LV_USE_THEME_MONO 1
78#else
79    #define LV_USE_THEME_DEFAULT    0
80    #define LV_USE_THEME_BASIC      0
81    #define LV_USE_THEME_MONO       0
82#endif
83```
847. Update `LV_TICK_CUSTOM` related macros:
85```c
86/*Use a custom tick source that tells the elapsed time in milliseconds.
87 *It removes the need to manually update the tick with `lv_tick_inc()`)*/
88#ifdef __PERF_COUNTER__
89    #define LV_TICK_CUSTOM 1
90    #if LV_TICK_CUSTOM
91        extern uint32_t SystemCoreClock;
92        #define LV_TICK_CUSTOM_INCLUDE             "perf_counter.h"
93
94        #if __PER_COUNTER_VER__ < 10902ul
95            #define LV_TICK_CUSTOM_SYS_TIME_EXPR    ((uint32_t)get_system_ticks() / (SystemCoreClock / 1000ul))
96        #else
97            #define LV_TICK_CUSTOM_SYS_TIME_EXPR    get_system_ms()
98        #endif
99    #endif   /*LV_TICK_CUSTOM*/
100#else
101    #define LV_TICK_CUSTOM 0
102    #if LV_TICK_CUSTOM
103        #define LV_TICK_CUSTOM_INCLUDE "Arduino.h"         /*Header for the system time function*/
104        #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis())    /*Expression evaluating to current system time in ms*/
105    #endif   /*LV_TICK_CUSTOM*/
106#endif       /*__PERF_COUNTER__*/
107```
1089. Thoroughly remove the `DEMO USAGE` section.
10910. Thoroughly remove the '3rd party libraries' section.
11010. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
111
112
113
114## STEP 2 Check, Update and Run the 'gen_pack.sh'
115
116```sh
117if [ `uname -s` = "Linux" ]
118  then
119  CMSIS_PACK_PATH="/home/$USER/.arm/Packs/ARM/CMSIS/5.7.0/"
120  PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
121else
122  CMSIS_PACK_PATH="/C/Users/gabriel/AppData/Local/Arm/Packs/ARM/CMSIS/5.7.0"
123  PATH_TO_ADD="/C/Program Files (x86)/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
124fi
125[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
126echo $PATH_TO_ADD appended to PATH
127echo " "
128```
129
130
131
132### A. For Windows users
133
134Update the '**CMSIS_PACK_PATH**' accordingly (Usually just replace the name gabriel with your own windows account name is sufficient.).
135
136Update the '**PATH_TO_ADD**' to point to the installation folders of **7Zip** and **xmllint**.
137
138Launch the git-bash and go to the cmsis-pack folder.
139
140enter the following command:
141
142```sh
143./gen_pack.sh
144```
145
146
147
148### B. For Linux Users
149
150Update '**PATH_TO_ADD**' if necessary.
151
152go to the **cmsis-pack** folder.
153
154enter the following command:
155
156```sh
157./gen_pack.sh
158```
159
160