Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
Introduction to Embedded System
Definition:
2
Introduction to Embedded System
Example Embedded System
3
Introduction to Embedded System
4
Introduction to Embedded System
Design Requirements
5
Introduction to Embedded System
Design challenges:
6
Life cycle of an Embedded System
7
Life cycle of an Embedded System-
Need/opportunity
The launch of new product starts with study of
market and determining the needs and
opportunities available.
The Embedded products are more often the not
are demand driven.
8
Life cycle of an Embedded System-
Concept development
The toughest part in embedded product
development is developing of concept for a
saleable product.
The concept should take into account the
requirements of the market.
The concept should also look into cost and
feasibility considerations.
9
Life cycle of an Embedded System-
Product/Process Design
Product Design can be defined as the idea generation,
concept development, testing and manufacturing or
implementation of a physical object or service.
Aesthetics is considered important in Product Design but
designers also deal with important aspects including
technology, ergonomics, usability, human factors and
material technology
Process design: Involves specifying all practices needed,
flowcharting, rationalisation and error prevention.
10
Life cycle of an Embedded System-
Production
Production is the application of tools and a
processing medium to the transformation of
raw materials into finished goods for sale. This
effort includes all intermediate processes
required for the production and integration of a
product's components.
11
Life cycle of an Embedded System-
Deployment
The deployment of a mechanical device,
electrical system, computer program, etc. is its
assembly from a packaged form to an
operational state.
Deployment should be interpreted as a general
process that has to be customized according to
specific requirements or characteristics
12
Life cycle of an Embedded System-
Maintenance/support
Maintenance is the process of enhancing and
optimizing deployed software (software
release), as well as remedying defects.
With the release of the product, other,
undocumented defects and deficiencies will be
discovered by the users of the software. As
these issues are reported into the development
organization, they will be entered into the defect
tracking system.
13
Life cycle of an Embedded System-
Upgrades
Upgrades are provided to add newer features to
the existing products.
Upgrades are also provided to sustain the
product a bit longer in market.
14
Life cycle of an Embedded System-
Retirement/disposal
Once the product is no longer sustainable, it is
finally disposed.
Then the company moves on to new product.
15
Host-Target Development Tools
16
Host-Target Development Tools
Target hardware platform does not contain
development tools (editor, compiler, debugger).
Target hardware platform is different from
development platform.
Development platform, called the Host
Computer, is typically a general purpose
computer.
Host computer runs compiler, assembler, linker,
locator to create a binary image that will run on
the Target embedded system.
17
Embedded Software Development
Process
Software Development is performed on a Host
computer
Compiler, Assembler, Linker, Locator, Debugger
Produces executable binary image that will run
on Target Embedded System
18
Embedded Software Development
Process
To develop software for a General Purpose
Computer.
19
Embedded Software Development
Process
To develop software for an embedded system
Create source file (on Host)
Type in C code (on Host)
Compile/Assemble: translate into machine code
(on Host)
Link: combine all object files and libraries, resolve
all symbols (on Host)
Locate: assign memory addresses to code and data
(on Host)
Download: copy executable image into Target
processor memory
Execute: reset Target processor
20
Embedded Software Development
Process
Compiler translates program written in human-
readable language into machine language
Source Code --> Object file
Object file is binary file that contains set of
machine-language instructions (opcodes) and
data resulting from language translation process
21
Embedded Software Development
Process
Machine-language instructions are specific to a
particular processor
Can the host computer's compiler be used to
compile a program to run on the target
computer?
A Native-compiler runs on a computer platform
and produces code for that same computer
platform
A Cross-compiler runs on one computer platform
and produces code for another computer platform
22
Embedded Software Development
Process
In some cases, a compiler is not used
Assembler performs one-to-one translation from
human-readable assembly language mnemonics
to equivalent machine-language opcodes
Interpreter constantly runs and interprets source
code as a set of directives
• Performs syntax checking as program is typed in.
• Result is slow performance - can be ~1000x slower
than an equivalent compiled language.
• Interactive capability provides more feedback --
easier to learn.
23
Linking Embedded Systems
The Linker combines object files (from compiler)
and resolves variable and function references
Source code may be contained in >1 file, which
must be combined. Resolve variables which may
be referenced in one file and defined in another
file
Resolve calls to library functions, like sqrt
24
Locating Embedded Systems
27
Debugging Tools
28
Debugging with Simulators
29
Debugging with Remote Debuggers
30
Debugging with Remote Debuggers
31
Debugging with In-Circuit
Emulators
In-Circuit Emulators (ICE)
Take the place of (i.e., emulates) target
processor
Contains copy of target processor, plus RAM,
ROM, and its own embedded software
Allows you to examine state of processor while
program is running
Uses Remote debugger for human interface
32
Debugging with In-Circuit
Emulators
Has more capability than target processor
Supports software and hardware breakpoints
(stop execution on memory and I/O read/write,
interrupts) .Stop on write to variable num.
Real-time tracing
Disadvantage: Expensive!
33
Binary formats
A format for representing data used by some
applications.
The other main formats for storing data are text
formats (such as ASCII and EBCDIC), in which
each character of data is assigned a specific code
number.
Binary formats are used for executable
programs and numeric data, whereas text
formats are used for textual data.
Examples :
Motorola s-format
Intel HEX format.
34
Motorola S-record
DESCRIPTION
An S-record file consists of a sequence of
specially formatted ASCII character strings. An
S-record will be less than or equal to 78 bytes in
length. The order of S-records within a file is of
no significance and no particular order may be
assumed.
The general format of an S-record follows:
35
Motorola S-record
36
Motorola S-record
37
Motorola S-record
data -- A char [0-64] field.
These characters when paired and interpreted
as hexadecimal values represent the memory
loadable data or descriptive information.
checksum -- A char[2] field.
These characters when paired and interpreted
as a hexadecimal value display the least
significant byte of the ones complement of the
sum of the byte values represented by the pairs
of characters making up the count, the address,
and the data fields.
38
Motorola S-record
Each record is terminated with a line feed. If any
additional or different record terminator(s) or delay
characters are needed during transmission to the target
system it is the responsibility of the transmitting
program to provide them.
S0 Record. The type of record is 'S0' (0x5330). The
address field is unused and will be filled with zeros
(0x0000). The code/data field contains descriptive
information identifying the following block of S-records.
S1 Record. The type of record field is 'S1' (0x5331). The
address field is interpreted as a 2-byte address. The data
field is composed of memory loadable data.
39
Motorola S-record
S2 Record. The type of record field is 'S2' (0x5332).
The address field is interpreted as a 3-byte
address. The data field is composed of memory
loadable data.
S3 Record. The type of record field is 'S3' (0x5333).
The address field is interpreted as a 4-byte
address. The data field is composed of memory
loadable data.
S5 Record. The type of record field is 'S5' (0x5335).
The address field is interpreted as a 2-byte value
and contains the count of S1, S2, and S3 records
previously transmitted. There is no data field.
40
Motorola S-record
S7 Record. The type of record field is 'S7' (0x5337).
The address field contains the starting execution
address and is interpreted as 4-byte address.
There is no data field.
S8 Record. The type of record field is 'S8' (0x5338).
The address field contains the starting execution
address and is interpreted as 3-byte address.
There is no data field. (EASy68K always uses this
termination record type.)
S9 Record. The type of record field is 'S9' (0x5339).
The address field contains the starting execution
address and is interpreted as 2-byte address.
There is no data field.
41
Intel HEX File Format
42
Intel HEX File Format
43
Intel HEX File Format
44
Intel HEX File Format
Calculating the Checksum
The checksum is calculated by summing the value of the
data on the line, excluding the leading colon and
checksum byte itself, and taking its two's complement.
For example, the line:
:0300300002337A1E
45
Cyclic redundancy check
The CRC is a very powerful but easily implemented
technique to obtain data reliability.
The CRC technique is used to protect blocks of data
called Frames.
Using this technique, the transmitter appends an extra n-
bit sequence to every frame called Frame Check Sequence
(FCS).
The FCS holds redundant information about the frame
that helps the transmitter detect errors in the frame.
The CRC is one of the most used techniques for error
detection in data communications.
The technique gained its popularity because it combines
three advantages:
Extreme error detection capabilities.
Little overhead.
Ease of implementation.
46
Cyclic redundancy check
The CRC algorithm works above the binary
field.
The algorithm treats all bit streams as binary
polynomials.
Given the original frame, the transmitter
generates the FCS for that frame.
The FCS is generated so that the resulting frame
(the cascade of the original frame and the FCS),
is exactly devisable by some pre-defined
polynomial.
This pre-defined polynomial is called the
devisor or CRC Polynomial.
47
Cyclic redundancy check
For the formal explanation we will define the
following :
48
In Session-1 we have covered
Introduction to Embedded System
Life cycle of an Embedded System
Host-Target Development Tools
Embedded Software Development Process
Linking Embedded Systems
Debugging Embedded Software
Binary formats
Cyclic redundancy check
49