BLEGen — a code generator for bluetooth low energy services - Oliveira, Pedro Filipe (2016)
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.