0% found this document useful (0 votes)
51 views

Paper 5-Microcontrollers Programming Framework

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Paper 5-Microcontrollers Programming Framework

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

(IJACSA) International Journal of Advanced Computer Science and Applications,

Vol. 13, No. 12, 2022

Microcontrollers Programming Framework based on


a V-like Programming Language

Fernando Martı́nez Santa1 , Santiago Orjuela Rivera2 , Fredy H. Martı́nez Sarmiento3


Universidad Distrital, Francisco José de Caldas, Bogotá, Colombia1,3
Corporación Nacional Unificada, de Educación Superior CUN, Bogotá, Colombia2

Abstract—This paper describes the design of a programming [10], which is based on C language in addition to an API
framework for microcontrollers specially the ones with low which makes the programming process easier. That API works
program and data memory, using as a base a programming on a predefined hardware setup to reduce the setup process
language with modern features. The proposed programming by the programmer. Another popular programming framework
framework is named Aixt Project and took inspiration from for microcontrollers is Micropython which implements on
other similar projects such as Arduino, Micropython and TinyGo
several devices a subset of Python language. Micropython has
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 specific relatively high memory requirements which makes
tribute to Ticuna people who live in the Amazon rain-forest, just it impossible to run on small microcontrollers, but it has
between Colombia, Perú and Brasil. Aixt comes from Aixtü or been ported to a large number of different architectures [11]
Aitü rü which means otter in Ticuna language. The proposed mainly in internet of things IoT implementations. Arduino
programming framework has three main components: the Aixt is compiled but its C syntax lacks modern features, on the
language based on the V syntax, a transpiler that turns the other hand Micropython is interpreted and therefore non time
defined V-like source code into C, and a generic cross-platform optimized as compiled language, but there is an intermediate
Application Programming Interface (API). The target of this framework named Tinygo which implements Go language on
project is obtaining a cross-platform programming framework Microcontrollers, offering modern features like Python and the
over the same language modern language an the same API, for
advantage of being compiled [12] like Arduino (C). However,
programming different microcontrollers especially the ones with
low memory resources. Aixt language is based on the syntax most of the microcontroller with limited memory features does
of V programming language but it uses mutable variables by not fit to the memory requirements of the projects previously
default. V language was selected to be used as base of this described, so for those ones it is necessary to use their native
project due to it is a new compiled programming language with C compiler.
interesting modern features. In order to turn the Aixt source
code into C, a transpiler is implemented using Python and the In order to obtain the best execution times and the best code
some specialized libraries to design each part of its translation optimization level [13], [3] it is necessary to use the native C
process. The transpiled code is compiled by the native C compiler compiler of each architecture. Then, if there is a programming
of each microcontroller to obtain the final binary file, that is framework with an upper modern language layer, a transpiler
why the API has to be adapted for each native C compiler. to C and the native C compiler as a part of the framework, this
The complete project is released as a free and open source
project. Finally, different application test were done over the XC8
could have high level language features along with optimiza-
and XC16 compilers for the PIC16, PIC18, PIC24 and dsPIC33 tion levels similar to the ones reached with only the native
microcontrollers families, demonstrating the correct working of compilers. The described programming framework needs to
the overall framework. Those tests show that the use modern have a transpiler [14], which is a translator from the upper layer
language framework to program any microcontrollers is perfectly language to the native C [15]. Transpilers are highly utilized
feasible using the proposed programming framework. nowadays [16], [17], in several languages both compiled and
interpreted [18], [19], [20], and even in languages based on
Keywords—Microcontroller; transpiler; API; programming lan-
guage; V; V-lang; Aixt project
virtual machines [21]. Those transpilers are mainly used in
order to reuse source code that comes from another different
language [18], or improve the execution times or another
I. I NTRODUCTION performance feature of the program [22], [23] changing the
platform or language (for instance turn Python (interpreted)
The different processor architectures used by the com- into Rust (compiled) [19]), even translating source code to
mercial microcontrollers, make the programming process de- gate-based hardware [24] like FPGAs or other processor-less
pendent on those architectures and thus not universal. Even, devices.
when the microcontrollers are programmed on high level
languages, tasks such as peripherals, timers, setup registers, Several new programming languages have emerged nowa-
and others, keep depending on the programmer’s knowledge of days, mainly to solve some of the issues of the traditional ones
the processor’s architecture [1], [2]. There are some different such as safety, memory management among others. Among
projects which pretends to generate cross-platform program- these new languages are Go, Swift, Dart, F# and Rust, being
ming frameworks [3], using different programming languages this last is one of the most preferred ones[25], having even
like JavaScript [4], and other implementations using virtual implementations on microcontrollers [26], [27], [28]. There are
machines [5], [6], [7]. An example of those programming some other other languages such as Peregrine which is based
frameworks (and one of the most popular) is Arduino[8], [9], on the Python’s syntax and the V programming language [29]
www.ijacsa.thesai.org 32 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 12, 2022

