The latest development version of this page may be more current than this released 4.0.0 version.

LVGL demos

Browse source code on GitHub

Overview

A sample showcasing upstream LVGL demos.

  • Music

    The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL.

  • Benchmark

    The benchmark demo tests the performance in various cases. For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc.

  • Stress

    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.

  • Widgets

    Shows how the widgets look like out of the box using the built-in material theme.

More details can be found in LVGL demos Readme [1].

Requirements

  • A board with display, ideally with 480x272 resolution or higher.

  • A pointer input device: touchpad, mouse, or touch screen capable display, compatible with zephyr,lvgl-pointer-input.

Note that other input devices types are not demonstrated in these demos, namely keyboards, keypads (zephyr,lvgl-keypad-input), rotary encoders (zephyr,lvgl-encoder-input) and hardware buttons (zephyr,lvgl-button-input).

Building and Running

Example building for MIMXRT1060-EVK:

# From the root of the zephyr repository
west build -b mimxrt1060_evk samples/modules/lvgl/demos
west flash

These demos can be built for simulated display environment as follows:

west build -b native_sim samples/modules/lvgl/demos -- -DCONFIG_LV_Z_DEMO_MUSIC=y
west build -t run
west build -b native_sim samples/modules/lvgl/demos -- -DCONFIG_LV_Z_DEMO_BENCHMARK=y
west build -t run
west build -b native_sim samples/modules/lvgl/demos -- -DCONFIG_LV_Z_DEMO_STRESS=y
west build -t run
west build -b native_sim samples/modules/lvgl/demos -- -DCONFIG_LV_Z_DEMO_WIDGETS=y
west build -t run

Alternatively, if building from a 64-bit host machine, the previous target board argument may also be replaced by native_sim/native/64.

References

See also

Display Interface