「App:Library:LVGL:docs:Porting:Set up a project」の版間の差分
1行目: | 1行目: | ||
https://docs.lvgl.io/8.2/porting/project.html | https://docs.lvgl.io/8.2/porting/project.html | ||
− | |||
__NOTOC__ | __NOTOC__ | ||
== Set up a project == | == Set up a project == |
2022年6月21日 (火) 20:19時点における版
https://docs.lvgl.io/8.2/porting/project.html
Set up a project
Get the library
英文 | 自動翻訳 |
---|---|
LVGL is available on GitHub: https://github.com/lvgl/lvgl. You can clone it or Download the latest version of the library from GitHub. |
Add lvgl to your project
英文 | 自動翻訳 |
---|---|
The graphics library itself is the |
Automatically add files
英文 | 自動翻訳 |
---|---|
If your IDE automatically adds the files from the folders copied to the project folder (as Eclipse or VSCode does), you can simply copy the |
Make and CMake
英文 | 自動翻訳 |
---|---|
LVGL also supports LVGL_DIR_NAME ?= lvgl #The name of the lvgl folder (change this if you have renamed it) LVGL_DIR ?= ${shell pwd} #The path where the lvgl folder is include $(LVGL_DIR)/$(LVGL_DIR_NAME)/lvgl.mk For integration with CMake take a look this section of the Documentation. |
Other platforms and tools
英文 | 自動翻訳 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
The Get started section contains many platform specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX, etc. Demos and Examples
Configuration fileComments in the config file explain the meaning of the options. Be sure to set at leastLV_COLOR_DEPTH according to your display's color depth. Note that, the examples and demos explicitly need to be enabled in lv_conf.h .
Alternatively, lv_conf.h can be copied to another place but then you should add the LV_CONF_INCLUDE_SIMPLE define to your compiler options (e.g. -DLV_CONF_INCLUDE_SIMPLE for GCC compiler) and set the include path manually (e.g. -I../include/gui ). In this case LVGL will attempt to include lv_conf.h simply with #include "lv_conf.h" .
You can even use a different name for lv_conf.h . The custom path can be set via the LV_CONF_PATH define. For example -DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"
If LV_CONF_SKIP is defined, LVGL will not try to include lv_conf.h . Instead you can pass the config defines using build options. For example "-DLV_COLOR_DEPTH=32 -DLV_USE_BTN 1" . The unset options will get a default value which is the same as the ones in lv_conf_template.h .
LVGL also can be used via Kconfig and menuconfig . You can use lv_conf.h together with Kconfig, but keep in mind that the value from lv_conf.h or build settings (-D... ) overwrite the values set in Kconfig. To ignore the configs from lv_conf.h simply remove its content, or define LV_CONF_SKIP .
Initialization
|