• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

boards/22-Aug-2025-

src/22-Aug-2025-

CMakeLists.txt A D22-Aug-20255.8 KiB11199

Kconfig A D22-Aug-20251.7 KiB7661

README.rst A D22-Aug-20253.2 KiB10481

prj.conf A D22-Aug-2025405 2115

rtk7eka6m3b00001bu.overlay A D22-Aug-2025239 1412

rtklcdpar1s00001be.overlay A D22-Aug-2025239 1412

sample.yaml A D22-Aug-20252.9 KiB9392

README.rst

1.. zephyr:code-sample:: lvgl-demos
2   :name: LVGL demos
3   :relevant-api: display_interface
4
5   Run LVGL built-in demos.
6
7Overview
8********
9
10A sample showcasing upstream LVGL demos.
11
12* Music
13      The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL.
14* Benchmark
15      The benchmark demo tests the performance in various cases. For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc.
16* Stress
17      A stress test for LVGL. It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
18* Widgets
19      Shows how the widgets look like out of the box using the built-in material theme.
20* Keypad and Encoder
21      Shows how to control widget with a keypad and hardware encoder.
22* Render
23      Collection of multiple rendering tests.
24
25More details can be found in `LVGL demos Readme`_.
26
27Requirements
28************
29
30* A board with display, ideally with 480x272 resolution or higher.
31* A pointer input device: touchpad, mouse, or touch screen capable display, compatible with :dtcompatible:`zephyr,lvgl-pointer-input`.
32
33Note that other input devices types are not demonstrated in these demos, namely keyboards, keypads (:dtcompatible:`zephyr,lvgl-keypad-input`), rotary encoders (:dtcompatible:`zephyr,lvgl-encoder-input`) and hardware buttons (:dtcompatible:`zephyr,lvgl-button-input`).
34
35Building and Running
36********************
37
38Example building for :zephyr:board:`mimxrt1060_evk`:
39
40.. zephyr-app-commands::
41   :zephyr-app: samples/modules/lvgl/demos
42   :board: mimxrt1060_evk
43   :goals: build flash
44
45These demos can be built for simulated display environment as follows:
46
47.. zephyr-app-commands::
48   :zephyr-app: samples/modules/lvgl/demos
49   :host-os: unix
50   :board: native_sim
51   :gen-args: -DCONFIG_LV_Z_DEMO_MUSIC=y
52   :goals: run
53   :compact:
54
55.. zephyr-app-commands::
56   :zephyr-app: samples/modules/lvgl/demos
57   :host-os: unix
58   :board: native_sim
59   :gen-args: -DCONFIG_LV_Z_DEMO_BENCHMARK=y
60   :goals: run
61   :compact:
62
63.. zephyr-app-commands::
64   :zephyr-app: samples/modules/lvgl/demos
65   :host-os: unix
66   :board: native_sim
67   :gen-args: -DCONFIG_LV_Z_DEMO_STRESS=y
68   :goals: run
69   :compact:
70
71.. zephyr-app-commands::
72   :zephyr-app: samples/modules/lvgl/demos
73   :host-os: unix
74   :board: native_sim
75   :gen-args: -DCONFIG_LV_Z_DEMO_WIDGETS=y
76   :goals: run
77   :compact:
78
79.. zephyr-app-commands::
80   :zephyr-app: samples/modules/lvgl/demos
81   :host-os: unix
82   :board: native_sim
83   :gen-args: -DCONFIG_LV_Z_DEMO_KEYPAD_AND_ENCODER=y
84   :goals: run
85   :compact:
86
87.. zephyr-app-commands::
88   :zephyr-app: samples/modules/lvgl/demos
89   :host-os: unix
90   :board: native_sim
91   :gen-args: -DCONFIG_LV_Z_DEMO_RENDER=y
92   :goals: run
93   :compact:
94
95Alternatively, if building from a 64-bit host machine, the previous target
96board argument may also be replaced by ``native_sim/native/64``.
97
98References
99**********
100
101.. target-notes::
102
103.. _LVGL demos Readme: https://github.com/zephyrproject-rtos/lvgl/blob/zephyr/demos/README.md
104