Rust-like Programming Language for Low-resource Microcontrollers

This article proposes a programming structure for low-resource microcontrollers over the name of Sokae Project, this is inspired by Arduino and Micropython projects and pretends to work as a medium point between both programming structures taking the best features of each kind of languages and progr...

Full description

Autores:
Martinez Santa1, Fernando
Orjuela Rivera2, Santiago
Martinez Sarmiento1, Fredy H.
Tipo de recurso:
Article of investigation
Fecha de publicación:
2022
Institución:
Corporación Unificada Nacional de Educación Superior
Repositorio:
Repositorio Corporación Unificada Nacional de Educación Superior
Idioma:
eng
OAI Identifier:
oai:repositorio.cun.edu.co:cun/4469
Acceso en línea:
https://repositorio.cun.edu.co/handle/cun/4469
Palabra clave:
Ciencias de la computación, información y obras generales - Programación, programas, datos de computación
Programming Language
Rust
Transpiler
Microcontroller
Embedded Systems
Compiled Language
Microcontroller API
Rights
closedAccess
License
http://purl.org/coar/access_right/c_14cb
Description
Summary:This article proposes a programming structure for low-resource microcontrollers over the name of Sokae Project, this is inspired by Arduino and Micropython projects and pretends to work as a medium point between both programming structures taking the best features of each kind of languages and programming structures. The project’s name is inspired by the crab pet of Rust programming language. Sokae means crab in Emberá Chamí language, so the project’s name is a tribute to Emberá native people. The programming structure is composed of three main components: a language based on Rust syntax, a transpiler that turns the defined Rust- like language into C, and a generic Application Programming Interface API. The main goal of this project is to obtain a cross- platform programming structure for programming low-resource microcontrollers over the same language and API. Sokae language is a small subset of Rust programming language following its overall syntax. On the other hand, the transpiler from Sokae language to C is implemented by using Python and the SLY module as lexer and parser. Likewise, the API is written for the native C compiler for each microcontroller, so it is necessary to use it as a part of the project. Several application examples are tested in order to check the correct working of the overall programming structure, just over the XC16 compiler for PIC24/dsPIC33 microcontroller family. Finally, after several tests, the proposed programming structure shows that it is possible to use modern language structure to program any kind of microcontroller no matteríts limited resources.