Abstract—The BLEGen is a retargeting generation code tool
to implement Bluetooth Low Energy services. Based on a
specification of the main characteristics of the BLE services, the
BLEGen is able to produce all the necessary C code to
implement the services for the chosen microchip. The
specifications are written using a domain specific language,
which was designed to allow a very compact, easy to understand,
highly focused on the BLE standard concepts and fully
independent of the details and constraints of the target
microchip. The BLEGen was conceived based on the builder
design pattern to be a retargeting tool. This means that it is able
to generate code for distinct target microchips, using the
correspondent BLE software stack and taking advantage of the
concrete microchip architecture. The BLEGen allows the
implementation of new BLE services, reducing significantly the
development time and the level of expertise, since it avoids a long
learning period to understand the BLE stack used by each
manufacturer and the microchip architecture.
At this paper, it is presented the motivation, the domain
specific language defined to describe the BLE services, the
architecture of the BLEGen and the solutions adopted to make it
a retargeting tool.
Index Terms—Bluetooth low energy, builder pattern, code
generation.
The authors are with the Polytechnical Institute of Bragança at Portugal,
Portugal (e-mail: poliveira@ipb.pt, pmatos@ipb.pt).
[PDF]
Cite: P. Oliveira and P. J. Matos, "BLEGen — A Code Generator for Bluetooth Low Energy Services," Lecture Notes on Software Engineering vol. 4, no. 1, pp. 7-11, 2016.