Migrating from LVGL to Sparklet: A Practical Guide

Moving from LVGL to Sparklet is a structured, manageable process. This guide walks through every step — from design migration in Flint Designer to API mapping, platform layer swap, and build system changes — with realistic timelines and widget mapping reference.

What Does It Mean to Migrate from LVGL to Sparklet?

Migrating from LVGL to Sparklet means replacing the LVGL library in an embedded application with Sparklet's framework, rebuilding UI screens using Sparklet's widget API and Flint UI Designer, and swapping LVGL's display and input driver layer for Sparklet's Hardware Abstraction Layer (HAL). The migration does not require changes to application business logic — sensor data, state management, communication protocols, and RTOS task structure remain unchanged. Only the UI rendering layer and screen definitions move.

Teams migrate from LVGL to Sparklet for three primary reasons: to achieve MISRA C compliance for regulated markets (automotive, medical, safety-critical industrial), to gain Flint Designer's no-code design productivity advantage (50–70% faster development), or to access professional engineering support with a defined SLA. See the LVGL alternative page for full context, and Sparklet vs LVGL for a side-by-side breakdown.

The four migration phases are: Phase 1 — design migration in Flint Designer; Phase 2 — API migration mapping LVGL calls to Sparklet equivalents; Phase 3 — platform layer swap replacing LVGL drivers with Sparklet HAL; Phase 4 — build system update and PC simulator validation. Each phase is independent and can be validated before the next begins.

Step-by-Step: How to Migrate from LVGL to Sparklet

Four structured phases — design migration, API mapping, platform layer swap, build system update. Validate on the Windows PC simulator before touching target hardware.
Phase 1

Phase 1 — Design Migration: Recreate Screens in Flint Designer

The most efficient approach to LVGL screen migration is visual recreation in Flint Designer rather than line-by-line code porting. Open your LVGL application on a simulator or take screenshots of each screen. Recreate each screen using Flint's widget palette — set dimensions, colours, fonts, and content to match the LVGL original. Add transitions using the animation timeline. Connect data bindings for dynamic content. Wire event callbacks through Flint's UML state machine editor rather than handwriting handler chains. Export C code. For a typical 8–12 screen embedded HMI, this process takes one to three days per engineer — and produces a sustainable, version-controllable Flint project file as a deliverable.

Phase 2

Phase 2 — API Migration: Map LVGL Widget Calls to Sparklet Equivalents

For UI logic written directly in C — event handlers, dynamic widget updates, data-driven display changes — map LVGL API calls to Sparklet equivalents. The widget taxonomy is similar: both frameworks have the same conceptual widget types (buttons, labels, images, charts, meters, sliders) with different naming conventions. Both use an event-driven model where widget interactions fire callback functions. An experienced engineer can map a typical LVGL screen's event handler code to Sparklet in a few hours per screen. Use the widget mapping table below for a direct reference between lv_* function families and Sparklet equivalents.

Phase 3

Phase 3 — Platform Layer Migration: Swap LVGL Drivers for Sparklet HAL

Remove lv_disp_drv_t and lv_indev_drv_t registrations from your LVGL port. Implement Sparklet's HAL display interface — typically a single framebuffer flush function plus an optional dirty-region partial refresh callback. Implement Sparklet's input interface — touch X/Y coordinates and event type sampled by Sparklet's execution engine on each tick. Both LVGL and Sparklet use an analogous architecture for this layer: a flush function and an input read function. If migrating on the same hardware, this step takes half a day to a day. If simultaneously changing silicon, this is where the platform-specific porting work is concentrated — and Embien can provide HAL bring-up support.

Phase 4

Phase 4 — Build System Update and PC Simulator Validation

Replace LVGL's Makefile, CMakeLists.txt, or STM32CubeMX-generated build includes with Sparklet's build configuration for your target platform. Before running on target hardware, validate the migrated UI on the Sparklet Windows PC simulator — the same Sparklet library compiled for Windows. This catches the vast majority of rendering issues, event handling logic bugs, and data binding problems without requiring hardware access, dramatically accelerating iteration speed. When the PC simulator passes, cross-compile for target and perform final hardware validation, focusing on frame rate, touch responsiveness, and hardware acceleration paths.

LVGL to Sparklet Widget Mapping Reference

