Embedded Graphics Rendering Architecture — A 7-Layer Stack Designed for Portability

Sparklet's graphics rendering architecture organises the entire GUI software stack into seven isolation layers — from user application code down to hardware display drivers. Each layer has a defined contract with the layers above and below it. This strict separation is why a platform port requires only HAL changes, and why the same Flint-generated screen code runs on Renesas, NXP, STM32, and a Windows simulator without modification.

What Is Embedded Graphics Rendering Architecture?

Embedded graphics rendering architecture is the software stack that defines how a GUI framework transforms application-level widget code into display-output pixel data, across layers of abstraction from high-level UI logic down to hardware drivers. A well-designed architecture isolates each concern into a distinct layer: what the UI shows (widgets), how pixels are computed (rendering), when and how screens transition (execution engine), and which hardware registers are written (HAL).

Most desktop GUI frameworks — Qt, WPF, Electron — mix rendering and application logic in ways that make sense for desktop hardware but create problems on embedded devices: large binary size, high RAM usage, C++ template overhead, and rendering paths that assume preemptive multitasking at desktop timescales. When these frameworks are ported to embedded hardware, the architectural mismatch results in performance compromises and fragile platform-specific patches.

Sparklet was designed with a 7-layer architecture from the start. Every layer is written in pure C. Every inter-layer boundary is a defined API. The widget layer (WID) never calls HAL functions directly. The HAL layer never interprets widget semantics. This clean separation is what makes Sparklet genuinely portable — not just "runs on multiple platforms" but "requires only a HAL change to port to a new platform." See all embedded GUI features →

The 7-Layer Architecture — Three Ways to Understand It

Top 3 Layers (UI)

APP — Application and Flint-Generated Screen Code. The topmost layer — user application logic and the C code generated by Flint UI Designer. Flint generates screen descriptors: widget tree definitions, initial property values, animation descriptors, and state machine event tables. Application business logic calls Sparklet's widget API to update data properties (e.g., set a gauge value, update a text label) and registers event callbacks. No knowledge of rendering or hardware required at this layer.

WID — Widget Implementations. All 36+ widget implementations live here. Each widget manages its own state (visible, hidden, focused, pressed, animated), responds to property updates from the APP layer, generates dirty-region notifications to the GDI layer when its appearance changes, and dispatches input events (touch, encoder, key) to registered callbacks. Widgets are pure logic and geometry — they compute bounding rectangles and draw commands but never call hardware APIs directly.

GDI — Graphics Device Interface. The rendering engine. It receives draw commands from the WID layer (fill rectangle, blit image, draw text, alpha blend), maintains the dirty-region list, and routes pixel operations to either the software renderer or a hardware accelerator (DMA2D, D/AVE2D, PXP, Mali) based on platform configuration. A widget calls gdi_fill_rect() regardless of which execution path handles the fill.

Middle 2 Layers (Engine)

EXEC — Execution Engine (Screen Manager and Frame Scheduler). The EXEC layer manages screen lifecycle: screen creation, screen switching (with transition animations), and the per-frame rendering loop. It drives the frame scheduler — on each tick it checks for pending input events, triggers state machine evaluation via RS_MIN, invokes GDI rendering for dirty regions, and initiates the framebuffer flush. In an RTOS environment, EXEC runs in a single dedicated task. In bare-metal systems, it is called from the main loop.

RS_MIN — RapidSea Minimal (State Machine and Data Engine). RS_MIN is a lightweight hierarchical state machine (HSM) engine. It evaluates UML-based state machines generated by Flint's state machine editor: state transitions, guard conditions, entry/exit actions, and event-driven property updates. RS_MIN is responsible for the "Connect" step in Flint's Design → Connect → Deploy workflow — it wires data model changes to widget property updates without requiring the developer to write event dispatch code manually. Every state machine in every Sparklet UI runs through RS_MIN each frame.

Bottom 2 Layers (Platform)

UTIL — Utilities (Codecs, Math, Memory, Fonts). The UTIL layer provides shared services used by multiple layers: PNG and JPEG image decoders, a fixed-point math library for rotation and scaling, a pool-based memory allocator suited to embedded use, and the font rasteriser (anti-aliased bitmap fonts, vector font support). The font rasteriser is the component that implements RTL text direction for right-to-left language support. No layer above UTIL needs to know which codec or math library is in use — all operations are accessed through the UTIL API.

