「App:Library:LVGL:docs:Porting:Set up a project」の版間の差分
69行目: | 69行目: | ||
| | | | ||
The Get started section contains many platform specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX, etc. | The Get started section contains many platform specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX, etc. | ||
− | | | + | |[はじめに]セクションには、ESP32、Arduino、NXP、RT-Thread、NuttXなどのプラットフォーム固有の説明が多数含まれています。 |
|} | |} | ||
:[[App:Library:LVGL:docs:Porting|戻る : Previous]] | :[[App:Library:LVGL:docs:Porting|戻る : Previous]] | ||
80行目: | 80行目: | ||
| | | | ||
The <code>lvgl</code> folder also contains an <code>examples</code> and a <code>demos</code> folder. If you needed to add the source files manually to your project, you can do the same with the source files of these two folders too. <code>make</code> and <code>CMake</code> handles the examples and demos, so no extra action required in these cases. | The <code>lvgl</code> folder also contains an <code>examples</code> and a <code>demos</code> folder. If you needed to add the source files manually to your project, you can do the same with the source files of these two folders too. <code>make</code> and <code>CMake</code> handles the examples and demos, so no extra action required in these cases. | ||
− | | | + | |このフォルダには、と<code>lvgl</code>フォルダも含まれています。プロジェクトにソースファイルを手動で追加する必要がある場合は、これら2つのフォルダーのソースファイルでも同じことができます。例とデモを処理するため、これらの場合に追加のアクションは必要ありません。 <code>examplesdemosmakeCMake</code> |
|} | |} | ||
:[[App:Library:LVGL:docs:Porting|戻る : Previous]] | :[[App:Library:LVGL:docs:Porting|戻る : Previous]] | ||
91行目: | 91行目: | ||
|- | |- | ||
| | | | ||
− | There is a configuration header file for LVGL called lv_conf.h. You modify this header to set the library's basic behavior, disable unused modules and features, adjust the size of memory buffers in compile-time, etc. | + | There is a configuration header file for LVGL called '''lv_conf.h'''. You modify this header to set the library's basic behavior, disable unused modules and features, adjust the size of memory buffers in compile-time, etc. |
− | To get <code>lv_conf.h</code> copy lvgl/lv_conf_template.h next to the <code>lvgl</code> directory and rename it to ''lv_conf.h''. Open the file and change the <code>#if 0</code> at the beginning to <code>#if 1</code> to enable its content. So the layout of the files should look like this: | + | To get <code>'''lv_conf.h'''</code> copy '''lvgl/lv_conf_template.h''' next to the <code>'''lvgl'''</code> directory and rename it to '''''lv_conf.h'''''. Open the file and change the <code>'''#if 0'''</code> at the beginning to <code>'''#if 1'''</code> to enable its content. So the layout of the files should look like this: |
<source lang="C++"> | <source lang="C++"> | ||
|-lvgl | |-lvgl | ||
99行目: | 99行目: | ||
|-other files and folders | |-other files and folders | ||
</source> | </source> | ||
− | Comments in the config file explain the meaning of the options. Be sure to set at least <code>LV_COLOR_DEPTH</code> according to your display's color depth. Note that, the examples and demos explicitly need to be enabled in <code>lv_conf.h</code>. | + | Comments in the config file explain the meaning of the options. Be sure to set at least <code>'''LV_COLOR_DEPTH'''</code> according to your display's color depth. Note that, the examples and demos explicitly need to be enabled in <code>'''lv_conf.h'''</code>. |
− | Alternatively, <code>lv_conf.h</code> can be copied to another place but then you should add the <code>LV_CONF_INCLUDE_SIMPLE</code> define to your compiler options (e.g. <code>-DLV_CONF_INCLUDE_SIMPLE</code> for GCC compiler) and set the include path manually (e.g. <code>-I../include/gui</code>). In this case LVGL will attempt to include <code>lv_conf.h</code> simply with <code>#include "lv_conf.h"</code>. | + | Alternatively, <code>'''lv_conf.h'''</code> can be copied to another place but then you should add the <code>'''LV_CONF_INCLUDE_SIMPLE'''</code> define to your compiler options (e.g. <code>'''-DLV_CONF_INCLUDE_SIMPLE'''</code> for GCC compiler) and set the include path manually (e.g. <code>'''-I../include/gui'''</code>). In this case LVGL will attempt to include <code>'''lv_conf.h'''</code> simply with <code>'''#include "lv_conf.h"'''</code>. |
− | You can even use a different name for <code>lv_conf.h</code>. The custom path can be set via the <code>LV_CONF_PATH</code> define. For example <code>-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"</code> | + | You can even use a different name for <code>'''lv_conf.h'''</code>. The custom path can be set via the <code>'''LV_CONF_PATH'''</code> define. For example <code>'''-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"'''</code> |
− | If <code>LV_CONF_SKIP</code> is defined, LVGL will not try to include <code>lv_conf.h</code>. Instead you can pass the config defines using build options. For example <code>"-DLV_COLOR_DEPTH=32 -DLV_USE_BTN 1"</code>. The unset options will get a default value which is the same as the ones in <code>lv_conf_template.h</code>. | + | If <code>'''LV_CONF_SKIP'''</code> is defined, LVGL will not try to include <code>'''lv_conf.h'''</code>. Instead you can pass the config defines using build options. For example <code>'''"-DLV_COLOR_DEPTH=32 -DLV_USE_BTN 1"'''</code>. The unset options will get a default value which is the same as the ones in <code>'''lv_conf_template.h'''</code>. |
− | LVGL also can be used via <code>Kconfig</code> and <code>menuconfig</code>. You can use <code>lv_conf.h</code> together with Kconfig, but keep in mind that the value from <code>lv_conf.h</code> or build settings (<code>-D...</code>) overwrite the values set in Kconfig. To ignore the configs from <code>lv_conf.h</code> simply remove its content, or define <code>LV_CONF_SKIP</code>. | + | LVGL also can be used via <code>'''Kconfig'''</code> and <code>'''menuconfig'''</code>. You can use <code>'''lv_conf.h'''</code> together with Kconfig, but keep in mind that the value from <code>'''lv_conf.h'''</code> or build settings (<code>'''-D...'''</code>) overwrite the values set in Kconfig. To ignore the configs from <code>'''lv_conf.h'''</code> simply remove its content, or define <code>'''LV_CONF_SKIP'''</code>. |
| | | | ||
|} | |} |
2022年6月21日 (火) 20:38時点における版
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. |
LVGLはGitHubで入手できます:https://github.com/lvgl/lvgl。
クローンを作成するか、GitHubからライブラリの最新バージョンをダウンロードできます。 |
Add lvgl to your project
英文 | 自動翻訳 |
---|---|
The graphics library itself is the |
グラフィックライブラリ自体がlvgl ディレクトリです。いくつかのフォルダが含まれていますが、使用するにはフォルダのファイルlvgl のみが必要です。 .c.hsrc
|
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 |
IDEが(EclipseまたはVSCodeのように)プロジェクトフォルダーにコピーされたフォルダーからファイルを自動的に追加する場合は、フォルダーをそのままプロジェクトにコピーするだけですlvgl 。
|
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. |
LVGLは、すぐに使用できるシステムのサポートmake とCMake 構築も行います。MakefileベースのビルドシステムにLVGLを追加するには、次の行をメインのMakefileに追加します。
LVGL_DIR_NAME?= lvgl#lvglフォルダーの名前(名前を変更した場合はこれを変更してください) LVGL_DIR?= $ {shell pwd}#lvglフォルダーがあるパス $(LVGL_DIR)/ $(LVGL_DIR_NAME)/lvgl.mkを含める CMakeとの統合については、ドキュメントのこのセクションをご覧ください。 |
Other platforms and tools
英文 | 自動翻訳 |
---|---|
The Get started section contains many platform specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX, etc. |
[はじめに]セクションには、ESP32、Arduino、NXP、RT-Thread、NuttXなどのプラットフォーム固有の説明が多数含まれています。 |
Demos and Examples
英文 | 自動翻訳 |
---|---|
The |
このフォルダには、とlvgl フォルダも含まれています。プロジェクトにソースファイルを手動で追加する必要がある場合は、これら2つのフォルダーのソースファイルでも同じことができます。例とデモを処理するため、これらの場合に追加のアクションは必要ありません。 examplesdemosmakeCMake
|
Configuration file
英文 | 自動翻訳 |
---|---|
There is a configuration header file for LVGL called lv_conf.h. You modify this header to set the library's basic behavior, disable unused modules and features, adjust the size of memory buffers in compile-time, etc. To get |-lvgl
|-lv_conf.h
|-other files and folders
Comments in the config file explain the meaning of the options. Be sure to set at least
|
Initialization
英文 | 自動翻訳 |
---|---|
To use the graphics library you have to initialize it and setup required components. The order of the initialization is:
|