wish is inspired on Rust and other languages. V is an statically-


typed programming language with several modern features that
make the development easy, and a better learning curve than
other modern languages like Rust.
This paper proposed a programming framework for micro-
controllers that is composed by a high level language based
on V as the main language, a transpiler from this V-like
language named Aixt to C, and the microcontrollers’ native C
compiler which finally generates output binary file. In order to
generalized the programs across the different microcontrollers,
a general API is designed, which is implemented on each
C compiler of the supported devices (in this first stage for
XC8 and XC16 compilers). For the transpiler implementation
Python and the module SLY were used, to write the lexer
analyzer and the Parser. This project is based on a previous
one named Sokae [30] developed by the same authors.
The paper is organized as follows: Section II presents
the methodology for implementing the overall proposed pro-
gramming framework, including the Aixt language definition
(Section II - A), the Python implementation of the Aixt-to-C
transpiler (Section II - B), and the API implementation for the
XC16 compiler and PIC24 microcontrollers family (Section
II - C). Section III shows the Aixt language functionality
by implementing several examples, as well as it presents the Fig. 1. General programming framework diagram
results of implementing the proposed programming framework
by several test source codes. Finally, Section IV shows the
conclusions about this research’s main ideas, including possi-
ble future jobs. selected for this implementation instead other new languages
like Rust [30]. The framework and language name is inspired
in the Weasel pet of V Language, and at the same time is a
II. M ETHODOLOGY tribute to Ticuna people who live in the Amazon rain-forest in
With the name Aixt Project, a microcontroller programming the borders between Colombia, Brasil and Perú. Weasels are
framework is implemented. This framework uses an homonym mustelids just like otters, so the name Aixt comes from Aixtü
language which is based on the V programming language. A or Aitü rü which is a way to say otter in Ticuna language.
transpiler from Aixt language to C is the most important block Aixt is a compiled and statically typed programming lan-
of this framework, as well as an Application Programming guage based on the V syntax. This is designed to be used
Interface (API) written in both languages. As part of the on a wide range of microcontrollers no matter their memory
proposed structure, the native C compiler of the specific micro- limitations. Aixt syntax shares some feature with languages
controller finally generates the output binary file, as shown in such as Rust and Go, therefore also it shares syntax features
Fig. 1. Using the proposed framework, the users will be able to with C, which makes Aixt easy to understand and transpile.
write the source code in Aixt language using a standard API
and obtains the binary file for a specific microcontroller or Listing 1 shows an example code using Aixt language and
board without having further knowledge of the programming API, which makes blinking a LED for a specific microcon-
architecture. This framework pretends to be highly modular troller’s pin. Likewise, the Listing 2 shows the C equivalent
and relatively easy to include other microcontrollers or boards. of the same Aixt source code.
The Fig. 1 shows the general structure of the programming Some of the basic features of Aixt language are listed as
framework indicating that for each new microcontroller to be follows:
supported it is necessary to adapt the API (Fig. 1 right) to this
and invoke its specific native C compiler (Fig. 1 left down). • the := operator is used for declaring variables.
The specific test done for this paper were implemented on • Unlike V, variables are mutable by default in Aixt.
some different Microchip® microcontroller families such as
PIC16, PIC18, PIC24 and dsPIC33 using the XC8 and XC16 • ix, ux and fx variable types for regular integers,
compilers, these microcontrollers were selected because their unsigned integers and floating point variables.
limited amount of implemented memory. • isize and usize for integers with same size of the
processor.
A. Aixt Language
• rune type for character variables.
Aixt is the name given to the proposed language and the
• Default type inference in declaring.
overall programming framework. This language is based on the
V programming language [29] and shares most of its syntax. • Underscore character in literals for improving its read-
Due to its relatively short learning curve, V language was ability.
www.ijacsa.thesai.org 33 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 12, 2022

