Git Product home page Git Product logo

ili9341_lvgl_driver_for_rp2040's Introduction

LVGL 用 ILI9341 汎用ドライバ

LVGL https://github.com/lvgl/lvgl の Raspberry Pi Pico 用 ILI9341 汎用ドライバです。

引用したもの

  • lvgl Light and Versatile Graphics Library

プロジェクトのディレクトリに git clone します。

  • spi.pio

pico-example の中にある software spi のサンプル PIO ファイルです。

構築手順

  • このリポジトリを git clone する
  • cd リポジトリ
  • git clone https://github.com/lvgl/lvgl.git
  • cd lvgl
  • cp lv_conf_template.h lv_conf.h
  • テキストエディタで lv_conf.h を修正する

#if 0 /*Set it to "1" to enable content*/

#if 0 を #if 1 に修正して lv_conf.h 内の define を有効にする

#define LV_USE_DEV_VERSION

を追記する

#define LV_COLOR_DEPTH 16

#define LV_MEM_SIZE (48 * 1024U) /*[bytes]*/

を確認する

  • cd ..
  • mkdir build
  • cd build
  • cmake -DCMAKE_BUILD_TYPE=Debug -DPICO_DEOPTIMIZED_DEBUG=on ..

MSYS2 Mingw64 でビルドするときは -G "MSYS Makefiles" を追記する

  • make

です。

lvgl ライブラリを add_subdirectory しているだけの環境なので難しくはないと思います。

2023/11/12 追記

8cf0bbb - feat(draw): add implements vector graphic APIs (#4528) (#4691)

で、機能追加がありましたが、エラーになります。CmakeLists.txt でこれをコンパイルしないよう Disable に暫定対応しています。

[ 47%] Building CXX object lvgl/CMakeFiles/lvgl_thorvg.dir/src/libs/thorvg/tvgAnimation.cpp.obj
In file included from C:/msys64/home/masahiro/work/ILI9341_lvgl_driver_for_RP2040/lvgl/src/libs/thorvg/tvgAnimation.cpp:23:
c:\msys64\home\masahiro\work\ili9341_lvgl_driver_for_rp2040\lvgl\src\lv_conf_internal.h:41:18: fatal error: ../../lv_conf.h: No such file or directory
   41 |         #include "../../lv_conf.h"                /*Else assume lv_conf.h is next to the lvgl folder*/
      |                  ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [lvgl/CMakeFiles/lvgl_thorvg.dir/build.make:76: lvgl/CMakeFiles/lvgl_thorvg.dir/src/libs/thorvg/tvgAnimation.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1770: lvgl/CMakeFiles/lvgl_thorvg.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

ili9341_lvgl_driver_for_rp2040's People

Contributors

ngc6589 avatar

Stargazers

 avatar

Watchers

 avatar Kostas Georgiou avatar

ili9341_lvgl_driver_for_rp2040's Issues

lvgl master branch(v9-dev) で画面が表示されない

git checkout e820dacd5 (2023年6月頃)のコミットでは当サンプルは動きますが、
2023年8月の lvgl 開発ブランチでは画面表示ができません。

lv_disp_set_flush_cb(disp, lcd_Flash_CB);

の液晶描画コールバック関数を登録するプロトタイプ宣言のうち

typedef void (*lv_disp_flush_cb_t)(struct _lv_disp_t * disp, const lv_area_t * area, lv_color_t * px_map);

lv_color_t * が uint8_t に変更されている。また lv_conf_template.h の修正が多く現状では何が原因かわからず。
少なくとも、現状で lv_conf_template.h を lv_conf.h にコピーし、#ifdef で有効にしただけでは
Raspberry Pi Pico(RP2040) ではビルド時にメモリサイズが不足のメッセージが出てコンパイルに失敗します。
また、メモリサイズに関すると思われるところの値を修正するとビルドは通りますが、画面のデーターがデバッガで見る限り渡されていないように見え、液晶画面の描画行われていないように見える。
コールバック関数は呼ばれているけど描画データーが違うように見える。
原因が分かるまでは、LVGL を6月くらいのところで使用するのが今の回避策。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.