Module 4
Module 4
Programming tools
Evolution of embedded programming tools,
Modelling programs, Code optimization, Logic
analyzers, Programming environment
BUILDING PROCESS
FOR EMBEDDED
SYSTEMS
2
BUILDING PROCESS FOR EMBEDDED SYSTEMS
Software Tools
1. Software Development Kit (SDK)
2. Source-code Engineering Software
3. RTOS
4. Integrated Development Environment (IDE)
5. Emulator
6. Editor
7. Interpreter
8. Compiler
9. Assembler
10.Cross Assembler
11.Locator
12.Testing and debugging tools
MODULE - 5 CSE3006 – EMBEDDED SYSTEM DESIGN
PROCESS FOR DEVELOPING EMBEDDED SOFTWARE
To develop software for a General Purpose Computer
Create source file
Type in C code
Build: compile and link
Execute: load and run
All of the object files that result from the first step must be
linked together to produce a single object file, called the re-
locatable program.
And it is up to the
MODULE - 5
linker to resolve such unresolved
CSE3006 – EMBEDDED SYSTEM DESIGN
LINKER
All of the object files resulting from the compilation in
step one must be combined.
COMPILE
COMPILE
The basic structure for the gcc compiler command is:
COMPILE
We broke up the compilation step into two separate
commands, but you can compile the two files with one
command.
1. Using a Device
Programmer
2. In-system programming
(ISP)
Host Computer
Device Programmer
Modelling
embedded
Unified
systems Data
model Flow
language Graph
50
Modelling Programs
Representation of a program
Can be represented by
Data Flow graph (DFG)
Control Data Flow Graph (CDFG)
Decision nodes
while (a < b)
{
a = proc1(a,b);
b= proc2(a,b);
}
if (cond1)
basic_block_1( );
else
basic_block_2();
basic_block_3( );
switch (test1) {
case c1: basic_block_4( ); break;
case c2: basic_block_5( ); break;
case c3: basic_block_6( ): break;
}
61
PETRI NET MODEL
COMPONENTS OF PETRINET
PROPERTIES
Sequential Execution: Transition t2
can take place only after t1. Here
a constraint is imposed “t2 after
t1”
PROPERTIES
Scenario 1: Normal
Enters all 4 digits
and press OK.
Scenario 2:
Exceptional
Enters only 3
digits and press
OK.
MODULE - 5 CSE3006 – EMBEDDED SYSTEM DESIGN
PETRINET MODEL
75
UNIFIED Modelling LANGUAGE (UML)
What is Modelling Language?
A Modelling language is a graphical/textual computer
language explains design and construction of any
model or structure following a set of guidelines.
INTRODUCTION
INTRODUCTION
UML is used in many applications by many people
like business users, common people to make the
system simple, clear and understandable
System
Use case diagrams
Requirement
82
UNIFIED Modelling LANGUAGE (UML)
System
Actors
Use Cases
Relationships
Verify
Primary actor – Initiates the process
<<Include>>
Password
Log in
Secondary actor – Responds
<<Extend>>
Error
Check Use case – Action
Balance
Customer
Association
Transfer
fund
Bank Exclude
Make
Include
Payment
Generalization
New Old
customer customer
98
UNIFIED Modelling LANGUAGE (UML)
CLASS DIAGRAM
Class diagram- use to document software
architecture
CLASS DIAGRAM
Class diagram - Static diagram, Structural diagram
CLASS DIAGRAM
The purpose of the class diagram can be summarized
as −
Conceptual modelling
Class
Relationship
Attributes s
Method
s
Anil Aggregati
Sunil
on
Classroo
m Multiplicity
N
0…*
0…1
1…*
m…n
1…* 1
Tables Projecto
r
Compositi
on
109
UNIFIED Modelling LANGUAGE (UML)
SEQUENCE DIAGRAM
Sequence diagram - interactions among the different
elements in the model
SEQUENCE DIAGRAM
Sequence Diagrams are suitable for following
scenarios:
Usage scenario – to determine how the system
could be used
Method logic – to explore logic of any function,
procedure or complex process
Service logic – ideal way to explain high level
methods used by clients
Alternate frame
Alt
If it is valid
Else
Yes/No
Yes/No
Payment
Receipt
119
UNIFIED Modelling LANGUAGE (UML)
STATE DIAGRAM
STATE DIAGRAM
Uses of state chart diagram:
We use it to depict event driven objects
We use it for showing use cases in business context
Shows the overall behavior of state machine
We use it to model the dynamic behavior of the system .
Steps to draw a state diagram:
Identify the initial state and the final states.
Identify the possible states in which the object can exist
Label the events which trigger these transitions.
MODULE - 5 CSE3006 – EMBEDDED SYSTEM DESIGN
UNIFIED Modelling LANGUAGE (UML)
STATE DIAGRAM SYMBOL NOTATIONS
Final state
Self Transition
Send Special or
Idle order Normal
request order v
v
Initial Abnormal
state exit state
Order
Final confirmation
state v
Dispatch
order v
Statechart
Statechart for for
"User" “Elevator
Behavior Control
System"
126
UNIFIED Modelling LANGUAGE (UML)
ACTIVITY DIAGRAM
An activity diagram - behavioral diagram
ACTIVITY DIAGRAM
ACTIVITY DIAGRAM
Steps to draw a activity diagram:
Identify the initial state and the final states.
Identify the intermediate activities needed to
reach the final state from the initial state.
Identify the conditions or constraints which cause
the system to change control flow.
Draw the diagram with appropriate notations.
MODULE - 5 CSE3006 – EMBEDDED SYSTEM DESIGN
UNIFIED Modelling LANGUAGE (UML)
ACTIVITY DIAGRAM SYMBOL NOTATIONS
Initial node Final node Object node Decision node Merge node
Fork node
Join node
[Yes]
Confirm order
[No]
Termination
Dispatch order