• The main function is the first entry of a V program. In B. Transpiler


case of having only one source code, the main function
definition can be ommited. A transpiler is a program that translates source code
between programming languages with the same abstraction
• All instructions end with a new line character, whit a levels, by contrast a compiler translate source code generally
semicolon or with a curly bracket close. to another low level language. The proposed programming
framework does not compile directly the Aixt source code
• The semicolon is optional. It has to be used when but transpile it to C. The Transpiler from Aixt language to
having two simple instructions in the same code line. C is implemented with Python and using the PLY module
in order to implement the lexer analyzer and parser for the
• All the code blocks are delimited by curly braces.
input source code. The complete working diagram of the
• All function declarations start with the reserved word implemented transpiler is shown in Fig. 2, where and input file
fn. with .v extension get in to the transpiler and it generates the
output .c file. The transpiler implementation is based on part
• The names for all the identifiers (variables, constants, of the V language grammar, the Listing 3 shows and extract
functions, etc.) prefer to use snake case as in V, for of that grammar in Backus-Naur form (BNF). This part of the
instance the function pin_low(). This feature is grammar shows the definition of the four different ways to do
implemented in order to keep a standard format for loops in Aixt using the reserved word for, including infinite
all the V source code. loops.
• There is only a loop instruction which is used for
implementing all the supported loops, changing only
its input parameters syntax.
• The reserved word import is used for including
different complete modules or libraries.
• In order to reduce the C obtained code, it is possi-
ble to include individual components from a global
module using the curly braces following the syntax:
import module { comp1, comp2, ...}

Listing 1: Blinking LED example in Aixt


Fig. 2. Transpiler diagram
import m a c h i n e { p i n }
import t i m e { s l e e p m s }
Listing 3: Aixt language BNF definition (extract)
p i n ( A6 , OUT)
for {
p i n h i g h ( A6 ) ...
sleep ms (500) forStmt ::= for block
p i n l o w ( A6 ) | for expr block
sleep ms (500) | for forClause block
} | for inClause block

f o r C l a u s e : : = simpStmt ; expr ; simpStmt


Listing 2: Resultant C code for the Blinking LED example
i n C l a u s e : : = e x p r L i s t i n IDENTIFIER
# include ” . / s e t t i n g s . h” ...
# i n c l u d e ” . / machine / pin . h”
# i n c l u d e ” . / time / sleep ms . h” For the implementation of the lexer analyzer, all of the to-
kens of V language are supported, such as keywords, operands
i n t main ( v o i d ) { and other punctuation symbols, as shown in the code extract
p i n ( A6 , OUT ) ; of Listing 4.
while ( t r u e ) {
p i n h i g h ( A6 ) ; Listing 4: Aixt Lexer implementation (extract)
sleep ms ( 5 0 0 ) ;
p i n l o w ( A6 ) ; ...
sleep ms ( 5 0 0 ) ; tokens = {
} I8 , I16 , I32 , I64 , ISIZE ,
return 0; ...
} F32 , F64 , BOOL, RUNE,
IMPORT , IN , MAP, MATCH, RETURN,
www.ijacsa.thesai.org 34 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 12, 2022

... to make the microcontroller’s programming process easier, a


} general Application Programming Interface is implemented in
both the Aixt programming language and C for the specific
BOOL = r ’ bool ’ # Types native compiler. This API includes the peripherals and features
RUNE = r ’ rune ’ shown in Tables from I to IV.
...
IDENTIFIER = r ’ [ a −zA−Z ] [ a −zA−Z0−9 ] * ’ TABLE I. G ENERAL P URPOSE I NPUT /O UTPUT
...
Description Function name
BINARY LIT = r ’ 0b [01 ]+ ’ pin type declaration pin()
... setting high and low pin_low() pin_high()
literals = { ’ ( ’ , ’ ) ’ , ’{ ’ , ’} ’ , ’ [ ’ , setting specific binary value pin_value()
’] ’ , ’; ’ , ’ , ’ , ’. ’ , reading an input value pin_value()
}
...
TABLE II. A NALOG TO D IGITAL C ONVERTER (ADC)

