A modern, component-oriented language designed explicitly for small footprint embedded systems.
Note: The current version only supports the Arduino platform. (See B# SDK below)
Main Highlights of B#:
Compact, simple, and fast
Component-oriented with modern software engineering features reinforced by its compiler
Supportive of writing portable interrupt handlers and device addressing registers in a uniform way
Type-safe with no pointer manipulation
Lean enough for 8-bit MCUs, expressive enough for 32-bit MCUs, and beyond
All of which are basic requirements for the embedded systems developer.
B# High-Level Mapping
In order to support these features efficiently, high-level B# code
is mapped directly to a compact instruction set which is
interpreted by an optimized embedded virtual machine (EVM) called B# EVM.
The B# EVM provides:
Component reuse and deployment across multiple architectures without recompilation
Compact and position-independent code (no linking)
Big-endian ordering on every architecture
Deterministic memory defragmentation (no GC)
Small footprint (<24 KBytes Flash and <2 KBytes RAM)
Current version only supports the Arduino Nano platform.
Using the B# language, we present an incremental and systematic way of moving
from a procedural to an OO approach that works for the embedded systems developer.
Embedded systems have unprecedented opportunities as the cost of building hardware
products dips lower and lower. On the other hand, the complexity of embedded software is
headed in the opposite direction. A similar trend happened in the Information Technology
(IT) field decades ago. As software exploded into millions of lines of code,
IT professionals were forced to adopt the object-oriented (OO) approach and
the OO languages to cope with the increased complexity.
Unfortunately, based on code reviews in many organizations, most fail to exploit the OO
paradigm. Basic, yet very important, learning steps are skipped over when they transition
from the procedural to the OO approach. What separates successful organizations from
unsuccessful organizations in building OO software is not just realizing the benefits
of the encapsulation principle (classes and setters/getters) but rather extending their
understanding and utilization of inheritance and polymorphism (interfaces and abstract
classes) and the most important basic design patterns such as inversions of control, abstract
factories, factory methods, and facades.
There are however few (if any) documented ways that take us from a
procedural embedded approach to an OO embedded one. That is what this book is
about. Using the B# language, we present an incremental and systematic way of moving
from a procedural to an OO approach that works for the embedded systems developer.
What Is Different About This Book?
Learn how to use a simple object-oriented programming language to develop, apply,
and reuse practical and portable embedded components.
Learn the best practices/idioms/patterns to build and reuse embedded components
of position-independent code (PIC).
For now, the B# SDK Arduino is available (only for those who contribute)
Please contact us if you have experience with the Arduino platform and want to contribute.
This SDK contain:
The B# compiler and its virtual machine running on a Windows platform (Mac/OS and Linux platforms are planned),
A "getting started" document, and
A collection of sample programs to experiment with the language