「App:Library:LVGL:docs:Introduction」の版間の差分

提供: robot-jp wiki
ナビゲーションに移動検索に移動
 
(同じ利用者による、間の31版が非表示)
1行目: 1行目:
 
https://docs.lvgl.io/8.2/intro/index.html
 
https://docs.lvgl.io/8.2/intro/index.html
 
__NOTOC__
 
__NOTOC__
:[https://robot-jp.com/wiki/index.php/App:Library:LVGL 戻る : Previous]
+
== Introduction ==
== Introduction (序文) ==
+
(序文)
 
:{| class="wikitable"
 
:{| class="wikitable"
 
!英文
 
!英文
12行目: 12行目:
 
LVGL(Light and Versatile Graphics Library)は、無料のオープンソースグラフィックライブラリであり、使いやすいグラフィック要素、美しい視覚効果、および低メモリフットプリントを備えた埋め込みGUIを作成するために必要なすべてを提供します。
 
LVGL(Light and Versatile Graphics Library)は、無料のオープンソースグラフィックライブラリであり、使いやすいグラフィック要素、美しい視覚効果、および低メモリフットプリントを備えた埋め込みGUIを作成するために必要なすべてを提供します。
 
|}
 
|}
 +
:[[App:Library:LVGL#Introduction|戻る : Previous]]
  
== Key features (主な機能) ==
 
:{| class="wikitable"
 
!英文
 
!自動翻訳
 
|-
 
|
 
* Powerful building blocks such as buttons, charts, lists, sliders, images, etc.
 
* Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling
 
* Various input devices such as touchpad, mouse, keyboard, encoder, etc.
 
* Multi-language support with UTF-8 encoding
 
* Multi-display support, i.e. use multiple TFT, monochrome displays simultaneously
 
* Fully customizable graphic elements with CSS-like styles
 
* Hardware independent: use with any microcontroller or display
 
* Scalable: able to operate with little memory (64 kB Flash, 16 kB RAM)
 
* OS, external memory and GPU are supported but not required
 
* Single frame buffer operation even with advanced graphic effects
 
* Written in C for maximal compatibility (C++ compatible)
 
* Simulator to start embedded GUI design on a PC without embedded hardware
 
* Binding to MicroPython
 
* Tutorials, examples, themes for rapid GUI design
 
* Documentation is available online and as PDF
 
* Free and open-source under MIT license
 
|
 
* ボタン、チャート、リスト、スライダー、画像などの強力なビルディングブロック。
 
* アニメーション、アンチエイリアシング、不透明度、スムーズなスクロールを備えた高度なグラフィックス
 
* タッチパッド、マウス、キーボード、エンコーダーなどのさまざまな入力デバイス。
 
* UTF-8エンコーディングによる多言語サポート
 
* マルチディスプレイのサポート、つまり複数のTFT、モノクロディスプレイを同時に使用
 
* CSSのようなスタイルで完全にカスタマイズ可能なグラフィック要素
 
* ハードウェアに依存しない:任意のマイクロコントローラーまたはディスプレイで使用
 
* スケーラブル:少ないメモリで動作可能(64 kBフラッシュ、16 kB RAM)
 
* OS、外部メモリ、GPUはサポートされていますが、必須ではありません
 
* 高度なグラフィック効果でもシングルフレームバッファ操作
 
* 最大限の互換性のためにCで書かれています(C ++互換)
 
* 組み込みハードウェアのないPCで組み込みGUIデザインを開始するシミュレーター
 
* MicroPythonへのバインド
 
* チュートリアル、例、迅速なGUIデザインのテーマ
 
* ドキュメントはオンラインおよびPDFで入手できます
 
* MITライセンスに基づく無料のオープンソース
 
|}
 
  
== Requirements (要求事項) ==
+
== Requirements ==
 +
(要求事項)
 
:{| class="wikitable"
 
:{| class="wikitable"
 
!英文
 
!英文
70行目: 32行目:
 
** Static RAM usage: ~2 kB depending on the used features and object types
 
** Static RAM usage: ~2 kB depending on the used features and object types
 
** Stack: > 2kB (> 8 kB is recommended)
 
** Stack: > 2kB (> 8 kB is recommended)
** Dynamic data (heap): > 4 KB (> 32 kB is recommended if using several objects).     Set by '''<code>LV_MEM_SIZE</code>''' in '''lv_conf.h'''.
+
** Dynamic data (heap): > 4 KB (> 32 kB is recommended if using several objects).     Set by '''<code style="color: #bb0000;">LV_MEM_SIZE</code>''' in '''lv_conf.h'''.
 
** Display buffer: > ''"Horizontal resolution"'' pixels (> 10× ''"Horizontal resolution"'' is recommended)
 
** Display buffer: > ''"Horizontal resolution"'' pixels (> 10× ''"Horizontal resolution"'' is recommended)
 
** One frame buffer in the MCU or in an external display controller
 
** One frame buffer in the MCU or in an external display controller
89行目: 51行目:
 
** Static RAMの使用量:最大2 kB  使用する機能とオブジェクトタイプによる
 
** Static RAMの使用量:最大2 kB  使用する機能とオブジェクトタイプによる
 
** Stack:> 2kB(> 8 kBを推奨)
 
** Stack:> 2kB(> 8 kBを推奨)
** Dynamic data (heap):> 4 KB(> 32 kBを推奨 複数のオブジェクトを使用する場合)。 '''lv_conf.h''' の <code>'''LV_MEM_SIZE'''</code> で設定します。
+
** Dynamic data (heap):> 4 KB(> 32 kBを推奨 複数のオブジェクトを使用する場合)。 '''lv_conf.h''' の <code style="color: #bb0000;">'''LV_MEM_SIZE'''</code> で設定します。
 
** Display buffer:> "''水平解像度"'' ピクセル数(> 10×”''水平解像度"'' を推奨)
 
** Display buffer:> "''水平解像度"'' ピクセル数(> 10×”''水平解像度"'' を推奨)
 
** MCUまたは外部ディスプレイコントローラの1つのフレームバッファ
 
** MCUまたは外部ディスプレイコントローラの1つのフレームバッファ
98行目: 60行目:
 
''注:メモリ使用量は、アーキテクチャ、コンパイラ、およびビルドオプションによって異なる場合があります。''
 
''注:メモリ使用量は、アーキテクチャ、コンパイラ、およびビルドオプションによって異なる場合があります。''
 
|}
 
|}
 +
:[[App:Library:LVGL#Introduction|戻る : Previous]]
  
== License (ライセンス) ==
+
== License ==
 +
(ライセンス)
 
:{| class="wikitable"
 
:{| class="wikitable"
 
!英文
 
!英文
121行目: 85行目:
 
LVGLプロジェクトを持続可能にするために、プロジェクトへの[https://docs.lvgl.io/8.2/CONTRIBUTING.html 貢献]を検討してください。LVGLを使用して自分に関するツイートを書く、バグを修正する、ドキュメントを翻訳する、さらにはメンテナになるなど、[https://docs.lvgl.io/8.2/CONTRIBUTING.html さまざまな貢献方法]から選択できます。
 
LVGLプロジェクトを持続可能にするために、プロジェクトへの[https://docs.lvgl.io/8.2/CONTRIBUTING.html 貢献]を検討してください。LVGLを使用して自分に関するツイートを書く、バグを修正する、ドキュメントを翻訳する、さらにはメンテナになるなど、[https://docs.lvgl.io/8.2/CONTRIBUTING.html さまざまな貢献方法]から選択できます。
 
|}
 
|}
 +
:[[App:Library:LVGL#Introduction|戻る : Previous]]
  
== Repository layout (リポジトリの配置) ==
+
== Repository layout ==
 +
(リポジトリの配置)
 
:{| class="wikitable"
 
:{| class="wikitable"
 
!英文
 
!英文
156行目: 122行目:
 
* [https://github.com/lvgl?q=lv_&type=&language= lv_...] 他のプラットフォームへの移植
 
* [https://github.com/lvgl?q=lv_&type=&language= lv_...] 他のプラットフォームへの移植
 
|}
 
|}
 +
:[[App:Library:LVGL#Introduction|戻る : Previous]]
  
== Release policy (リリースの方針) ==
+
== Release policy ==
 +
(リリースの方針)
 
:{| class="wikitable"
 
:{| class="wikitable"
 
!英文
 
!英文
 
!自動翻訳
 
!自動翻訳
 
|-
 
|-
|
+
|The core repositories follow the rules of [https://semver.org/ Semantic versioning]:
The core repositories follow the rules of [https://semver.org/ Semantic versioning]:
 
 
 
 
* Major versions for incompatible API changes. E.g. v5.0.0, v6.0.0
 
* Major versions for incompatible API changes. E.g. v5.0.0, v6.0.0
 
* Minor version for new but backward-compatible functionalities. E.g. v6.1.0, v6.2.0
 
* Minor version for new but backward-compatible functionalities. E.g. v6.1.0, v6.2.0
 
* Patch version for backward-compatible bug fixes. E.g. v6.1.1, v6.1.2
 
* Patch version for backward-compatible bug fixes. E.g. v6.1.1, v6.1.2
  
Tags like <code>vX.Y.Z</code> are created for every release.
+
Tags like <code style="color: #bb0000;">vX.Y.Z</code> are created for every release.
 +
|コアリポジトリは、[https://semver.org/ セマンティックバージョニング]のルールに従います。
 +
* 互換性のないAPI変更のメジャーバージョン。例:v5.0.0、v6.0.0
 +
* 新しいが下位互換性のある機能のマイナーバージョン。例:v6.1.0、v6.2.0
 +
* 下位互換性のあるバグ修正のためのパッチバージョン。例:v6.1.1、v6.1.2
  
 +
のようなタグ<code style="color: #bb0000;">vX.Y.Z</code>は、リリースごとに作成されます。
 +
|-
 +
|
 
=== Release cycle ===
 
=== Release cycle ===
 
 
* Bug fixes: Released on demand even weekly
 
* Bug fixes: Released on demand even weekly
 
* Minor releases: Every 3-4 months
 
* Minor releases: Every 3-4 months
 
* Major releases: Approximately yearly
 
* Major releases: Approximately yearly
 
+
|
 +
=== リリースサイクル ===
 +
* バグ修正:毎週でもオンデマンドでリリース
 +
* マイナーリリース:3〜4か月ごと
 +
* メジャーリリース:約毎年
 +
|-
 +
|
 
=== Branches ===
 
=== Branches ===
 
The core repositories have at least the following branches:
 
The core repositories have at least the following branches:
  
*<code>master</code> latest version, patches are merged directly here.
+
*<code style="color: #bb0000;">master</code> latest version, patches are merged directly here.
* <code>release/vX.Y</code> stable versions of the minor releases
+
*<code style="color: #bb0000;">release/vX.Y</code> stable versions of the minor releases
* <code>fix/some-description</code> temporary branches for bug fixes
+
*<code style="color: #bb0000;">fix/some-description</code> temporary branches for bug fixes
* <code>feat/some-description</code> temporary branches for features
+
*<code style="color: #bb0000;">feat/some-description</code> temporary branches for features
 +
|
 +
=== ブランチ ===
 +
コアリポジトリには、少なくとも次のブランチがあります。
  
 +
*<code style="color: #bb0000;">master</code>最新バージョンでは、パッチはここに直接マージされます。
 +
*<code style="color: #bb0000;">release/vX.Y</code>マイナーリリースの安定バージョン
 +
*<code style="color: #bb0000;">fix/some-description</code>バグ修正のための一時的なブランチ
 +
*<code style="color: #bb0000;">feat/some-description</code>機能の一時的なブランチ
 +
|-
 +
|
 
=== Changelog ===
 
=== Changelog ===
 
The changes are recorded in [https://docs.lvgl.io/8.2/CHANGELOG.html CHANGELOG.md].
 
The changes are recorded in [https://docs.lvgl.io/8.2/CHANGELOG.html CHANGELOG.md].
 
+
|
 +
=== 変更ログ ===
 +
変更履歴は[https://docs.lvgl.io/8.2/CHANGELOG.html CHANGELOG.md]に記録されています。
 +
|-
 +
|
 
=== Version support ===
 
=== Version support ===
 
Before v8 every minor release of major releases is supported for 1 year. Starting from v8, every minor release is supported for 1 year.
 
Before v8 every minor release of major releases is supported for 1 year. Starting from v8, every minor release is supported for 1 year.
{| class="wikitable"
+
 
 +
|
 +
=== バージョンサポート ===
 +
v8より前では、メジャーリリースのすべてのマイナーリリースが1年間サポートされています。v8以降、すべてのマイナーリリースが1年間サポートされます。
 +
|}
 +
 
 +
:{| class="wikitable"
 
!Version
 
!Version
 
!Release date
 
!Release date
226行目: 223行目:
 
|
 
|
 
|}
 
|}
|
+
:[[App:Library:LVGL#Introduction|戻る : Previous]]
コアリポジトリは、[https://semver.org/ セマンティックバージョニング]のルールに従います。
 
 
 
* 互換性のないAPI変更のメジャーバージョン。例:v5.0.0、v6.0.0
 
* 新しいが下位互換性のある機能のマイナーバージョン。例:v6.1.0、v6.2.0
 
* 下位互換性のあるバグ修正のためのパッチバージョン。例:v6.1.1、v6.1.2
 
 
 
のようなタグ<code>vX.Y.Z</code>は、リリースごとに作成されます。
 
 
 
=== リリースサイクル ===
 
 
 
* バグ修正:毎週でもオンデマンドでリリース
 
* マイナーリリース:3〜4か月ごと
 
* メジャーリリース:約毎年
 
 
 
=== ブランチ ===
 
コアリポジトリには、少なくとも次のブランチがあります。
 
 
 
*<code>master</code>最新バージョンでは、パッチはここに直接マージされます。
 
* <code>release/vX.Y</code>マイナーリリースの安定バージョン
 
* <code>fix/some-description</code>バグ修正のための一時的なブランチ
 
* <code>feat/some-description</code>機能の一時的なブランチ
 
 
 
=== 変更ログ ===
 
変更履歴は[https://docs.lvgl.io/8.2/CHANGELOG.html CHANGELOG.md]に記録されています。
 
 
 
=== バージョンサポート ===
 
v8より前では、メジャーリリースのすべてのマイナーリリースが1年間サポートされています。v8以降、すべてのマイナーリリースが1年間サポートされます。
 
{| class="wikitable"
 
!バージョン
 
!発売日
 
!サポート終了
 
!アクティブ
 
|-
 
|v5.3
 
|2019年2月1日
 
|2020年2月1日
 
|いいえ
 
|-
 
|v6.1
 
|2019年11月26日
 
|2020年11月26日
 
|いいえ
 
|-
 
|v7.11
 
|2021年3月16日
 
|2022年3月16日
 
|はい
 
|-
 
|v8.0
 
|2021年6月1日
 
|2022年6月1日
 
|はい
 
|-
 
|v8.1
 
|2021年11月10日
 
|2022年11月10日
 
|はい
 
|-
 
|v8.2
 
|進行中
 
|
 
|
 
|}
 
|}
 
  
== FAQ (よくある質問) ==
+
== FAQ ==
 +
(よくある質問)
 
:{| class="wikitable"
 
:{| class="wikitable"
 
!英文
 
!英文
301行目: 235行目:
 
You can ask questions in the forum: '''https://forum.lvgl.io/'''.
 
You can ask questions in the forum: '''https://forum.lvgl.io/'''.
  
We use [https://github.com/lvgl/lvgl/issues '''GitHub issues'''] for development related discussion. You should use them only if your question or issue is tightly related to the development of the library.
+
We use [https://github.com/lvgl/lvgl/issues '''GitHub issues'''] for development related discussion.  
 +
 
 +
You should use them only if your question or issue is tightly related to the development of the library.
  
 
Before posting a question, please ready this FAQ section as you might find answer to your issue here too.
 
Before posting a question, please ready this FAQ section as you might find answer to your issue here too.
 +
|
 +
=== どこで質問できますか? ===
 +
フォーラムで質問できます:'''https://forum.lvgl.io/''' 。
  
 +
開発関連の討論には[https://github.com/lvgl/lvgl/issues '''GitHub issues''']を使用します。
 +
 +
質問や問題がライブラリの開発に密接に関連している場合にだけ、これらを使用するべきです。
 +
 +
質問を投稿する前に、このFAQセクションを確認して、回答が見つかるかどうかを確認して下さい。
 +
|-
 +
|
 
=== Is my MCU/hardware supported? ===
 
=== Is my MCU/hardware supported? ===
 
Every MCU which is capable of driving a display via parallel port, SPI, RGB interface or anything else and fulfills the [https://docs.lvgl.io/8.2/intro/index.html#requirements '''Requirements'''] is supported by LVGL.
 
Every MCU which is capable of driving a display via parallel port, SPI, RGB interface or anything else and fulfills the [https://docs.lvgl.io/8.2/intro/index.html#requirements '''Requirements'''] is supported by LVGL.
314行目: 260行目:
 
* Linux with frame buffer device such as /dev/fb0. This includes Single-board computers like the Raspberry Pi
 
* Linux with frame buffer device such as /dev/fb0. This includes Single-board computers like the Raspberry Pi
 
* Anything else with a strong enough MCU and a peripheral to drive a display
 
* Anything else with a strong enough MCU and a peripheral to drive a display
 +
|
 +
=== 私のMCU/ハードウェアはサポートされていますか? ===
 +
パラレルポート、SPI、RGBインターフェイスなどを介してディスプレイを駆動でき、[https://docs.lvgl.io/8.2/intro/index.html#requirements '''要件''']を満たすすべてのMCUは、LVGLでサポートされています。
  
 +
以下を含みます:
 +
 +
* STM32F, STM32H, NXP Kinetis, LPC, iMX, dsPIC33, PIC32 等の"一般的な"MCU。
 +
* Bluetooth, GSM, Nordic NRF, Espressif ESP32 等のWi-Fiモジュール
 +
* / dev/fb0のようなフレームバッファデバイスを備えたLinux。これには Raspberry Pi のようなシングルボードコンピューター が含まれます
 +
* その他、ディスプレイを駆動するのに十分な強度のMCUと周辺機器を備えているもの
 +
|-
 +
|
 
=== Is my display supported? ===
 
=== Is my display supported? ===
LVGL needs just one simple driver function to copy an array of pixels into a given area of the display. If you can do this with your display then you can use it with LVGL.
+
LVGL needs just one simple driver function to copy an array of pixels into a given area of the display.  
 +
 
 +
If you can do this with your display then you can use it with LVGL.
  
 
Some examples of the supported display types:
 
Some examples of the supported display types:
326行目: 285行目:
 
* even LED matrices
 
* even LED matrices
 
* or any other display where you can control the color/state of the pixels
 
* or any other display where you can control the color/state of the pixels
 +
  
 
See the [https://docs.lvgl.io/8.2/porting/display.html '''Porting'''] section to learn more.
 
See the [https://docs.lvgl.io/8.2/porting/display.html '''Porting'''] section to learn more.
 +
|
 +
=== 私のディスプレイはサポートされていますか? ===
 +
LVGLは、ピクセルの配列をディスプレイの特定の領域にコピーするために1つの単純なドライバー関数を必要とします。
 +
 +
ディスプレイでこれを行うことができれば LVGL で使用できます。
 +
 +
サポートされている表示タイプの例:
 +
 +
* 16ビット色または24ビット色のTFT
 +
* HDMIポート付きモニター
 +
* 小さなモノクロディスプレイ
 +
* グレースケールディスプレイ
 +
* LEDマトリックス
 +
* その他、ピクセルの色/状態を制御できるディスプレイ
 +
  
 +
詳細については、section "[https://docs.lvgl.io/8.2/porting/display.html Porting('''移植)''']" を参照してください。
 +
|-
 +
|
 
=== LVGL doesn't start, randomly crashes or nothing is drawn on the display. What can be the problem? ===
 
=== LVGL doesn't start, randomly crashes or nothing is drawn on the display. What can be the problem? ===
 
+
* Try increasing <code style="color: #bb0000;">LV_MEM_SIZE</code>.
* Try increasing <code>LV_MEM_SIZE</code>.
+
* Be sure <code style="color: #bb0000;">lv_disp_drv_t</code>, <code style="color: #bb0000;">lv_indev_drv_t</code> and <code style="color: #bb0000;">lv_fs_drv_t</code> are global or <code style="color: #bb0000;">static</code>.
* Be sure <code>lv_disp_drv_t</code>, <code>lv_indev_drv_t</code> and <code>lv_fs_drv_t</code> are global or <code>static</code>.
 
 
* Be sure your display works without LVGL. E.g. paint it to red on start up.
 
* Be sure your display works without LVGL. E.g. paint it to red on start up.
 
* Enable [https://docs.lvgl.io/8.2/intro/porting/log '''Logging''']
 
* Enable [https://docs.lvgl.io/8.2/intro/porting/log '''Logging''']
* Enable asserts in <code>lv_conf.h</code> (<code>LV_USE_ASSERT_...</code>)
+
* Enable asserts in <code style="color: #bb0000;">lv_conf.h</code> (<code style="color: #bb0000;">LV_USE_ASSERT_...</code>)
 
* If you use an RTOS
 
* If you use an RTOS
** increase the stack size of the task which calls <code>lv_timer_handler()</code>
+
** increase the stack size of the task which calls <code style="color: #bb0000;">lv_timer_handler()</code>
 
** Be sure you used a mutex as [https://docs.lvgl.io/8.2/porting/os.html '''described here''']
 
** Be sure you used a mutex as [https://docs.lvgl.io/8.2/porting/os.html '''described here''']
 +
|
 +
=== LVGLが起動しない、ランダムにクラッシュする、またはディスプレイに何も表示されない。何が問題になる可能性がありますか? ===
 +
*<code style="color: #bb0000;">'''LV_MEM_SIZE'''</code> の値を増やしてみてください
 +
*<code style="color: #bb0000;">'''lv_disp_drv_t'''</code> , <code style="color: #bb0000;">'''lv_indev_drv_t'''</code> , <code style="color: #bb0000;">'''lv_fs_drv_t'''</code> が全て '''global''' または '''static''' であることを確認してください。
 +
* ディスプレイが LVGLなしで機能することを確認してください。たとえば、起動時に赤に塗りつぶす等。
 +
*[https://docs.lvgl.io/8.2/intro/porting/log logging] を有効にする
 +
*<code style="color: #bb0000;">'''lv_conf.h'''</code>(<code style="color: #bb0000;">'''LV_USE_ASSERT'''_...</code>) で assert  を有効にする
 +
* RTOSを使用している場合
 +
**<code style="color: #bb0000;">'''lv_timer_handler()'''</code> で呼び出すタスクのスタックサイズを増やす
 +
**[https://docs.lvgl.io/8.2/porting/os.html ここで説明] されているように '''mutex''' を使用していることを確認してください
 +
|-
 +
|
 +
=== My display driver is not called. What have I missed? ===
 +
Be sure you are calling <code style="color: #bb0000;">lv_tick_inc(x)</code> in an interrupt and <code style="color: #bb0000;">lv_timer_handler()</code> in your main <code style="color: #bb0000;">while(1)</code>.
  
=== My display driver is not called. What have I missed? ===
 
Be sure you are calling <code>lv_tick_inc(x)</code> in an interrupt and <code>lv_timer_handler()</code> in your main <code>while(1)</code>.
 
  
 
Learn more in the [https://docs.lvgl.io/8.2/porting/tick.html '''Tick'''] and [https://docs.lvgl.io/8.2/porting/task-handler.html '''Task handler'''] sections.
 
Learn more in the [https://docs.lvgl.io/8.2/porting/tick.html '''Tick'''] and [https://docs.lvgl.io/8.2/porting/task-handler.html '''Task handler'''] sections.
 +
|
 +
=== ディスプレイドライバが呼び出されません。何が原因でしょうか? ===
 +
<code style="color: #bb0000;">lv_tick_inc(x)</code>  を割込から呼び出し、
 +
 +
<code style="color: #bb0000;">lv_timer_handler()</code> をメインの <code style="color: #bb0000;">while(1)</code> で呼び出していることを確認してください
 +
  
 +
詳細については、section "[https://docs.lvgl.io/8.2/porting/tick.html tick]" と "[https://docs.lvgl.io/8.2/porting/task-handler.html task handler]" をご覧ください。
 +
|-
 +
|
 
=== Why is the display driver called only once? Only the upper part of the display is refreshed. ===
 
=== Why is the display driver called only once? Only the upper part of the display is refreshed. ===
Be sure you are calling <code>lv_disp_flush_ready(drv)</code> at the end of your "''display flush callback''".
+
Be sure you are calling <code style="color: #bb0000;">'''lv_disp_flush_ready(drv)'''</code> at the end of your "'''display flush callback'''".
 +
|
 +
=== ディスプレイドライバが1回しか呼び出されないのはなぜですか?displayの上部だけが更新されます。 ===
 +
"'''display flush callback'''" の最後にある <code style="color: #bb0000;">'''lv_disp_flush_ready(drv)'''</code> を呼び出していることを確認してください。
 +
|-
 +
|
  
 
=== Why do I see only garbage on the screen? ===
 
=== Why do I see only garbage on the screen? ===
Probably there a bug in your display driver. Try the following code without using LVGL. You should see a square with red-blue gradient.
+
Probably there a bug in your display driver.
 +
 
 +
Try the following code without using LVGL.  
 +
 
 +
You should see a square with red-blue gradient.
 +
<syntaxhighlight lang="C++" style="border: 1px dashed gray;">
 
  #define BUF_W 20
 
  #define BUF_W 20
 
  #define BUF_H 10
 
  #define BUF_H 10
370行目: 378行目:
 
  a.y2 = a.y1 + BUF_H - 1;
 
  a.y2 = a.y1 + BUF_H - 1;
 
  my_flush_cb(NULL, &a, buf);
 
  my_flush_cb(NULL, &a, buf);
 
+
</syntaxhighlight>
=== Why do I see nonsense colors on the screen? ===
 
Probably LVGL's color format is not compatible with your display's color format. Check <code>LV_COLOR_DEPTH</code> in ''lv_conf.h''.
 
 
 
If you are using 16-bit colors with SPI (or another byte-oriented interface) you probably need to set <code>LV_COLOR_16_SWAP  1</code> in ''lv_conf.h''. It swaps the upper and lower bytes of the pixels.
 
 
 
=== How to speed up my UI? ===
 
 
 
* Turn on compiler optimization and enable cache if your MCU has it
 
* Increase the size of the display buffer
 
* Use two display buffers and flush the buffer with DMA (or similar peripheral) in the background
 
* Increase the clock speed of the SPI or parallel port if you use them to drive the display
 
* If your display has an SPI port consider changing to a model with a parallel interface because it has much higher throughput
 
* Keep the display buffer in internal RAM (not in external SRAM) because LVGL uses it a lot and it should have a fast access time
 
 
 
=== How to reduce flash/ROM usage? ===
 
You can disable all the unused features (such as animations, file system, GPU etc.) and object types in ''lv_conf.h''.
 
 
 
If you are using GCC you can add <code>-fdata-sections -ffunction-sections</code> compiler flags and <code>--gc-sections</code> linker flag to remove unused functions and variables from the final binary.
 
 
 
=== How to reduce the RAM usage ===
 
 
 
* Lower the size of the ''Display buffer''
 
* Reduce <code>LV_MEM_SIZE</code> in ''lv_conf.h''. This memory is used when you create objects like buttons, labels, etc.
 
* To work with lower <code>LV_MEM_SIZE</code> you can create objects only when required and delete them when they are not needed anymore
 
 
 
=== How to work with an operating system? ===
 
To work with an operating system where tasks can interrupt each other (preemptively) you should protect LVGL related function calls with a mutex. See the [https://docs.lvgl.io/8.2/porting/os.html '''Operating system and interrupts'''] section to learn more.
 
 
|
 
|
=== どこで質問できますか? ===
 
フォーラムで質問することができます:'''https://forum.lvgl.io/''' 。
 
  
開発関連のディスカッションには[https://github.com/lvgl/lvgl/issues '''GitHubの問題''']を使用します。質問や問題がライブラリの開発に密接に関連している場合にのみ、これらを使用する必要があります。
+
=== 画面にゴミだけが表示されるのはなぜですか? ===
 
+
おそらく、あなたのディスプレイドライバにバグがあります。
質問を投稿する前に、このFAQセクションを準備してください。ここでも、問題に対する回答が見つかる可能性があります。
 
 
 
=== 私のMCU/ハードウェアはサポートされていますか? ===
 
パラレルポート、SPI、RGBインターフェイスなどを介してディスプレイを駆動でき、[https://docs.lvgl.io/8.2/intro/index.html#requirements '''要件''']を満たすすべてのMCUは、LVGLでサポートされています。
 
 
 
これも:
 
 
 
* STM32F、STM32H、NXP Kinetis、LPC、iMX、dsPIC33、PIC32などの「一般的な」MCU。
 
* Bluetooth、GSM、NordicNRFやEspressifESP32などのWi-Fiモジュール
 
* / dev/fb0などのフレームバッファデバイスを備えたLinux。これには、RaspberryPiのようなシングルボードコンピューターが含まれます
 
* ディスプレイを駆動するのに十分な強度のMCUと周辺機器を備えたその他のもの
 
 
 
=== 私のディスプレイはサポートされていますか? ===
 
LVGLは、ピクセルの配列をディスプレイの特定の領域にコピーするために1つの単純なドライバー関数を必要とします。ディスプレイでこれを行うことができる場合は、LVGLで使用できます。
 
 
 
サポートされている表示タイプの例:
 
 
 
* 16ビットまたは24ビットの色深度のTFT
 
* HDMIポート付きモニター
 
* 小さなモノクロディスプレイ
 
* グレースケールディスプレイ
 
* LEDマトリックスでさえ
 
* または、ピクセルの色/状態を制御できるその他のディスプレイ
 
 
 
詳細については、「[https://docs.lvgl.io/8.2/porting/display.html '''移植''']」セクションを参照してください。
 
 
 
=== LVGLが起動しない、ランダムにクラッシュする、またはディスプレイに何も表示されない。何が問題になる可能性がありますか? ===
 
 
 
* 増やしてみてください<code>LV_MEM_SIZE</code>。
 
* <code>lv_disp_drv_t</code>、<code>lv_indev_drv_t</code>および<code>lv_fs_drv_t</code>がグローバルまたはであることを確認してください<code>static</code>。
 
* ディスプレイがLVGLなしで機能することを確認してください。たとえば、起動時に赤にペイントします。
 
* [https://docs.lvgl.io/8.2/intro/porting/log '''ロギング''']を有効にする
 
* <code>lv_conf.h</code>(<code>LV_USE_ASSERT_...</code>)でアサートを有効にする
 
* RTOSを使用する場合
 
** 呼び出すタスクのスタックサイズを増やす<code>lv_timer_handler()</code>
 
** [https://docs.lvgl.io/8.2/porting/os.html ここで説明されている]ようにmutexを使用していることを確認してください
 
 
 
=== ディスプレイドライバが呼び出されません。私は何を逃しましたか? ===
 
<code>lv_tick_inc(x)</code>割り込みと<code>lv_timer_handler()</code>メインで呼び出していることを確認してください<code>while(1)</code>。
 
 
 
詳細については、[https://docs.lvgl.io/8.2/porting/tick.html '''ティック''']と[https://docs.lvgl.io/8.2/porting/task-handler.html '''タスクハンドラー''']のセクションをご覧ください。
 
  
=== ディスプレイドライバが1回だけ呼び出されるのはなぜですか?表示上部のみが更新されます。 ===
+
LVGLを使用せずに次のコードを試してください。
''「 displayflushcallback''<code>lv_disp_flush_ready(drv)</code>」の最後に呼び出していることを確認してください。
 
  
=== 画面にゴミだけが表示されるのはなぜですか? ===
+
赤青のグラデーションの正方形が表示されるはずです。
おそらく、ディスプレイドライバにバグがあります。LVGLを使用せずに次のコードを試してください。赤青のグラデーションの正方形が表示されます。
+
<syntaxhighlight lang="C++" style="border: 1px dashed gray;">
 
  #define BUF_W 20
 
  #define BUF_W 20
 
  #define BUF_H 10
 
  #define BUF_H 10
471行目: 408行目:
 
  a.y2 = a.y1 + BUF_H - 1;
 
  a.y2 = a.y1 + BUF_H - 1;
 
  my_flush_cb(NULL, &a, buf);
 
  my_flush_cb(NULL, &a, buf);
 +
</syntaxhighlight>
 +
|-
 +
|
  
 +
=== Why do I see nonsense colors on the screen? ===
 +
Probably LVGL's color format is not compatible with your display's color format. Check <code style="color: #bb0000;">LV_COLOR_DEPTH</code> in ''lv_conf.h''.
 +
 +
If you are using 16-bit colors with SPI (or another byte-oriented interface) you probably need to set <code style="color: #bb0000;">LV_COLOR_16_SWAP  1</code> in ''lv_conf.h''.
 +
 +
It swaps the upper and lower bytes of the pixels.
 +
|
 
=== 画面に意味のない色が表示されるのはなぜですか? ===
 
=== 画面に意味のない色が表示されるのはなぜですか? ===
おそらく、LVGLのカラーフォーマットはディスプレイのカラーフォーマットと互換性がありません。''lv_conf.h''をチェック<code>LV_COLOR_DEPTH</code>インします。
+
おそらく、LVGLのカラーフォーマットが、あなたのディスプレイのカラーフォーマットと互換性がないのだと思います。
  
SPI(または別のバイト指向インターフェイス)で16ビットカラーを使用している場合は、おそらく''lv_conf.h''で設定する必要があります。ピクセルの上位バイトと下位バイトを交換します。<code>LV_COLOR_16_SWAP  1</code>
+
''lv_conf.h の中の'' <code style="color: #bb0000;">LV_COLOR_DEPTH</code> を確認して下さい。。
  
 +
もし、あなたが SPI(又は他のbyte単位I/F) で16bit colorを使用している場合、おそらく''lv_conf.h の中の <code style="color: #bb0000;">LV_COLOR_16_SWAP  1</code> を''設定する必要があると思います。
 +
 +
これにより ピクセルの上位バイトと下位バイトを入れ替えます。
 +
|-
 +
|
 +
=== How to speed up my UI? ===
 +
* Turn on compiler optimization and enable cache if your MCU has it
 +
* Increase the size of the display buffer
 +
* Use two display buffers and flush the buffer with DMA (or similar peripheral) in the background
 +
* Increase the clock speed of the SPI or parallel port if you use them to drive the display
 +
* If your display has an SPI port consider changing to a model with a parallel interface because it has much higher throughput
 +
* Keep the display buffer in internal RAM (not in external SRAM) because LVGL uses it a lot and it should have a fast access time
 +
|
 
=== UIを高速化する方法は? ===
 
=== UIを高速化する方法は? ===
 
 
* コンパイラの最適化をオンにし、MCUにキャッシュがある場合はキャッシュを有効にします
 
* コンパイラの最適化をオンにし、MCUにキャッシュがある場合はキャッシュを有効にします
 
* 表示バッファのサイズを大きくします
 
* 表示バッファのサイズを大きくします
* 2つのディスプレイバッファを使用し、バックグラウンドでDMA(または同様の周辺機器)を使用してバッファをフラッシュします
+
* 2つのディスプレイバッファを使用し、DMA(または同様の周辺機器)によりバックグラウンドでバッファをフラッシュします
* SPIまたはパラレルポートを使用してディスプレイを駆動する場合は、それらのクロック速度を上げてください
+
* SPIまたはパラレルポートを使用してディスプレイを駆動する場合は、それらのクロック周波数を増やしてください
* ディスプレイにSPIポートがある場合は、スループットがはるかに高いため、パラレルインターフェイスを備えたモデルに変更することを検討してください。
+
* SPIポートを持つディスプレイの場合、より高いスループットを持つパラレルインターフェース搭載モデルへの変更をご検討ください。
 
* LVGLはディスプレイバッファを頻繁に使用し、アクセス時間が高速である必要があるため、ディスプレイバッファを(外部SRAMではなく)内部RAMに保持します。
 
* LVGLはディスプレイバッファを頻繁に使用し、アクセス時間が高速である必要があるため、ディスプレイバッファを(外部SRAMではなく)内部RAMに保持します。
 +
|-
 +
|
 +
=== How to reduce flash/ROM usage? ===
 +
You can disable all the unused features (such as animations, file system, GPU etc.) and object types in ''lv_conf.h''.
  
=== フラッシュ/ROMの使用量を減らす方法は? ===
+
If you are using GCC you can add <code style="color: #bb0000;">-fdata-sections -ffunction-sections</code> compiler flags and <code style="color: #bb0000;">--gc-sections</code> linker flag to remove unused functions and variables from the final binary.
''lv_conf.h''で、未使用の機能(アニメーション、ファイルシステム、GPUなど)とオブジェクトタイプをすべて無効にすることができます。
+
|
 
+
=== Flash/ROMの使用量を減らす方法は? ===
GCCを使用している場合は、コンパイラフラグとリンカフラグを追加して、未使用の関数と変数を最終的なバイナリから削除できます。<code>-fdata-sections -ffunction-sections--gc-sections</code>
+
''lv_conf.h の中''で、未使用の機能(アニメーション、ファイルシステム、GPUなど)とオブジェクトタイプをすべて無効にすることができます。
  
 +
GCCを使用している場合、コンパイラフラグ <code style="color: #bb0000;">-fdata-sections -ffunction-sections</code>  とリンカフラグ <code style="color: #bb0000;">--gc-sections</code>  を追加する事により、未使用の関数と変数を最終的なバイナリから削除する事ができます。
 +
|-
 +
|
 +
=== How to reduce the RAM usage ===
 +
* Lower the size of the ''Display buffer''
 +
* Reduce <code style="color: #bb0000;">LV_MEM_SIZE</code> in ''lv_conf.h''. This memory is used when you create objects like buttons, labels, etc.
 +
* To work with lower <code style="color: #bb0000;">LV_MEM_SIZE</code> you can create objects only when required and delete them when they are not needed anymore
 +
|
 
=== RAM使用量を減らす方法 ===
 
=== RAM使用量を減らす方法 ===
 +
*''Display buffer'' のサイズを小さくします
 +
* lv_conf.h の中の <code style="color: #bb0000;">LV_MEM_SIZE</code> を小さくします。このメモリは、ボタンやラベルなどのオブジェクトを作成するときに使用されます。
 +
* 少ない <code style="color: #bb0000;">LV_MEM_SIZE</code> で作業するには、必要なときだけオブジェクトを作成し、不要になったら削除します。
 +
|-
 +
|
 +
=== How to work with an operating system? ===
 +
To work with an operating system where tasks can interrupt each other (preemptively) you should protect LVGL related function calls with a '''mutex'''.
  
*''表示バッファ''のサイズを小さくします
+
See the [https://docs.lvgl.io/8.2/porting/os.html '''Operating system and interrupts'''] section to learn more.
* lv_conf.h<code>LV_MEM_SIZE</code>で''減らし''ます。このメモリは、ボタンやラベルなどのオブジェクトを作成するときに使用されます。
+
|
* 下位で作業する<code>LV_MEM_SIZE</code>には、必要な場合にのみオブジェクトを作成し、不要になったときにオブジェクトを削除できます。
+
=== オペレーティングシステムから操作する方法は? ===
 +
タスクが(プリエンプティブに)相互に割り込むことができるオペレーティングシステムで作業するには、'''mutex''' を使用してLVGL関連の関数呼び出しを保護する必要があります。
  
=== オペレーティングシステムを操作する方法は? ===
+
詳細は、section "[https://docs.lvgl.io/8.2/porting/os.html '''Operating system and interrupts''']" を参照してください。
タスクが(プリエンプティブに)相互に割り込むことができるオペレーティングシステムで作業するには、ミューテックスを使用してLVGL関連の関数呼び出しを保護する必要があります。詳細については、[https://docs.lvgl.io/8.2/porting/os.html '''オペレーティングシステムと割り込み''']のセクションを参照してください。
 
 
|}
 
|}
 
+
:[[App:Library:LVGL#Introduction|戻る : Previous]]
 
 
 
 
----
 
[https://robot-jp.com/wiki/index.php/App:Library:LVGL 戻る]
 

2022年10月5日 (水) 20:37時点における最新版

https://docs.lvgl.io/8.2/intro/index.html

Introduction

(序文)

英文 自動翻訳

LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create an embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint.

LVGL(Light and Versatile Graphics Library)は、無料のオープンソースグラフィックライブラリであり、使いやすいグラフィック要素、美しい視覚効果、および低メモリフットプリントを備えた埋め込みGUIを作成するために必要なすべてを提供します。

戻る : Previous


Requirements

(要求事項)

英文 自動翻訳

Basically, every modern controller which is able to drive a display is suitable to run LVGL.

The minimal requirements are:

  • 16, 32 or 64 bit microcontroller or processor
  • > 16 MHz clock speed is recommended
  • Flash/ROM: > 64 kB for the very essential components (> 180 kB is recommended)
  • RAM:
    • Static RAM usage: ~2 kB depending on the used features and object types
    • Stack: > 2kB (> 8 kB is recommended)
    • Dynamic data (heap): > 4 KB (> 32 kB is recommended if using several objects).     Set by LV_MEM_SIZE in lv_conf.h.
    • Display buffer: > "Horizontal resolution" pixels (> 10× "Horizontal resolution" is recommended)
    • One frame buffer in the MCU or in an external display controller
  • C99 or newer compiler
  • Basic C (or C++) knowledge: pointers, structs, callbacks.


Note that memory usage may vary depending on architecture, compiler and build options.

基本的に、ディスプレイを駆動できる最新のコントローラーはすべて、LVGLの実行に適しています。

最小要件は次のとおりです。

  • 16、32、または64ビットのマイクロコントローラーまたはプロセッサー
  • >16MHzのクロック速度をお勧めします
  • フラッシュ/ROM:非常に重要なコンポーネントの場合は> 64 kB(> 180 kBを推奨)
  • RAM:
    • Static RAMの使用量:最大2 kB  使用する機能とオブジェクトタイプによる
    • Stack:> 2kB(> 8 kBを推奨)
    • Dynamic data (heap):> 4 KB(> 32 kBを推奨 複数のオブジェクトを使用する場合)。 lv_conf.hLV_MEM_SIZE で設定します。
    • Display buffer:> "水平解像度" ピクセル数(> 10×”水平解像度" を推奨)
    • MCUまたは外部ディスプレイコントローラの1つのフレームバッファ
  • C99以降のコンパイラ
  • 基本的なC(またはC ++)の知識: ポインター構造体コールバック


注:メモリ使用量は、アーキテクチャ、コンパイラ、およびビルドオプションによって異なる場合があります。

戻る : Previous

License

(ライセンス)

英文 自動翻訳

The LVGL project (including all repositories) is licensed under MIT license. This means you can use it even in commercial projects.

It's not mandatory, but we highly appreciate it if you write a few words about your project in the My projects category of the forum or a private message to lvgl.io.

Although you can get LVGL for free there is a massive amount of work behind it. It's created by a group of volunteers who made it available for you in their free time.

To make the LVGL project sustainable, please consider contributing to the project. You can choose from many different ways of contributing such as simply writing a tweet about you using LVGL, fixing bugs, translating the documentation, or even becoming a maintainer.

LVGLプロジェクト(すべてのリポジトリを含む)は、MITライセンスの下でライセンスされています。これは、商業プロジェクトでも使用できることを意味します。

必須ではありませんが、フォーラムの My Project カテゴリにプロジェクトについていくつかの単語を書き込んだり、lvgl.ioへのプライベートメッセージを書き込んだりしていただければ幸いです。

LVGLは無料で入手できますが、その背後には膨大な量の作業があります。それは彼らの自由な時間にあなたのためにそれを利用可能にしたボランティアのグループによって作成されました。

LVGLプロジェクトを持続可能にするために、プロジェクトへの貢献を検討してください。LVGLを使用して自分に関するツイートを書く、バグを修正する、ドキュメントを翻訳する、さらにはメンテナになるなど、さまざまな貢献方法から選択できます。

戻る : Previous

Repository layout

(リポジトリの配置)

英文 自動翻訳

All repositories of the LVGL project are hosted on GitHub: https://github.com/lvgl

You will find these repositories there:

LVGLプロジェクトのすべてのリポジトリは、GitHubでホストされています:https://github.com/lvgl

これらのリポジトリはそこにあります:

  • lvgl 多くの例を含むライブラリ自体。
  • lv_demo LVGLで作成されたデモ。
  • lv_drivers デバイスドライバーの表示と入力
  • blog ブログのサイトのソース(https://blog.lvgl.io
  • sim オンラインシミュレーターのサイトのソース(https://sim.lvgl.io
  • lv_sim_... さまざまなIDEおよびプラットフォーム用のシミュレータプロジェクト
  • lv_port_... 開発ボードへのLVGLポート
  • lv_binding_.. 他の言語との結合
  • lv_... 他のプラットフォームへの移植
戻る : Previous

Release policy

(リリースの方針)

英文 自動翻訳
The core repositories follow the rules of Semantic versioning:
  • Major versions for incompatible API changes. E.g. v5.0.0, v6.0.0
  • Minor version for new but backward-compatible functionalities. E.g. v6.1.0, v6.2.0
  • Patch version for backward-compatible bug fixes. E.g. v6.1.1, v6.1.2

Tags like vX.Y.Z are created for every release.

コアリポジトリは、セマンティックバージョニングのルールに従います。
  • 互換性のないAPI変更のメジャーバージョン。例:v5.0.0、v6.0.0
  • 新しいが下位互換性のある機能のマイナーバージョン。例:v6.1.0、v6.2.0
  • 下位互換性のあるバグ修正のためのパッチバージョン。例:v6.1.1、v6.1.2

のようなタグvX.Y.Zは、リリースごとに作成されます。

Release cycle

  • Bug fixes: Released on demand even weekly
  • Minor releases: Every 3-4 months
  • Major releases: Approximately yearly

リリースサイクル

  • バグ修正:毎週でもオンデマンドでリリース
  • マイナーリリース:3〜4か月ごと
  • メジャーリリース:約毎年

Branches

The core repositories have at least the following branches:

  • master latest version, patches are merged directly here.
  • release/vX.Y stable versions of the minor releases
  • fix/some-description temporary branches for bug fixes
  • feat/some-description temporary branches for features

ブランチ

コアリポジトリには、少なくとも次のブランチがあります。

  • master最新バージョンでは、パッチはここに直接マージされます。
  • release/vX.Yマイナーリリースの安定バージョン
  • fix/some-descriptionバグ修正のための一時的なブランチ
  • feat/some-description機能の一時的なブランチ

Changelog

The changes are recorded in CHANGELOG.md.

変更ログ

変更履歴はCHANGELOG.mdに記録されています。

Version support

Before v8 every minor release of major releases is supported for 1 year. Starting from v8, every minor release is supported for 1 year.

バージョンサポート

v8より前では、メジャーリリースのすべてのマイナーリリースが1年間サポートされています。v8以降、すべてのマイナーリリースが1年間サポートされます。

Version Release date Support end Active
v5.3 Feb 1, 2019 Feb 1, 2020 No
v6.1 Nov 26, 2019 Nov 26, 2020 No
v7.11 Mar 16, 2021 Mar 16, 2022 Yes
v8.0 1 Jun, 2021 1 Jun, 2022 Yes
v8.1 10 Nov, 2021 10 Nov, 2022 Yes
v8.2 In progress
戻る : Previous

FAQ

(よくある質問)

英文 自動翻訳

Where can I ask questions?

You can ask questions in the forum: https://forum.lvgl.io/.

We use GitHub issues for development related discussion.

You should use them only if your question or issue is tightly related to the development of the library.

Before posting a question, please ready this FAQ section as you might find answer to your issue here too.

どこで質問できますか?

フォーラムで質問できます:https://forum.lvgl.io/

開発関連の討論にはGitHub issuesを使用します。

質問や問題がライブラリの開発に密接に関連している場合にだけ、これらを使用するべきです。

質問を投稿する前に、このFAQセクションを確認して、回答が見つかるかどうかを確認して下さい。

Is my MCU/hardware supported?

Every MCU which is capable of driving a display via parallel port, SPI, RGB interface or anything else and fulfills the Requirements is supported by LVGL.

This includes:

  • "Common" MCUs like STM32F, STM32H, NXP Kinetis, LPC, iMX, dsPIC33, PIC32 etc.
  • Bluetooth, GSM, Wi-Fi modules like Nordic NRF and Espressif ESP32
  • Linux with frame buffer device such as /dev/fb0. This includes Single-board computers like the Raspberry Pi
  • Anything else with a strong enough MCU and a peripheral to drive a display

私のMCU/ハードウェアはサポートされていますか?

パラレルポート、SPI、RGBインターフェイスなどを介してディスプレイを駆動でき、要件を満たすすべてのMCUは、LVGLでサポートされています。

以下を含みます:

  • STM32F, STM32H, NXP Kinetis, LPC, iMX, dsPIC33, PIC32 等の"一般的な"MCU。
  • Bluetooth, GSM, Nordic NRF, Espressif ESP32 等のWi-Fiモジュール
  • / dev/fb0のようなフレームバッファデバイスを備えたLinux。これには Raspberry Pi のようなシングルボードコンピューター が含まれます
  • その他、ディスプレイを駆動するのに十分な強度のMCUと周辺機器を備えているもの

Is my display supported?

LVGL needs just one simple driver function to copy an array of pixels into a given area of the display.

If you can do this with your display then you can use it with LVGL.

Some examples of the supported display types:

  • TFTs with 16 or 24 bit color depth
  • Monitors with an HDMI port
  • Small monochrome displays
  • Gray-scale displays
  • even LED matrices
  • or any other display where you can control the color/state of the pixels


See the Porting section to learn more.

私のディスプレイはサポートされていますか?

LVGLは、ピクセルの配列をディスプレイの特定の領域にコピーするために1つの単純なドライバー関数を必要とします。

ディスプレイでこれを行うことができれば LVGL で使用できます。

サポートされている表示タイプの例:

  • 16ビット色または24ビット色のTFT
  • HDMIポート付きモニター
  • 小さなモノクロディスプレイ
  • グレースケールディスプレイ
  • LEDマトリックス
  • その他、ピクセルの色/状態を制御できるディスプレイ


詳細については、section "Porting(移植)" を参照してください。

LVGL doesn't start, randomly crashes or nothing is drawn on the display. What can be the problem?

  • Try increasing LV_MEM_SIZE.
  • Be sure lv_disp_drv_t, lv_indev_drv_t and lv_fs_drv_t are global or static.
  • Be sure your display works without LVGL. E.g. paint it to red on start up.
  • Enable Logging
  • Enable asserts in lv_conf.h (LV_USE_ASSERT_...)
  • If you use an RTOS
    • increase the stack size of the task which calls lv_timer_handler()
    • Be sure you used a mutex as described here

LVGLが起動しない、ランダムにクラッシュする、またはディスプレイに何も表示されない。何が問題になる可能性がありますか?

  • LV_MEM_SIZE の値を増やしてみてください
  • lv_disp_drv_t , lv_indev_drv_t , lv_fs_drv_t が全て global または static であることを確認してください。
  • ディスプレイが LVGLなしで機能することを確認してください。たとえば、起動時に赤に塗りつぶす等。
  • logging を有効にする
  • lv_conf.hLV_USE_ASSERT_...) で assert を有効にする
  • RTOSを使用している場合
    • lv_timer_handler() で呼び出すタスクのスタックサイズを増やす
    • ここで説明 されているように mutex を使用していることを確認してください

My display driver is not called. What have I missed?

Be sure you are calling lv_tick_inc(x) in an interrupt and lv_timer_handler() in your main while(1).


Learn more in the Tick and Task handler sections.

ディスプレイドライバが呼び出されません。何が原因でしょうか?

lv_tick_inc(x) を割込から呼び出し、

lv_timer_handler() をメインの while(1) で呼び出していることを確認してください


詳細については、section "tick" と "task handler" をご覧ください。

Why is the display driver called only once? Only the upper part of the display is refreshed.

Be sure you are calling lv_disp_flush_ready(drv) at the end of your "display flush callback".

ディスプレイドライバが1回しか呼び出されないのはなぜですか?displayの上部だけが更新されます。

"display flush callback" の最後にある lv_disp_flush_ready(drv) を呼び出していることを確認してください。

Why do I see only garbage on the screen?

Probably there a bug in your display driver.

Try the following code without using LVGL.

You should see a square with red-blue gradient.

 #define BUF_W 20
 #define BUF_H 10
 
 lv_color_t buf[BUF_W * BUF_H];
 lv_color_t * buf_p = buf;
 uint16_t x, y;
 for(y = 0; y &amp;lt; BUF_H; y++) {
     lv_color_t c = lv_color_mix(LV_COLOR_BLUE, LV_COLOR_RED, (y * 255) / BUF_H);
     for(x = 0; x &amp;lt; BUF_W; x++){
         (*buf_p) =  c;
         buf_p++;
     }
 }
 
 lv_area_t a;
 a.x1 = 10;
 a.y1 = 40;
 a.x2 = a.x1 + BUF_W - 1;
 a.y2 = a.y1 + BUF_H - 1;
 my_flush_cb(NULL, &a, buf);

画面にゴミだけが表示されるのはなぜですか?

おそらく、あなたのディスプレイドライバにバグがあります。

LVGLを使用せずに次のコードを試してください。

赤青のグラデーションの正方形が表示されるはずです。

 #define BUF_W 20
 #define BUF_H 10
 
 lv_color_t buf[BUF_W * BUF_H];
 lv_color_t * buf_p = buf;
 uint16_t x, y;
 for(y = 0; y &amp;lt; BUF_H; y++) {
     lv_color_t c = lv_color_mix(LV_COLOR_BLUE, LV_COLOR_RED, (y * 255) / BUF_H);
     for(x = 0; x &amp;lt; BUF_W; x++){
         (*buf_p) =  c;
         buf_p++;
     }
 }
 
 lv_area_t a;
 a.x1 = 10;
 a.y1 = 40;
 a.x2 = a.x1 + BUF_W - 1;
 a.y2 = a.y1 + BUF_H - 1;
 my_flush_cb(NULL, &a, buf);

Why do I see nonsense colors on the screen?

Probably LVGL's color format is not compatible with your display's color format. Check LV_COLOR_DEPTH in lv_conf.h.

If you are using 16-bit colors with SPI (or another byte-oriented interface) you probably need to set LV_COLOR_16_SWAP  1 in lv_conf.h.

It swaps the upper and lower bytes of the pixels.

画面に意味のない色が表示されるのはなぜですか?

おそらく、LVGLのカラーフォーマットが、あなたのディスプレイのカラーフォーマットと互換性がないのだと思います。

lv_conf.h の中の LV_COLOR_DEPTH を確認して下さい。。

もし、あなたが SPI(又は他のbyte単位I/F) で16bit colorを使用している場合、おそらくlv_conf.h の中の LV_COLOR_16_SWAP  1設定する必要があると思います。

これにより ピクセルの上位バイトと下位バイトを入れ替えます。

How to speed up my UI?

  • Turn on compiler optimization and enable cache if your MCU has it
  • Increase the size of the display buffer
  • Use two display buffers and flush the buffer with DMA (or similar peripheral) in the background
  • Increase the clock speed of the SPI or parallel port if you use them to drive the display
  • If your display has an SPI port consider changing to a model with a parallel interface because it has much higher throughput
  • Keep the display buffer in internal RAM (not in external SRAM) because LVGL uses it a lot and it should have a fast access time

UIを高速化する方法は?

  • コンパイラの最適化をオンにし、MCUにキャッシュがある場合はキャッシュを有効にします
  • 表示バッファのサイズを大きくします
  • 2つのディスプレイバッファを使用し、DMA(または同様の周辺機器)によりバックグラウンドでバッファをフラッシュします
  • SPIまたはパラレルポートを使用してディスプレイを駆動する場合は、それらのクロック周波数を増やしてください
  • SPIポートを持つディスプレイの場合、より高いスループットを持つパラレルインターフェース搭載モデルへの変更をご検討ください。
  • LVGLはディスプレイバッファを頻繁に使用し、アクセス時間が高速である必要があるため、ディスプレイバッファを(外部SRAMではなく)内部RAMに保持します。

How to reduce flash/ROM usage?

You can disable all the unused features (such as animations, file system, GPU etc.) and object types in lv_conf.h.

If you are using GCC you can add -fdata-sections -ffunction-sections compiler flags and --gc-sections linker flag to remove unused functions and variables from the final binary.

Flash/ROMの使用量を減らす方法は?

lv_conf.h の中で、未使用の機能(アニメーション、ファイルシステム、GPUなど)とオブジェクトタイプをすべて無効にすることができます。

GCCを使用している場合、コンパイラフラグ -fdata-sections -ffunction-sections とリンカフラグ --gc-sections を追加する事により、未使用の関数と変数を最終的なバイナリから削除する事ができます。

How to reduce the RAM usage

  • Lower the size of the Display buffer
  • Reduce LV_MEM_SIZE in lv_conf.h. This memory is used when you create objects like buttons, labels, etc.
  • To work with lower LV_MEM_SIZE you can create objects only when required and delete them when they are not needed anymore

RAM使用量を減らす方法

  • Display buffer のサイズを小さくします
  • lv_conf.h の中の LV_MEM_SIZE を小さくします。このメモリは、ボタンやラベルなどのオブジェクトを作成するときに使用されます。
  • 少ない LV_MEM_SIZE で作業するには、必要なときだけオブジェクトを作成し、不要になったら削除します。

How to work with an operating system?

To work with an operating system where tasks can interrupt each other (preemptively) you should protect LVGL related function calls with a mutex.

See the Operating system and interrupts section to learn more.

オペレーティングシステムから操作する方法は?

タスクが(プリエンプティブに)相互に割り込むことができるオペレーティングシステムで作業するには、mutex を使用してLVGL関連の関数呼び出しを保護する必要があります。

詳細は、section "Operating system and interrupts" を参照してください。

戻る : Previous