Once the Lexer analyzer reduced the character flux of the Description Function name
source code to an token flux, the parser analyzes the syntactic ADC setting up adc()
ADC reading value adc_read()
rules of language in order to find possible syntactic error and
transpile it to C. The most of the syntactic rules of V are
implemented in Aixt using the SLY module as shown in the TABLE III. U NIVERSAL A SYNCHRONOUS R ECEIVER T RANSMITTER
extract source code of Listing 5, which matches with the BNF (UART)
definition shown in Listing 6.
Description Function name
UART setting up uartx()
Listing 5: Aixt Parser implementation (extract) single byte transmitting uartx_put()
single byte receiving uartx_get()
...
@ ( ’ i d e n t L i s t DECL ASGN e x p r L i s t ’ ,
) TABLE IV. T IMING F EATURES
def varDecl ( s e l f , p ) : Description Function name
... delays in microseconds sleep_us()
return r e t v a l u e delays in millisecond sleep_ms()
delays in second sleep()

@ ( ’ IDENTIFIER ’ ,
’ i d e n t L i s t ” , ” IDENTIFIER ’ Table I shows the pin and GPIO functions like setup,
) input capture and output set. Some devices even could support
def i d e n t L i s t ( s e l f , p ) : exchange state functions (pin_toggle). The rest of API
... functions follow the same rules:
return p [ 0 ] • The setup function has the same name of the module.
...
• The rest of name functions of the same module follow
the syntax: module_function(). For instance:
Listing 6: Aixt BNF rules (extract) adc_read() function of machine { adc }
module (Table II).
v a r D e c l : : = i d e n t L i s t DECL ASGN e x p r L i s t
• Devices with more than one peripheral of the
i d e n t L i s t : = IDENTIFIER same time follow this name function syntax:
| i d e n t L i s t ” , ” IDENTIFIER modulex_function() where the x refers to the
number that identify each peripheral. For instance:
SLY library uses Python’s function decorators to implement uart2_get() as shown in Table III.
the syntactic rules of the language to be compiled or transpiled, • Some API modules refers to a inner features of the
applying them to each syntactic production, for example the device different to hardware peripherals, for instance
production varDecl is the implementation of variable declara- software delays (Table IV).
tions in Aixt language.
The Fig. 3 shows the folder structure designed for the
As previously said, the transpiler reads the source code overall API, this structure has to be followed for each of the
written in Aixt, which for compatibility with standard source supported microcontrollers and boards to maintain the com-
code editors, the .v file extension. patibility across all the hardware devices. Following strictly
this folder structure allow the transpiler to correctly redirect
C. Application Programming Interface the module including tasks when it is necessary to include to
the project isolated components of a module.
One of the main goals of the proposed framework is
designing a cross-platform API, which includes the basic As previously mentioned, the module including
features and peripherals of most microcontrollers. In order follows the next syntax in Aixt: import module
www.ijacsa.thesai.org 35 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 12, 2022

for complete modules, which will be transpiled as are shown. The only difference with C is the octal literals
#include \./module.h". Likewise, the sub-modules beginning with the sequence "0o" (zero + o), instead of only
or module components including follows the syntax: 0 as in C.
import module { sub1, sub2, ...}, which will
be transpiled to #include \./module/sub1.h" etc. Listing 7: Aixt variable declaring and assignment example.
That is very important to optimize the resultant binary file.
On the other hand, when a complete module is included, the var2 := i8 (129)
./module.h header file has to include all of the .h files in var3 := i 6 4 ( −6 835 292 )
the correspondent folder on the folder’s API structure. var4 := u8 ( 0 b0011 0101 )
var5 := u16 ( 0 o073452 )
var7 := u64 ( 0 xAAFF 7625 )
var8 := f 3 2 ( 1 342 . 5 6 )
var9 := f 6 4 ( − 3 4 . 0 3 5 440 )

