env_support/cmsis-pack/README.md
Copy the lv_conf_template.h to 'cmsis-pack' directory
Set the macro protector to '1'
...
/* clang-format off */
#if 1 /*Set it to "1" to enable content*/
...
remove the misleading guide above this code segment.
/*
* Copy this file as `lv_conf.h`
* 1. simply next to the `lvgl` folder
* 2. or any other places and
* - define `LV_CONF_INCLUDE_SIMPLE`
* - add the path as include path
*/
#ifndef LV_CONF_CMSIS_H
#define LV_CONF_CMSIS_H
#if defined(_RTE_)
#include "RTE_Components.h"
#endif
...
Remove macro definitions for
Update LV_LOG_PRINTF to 1 and LV_LOG_LEVEL to LV_LOG_LEVEL_USER
Set LV_FONT_MONTSERRAT_12, LV_FONT_MONTSERRAT_20, LV_FONT_MONTSERRAT_24, LV_FONT_MONTSERRAT_26 and LV_FONT_MONTSERRAT_16 to 1 (So Widgets and Benchmark can be compiled correctly, this is for improving the out of box experience.)
Update macro LV_ATTRIBUTE_MEM_ALIGN and LV_ATTRIBUTE_MEM_ALIGN_SIZE to force a WORD alignment.
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
#define LV_DRAW_BUF_STRIDE_ALIGN 4
#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
Make sure LV_MEM_SIZE is no less than (128*1024U).
Remove following macro definitions in the 3rd party libraries section:
update the definition of following macros: LV_USE_VECTOR_GRAPHIC, LV_USE_THORVG_INTERNAL and LV_USE_THORVG_EXTERNAL as
/*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
update the definition of following macros: LV_USE_LZ4, LV_USE_LZ4_INTERNAL and LV_USE_LZ4_EXTERNAL as
/*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
Add the following code to HAL SETTINGS:
/*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
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
with:
#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_SYNC 1
#endif
#endif
#ifndef LV_USE_DRAW_SW_ASM
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
#endif
LV_PROFILER_INCLUDE:#define LV_PROFILER_INCLUDE "src/misc/lv_profiler_builtin.h"
/** Swap the high and low bytes for RGB565 */
#define LV_COLOR_16_SWAP 0
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/$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}"
echo $PATH_TO_ADD appended to PATH
echo " "
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:
./gen_pack.sh
Update 'PATH_TO_ADD' if necessary.
go to the cmsis-pack folder.
enter the following command:
./gen_pack.sh