Kivas – Modern touch UIs with Python

Create powerful, multitouch-enabled user interfaces directly in Python – without C++ overhead. With our Ezpire module for Kivy, you can fully leverage the hardware acceleration of our i.MX 8M Plus platforms while conveniently writing your application logic in Python. Save yourself the hassle of configuring display drivers and graphics stacks: We offer a fully functional demo implementation and design template on the i.MX 8M Plus that perfectly combines hardware acceleration and touch support.

What is Kivy?

Kivy is an open-source Python framework for developing multitouch applications. It is ideally suited for embedded systems because it doesn't require a heavyweight windowing system (like X11 or Wayland) but can render directly to the framebuffer via OpenGL ES 2.0. This enables a smooth, GPU-accelerated UI with minimal resource consumption and maximum design freedom ("Natural User Interfaces"), all controlled by simple Python code.

Our service: Python GUI out-of-the-box

With Ezpire, we remove the hurdle of combining Python and hardware acceleration. Our Kivy support includes:

  • Pre-configured Yocto image: Get started immediately with an image that already includes Python 3, Kivy and all necessary graphics drivers (GLES, DRM/KMS).

  • Hardware acceleration enabled: We made sure that Kivy uses the GPU (Vivante) of the i.MX 8M Plus instead of burdening the CPU.

  • Ready-to-use demo immediately: Our phytec-kivy-demo image shows you an example of how touch input, widgets and performance optimization work on our hardware and allows you to quickly get started with your project.

  • Comprehensive Integration Guide: Our documentation guides you step by step: from flashing the image to the first "Hello World" button to building your own Yocto layer with meta-kivy.

More technical details (Expandable)

We not only installed Kivy, but also optimized it for industrial use on the i.MX 8M Plus.

We use and maintain Yocto recipes that seamlessly integrate Kivy into our BSP. We rely on meta-kivy and extend it with PHYTEC-specific adjustments in meta-phytec. In the python3-kivy_%.bbappend recipe, we ensure that the correct EGL and GLES libraries of the i.MX driver are linked so that hardware acceleration takes effect.

Kivy runs on our images by default in the high-performance EGLFS mode (or directly on DRM/KMS), without the overhead of a desktop manager. This enables faster boot times, reduced RAM consumption, and direct GPU access. We've also pre-configured the environment variables (KIVY_BCM_DISPMANX_ID, KIVY_GL_BACKEND) to ensure that multitouch events from our capacitive displays (phyCAM/display kits) are correctly passed through to the Python application.

Our demo application on GitHub is more than just a gimmick and can serve as an architectural template. It:

  • Demonstrates a clean separation of UI (KV-Language) and logic (Python).

  • Demonstrates how to use screen managers for multi-page UIs.

  • This serves as a test to ensure your toolchain is set up correctly.

Recommended Hardware

For Python-based GUIs with Kivy, we recommend high-performance platforms with a dedicated GPU, such as our phyBOARD Pollux (i.MX 8M Plus)The integrated NPU and powerful GPU of the i.MX 8M Plus make the board ideal for modern HMI applications with Python (e.g., AI-supported image recognition directly in the UI).