Listing 8: C resultant variable declaring and assignment ex-


ample.

i n t 8 t var2 = 129;
i n t 6 4 t v a r 3 = −6835292;
u i n t 8 t v a r 4 = 0 b00110101 ;
u i n t 1 6 t var5 = 0073452;
u i n t 6 4 t v a r 7 = 0xAAFF7625 ;
f l o a t var8 = 1342.56;
long double var9 = −34.035440;

Modern programming languages like V has some useful


features such as the type inference, which simplifies program-
ming in most cases. Type inference gives programmers peace
Fig. 3. General API structure of mind about variable types when they are not needed, thereby
reducing development time. The implementation of this feature
in Aixt is reached by using the standard types for integer
III. R ESULTS and floating point variables. In the case of XC8 compiler
the standard integer type is int8_t and for XC16 compiler
The overall project including the Aixt language defini- int16_t. For the floating point variables the default type
tion, the transpiler from Aixt to C and the API, is pub- is float. Listings 9 and 10 show the transpiling result for
lished by the authors as a free software project at the URL some variable declarations by inference, including Boolean,
https://gitlab.com/fermarsan/aixt-project. The authors hope this character (named runes), integer and floating point literals, for
project works as a starting point of a great free programming the XC8 compiler.
framework for microcontrollers or as seed for other similar
projects. Listing 9: Aixt variable declaring and assignment by inference
example.
The complete programming framework was successfully
tested using some of the 8-bit and 16-bit PIC microcontroller
families from Microchip ®. Those devices were selected due to var0 := true
their low amount of implemented data and program memories. var1 := false
var2 := 1345
Several different working tests have been performed to var3 := 71.4
check the correctness of most Aixt features. Listings 7 and var4 := −457
8 show a comparison of the variable declarations in Aixt var5 := −10.445
and the corresponding transpiled C code for XC8 and XC16 var6 := ‘d ‘
compilers. In Aixt the variable declaration is always along with
an assignment. The declaration and assignment process uses
the operator := to differentiate with only assignment =. At Listing 10: C resultant variable declaring and assignment by
the same time it is necessary to use the conversion predefined inference example.
functions such as i8(), u32() and f64() among others,
in order to specify the number of bits and the type of integer bool var0 = true ;
and floating point variables. One of the benefits of using the bool var1 = f a l s e ;
conversion functions of V for the variable definitions is that int8 t var2 = 1345;
each variable is bit-width explicit, independent of hardware float var3 = 7 1 . 4 ;
device. Listing 7 shows too the use of the underscore symbol int8 t v a r 4 = −457;
"_" for improving the large numbers readability. Also the float var5 = −10.445;
special notations for hexadecimal, octal, and binary literals, char var6 = ’d ’ ;
www.ijacsa.thesai.org 36 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 12, 2022

On the other hand, Aixt language syntax provides support


