You are on page 1of 3

9/12/2020 Programming

languages in
Embedded System
Comp 306
Assignment 4

Suyog Acharya
ROLL NO 03
Programming Language Used in Embedded System
There are many programming languages that are used in embedded systems. Practically
embedded system can be viewed as a customized software running on a customized hardware.
Since the hardware is very specific the software also needs to be tuned, which needs additional
constraints for the developer. Choosing a programming language used to be an easy task,
developers simply went for C or if they wanted a little adventure C++. The last couple of years
have provided developers with many alternatives with languages such as Python, Rust, Java and
several scripting languages becoming options for developers. Today most of the developers use
high level language over assembly level language.

Assembly level languages were developed which contained human readable codes such as
MUL, SUB, MOV etc. Assembly language allows complex job to run in a simpler way. It requires
less memory and its speed of execution is less as it required less instruction to get the result.
Assembly language is hardware oriented which makes it best suitable for embedded systems.

Even though assembly languages have so much advantages they are considered obsolete these
days as it takes a lot of time and effort to write the code and is very complex and difficult to
understand which makes it difficult to remember the syntax. The code written in assembly level
language are not portable as program written in one computer architecture may not run in
another architecture.

With the popularity of high-level languages in embedded system, there are many languages like
C, C++, JAVA, python, etc. To choose among for any embedded system. High level language C
and object-oriented programming JAVA is discussed In this paper.

C programming language is a killer when it comes to the aspects of embedded system like
resource constraints, where usage of every other hardware resource must be done efficiently.
Before the use of C, for micro controller-based system, programs were developed using
assemblers. The only way to check the correctness of the program was using LEDs, switches, etc.
But as time passed embedded system moved to C. The major advantages of c over other
languages is that C provides direct memory control without sacrificing benefits of high-level
language. C is platform independent whereas the applications written in C is not, which makes it
platform independent. C provides optimized machine instruction which increases the
performance of embedded system, which is also the problem of many high level languages that
they rely more on libraries.

Java is one of the most popular programming languages. The worldwide population of java
developer who have trained in enterprise and other non-embedded domains. This talent and
knowledge can be extended to embedded systems by developing their application code in the
Java programming language. A wide array of developer tools and powerful libraries make Java a
suitable choice for embedded systems programming. Java is less prone to errors than c as it has
no pointer and memory management is automatic. JAVA being OOP makes software
management easier. Java programs are machine independent – as it is executed inside the Java
Virtual Machine(JVM) and another important functionality of OOP i.e. exception handling allow
to eliminate most runtime bugs pretty easily.
In conclusion, the assembly language has the best execution speed and has less instruction but
due to its complexity there was need of a high-level language. Whereas high-level languages are
slow and require more space it is preferred over assembly languages. Among high level
languages, C is the most preferred one because of its ability to control memory directly.

References:
1. Embedded system: Assembly language
https://www.tutorialspoint.com/embedded_systems/es_assembly_language.html

2. Introducing Oracle Java SE Embedded. (n.d.). Retrieved September 12, 2020,


from https://docs.oracle.com/javase/8/embedded/develop-apps-
platforms/overview.html

3. 5 reasons to use Java in embedded systems- MicroEJ Software. (n.d.). Retrieved


September 12, 2020, from https://www.microej.com/news/5-top-reasons-for-
using-java-in-embedded-systems

4. Why is C the most preferred language for embedded systems? Retrieved


September 12, 2020, from https://emertxe.com/blog/2017/09/why-is-c-the-most-
preferred-language-for-embedded-systems.html.

You might also like