You are on page 1of 17

Characteristics of Realtime and

Embedded Systems
Chapter 1

2/26/24 1
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.

2/26/24 2
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.
2/26/24 3
Realtime Systems

Synchronous &
Synchronous Asynchronous
& asynchronous Outputs
Real-time
Events
systems

Timing constraints

2/26/24 4
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.
2/26/24 5
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

2/26/24 6
Real-time Embedded Systems

RTS RTEMB
EMB

Railway monitoring and scheduling : RTS


Cell phone: EMB
Heart pacemaker: RTSEMB
2/26/24 7
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
2/26/24 8
Making of an Executable
• Makefile
• Demo

2/26/24 9
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.

2/26/24 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.

2/26/24 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.
`

2/26/24 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
2/26/24 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).
2/26/24 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)

2/26/24 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.

2/26/24 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.
2/26/24 17

You might also like