for some of V’s looping statements, such as: condition for i8 : int8 t
(while in C), bare for or infinite loop (while(true) in C), ...
infinite loops, regular for loop and C-like for loop. Listing 10 u16 : uint16 t
shows an example of the loop statements currently supported ...
by the Aixt syntax and Listing 11 shows the C equivalent of default int : int16 t
each one. The Aixt-like for loop includes and integer range ...
notation with the syntax: i..f, where i is the initial value device : p24FJ128GA010
and f is the final value. ...
headers :
Listing 11: Aixt available loops. − <xc . h>
− < s t d i n t . h>
/ / condition for ...
f o r a < 10 { configuration :
a += 1 − ”POSCMOD = XT”
} − ”OSCIOFNC = ON”
/ / bare for ...
for {
a += 1 On the other hand, a batch file has to be included for each
} new device. This file works as a Makefile, following the steps
/ / range f o r and invoking the different component of the framework, in
for i in 0 . . 1 0 { order to obtain the final binary file starting from the Aixt source
arr [ i ] = 0 code. The batch file has to be provided in .ps1 (PowerShell)
} format for Windows and in .sh format for Linux.
/ / c for
f o r i : = 0 ; i <=10; i ++ { IV. C ONCLUSION
arr [ i ] = 0
Using the proposed programming framework, the micro-
}
controllers programmer can utilize a modern high level lan-
guage programming environment, using a compiled language
Listing 12: C equivalent loops. with its benefits and at the same time taking advantage of the
modern features of the language. Aixt Language pretends to
while ( a < 10){ be a highly level programming language for microcontrollers
a += 1 ; with a short learning curve due to its simplicity compared with
} other modern languages. Aixt utilizes modern V-based features
while ( true ){ such as type inference but at the exact same time obtains
a += 1 ; binary files with similar optimization degrees of standard
} compiled languages such as C and similar execution times. Aixt
f o r ( i n t i =0 , i <10 , i ++){ Language and the proposed programming framework could
arr [ i ] = 0; enable programming microcontrollers with ease, as long as
} they have a native C compilers. At the same time Aixt does not
f o r ( i n t i =0 , i <=10 , i ++){ need a fixed amount of memory to work, the finally binary file
arr [ i ] = 0; depends only the source code. So it has not the problem of the
} memory needed to run a program written with an interpreted
language such as MicroPython or Javascript.
A. Microcontrollers Setting Up The transcompilation process between Aixt and C is suc-
cessful because both languages are similar, mainly due to all
In order to setup a specific new microcontroller or board variables in Aixt are mutable by default like in C, and some
added to the Aixt programming framework, a configuration other similar features like curly braces and others. Transpile
file has to be written. The chosen format for this configuration another language such Python to C for instance, would be
file is YAML which means Yet Another Markup Language, a little bit difficult because the differences between both
and is a very simple format to implement setup file for languages.
software projects. In that configuration file the designer can
setup features such as: type equivalences between Aixt and the Aixt Language and programming framework could allow
native C compiler, the microcontroller fuses or configuration individuals with little electronics know how to program easily
bytes, the part or device number, the default header files among embedded systems, just like Arduino, mbed, and MicroPy-
others. This configuration file is expected to be modified once thon among other frameworks. Likewise, Aixt could enable
by the designer and not to be modified by a regular user. The experienced embedded system programmers only learning one
Listing 12 shows an extract of the configuration file for a programming language and API, to program a wide variety of
PIC24FJ device. microcontrollers no matter their memory sizes.
Listing 13: YAML microcontroller or board configuration file All of the features in the proposed programming framework
(extract). was completely tested, however not all the modern features of
www.ijacsa.thesai.org 37 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 12, 2022

