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

..--

LVGL.lvgl.1.0.0.packD11-Mar-20244.6 MiB

LVGL.lvgl.pdscD11-Mar-202430.4 KiB593360

README.mdD11-Mar-20243.4 KiB138100

gen_pack.shD11-Mar-20245.4 KiB231148

lv_cmsis_pack.txtD11-Mar-20243.4 KiB11693

lv_conf_cmsis.hD11-Mar-202420 KiB604244

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
18
193. Add including for '**RTE_Components.h**'
20
21```c
22#ifndef LV_CONF_H
23#define LV_CONF_H
24
25#include <stdint.h>
26#include "RTE_Components.h"
27...
28```
29
304. Remove macro definitions for
31   - LV_USE_GPU_STM32_DMA2D
32   - LV_USE_GPU_NXP_PXP
33   - LV_USE_GPU_NXP_VG_LITE
345. Update macro LV_ATTRIBUTE_MEM_ALIGN to force a WORD alignment.
35```c
36#define LV_ATTRIBUTE_MEM_ALIGN      __attribute__((aligned(4)))
37```
386. Update Theme related macros:
39
40```c
41#ifdef RTE_GRAPHICS_LVGL_USE_EXTRA_THEMES
42    /*A simple, impressive and very complete theme*/
43    #define LV_USE_THEME_DEFAULT 1
44    #if LV_USE_THEME_DEFAULT
45
46        /*0: Light mode; 1: Dark mode*/
47        #define LV_THEME_DEFAULT_DARK 0
48
49        /*1: Enable grow on press*/
50        #define LV_THEME_DEFAULT_GROW 1
51
52        /*Default transition time in [ms]*/
53        #define LV_THEME_DEFAULT_TRANSITION_TIME 80
54    #endif /*LV_USE_THEME_DEFAULT*/
55
56    /*A very simple theme that is a good starting point for a custom theme*/
57    #define LV_USE_THEME_BASIC 1
58
59    /*A theme designed for monochrome displays*/
60    #define LV_USE_THEME_MONO 1
61#else
62    #define LV_USE_THEME_DEFAULT    0
63    #define LV_USE_THEME_BASIC      0
64    #define LV_USE_THEME_MONO       0
65#endif
66```
677. Update LV_TICK_CUSTOM related macros:
68```c
69/*Use a custom tick source that tells the elapsed time in milliseconds.
70 *It removes the need to manually update the tick with `lv_tick_inc()`)*/
71#ifdef __PERF_COUNTER__
72    #define LV_TICK_CUSTOM 1
73    #if LV_TICK_CUSTOM
74        extern uint32_t SystemCoreClock;
75        #define LV_TICK_CUSTOM_INCLUDE          "perf_counter.h"
76        #define LV_TICK_CUSTOM_SYS_TIME_EXPR    (get_system_ticks() / (SystemCoreClock / 1000ul))
77    #endif   /*LV_TICK_CUSTOM*/
78#else
79    #define LV_TICK_CUSTOM 0
80    #if LV_TICK_CUSTOM
81        #define LV_TICK_CUSTOM_INCLUDE "Arduino.h"         /*Header for the system time function*/
82        #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis())    /*Expression evaluating to current system time in ms*/
83    #endif   /*LV_TICK_CUSTOM*/
84#endif       /*__PERF_COUNTER__*/
85```
869. Thoroughly remove the 'DEMO USAGE' section.
8710. Thoroughly remove the '3rd party libraries' section.
8810. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
89
90
91
92## STEP 2 Check, Update and Run the 'gen_pack.sh'
93
94```sh
95if [ `uname -s` = "Linux" ]
96  then
97  CMSIS_PACK_PATH="/home/$USER/.arm/Packs/ARM/CMSIS/5.7.0/"
98  PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
99else
100  CMSIS_PACK_PATH="/C/Users/gabriel/AppData/Local/Arm/Packs/ARM/CMSIS/5.7.0"
101  PATH_TO_ADD="/C/Program Files (x86)/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
102fi
103[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
104echo $PATH_TO_ADD appended to PATH
105echo " "
106```
107
108
109
110### A. For Windows users
111
112Update the '**CMSIS_PACK_PATH**' accordingly (Usually just replace the name gabriel with your own windows account name is sufficient.).
113
114Update the '**PATH_TO_ADD**' to point to the installation folders of **7Zip** and **xmllint**.
115
116Launch the git-bash and go to the cmsis-pack folder.
117
118enter the following command:
119
120```sh
121./gen_pack.sh
122```
123
124
125
126### B. For Linux Users
127
128Update '**PATH_TO_ADD**' if necessary.
129
130go to the cmsis-pack folder.
131
132enter the following command:
133
134```sh
135./gen_pack.sh
136```
137
138