LVGL Widget / APISparklet EquivalentNotes
lv_btnButton (BTN)Push, Toggle, Radio sub-types available
lv_checkboxCheckBox (CHK)Direct functional equivalent
lv_sliderSlider (SLD)Horizontal and vertical support
lv_arcRotaryKnob (RKN)Arc + rotary knob control
lv_labelStatic (STC)For static text display labels
lv_textareaTextArea (TXA)Multi-line text display
lv_imgImageHolder (IMH)PNG/JPEG/BMP support
lv_chartGraph (GRP)Line and Bar chart support
lv_meterMeter (MTR)Gauge and arc meter variants
lv_barProgressBar (PBR)Horizontal and vertical orientation
lv_listListView (LVW)Scrollable list widget
lv_dropdownComboBox (CMB)Dropdown selection widget
lv_tabviewTab (TAB)Tabbed container
lv_scrollScrollView (SCV)Scrollable container widget
lv_msgboxMsgBox (MBX)Modal message dialog
lv_spinboxStepInput (STP)Numeric step input widget
lv_rollerWheelPicker (WHP)Scrolling value wheel with inertia
lv_keyboardKeyboard (KBD)Onscreen keyboard widget

Understanding the Migration in Detail

What changes, what stays the same, and what timeline to plan for — in three clear sections.

The GUI Layer — Nothing Else

The migration replaces exactly one layer of your embedded firmware: the GUI rendering library and the screen definition code. Everything else in your application stack remains unchanged — no RTOS reconfiguration, no peripheral driver rewrites, no communication stack changes.

  • Changes: GUI library source files, screen definition C files (rebuilt in Flint), display and touch HAL callbacks, build system GUI library includes
  • Unchanged: RTOS configuration and task structure, sensor and peripheral driver code, communication protocol handlers (CAN, UART, SPI, I2C), application business logic and state management, memory map and linker scripts (except framebuffer region sizing if partial-buffer strategy changes)

The business logic separation that good embedded architecture enforces — where the GUI layer calls application APIs for data, and the application layer calls GUI APIs to update display values — means migration is a GUI-layer-only exercise. If your LVGL project mixed business logic and GUI rendering code heavily, the migration is an opportunity to refactor this architecture at the same time.

What You Gain After the Migration

MISRA C compliance, a professional design workflow, engineering support, and royalty-free economics — from day one.
MISRA C

MISRA C Compliant

Full MISRA C compliance from day one of Sparklet deployment — no remediation work, no formal exclusion documentation required. Eligible for automotive (ISO 26262), medical (IEC 62304), and safety-critical industrial (IEC 61508) certification stacks.

Design Tool

Flint Designer Workflow

All future UI work happens in Flint Designer — visual drag-and-drop, UML state machines, animation timelines, Figma import. Engineers report 50–70% faster embedded GUI development after switching from LVGL's code-only workflow.

Support

Direct Engineering Support

Access to the Embien engineering team — the framework authors — for integration questions, performance optimisation, and platform bring-up. Defined SLA commitments, not community-forum best-effort timing.

Royalty-Free

Zero Per-Unit Royalties

Royalty-free licensing scales from prototype to mass production. Ship any volume on any supported platform with zero per-unit fees. One predictable developer seat cost at project start, permanently zero incremental cost per unit shipped.

FAQs: Migrating from LVGL to Sparklet

Migration from LVGL to Sparklet follows four phases: (1) Design migration — recreate LVGL screens visually in Flint UI Designer rather than porting LVGL C code line-by-line, which is typically faster and yields a maintainable design file as output. (2) API migration — map LVGL widget function calls to Sparklet equivalents; both frameworks have the same conceptual widget types with different naming conventions. (3) Platform layer swap — replace LVGL's lv_disp_drv_t and lv_indev_drv_t with Sparklet's HAL flush function and input interface; the architecture is analogous. (4) Build system update — replace LVGL's Makefile or CMake includes with Sparklet's build configuration. Validate on the Windows PC simulator before testing on target hardware.

Start Your LVGL to Sparklet Migration

Request the free evaluation package — Flint UI Designer plus Windows PC simulator binary — and start rebuilding your first LVGL screen in Flint today. Or contact our migration services team for expert-guided porting support with defined timelines.