- Added POSIX desktop support for SDK builds, application packaging, and integration testing. - Added POSIX filesystem partitions and improved application path handling. - Added simulator support for loading and running applications dynamically. - Improved simulator task stack handling and display startup reliability. - Improved simulator display scaling, resizing, high-DPI support, and pointer accuracy. - Fixed LVGL timers and input polling on POSIX. (fixes simulator with Linux on some Intel graphics platforms) - Standardized data paths across platforms. - Logging now works via separate task: this allows apps to write to log without it affecting their stdout (for apps that output text as relevant date for other apps, like the File Selection app) - Fixes for app stdio
lvgl-module
This module manages the lifecycle of the LVGL library within the Tactility ecosystem.
What the library does
The lvgl-module provides:
- Lifecycle Management: Handles initialization and termination of the LVGL library.
- Task Management: Manages the LVGL main loop task.
- Thread-Safety: Provides mutex-based locking mechanisms (
lvgl_lock,lvgl_unlock) to ensure safe access to LVGL APIs from multiple tasks. - Font Access: Provides a unified interface to access pre-configured text and icon fonts.
Different types of fonts
The module supports two main categories of fonts:
Text Fonts
Standard text rendering uses the Montserrat font. Three sizes are pre-configured:
FONT_SIZE_SMALLFONT_SIZE_DEFAULTFONT_SIZE_LARGE
Icon Fonts
Icons are provided by the Material Symbols font, divided into three usage-specific sets:
- Statusbar Icons: Optimized for the system status bar.
- Launcher Icons: Sized for application launchers.
- Shared Icons: General purpose icons used across the system.
How to update the fonts
Font sizes and symbols are configurable:
- On ESP32 (IDF): Sizes can be updated via
menuconfigor by editingsdkconfig. Look forCONFIG_TT_LVGL_FONT_SIZE_*andCONFIG_TT_LVGL_*_ICON_SIZEparameters. - On Simulator/POSIX: Default sizes are defined in
Modules/lvgl-module/CMakeLists.txt.
If you change an icon font size, ensure that a corresponding C file exists in source-fonts/ (e.g., material_symbols_shared_24.c). These files are generated from TTF/OTF fonts using the LVGL font converter.
Custom memory allocator
LVGL's malloc/realloc/free can be routed through a custom backend instead of its built-in pool or
plain malloc. Three things are required:
1. Select the backend. On ESP32, via Kconfig (sdkconfig):
CONFIG_LV_USE_CUSTOM_MALLOC=y
On Simulator/POSIX, ESP-IDF's Kconfig doesn't apply - select it in lv_conf.h instead:
#define LV_USE_STDLIB_MALLOC LV_STDLIB_CUSTOM
2. Force the module into the link. LVGL's own init code calls back into the functions above a reverse reference a normal single-pass static-archive link can't resolve on its own:
tactility_add_module(lvgl-module
...
WHOLE_ARCHIVE
)
Without WHOLE_ARCHIVE, or without step 1 selecting the custom backend, ESP-IDF's LVGL component
compiles its own allocator using these same symbol names - whichever one the linker happens to
pull in first silently wins, with no error and no guarantee it's the intended one.
License
This module is licensed under the Apache v2.0 license.