LVGL on Oniro

Philippe.Coval + Gábor.Kiss-Vámosi #FOSDEM2022

ONIRO.svg

Agenda

  • Introduction
  • LVGL
  • Oniro project
  • Integration showcase

Introduction

What is LVGL?

  • Light and Versatile Graphics Library
    • Open source (MIT license)
    • Platform independent, and scalable
  • First published in 2016 on GitHub
    • Now has 8.3k stars and 200+ contributors
  • Integrated into many OS and HW solutions:
    • NXP, ESP, NuttX, Zephyr, Rt-Thread, Adafruit, and many more

LVGL UI Demo

LVGL Features

  • Many built in Widgets:
    • buttons, charts, lists, sliders, images, etc.
  • Advanced graphics with animations
    • anti-aliasing, opacity, smooth scrolling
  • Fully customizable with CSS-like styles
  • Supports various input devices:
    • touchpad, mouse, keyboard, encoder, etc
  • Multi-language support with UTF-8 encoding
  • Binding to MicroPython

Scalable and Portable

  • Written in C for maximal compatibility
    • C++ compatible
  • Hardware independent:
    • use with any MCU and display
  • OS, external memory, GPU are optional
  • Scalable:
    • from small MCUs (>64 kB Flash, 16 kB RAM)
    • to desktop PCs with 4k displays

Porting LVGL

  • Only 2 functions are needed to port LVGL:
    1. A Render ready callback
      • to copy the rendered image to the screen
    2. An Input read callback
      • to read the touchpad or other device
  • Flexible architecture:
    • you can add GPU support in the pipeline
    • hook any drawing drawing operations

Design with SquareLine ($)

📺

The Oniro Project

  • An independent Eclipse Foundation project
  • An open source distributed operating system
    • For diverse IoT devices (big and small)
    • Cross kernel, focus on interoperability
  • Defragment development for embedded sys:
    • Avoid technology silos
    • Unified tooling, common policies,

UI Requirements

  • Oniro can support FLOSS toolkits:
    • Qt, GTK+, EFL… or Web frameworks
  • LVGL works on many flavors of Oniro devices
    • A common denominator for CPU/MCU
      • For cross kernel Oniro apps
  • Challenge: Prototype app on CPU (Linux)
    • rebase on MCU (Zephyr or Other)

Oniro Linux flavour

  • Reference "Vending machine" blueprint
  • Using lvgl v8 with wayland driver
  • 2 apps: UI + controller (websockets)
  • Shipped into customized distro with variables:
    • Screen size, allocator, fonts
    • weston config for kiosk application

Oniro's Vending machine

📺 📺

Oniro's Keypad

Oniro Zephyr flavour

Summary

  • LVGL is portable library for MCU
  • Also CPU using drivers: Wayland, SDL
  • Oniro is crosskernel OS
    • with "blueprint" projects using LVGL
      • Linux: Vending machine
      • Zephyr: Keypad
  • Visit FOSDEM Oniro's stand for more!

Resources and more:

Extras ?

Howto: Vending machine

Video Playback