Embedded systems with displays face a fundamental tension: the user expects a responsive, polished interface, but the hardware has a fraction of the memory and processing power of a desktop platform. Writing a GUI framework from scratch for every product is not viable, handling display drivers, font rendering, touch input, widget layout, and image decoding takes engineering-months. SEGGER emWin eliminates this effort with a production-grade graphics library purpose-built for resource-constrained systems.
What emWin Does
emWin is a graphics library that handles the full GUI stack: display driver abstraction, pixel-level rendering, a widget toolkit, a font engine, image decoding, and input handling. It runs on any microcontroller with sufficient RAM and flash, most commonly Arm Cortex-M devices, where emWin is optimized for the instruction set and memory architecture.
The library is not a framework that dictates application architecture. It is a set of callable functions. The application retains full control over when and how the GUI updates, making emWin compatible with bare-metal super-loops, RTOS multi-task designs, or event-driven state machines.
Supported Displays
emWin supports LCD, TFT, and OLED displays across a range of interfaces:
- Parallel RGB: direct connection to TFT panels via the MCU’s LCD controller. emWin writes to the framebuffer; hardware handles timing.
- SPI and QSPI: common in cost-sensitive designs with smaller panels. emWin includes drivers for popular controllers (ILI9341, ST7789, SSD1306 for OLED).
- MIPI DSI: for higher-resolution panels on Cortex-M7 and Cortex-A class devices.
Switching panels requires changing driver configuration, not rewriting GUI code.
Widget Library
emWin provides pre-built widgets handling rendering, interaction, and state: buttons (text, bitmap, toggle), sliders, scrollbars, text fields, edit boxes, real-time graphs with auto-scaling axes, progress bars, listboxes, dropdowns, tree views, and container windows. Each widget is customizable in appearance and behavior via callbacks. Widgets can be created in C code or designed visually using SEGGER’s AppWizard tool, which generates the C source.
Font Engine and Anti-Aliasing
emWin supports bitmap fonts (pre-rendered for speed), TrueType fonts (scalable at runtime from a single file), and anti-aliased rendering using 2-bit or 4-bit AA. On TFT displays with sufficient color depth, anti-aliased text is visually comparable to desktop quality. A font converter tool converts standard formats into emWin’s optimized internal format, with character subset selection to minimize flash usage.
Image Support and Memory Efficiency
emWin decodes PNG, JPEG, BMP, and GIF directly. For constrained systems, SEGGER’s Bitmap Converter pre-processes images into a native compressed format that decodes faster with less RAM.
Memory efficiency is central to emWin’s design:
- Banded rendering: instead of a full-screen framebuffer (150 KB+ for 320x240 at 16-bit), emWin renders in horizontal bands, cutting buffer requirements dramatically.
- Cache management: widget backgrounds are cached to avoid redundant re-rendering.
- Configurable footprint: unused features (AA, TrueType, specific decoders) are excluded at compile time.
A minimal configuration for a 128x64 OLED fits under 30 KB ROM. A full-featured 480x272 TFT configuration with widgets, AA fonts, and PNG typically needs 100-200 KB ROM.
RTOS Integration
emWin integrates with SEGGER embOS and other RTOS kernels through an OS abstraction layer:
- Mutual exclusion: GUI operations are mutex-protected, allowing multiple tasks to call emWin safely.
- Input task separation: touch input runs in a high-priority task feeding events to the GUI task, ensuring responsiveness during rendering.
- Timer-driven animations: RTOS timers drive scrolling text, progress bars, and blinking cursors without a dedicated task.
On bare-metal systems, the OS layer is replaced with direct function calls, emWin works equally well without an RTOS.
emWin and SEGGER GUI Tools in India
GSAS Micro Systems provides SEGGER emWin along with embOS, Embedded Studio, and the full SEGGER toolchain with INR invoicing and local application engineering. Teams building products with embedded displays, industrial HMIs, medical devices, consumer electronics, EV dashboards, across Bengaluru, Chennai, Hyderabad, Pune, Mumbai, and Delhi NCR can access GUI development assistance, display integration consulting, and evaluation licenses.
Also appears in:
Interested in SEGGER tools?
Talk to our application engineers for personalized tool recommendations.
More from SEGGER
View all →