App:Library:LVGL:docs:Porting:Set up a project

提供: robot-jp wiki
2022年6月21日 (火) 20:29時点におけるTakashi (トーク | 投稿記録)による版 (→‎Configuration file)
ナビゲーションに移動検索に移動

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からライブラリの最新バージョンをダウンロードできます。

戻る : Previous


Add lvgl to your project

英文 自動翻訳

The graphics library itself is the lvgl directory. It contains a couple of folders but to use lvgl you only need .c and .h files from the src folder.

グラフィックライブラリ自体がlvglディレクトリです。いくつかのフォルダが含まれていますが、使用するにはフォルダのファイルlvglのみが必要です。 .c.hsrc
戻る : Previous


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 lvgl folder as it is into your project.

IDEが(EclipseまたはVSCodeのように)プロジェクトフォルダーにコピーされたフォルダーからファイルを自動的に追加する場合は、フォルダーをそのままプロジェクトにコピーするだけですlvgl
戻る : Previous


Make and CMake

英文 自動翻訳

LVGL also supports make and CMake build systems out of the box. To add LVGL to your Makefile based build system add these lines to your main Makefile:

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は、すぐに使用できるシステムのサポートmakeCMake構築も行います。MakefileベースのビルドシステムにLVGLを追加するには、次の行をメインのMakefileに追加します。
LVGL_DIR_NAME?= lvgl#lvglフォルダーの名前(名前を変更した場合はこれを変更してください)
LVGL_DIR?= $ {shell pwd}#lvglフォルダーがあるパス
$(LVGL_DIR)/ $(LVGL_DIR_NAME)/lvgl.mkを含める

CMakeとの統合については、ドキュメントのこのセクションをご覧ください。

戻る : Previous


Other platforms and tools

英文 自動翻訳

The Get started section contains many platform specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX, etc.

戻る : Previous

Demos and Examples

英文 自動翻訳

The lvgl folder also contains an examples and a demos 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. make and CMake handles the examples and demos, so no extra action required in these cases.

戻る : Previous


Configuration file

戻る : Previous

Initialization

英文 自動翻訳

To use the graphics library you have to initialize it and setup required components. The order of the initialization is:

  1. Call lv_init().
  2. Initialize your drivers.
  3. Register the display and input devices drivers in LVGL. Learn more about Display and Input device registration.
  4. Call lv_tick_inc(x) every x milliseconds in an interrupt to report the elapsed time to LVGL. Learn more.
  5. Call lv_timer_handler() every few milliseconds to handle LVGL related tasks. Learn more.
戻る : Previous