The C programming language is perhaps the most popular programming language for programming embedded systems. (Previously Embedded Systems / Embedded Systems Introduction # What Programming Languages Will Use This Book?, We have mentioned other popular programming languages).
Most C programmers crash because they are programmed in environments where not only a standard library implementation exists, but many other libraries are also available for use. The cold fact is that on embedded systems, there are rarely many of the libraries that programmers have become accustomed to, but occasionally an embedded system may not have a full standard library if a standard library exists. Few embedded systems have the ability to bind dynamically, so if the standard library functions must be available at all, they often need to be directly linked to the executable. Often, because of space concerns, it is not possible to link to a complete library file, and programmers are often forced to "prepare their own" implementations of standard c libraries if they want to use them at all. Although some libraries are bulky and are not suitable for use in microcontrollers, many development systems still include standard libraries that are most common for C programmers.
C is still a very popular language for microcontroller developers due to code efficiency and reduced overhead and development time. C offers low level control and is considered more readable than assembly. Many free C compilers are available for a wide variety of development platforms. Compilers are part of an IDE with ICD support, breakpoints, a single pass, and an assembly window. The performance of C compilers has improved considerably in recent years, and are said to be pretty much as good as assembly, depending on who you ask. Most tools now offer options for customizing compiler optimization. In addition, the use of C increases portability, since the C code can be compiled for different types of processors.
Embedded C is a set of language extensions for the C programming language by the C Standards Committee to address the common problems that exist between C extensions for different embedded systems. Historically, embedded C programming requires non-standard C language extensions to support exotic features such as fixed-point arithmetic, multiple distinct memory banks, and basic I / O operations.
In 2008, the C Standards Committee extended the C language to address these issues by providing a common standard for all implementations to be adhered to. It includes a number of features not available in normal C, such as fixed-point arithmetic, named address spaces, and basic I / O hardware addresses.
Embedded C uses most of the C standard syntax and semantics, for example, the main () function, variable definition, data type declaration, if, switch case, loops (while , For), functions, arrays and strings, joining, bit operations, macros, etc.
A Technical Report was issued in 2004 and a second review was carried out in 2006.