the V programming language were implemented. That means [7] R. Gurdeep Singh and C. Scholliers, “Warduino: a dynamic webassem-
this project can highly improve implementing more features bly virtual machine for programming microcontrollers,” in Proceedings
and adapting it to other microcontrollers and boards. It is of the 16th ACM SIGPLAN International Conference on Managed
Programming Languages and Runtimes, 2019, pp. 27–36.
perfectly able to use Aixt language and this framework in the
[8] D. E. Bolanakis, “A survey of research in microcontroller education,”
classroom in Basic courses of microcontroller and embedded IEEE Revista Iberoamericana de Tecnologias del Aprendizaje, vol. 14,
systems, due to currently this project is highly functional. no. 2, pp. 50–57, 2019.
In spite of the short learning curve of V and therefore Aixt [9] S.-M. Kim, Y. Choi, and J. Suh, “Applications of the open-source
hardware arduino platform in the mining industry: A review,” Applied
languages, it is possible to explore another simple languages Sciences, vol. 10, no. 14, p. 5018, 2020.
to improve the proposed programming scheme, or even giving [10] H. K. Kondaveeti, N. K. Kumaravelu, S. D. Vanambathina, S. E.
support to another main languages maintaining the same API. Mathe, and S. Vappangi, “A systematic literature review on prototyping
One of the candidates is the Peregrine Language who is based with arduino: Applications, challenges, advantages, and limitations,”
on the Python syntax. Computer Science Review, vol. 40, p. 100364, 2021.
[11] V. M. Ionescu and F. M. Enescu, “Investigating the performance of
As future work, the development of other useful features micropython and c on esp32 and stm32 microcontrollers,” in 2020 IEEE
of V language are proposed. For example, the array definition, 26th International Symposium for Design and Technology in Electronic
direct array indexing using the array for loop, array inter- Packaging (SIITME), 2020, pp. 234–237.
polation, matching statements among others. Likewise, it is [12] A. Suarez Ruiz, “Diseño de hardware y firmware para un sistema
inalámbrico de adquisición de datos daq de bajo costo,” Departamento
important to keep giving support to other MCUs and board de Ingenierı́a Eléctrica, Electrónica y Computación, 2019.
especially those with low program and data memories, which [13] H. Wu, C. Chen, and K. Weng, “An energy-efficient strategy for
are the motivation for this project. For instance Atmel ® AT microcontrollers,” Applied Sciences, vol. 11, no. 6, p. 2581, 2021.
mega and AT tiny will be included to the project soon due [14] M.-A. Lachaux, B. Roziere, L. Chanussot, and G. Lample, “Un-
to they use also the XC8 compiler. Finally, it is possible supervised translation of programming languages,” arXiv preprint
to combine PC graphical application developed in V with arXiv:2006.03511, 2020.
embedded application developed in Aixt, taking the advantage [15] A. M. Karpiński, “Automatic translation of programs source codes
of learning only one programming basis to develop a complete from python to c# programming language,” Ph.D. dissertation, Zakład
embedded-based graphical application. Sztucznej Inteligencji i Metod Obliczeniowych, 2022.
[16] M. Szafraniec, B. Roziere, H. Leather, F. Charton, P. Labatut, and
G. Synnaeve, “Code translation with compiler representations,” 2022.
ACKNOWLEDGMENT [Online]. Available: https://arxiv.org/abs/2207.03578
This work was supported by Universidad Distrital Fran- [17] F. A. Bastidas and M. Pérez, “A systematic review on transpiler usage
for transaction-oriented applications,” in 2018 IEEE Third Ecuador
cisco José de Caldas and Corporación Unificada Nacional de Technical Chapters Meeting (ETCM), 2018, pp. 1–6.
Educación Superior CUN. The views expressed in this docu- [18] M. Ling, Y. Yu, H. Wu, Y. Wang, J. R. Cordy, and A. E. Hassan, “In rust
ment are not necessarily endorsed by Universidad Distrital or we trust – a transpiler from unsafe c to safer rust,” in 2022 IEEE/ACM
CUN. The authors thank the ARMOS and IDECUN research 44th International Conference on Software Engineering: Companion
groups for the simulations and tests. Proceedings (ICSE-Companion), 2022, pp. 354–355.
[19] H. Lunnikivi, K. Jylkkä, and T. Hämäläinen, “Transpiling python to
rust for optimized performance,” in Embedded Computer Systems:
R EFERENCES Architectures, Modeling, and Simulation, A. Orailoglu, M. Jung, and
[1] A. Radovici and I. Culic, Embedded Systems Software Development. M. Reichenbach, Eds. Cham: Springer International Publishing, 2020,
Berkeley, CA: Apress, 2022, pp. 27–47. pp. 127–138.
[2] E. Kusmenko, B. Rumpe, S. Schneiders, and M. von Wenckstern, [20] M. Marcelino and A. M. Leitão, “Extending PyJL - Transpiling Python
“Highly-optimizing and multi-target compiler for embedded system Libraries to Julia,” in 11th Symposium on Languages, Applications and
models: C++ compiler toolchain for the component and connector Technologies (SLATE 2022), ser. Open Access Series in Informatics
language embeddedmontiarc,” in Proceedings of the 21th ACM/IEEE (OASIcs), J. a. Cordeiro, M. J. a. Pereira, N. F. Rodrigues, and
International Conference on Model Driven Engineering Languages S. a. Pais, Eds., vol. 104. Dagstuhl, Germany: Schloss Dagstuhl
and Systems, ser. MODELS ’18. New York, NY, USA: Association – Leibniz-Zentrum für Informatik, 2022, pp. 6:1–6:14. [Online].
for Computing Machinery, 2018, p. 447–457. [Online]. Available: Available: https://drops.dagstuhl.de/opus/volltexte/2022/16752
https://doi.org/10.1145/3239372.3239388 [21] B. F. Andrés and M. Pérez, “Transpiler-based architecture for multi-
[3] A. K. Rachioti, D. E. Bolanakis, and E. Glavas, “Teaching strategies for platform web applications,” in 2017 IEEE Second Ecuador Technical
the development of adaptable (compiler, vendor/processor independent) Chapters Meeting (ETCM), 2017, pp. 1–6.
embedded c code,” in 2016 15th International Conference on Informa- [22] T. Würthinger, C. Wimmer, C. Humer, A. Wöß, L. Stadler, C. Seaton,
tion Technology Based Higher Education and Training (ITHET), 2016, G. Duboscq, D. Simon, and M. Grimmer, “Practical partial evaluation
pp. 1–7. for high-performance dynamic language runtimes,” in Proceedings
[4] K. Grunert, “Overview of javascript engines for resource-constrained of the 38th ACM SIGPLAN Conference on Programming Language
microcontrollers,” in 2020 5th International Conference on Smart and Design and Implementation, ser. PLDI 2017. New York, NY, USA:
Sustainable Technologies (SpliTech), 2020, pp. 1–7. Association for Computing Machinery, 2017, p. 662–676. [Online].
Available: https://doi.org/10.1145/3062341.3062381
[5] K. Zandberg and E. Baccelli, “Minimal virtual machines on iot mi-
crocontrollers: The case of berkeley packet filters with rbpf,” in 2020 [23] R. Pereira, M. Couto, F. Ribeiro, R. Rua, J. Cunha, J. P. Fernandes,
9th IFIP International Conference on Performance Evaluation and and J. Saraiva, “Ranking programming languages by energy efficiency,”
Modeling in Wireless Networks (PEMWN). IEEE, 2020, pp. 1–6. Science of Computer Programming, vol. 205, p. 102609, 2021.
[6] S. Varoumas, B. Pesin, B. Vaugon, and E. Chailloux, “Programming [24] K. Takano, T. Oda, and M. Kohata, “Approach of a coding conventions
microcontrollers through high-level abstractions,” in Proceedings of the for warning and suggestion in transpiler for rust convert to rtl,” in 2020
12th ACM SIGPLAN International Workshop on Virtual Machines and IEEE 9th Global Conference on Consumer Electronics (GCCE), 2020,
Intermediate Languages, 2020, pp. 5–14. pp. 789–790.
[25] W. Bugden and A. Alahmar, “Rust: The programming language for
safety and performance,” arXiv preprint arXiv:2206.05503, 2022.

