What are some primary reasons why an embedded system develop

What are some primary reasons why an embedded system developer would use C or C++ instead of assembly language? What are some specific problems that an embedded systems programmer can encounter while using only C or C++?

Solution

   One of the primary reasons why an embedded system developer would use C or C++ instead of assembly language may be the layer of abstraction that C and C++ provides to the user, this means that you can write complex programs in a few lines of code, while in assembly code one instruction or function may become into twenty lines of code, since in the assembly language you must write every instruction. You can configure registers and other tools like timers and UART in a much easier that way that in assembler, this also applies to the configuration of modes that I/O ports may work (multiplexing ports is one example).

   A specific problem that an embedded systems programmer can encounter is the lack of direct access to the hardware, since you can\'t configure directly the hardware, the compiler has to translate the code, and it may not do it in the most efficient way, which may turn later in some errors, or the compiler may add trash to you code. Some instructions that may be writing more effectily in assembler like short jumps to a specific lines of code, may be harder to develop in C or C++. Also most of the programs are written in C instead of assembler, so it\'s less productive to program in assembly language. Learning to program in assembler may give you better skills to develop programs, but it takes much time, and programmers don\'t have to spend hours writting programs that can be written in other high level languages in a much more effective way.

   The layer of abstraction that some programming languages has, allows you to learn faster and make easy programs, but more layers of abstractions the language applies, the more limited the developer will be.

What are some primary reasons why an embedded system developer would use C or C++ instead of assembly language? What are some specific problems that an embedded

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site