The fight on C vs Embedded C has been going on for quite some time. First off—Yes, there really IS something officially called “Embedded C”, which is different than standard C. It’s defined in “ISO/IEC TR 18037:2008” which you can look up. (see also the draft spec “ISO/IEC JTC1 SC22 WG14 N1169”)
When students come across embedded C programming, they often start wondering what precisely is the difference between c and embedded c. Well truly there isn’t a wide difference among each, they differ in small elements and owe extra similarities than differences.
C vs Embedded C – The Differences
C programming | Embedded C programming |
---|---|
C is a general purpose programming language, which can be used to design any type of desktop based applications. | Embedded C is an extension of C language (some of the features are there, which can be used to specific purposes), it is used to develop micro-controller based applications (low-level or/and application level). |
While, writing a C programming language code there is no need to know about computer hardware i.e. C language is not hardware dependent language. | You must have good knowledge about the hardware for that you’re developing any code. Embedded C is fully hardware dependent language. |
C language program is hardware independent. | Embedded C program is hardware dependent. |
For C language, the standard compilers can be used to compile and execute the program. | For Embedded C, you need to some specific compilers that are able to generate particular hardware/micro-controller based output. |
We need to write full program from scratch while developing a C language code. | The compiler generates some initial code automatically (which may include some assembly language code/files) based on the selected micro-controller/microprocessor. |
In the C programming language, we can use standard function like printf(), scanf() etc for output and input. | These functions may not work, because in an embedded device there may not any standard output device (like monitor, Keyboard etc.). you have to write code to display output to connected display unit like 16X2 LCD, graphics display etc. |
C language compilers generate operating system dependent executable files that can be run on the same operating system. | Embedded C language compilers generate hardware dependent files that you have to upload in the micro-controller and then you have to switch on the device to check weather code is working or not |
Readability modifications, bug fixing are very easy in a C language program. | It’s not too easy to read, understand, modify and fix the bugs in an Embedded C language program. |
GCC (GNU Complier collection), Borland turbo C, Intel C++ compiler are some of the popular compilers which are used to compile, execute a C language program. | Keil compiler (An Arm company compilers), BiPOM ELECTRONIC – Embedded training and Development, Green Hill software etc are some of the popular compilers to compile, run an Embedded C language program. |
Read more concepts of Embedded C programming.
Hi, I’m Vivek, a Senior Embedded Innovation Specialist. I have been working on Embedded Systems and IoT for the past 11 years. I love to share my knowledge and train those who are interested. Nerdyelectronics.com was started out of this interest. You can read my full profile in this link.