Microcontrollers Programming Framework based on a V-like Programming Language

—This paper describes the design of a programming framework for microcontrollers specially the ones with low program and data memory, using as a base a programming language with modern features. The proposed programming framework is named Aixt Project and took inspiration from other similar projects such as Arduino , Micropython and TinyGo among others. The project’s name is inspired on the weasel pet of the V programming language and at the same time it is a tribute to Ticuna people who live in the Amazon rain-forest, just between Colombia, Per´u and Brasil. Aixt comes from Aixt¨u or Ait¨u r¨u which means otter in Ticuna language. The proposed programming framework has three main components: the Aixt language based on the V syntax, a transpiler that turns the defined V-like source code into C , and a generic cross-platform Application Programming Interface (API). The target of this project is obtaining a cross-platform programming framework over the same language modern language an the same API, for programming different microcontrollers especially the ones with low memory resources. Aixt language is based on the syntax of V programming language but it uses mutable variables by default. V language was selected to be used as base of this project due to it is a new compiled programming language with interesting modern features. In order to turn the Aixt source code into C , a transpiler is implemented using Python and the some specialized libraries to design each part of its translation process. The transpiled code is compiled by the native C compiler of each microcontroller to obtain the final binary file, that is why the API has to be adapted for each native C compiler. The complete project is released as a free and open source project. Finally, different application test were done over the XC8 and XC16 compilers for the PIC16, PIC18, PIC24 and dsPIC33 microcontrollers families, demonstrating the correct working of the overall framework. Those tests show that the use modern language framework to program any microcontrollers is perfectly feasible using the proposed programming framework.

[1]  Gabriel Synnaeve,et al.  Code Translation with Compiler Representations , 2022, ICLR.

[2]  A. Alahmar,et al.  Rust: The Programming Language for Safety and Performance , 2022, ArXiv.

[3]  A. Hassan,et al.  In Rust We Trust – A Transpiler from Unsafe C to Safer Rust , 2022, 2022 IEEE/ACM 44th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion).

[4]  Jácome Cunha,et al.  Ranking programming languages by energy efficiency , 2021, Sci. Comput. Program..

[5]  Suseela Vappangi,et al.  A systematic literature review on prototyping with Arduino: Applications, challenges, advantages, and limitations , 2021, Comput. Sci. Rev..

[6]  Kai Weng,et al.  An Energy-Efficient Strategy for Microcontrollers , 2021, Applied Sciences.

[7]  E. Baccelli,et al.  Minimal Virtual Machines on IoT Microcontrollers: The Case of Berkeley Packet Filters with rBPF , 2020, 2020 9th IFIP International Conference on Performance Evaluation and Modeling in Wireless Networks (PEMWN).

[8]  Emmanuel Chailloux,et al.  Programming microcontrollers through high-level abstractions , 2020 .

[9]  F. Enescu,et al.  Investigating the performance of MicroPython and C on ESP32 and STM32 microcontrollers , 2020, 2020 IEEE 26th International Symposium for Design and Technology in Electronic Packaging (SIITME).

[10]  Keisuke Takano,et al.  Approach of a Coding Conventions for Warning and Suggestion in Transpiler for Rust Convert to RTL , 2020, 2020 IEEE 9th Global Conference on Consumer Electronics (GCCE).

[11]  Kai Grunert,et al.  Overview of JavaScript Engines for Resource-Constrained Microcontrollers , 2020, 2020 5th International Conference on Smart and Sustainable Technologies (SpliTech).

[12]  Yosoon Choi,et al.  Applications of the Open-Source Hardware Arduino Platform in the Mining Industry: A Review , 2020, Applied Sciences.

[13]  Guillaume Lample,et al.  Unsupervised Translation of Programming Languages , 2020, NeurIPS.

[14]  A. Ruiz Diseño de Hardware y Firmware para un sistema inalámbrico de adquisición de datos DAQ de bajo costo , 2020 .

[15]  Robbert Gurdeep Singh,et al.  WARDuino: a dynamic WebAssembly virtual machine for programming microcontrollers , 2019, MPLR.

[16]  Dimosthenis E. Bolanakis,et al.  A Survey of Research in Microcontroller Education , 2019, IEEE Revista Iberoamericana de Tecnologias del Aprendizaje.

[17]  Bernhard Rumpe,et al.  Highly-Optimizing and Multi-Target Compiler for Embedded System Models: C++ Compiler Toolchain for the Component and Connector Language EmbeddedMontiArc , 2018, MoDELS.

[18]  María Pérez,et al.  A systematic review on Transpiler usage for Transaction-Oriented Applications , 2018, 2018 IEEE Third Ecuador Technical Chapters Meeting (ETCM).

[19]  María Pérez,et al.  Transpiler-based architecture for multi-platform web applications , 2017, 2017 IEEE Second Ecuador Technical Chapters Meeting (ETCM).

[20]  Ediz Şaykol,et al.  On utilizing rust programming language for Internet of Things , 2017, 2017 9th International Conference on Computational Intelligence and Communication Networks (CICN).

[21]  Christian Wimmer,et al.  Practical partial evaluation for high-performance dynamic language runtimes , 2017, PLDI.

[22]  Dimosthenis E. Bolanakis,et al.  Teaching strategies for the development of adaptable (Compiler, vendor/processor independent) embedded C code , 2016, 2016 15th International Conference on Information Technology Based Higher Education and Training (ITHET).

[23]  A. Leitão,et al.  Extending PyJL - Transpiling Python Libraries to Julia , 2022, SLATE.

[24]  Alexandru Radovici,et al.  Embedded Systems Software Development , 2022, Getting Started with Secure Embedded Systems.

[25]  Timo Hämäläinen,et al.  Transpiling Python to Rust for Optimized Performance , 2020, SAMOS.