HAL — Hardware Abstraction Layer. The HAL is the only layer with platform-specific code. It provides: display initialisation (LCD timing, framebuffer base address), framebuffer flush (DMA or sync write), touch controller read (I2C, SPI, or parallel), timer tick for the frame scheduler, and GPU or 2D accelerator initialisation and command dispatch. Porting Sparklet to a new MCU or display panel requires writing or modifying only the HAL. All six layers above compile unchanged. Platform porting services →

Sparklet 7-Layer Architecture — Quick Reference

LayerCodeResponsibilityContains Platform-Specific Code?
ApplicationAPPUser code + Flint-generated screens, event callbacksNo
WidgetsWID36+ widget implementations — state, events, geometryNo
Graphics Device InterfaceGDIRendering engine — dirty region, software/HW routingNo (routes via HAL APIs)
Execution EngineEXECScreen manager, frame scheduler, RTOS taskNo
RapidSea MinimalRS_MINHSM state machine engine, data model, guard evaluationNo
UtilitiesUTILPNG/JPEG codecs, math, memory allocator, font rasteriserNo
Hardware AbstractionHALDisplay driver, touch driver, timer, GPU integrationYES — only this layer

Why Layer Isolation Matters for Embedded GUI Development

The practical benefits of Sparklet's 7-layer isolation manifest in four scenarios that embedded development teams encounter regularly:

Platform porting: Moving from STM32H7 to NXP i.MX RT1170 requires a new HAL implementation. The widget code, state machines, Flint-generated screen code, and GDI rendering logic are all recompiled unchanged. Customers consistently report completing hardware platform ports in one to three days rather than weeks.

Hardware upgrade within a product family: When a product moves from a display with DMA2D to one with D/AVE2D, only the GDI hardware routing configuration and HAL change. The rest of the stack — including all application screen code — is untouched. Frame rates improve automatically.

OTA UI update: Because the APP layer (Flint-generated screen descriptors) is isolated from the rendering and hardware layers, UI updates can be distributed over-the-air as new screen descriptor data without updating the firmware binary. This is architecturally clean in a way that monolithic GUI stacks do not support.

Multi-team development: UI designers work in Flint (APP layer output). Application engineers implement business logic in the APP layer. Platform engineers maintain the HAL. The strict API boundaries prevent teams from accidentally coupling concerns — a common source of maintenance debt in embedded UI projects.

By contrast, desktop-derived embedded GUI frameworks typically do not enforce this separation. Qt's QML/C++ boundary is not cleanly separable from the rendering pipeline; LVGL requires application code to call drawing functions directly for custom widgets, coupling rendering logic to application semantics. Sparklet's architecture makes the "right" approach the natural approach. Compare Sparklet vs LVGL, Qt, TouchGFX, and emWin →

Practical Benefits of the 7-Layer Architecture

How the separation of concerns pays off in real embedded development projects.
Port Icon

Port in Days, Not Weeks

A new MCU or display panel port requires only a HAL implementation. All six layers above compile unchanged. Customers report completing platform ports in one to three days.

OTA Icon

OTA UI Updates Without Firmware Change

The APP layer (Flint-generated screen descriptors) is isolated from firmware. UI updates can be distributed over-the-air as new screen data — no firmware binary update required.

Team Icon

Parallel Development by Role

UI designers work in Flint (APP). Engineers implement business logic (APP). Platform engineers own the HAL. Strict API boundaries prevent accidental cross-layer coupling.

Upgrade Icon

Hardware Upgrades Are Non-Breaking

Upgrading from DMA2D to D/AVE2D changes only the GDI routing configuration and HAL. All application and widget code compiles and runs unchanged on the new hardware.

Embedded Graphics Rendering Architecture — Frequently Asked Questions

Embedded GUI rendering architecture is the software stack that defines how a GUI framework converts application-level widget code into display-output pixel data across multiple layers of abstraction. A well-designed architecture separates what the UI shows (widget layer), how pixels are computed (rendering/GDI layer), when and how transitions occur (execution layer), and which hardware registers are written (HAL layer). Sparklet implements this as a 7-layer architecture: APP, WID, GDI, EXEC, RS_MIN, UTIL, and HAL.

Explore Sparklet's Architecture on Your Target Hardware

Request the free evaluation binary and Flint UI Designer. See the 7-layer architecture in practice — from Flint-generated screen code through the GDI rendering engine to your display hardware.