www.ijacsa.thesai.org 38 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 12, 2022

[26] T. Uzlu and E. Şaykol, “On utilizing rust programming language for Master’s thesis, Luleå University of Technology, Computer Science,
internet of things,” in 2017 9th International Conference on Compu- 2020.
tational Intelligence and Communication Networks (CICN), 2017, pp. [29] N. P. Kumar Rao, Getting Started with
93–96. V Programming. Packt Publishing, 2021. [Online].
[27] K. I. Vishnunaryan and G. Banda, “Harsark multi rs: A hard real- Available: https://www.packtpub.com/product/getting-started-with-v-
time kernel for multi-core microcontrollers in rust language,” in Smart programming/9781839213434
Intelligent Computing and Applications, Volume 2, S. C. Satapathy, [30] F. Martı́nez Santa, S. Orjuela Rivera, and F. H. Martı́nez Sarmiento,
V. Bhateja, M. N. Favorskaya, and T. Adilakshmi, Eds. Singapore: “Rust-like programming language for low-resource microcontrollers,”
Springer Nature Singapore, 2022, pp. 21–32. Advances in Dynamical Systems and Applications, 2022.
[28] J. Aparicio Rivera, “Real time rust on multi-core microcontrollers,”

www.ijacsa.thesai.org 39 | P a g e

You might also like