Embedded Developing Tools

When developing software and hardware for an embedded system, the use of developing tools such as editors, assemblers, compilers, debuggers, simulators, emulators and Flash/OTP programmers are rather essential to an embedded system developer. To beginners it might be not so easy to learn about all these components. How do all of them play together? What differences are there between them? What matters should be considered when selecting a right tool?
In this article these questions are to be answered.

     Let's start out by looking at the typical microcontroller software development cycle with some of the software and hardware components involved:
     A typical embedded firmware development cycle involves:

* Writing code with text editor
* Translating the code
* Debugging the code
* Programming Flash or OTP version of the microcontroller to built up a first functional prototype of your system

 

1. Writting Microcontroller Code
     Software code for embedded systems is written in programming languages, often Assembly or C. Assembly language programming involves learning a microcontroller's specific instruction set, which might increase the difficulty of programming, but on the other hand it results in the most compact and fastest code. The C language programming produces more portable code and faster programs development, as well as a larger code size.


2. Translating the Code
     Source code must be translated into instructions that can be acturally executed by the microcontroller. This job is usually done by assemblers/compilers.

Assemblers, Compilers, Linkers and Librarians
     Assemblers or (C-) compilers translate the human-written code into “hex code” that represents the machine instructions. Most of them come with linkers and librarians to support modular code   and reusable libraries of code.
A linker is a program which binds a library subprogram together with any other library units it refers to into a single executable program. In other words, it links code modules saved in different files together into a program.
     A librarian helps you to manage, organize and revision control a library of re-usable code modules.

 

3. Debugging the Code
     The code you wrote might not be perfect, bugs are usually involved. That is why a debugger is needed for embedded programming.
     A debugger is a piece of software used to find errors (bugs) in other programs, when running with an emulator, it tells the programmer what types of errors it finds and often marks the exact lines of code where the bugs are found. Debuggers also allow programmers to run a program step by step so that they can determine exactly when and why a program crashes. Advanced debuggers provide detailed information about threads and memory being used by the program during each step of execution.