MENU_LIB is a lightweight, portable library for building hierarchical, text-based menu systems on embedded platforms. It separates menu logic, display rendering, and menu data structures, enabling flexible use across LCD, OLED, or UART-based interfaces.
- 🧭 Hierarchical Menu Navigation — supports multi-level submenus and callbacks
- 🧩 Hardware Independence — compatible with any display driver implementing the screen interface
- 🧠 Static Memory Model — all menus defined at compile time (no dynamic allocation)
- ⚙️ Customizable Rendering — configurable headers, cursor positions, and line count
- 🔗 Callback Integration — execute user-defined functions directly from menu items
- 🧱 Error-Safe Architecture — validation for display drivers and menu depth
- 💡 Designed for Embedded Targets — minimal RAM and code footprint
- 🗂️ Multiple Independent Menus — architecture allows defining and switching between multiple menus (e.g., different device modes) without changing core logic
- ✍️ Dynamic Labels Support — item labels can be generated at runtime (e.g., values, states) while keeping the static structure of the tree
For an in-depth explanation of internal structure, data flow, and design principles, see the 👉 Architecture Overview document.
That document covers:
- The 4-layer modular architecture
- Internal data structures (
menu_t,menu_status_t) - Rendering and navigation logic
- Display driver abstraction layer
- Error handling flow and design principles
For detailed instructions on how to set up and use the library — including display driver configuration, menu definition, and initialization steps — please refer to:
- 👉 Getting Started Guide
- 👉 Menu Generator Tool — optional web-based tool for visually designing menus and generating compatible
menu.c/menu.hfiles
Ready-to-run examples can be found in the examples/ directory. Each example demonstrates a different use case (LCD display, UART terminal, FreeRTOS integration, etc.).
More details in 👉 Examples Overview
The MENU_LIB project includes automated CI pipelines (GitHub Actions) that perform continuous checks and generate reports.
cppcheck— static code analysislizard— code complexity checkgcovr— coverage data collection- Build verification
- Unit tests execution
clang-format— formatting consistency check
Results of all checks are available in the Actions tab of the repository.
After successful build and test runs, the following reports are published to the project page:
- CCM Report — code complexity metrics
- GCOVR Coverage Report — unit test coverage summary
- Doxygen Documentation — automatically generated API reference
📄 See also: Reports
The complete API documentation is generated automatically with Doxygen and published on the project page:
An additional API reference is also available in Markdown format:
Contributions, ideas, and improvements are welcome! Please read the CONTRIBUTING guide before submitting pull requests. It includes:
- Build & test instructions
- Code style and formatting
- Adding new menu features or drivers
- Running analysis tools (cppcheck, ccm, coverage)
This project is released under the MIT License. See the LICENSE file for details.
© 2025 Niwciu — MENU_LIB Embedded menu system for modular, human-friendly interfaces.
