Você está na página 1de 17

Characteristics of Realtime

and Embedded Systems


Chapter 1

03/18/15

Embedded Systems
Embedded systems are computing systems
with tightly coupled hardware and software
integration.
Designed to perform dedicated function
Embedded means that the system is a
integral part of a larger system
Multiple embedded systems can co-exist in a
single system.
General purpose processor are typically not
aware of the applications.
An embedded processor is application-aware.
03/18/15

Embedded Systems (contd.)


Hardware and software co-design:
hardware and software for the embedded
system are developed in parallel.
Cross-platform development: Both
embedded system and its application use
the cross-platform development method.
Software is developed on one platform but
runs on another.

Software storage will have to be chosen


to allow for upgradeability.
Of course, the SoC, PoE, etc.
03/18/15

Realtime Systems

Synchronous
& asynchronous
Real-time
Events
systems

Synchronous &
Asynchronous
Outputs

Timing constraints

03/18/15

Real-time Systems
Real-time systems are those systems in
which the overall correctness of the
system depends on both the functional
correctness and the timing correctness.
Realtime systems also have a
substantial knowledge of the system it
controls and the applications running on
it.
Deadline dependent.
Predictability is important.
03/18/15

Hard and soft Real-time


Systems
A hard real-time systems is a real-time
system that must meet its deadlines with a
near zero degree of flexibility. Deadlines
must be met, otherwise catastrophes occur.
A soft-time system is a real-time system
that must its deadlines but with a degree of
flexibility. The deadlines contains various
levels of tolerance, even statistical
distribution of response times with different
degrees of acceptability.
An important requirement: scheduling
algorithms
03/18/15

Real-time Embedded
Systems

RTS

RTEMB

EMB

Railway monitoring and scheduling : RTS


Cell phone: EMB
Heart pacemaker: RTSEMB
03/18/15

Chapter 2: Basics of
Development for Embedded
Systems

Typical cross-platform development


environment
Host system: essential tools are cross
compiler, linker, source level debugger
Executable image contains RTOS, Kernel,
application program: compiled and linked
Target system: where to store the
executable image, and how?
Connections: ethernet and serial
See figure 2.1
03/18/15

Making of an Executable
Makefile
Demo

03/18/15

Compile and Link


Compiler converts the high level language code
into native machine code or object code
Linker does symbol resolution and symbol
relocation to generate the executable code:
See Figure 2.3
Symbol resolution is the process by which the
linked goes through each object file and
determines where the external symbols in it are
located. Then it copies the required file into the
final image.
Symbol relocation is the process in which the
linker maps symbol reference to its definition.
03/18/15

10

ELF (Executable Linker


Format)
An object file contains:
file size, binary code, data size, source file
name and other general information
Machine architecture specific binary
instructions and data
Symbol table and relocation table
Debug information, which the debugger uses

There are standards for organizing object


file formats. ELF is very commonly used
format.
03/18/15

11

ELF (contd.)
Compiler organizes the compiled code into
system-defined as well as user-defined content
groupings called sections.
Example sections: binary code, symbol table
Each section also has important information
about load address and run address.
Section header and program header: Listing 2.1
A section header table is an array of section
header sections of an object file.
A program header table is array of program
header structures describing a loadable
segment of an image.
`
03/18/15

12

Section Types (sh_types)


PROGBITS code or initialized data
SYMTAB etc.
Some common system created default
sections are: .text, .data, .sdata
Section attributes (sh_flags) : WRITE,
ALLOC, EXECINSTR
sh_addr is the section address and p_addr
is the program address on the target
machine
03/18/15

13

User defined sections


You could add user-defined sections:
.section mysection
If you were to create the embedded
program from scratch you will define it
in terms of sections as defined above.
Remember the .data and .text sections
from your MIPS code (of cse341).
03/18/15

14

Mapping Executable Images


into Target Embedded
Systems
Multiple source files (C/C++, assemble) have been
compiled and assembled into object files, a linker
must combine these object files and merge sections
from different object files into program segments.
The process creates a single executable image for
the target embedded system.
Embedded system developer uses linker directives
to control how the linker combines sections and
allocates segments into target system.
Common directives are MEMORY and SECTION (see
examples Listing 2.2 and 2.3)
03/18/15

15

Memory Map of the Target


System
See fig 2.5 and compare it with
MEMORY directive listing 2.2
Also check out the memory map of
XINU
Section .text can be mapped to ROM,
Flash or Ram where the section .data
has to be mapped to RAM.

03/18/15

16

Generating Executable
Image
Combining multiple sections into executable
image: fig. 2.6
Mapping executable image into target
memory fig 2.7
Module upgradability through flash memory.
Use SDRAM for code /data that require fast
access and DRAM for the rest of the
code/data.
See Listing 2.5 and Figure 2.8 for examples.
03/18/15

17

Você também pode gostar