Abstract
Microcontroller units (MCU) with integrated communication transceivers usually require protocol stack support to be compliant with standards. Many manufacturers provide royalty-free stacks in the form binary images linkable by specific compilers as an effective way to support developers while protecting the stack code as intellectual property from being used in competitors' products. Unfortunately, the use of designated compilers prevents the developers from choosing their own compilers, even if they target the same instruction-set architecture. What prevents the mixing of compilers include differences in the calling convention across compilers, format of the object files, and runtime support for various architecture extensions. Another issue with compiler-based programming approach is that the code must be executed in batch, making it difficult to interactively experiment with simple code fragments. To address these problems, we propose two layers to be inserted into the existing firmware architecture. The compiler binding layer (CBL) resolves the differences in calling conventions by using a mix of compile-time and run-time techniques. The interactive execution layer (IEL) enables the user to execute disposable code fragments that are dynamically loaded into SRAM during runtime. By distributing an image built with the designated compiler and the proper stub code, we enable developers to be completely independent of the designated compiler and to use their own compiler exclusively to develop their own user code while still being able to take advantage of the proprietary protocol stack such as Bluetooth Low Energy, ZigBee, and others that target single-chip RF+MCU platforms.