|
LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
This directory contains minimal, self-contained examples demonstrating LibJuno's core capabilities.
Build all examples with:
Executables will be in ../build/examples/.
What it demonstrates: Block-based memory allocator with type-safe pointer API
Key concepts:
USER_DATA_T)JUNO_POINTER_API_T (Copy and Reset functions)Learn: How LibJuno achieves memory safety without dynamic allocation
Run:
What it demonstrates: Type-safe queue implementation using array and pointer APIs
Key concepts:
JUNO_POINTER_API_T for a custom typeJUNO_DS_ARRAY_API_T to provide indexed accessJUNO_MODULE_DERIVELearn: How LibJuno data structures work with your types
Documentation: See MINIMAL_QUEUE_EXAMPLE.md for detailed walkthrough
Run:
What it demonstrates: State machine implementation using LibJuno's SM API
Key concepts:
JUNO_MODULE_DERIVELearn: How to implement state machines in LibJuno
Use case: Traffic light controller simulation
Run:
What it demonstrates: Full application using multiple LibJuno subsystems
Key concepts:
Learn: How to structure a complete embedded application with LibJuno
Documentation: See example_project/LibJuno_Tutorial.md for complete walkthrough
Build:
| Goal | Start Here |
|---|---|
| Learn memory management | minimal_memory_example.c |
| Learn data structures | minimal_queue_example.c |
| Learn state machines | example_state_machine.c |
| Build a complete app | example_project/ |
| Understand DI patterns | Tutorial + any example |
Examples are designed to be:
For production code, use the generators in ../scripts/:
create_array.py: Generate array and pointer API boilerplatecreate_impl.py: Generate module implementationscreate_app.py: Generate application skeletoncreate_msg.py: Generate message typesAll examples follow these patterns:
../include/juno/README.md for module system architecture-DJUNO_DOCS=ON)Check the LibJuno GitHub Issues or consult inline documentation in headers.