system (RTOS) that is easy to deploy, secure, connect and manage.
It has a growing set of software libraries that can be used
across various applications and industry sectors such as
Industrial IoT, wearables, machine learning and more.
Zephyr is built with an emphasis on broad chipset support,
security, dependability, longterm support releases and a
growing open source ecosystem.
Highlights of Zephyr
~~~~~~~~~~~~~~~~~~~~
-**Small** - Runs on microcontrollers as small as 8 kB Flash
and 5 kB of RAM.
-**Scalable** - Usable for complex multicore systems.
-**Customizable** - Out-of-the-box support for 500+ boards
and high portability.
-**Secure** - Built with safety and security in mind,
offers Long-term support.
-**Ecosystem** - Zephyr not only provides the RTOS kernel but
also developer tooling, device drivers, connectivity, logging,
tracing, power management and much more.
-**Decoupling** - Leverages devicetree to describe and
configure the target system.
-**Compliant** - Apps are runnable as native Linux applications,
which simplifies debugging and profiling.
How to run LVGL on Zephyr?
--------------------------
To setup your development environment refer to the
`getting started guide <https://docs.zephyrproject.org/latest/develop/getting_started/index.html>`__.
After you completed the setup above you can check out all of the `provided samples <https://docs.zephyrproject.org/latest/samples/>`__ for various boards.
To optimize LVGL's performance, several `kconfig` options can be configured:
-**CONFIG_LV_Z_VDB_SIZE**: Sets the rendering buffer size as a percentage of the display area, adjustable from 1% to 100%. Larger buffers can enhance performance, especially when used with **CONFIG_LV_Z_FULL_REFRESH**.
-**CONFIG_LV_Z_DOUBLE_VDB**: Enables the use of two rendering buffers, allowing for parallel rendering and data flushing, thus improving responsiveness and reducing latency.
-**CONFIG_LV_Z_VDB_ALIGN**: Ensures that the rendering buffer is properly aligned, which is critical for efficient memory access based on the color depth.
-**CONFIG_LV_Z_VBD_CUSTOM_SECTION**: Allows rendering buffers to be placed in a custom memory section (e.g., `.lvgl_buf`), useful for leveraging specific memory types like tightly coupled or external memory to enhance performance.
Zephyr ≤ 3.7.0 Specific Options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Zephyr versions 3.7.0 and below, additional options are available to manage LVGL's frame flushing:
-**CONFIG_LV_Z_FLUSH_THREAD**: Enables flushing LVGL frames in a separate thread, allowing the main thread to continue rendering the next frame simultaneously. This option can be disabled if the performance gain is not needed.
-**CONFIG_LV_Z_FLUSH_THREAD_STACK_SIZE**: Specifies the stack size for the flush thread, with a default of 1024 bytes.
-**CONFIG_LV_Z_FLUSH_THREAD_PRIO**: Sets the priority of the flush thread, with a default priority of 0, indicating cooperative priority.
For newer versions of Zephyr, the OSAL (Operating System Abstraction Layer) can be utilized, which takes care of the flushing.