<img style="display: block; margin: auto;" src="docs/mbb.png" alt"Logo libmbb"/>
libmbb - Embedded Building Bricks
libmbb is a MIT-licensed C library targeted at embedded systems.
The upstream repository is at https://github.com/jawebada/libmbb/.
- Hierarchical state machines (HSMs), including timers
- Fixed-cacpacity queues
- Debugging macros
- Unit tests
libmbb does not allocate memory dynamically. It is up to the developer to decide how memory is allocated. The HSM module supports both purely event-driven and non-blocking, real-time suitable processing.
The tools sub directory contains the following command line tools:
mhsm_scaffoldadds event processing function stubs to source files
munt_maingenerates main functions for unit tests
libmbb uses the autotools for building. If you clone its upstream repository
you will have to call
./autogen.sh to build the
autogen.sh just calls
autoreconf which depends on
being installed. If the
configure script is built it is the usual game of
./configure make make install
install target will install the examples and unit tests along with libmbb
itself. These programs have rather unspecific names like
./configure --program-prefix=mbb_ will install them as
instead. Alternatively, you might specify
./configure --prefix=/opt/mbb to
install everything into
make check to run the unit tests.
./configure --host=arm-linux to cross-compile for arm-linux.
./configure --help for a general help message.
- The libev timers backend and the
examples using it are only compiled if
libevand its header files are installed on your system.
- The tools are written in and thus depend on Ruby.
- debugging: debugging macros
- monostable: multiple HSM instances, libev timers
- pelican: Miro Samek's PEdestrian LIght CONtrolled (PELICAN) Crossing Example, periodic timers
Note that the terminal interfaces of some of the examples (
monostable) will be interfered with by the
stderr output of the debugging
macros. You can either add
CPPFLAGS to disable these debugging
macros or redirect
stderr like this:
examples/pelican 2> log