Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Sauermann J.Realtime operating systems.Concepts and implementation of microkernels for embedded systems.1997.pdf
Скачиваний:
29
Добавлен:
23.08.2013
Размер:
1.32 Mб
Скачать

2. Concepts

11

 

 

2.2Loading and Execution of Programs

After a program has been compiled and linked, it can be executed. While compilation and linking is basically identical for embedded systems and general purpose computers, there are some differences regarding the execution of programs. Table 2.1 lists the steps performed during program execution and shows the differences between general purpose computers and embedded systems:

 

General Purpose Computer

Embedded System

 

 

 

1

The TEXT section of the program

The TEXT section is already

 

is loaded into the program memory

existing in the program memory

 

(part of the computer’s RAM).

(EEPROM) of the embedded

 

 

system.

 

 

 

2

Depending on the object format

The addresses are computed by the

 

generated by the linker, the

linker.

 

addresses of the TEXT section may

 

 

need to be relocated. If the compiler

 

 

produced position independent

 

 

code (PIC), this step is omitted.

 

 

 

 

3

The DATA section of the program

The DATA section is already in the

 

is loaded into program memory

EEPROM of the embedded system.

 

(part of the computer’s RAM).

 

 

 

 

4

Depending of the object format

The DATA section is copied as a

 

generated by the linker, the

whole to its final address in RAM.

 

addresses of the TEXT section may

 

 

need to be relocated.

 

 

 

 

TABLE 2.1 Execution of a program

Obviously, the execution of a program in an embedded system is much easier than in a general purpose computer.