top of page
  • Linkedin

Embedded User Interface

Public·2 members

Debugging LVGL on Infrabase (QEMU, no hardware needed) — a step-by-step guide


Infrabase's build infrastructure — based on BitBake and OpenEmbedded, but optimized for simplicity and flexibility — continues to evolve, with numerous improvements since our initial release. Today’s guide walks through source-level debugging of an LVGL application, all inside a QEMU/virt64 environment. No hardware needed — just a modern Linux host and developer tools


Today we’ll dive into the execution of an LVGL application and explore the LVGL library internals — all inside a QEMU/virt64 emulated environment. Yep: no hardware required. 🙂


What you’ll do

  • Build the default Infrabase environment and QEMU.

  • Enable debug symbols for your LVGL app and the LVGL library.

  • Launch the emulated GUI and attach VS Code + gdb-multiarch.


21 Views

Rendering QR Codes in LVGL: From Pixels to Philosophy

QR codes have become a ubiquitous way to encode and share information, URLs, contact details, configuration parameters, and more. With LVGL, embedding a QR code into your embedded UI is straightforward. In this post, we’ll explore how to use QR codes in LVGL, discuss the limits of QR code sizing on embedded displays, and take a step back to reflect on the design philosophy behind these clever square patterns.


Using QR Codes in LVGL

Starting from LVGL v8, the library includes a built-in widget for generating and displaying QR codes.

Here's a simple example:

lv_obj_t * qr = lv_qrcode_create(lv_scr_act(), 100, lv_color_black(), lv_color_white());
lv_qrcode_update(qr, "https://www.edgemtech.com");

This snippet creates a 100x100 pixel QR code in black on a white background. The lv_qrcode_update function encodes the string into the QR pattern.


23 Views

LVGL: Adding a custom pixel format (Part 2: Transformation)

Welcome to this second part of the great quest to add a custom format to LVGL 9.x!


Last time, we saw how to define our custom pixel format and how to add a way to blend it using LVGL. At this point, we are able to draw basic objects with our custom pixel format.


This time, we'll see how to patch LVGL to be able to transform our objects. This includes:

  • Scaling

  • Rotation

  • Skewing


13 Views

LVGL Class System (Extending Widgets)

This feature is not documented at all in LVGL, and many developers would love to know about that! That's why this post exists!

a.k.a Real inheritance in C

Most developers know LVGL for its lightweight rendering engine and friendly widget API, but behind the scenes is a surprisingly powerful class system that mimics object-oriented inheritance in pure C.


In this post, we’ll explore how to extend an existing widget, such as a button, and inject your own custom behavior. (for example, a button_with_fade_in_anim). You’ll learn how to build on top of lv_btn using LVGL’s internal lv_obj_class_t system.


What is lv_obj_class_t

In LVGL 8.x and newer, every object is associated with an object class defined by lv_obj_class_t. This class structure defines:


116 Views
bottom of page