PixelUI trades fixed capacity for predictable memory use. “What happens when this is full?” is part of the API contract.
| Public setting | Default | Effect |
|---|---|---|
PIXELUI_MAX_ANIMATION_COUNT |
35 | Inline animation slots |
PIXELUI_MAX_APP_NUM |
11 | AppManager registrations |
PIXELUI_MAX_VIEW_DEPTH |
8 | Live App depth and metadata |
PIXELUI_APPLICATION_ARENA_SIZE |
4096 B | Shared storage for all live Apps |
PIXELUI_APPLICATION_ARENA_MAX_ALIGNMENT |
64 | Maximum App alignment |
PIXELUI_CALLBACK_STORAGE_SIZE |
32 B | ETL inline lambda capacity |
PIXELUI_MAX_ICONVIEW_ITEMS |
11 | IconView items |
PIXELUI_MAX_LISTVIEW_SLOT_NUM |
30 | ListView fixed table |
PIXELUI_MAX_LISTVIEW_DEPTH |
6 | Submenu history depth |
PIXELUI_MAX_POPUP_NUM |
3 | Active plus pending Popups |
PIXELUI_MAX_ONSCREEN_WIDGET_NUM |
6 | FocusManager root nodes |
PIXELUI_MAX_INT_FIXED_WIDTH |
6 | Maximum PopupValueDigits width |
PIXELUI_MAX_COROUTINE_NUM |
10 | CoroutineScheduler capacity |
Feature switches and fonts
PIXELUI_USE_ANIMATION, PIXELUI_USE_POPUP, PIXELUI_USE_COROUTINE, and PIXELUI_USE_FOCUS control whether core modules are compiled. Info, Progress, and ValueDigits Popups can also be disabled independently.
PIXELUI_FONT_TEXT/SMALL/TINY/NUMERIC/CHART define font roles used by Widgets. The default body font contains GB2312 glyphs. Replacing it can significantly reduce flash use when Chinese text is not needed.
External configuration
Define PIXELUI_CONFIG_PATH consistently across the library and firmware to point to one complete configuration file. Different translation units must not see different capacities or switches, because that creates ABI and ODR violations.
Tuning order
- Count peak simultaneously live Apps, Animations, Popups, and root Widgets.
- Leave headroom and handle
falseorLaunchResultfailures. - Measure
sizeof, alignment, and the linker map again with the target compiler. - Change one capacity category at a time and compare
.bssand.data.
ViewManager, the App arena, and the other managers are inline members of PixelUI. Raising limits directly increases fixed RAM use even before those slots are occupied.
