SlideShare a Scribd company logo
Software for
Embedded Systems
Designed & Presented by,
Anand K
Embedded Software
 Software interacting with the physical world
o it takes time.
o it consumes power
o it does not terminate.
 Embedded software
o hidden in watches, mobile phones, iPods
o guided missiles, controls satellites
o used in automotive instruments.
 Varying requirements and hardware platform.
Requirements of Software for
Embedded Systems
 Reliability
 Human intervention not possible for error handling
 Cost- effectiveness
 Low power consumption
 Efficient use of memory.
 Performance requirement
 Timeliness
Features of Embedded Software
Timeliness
 Computation takes time
 Even Infinitely fast computer embedded software needs to deal with time
because the physical processes with which it interacts evolves over time.
 Concurrency
 Engage with the physical world where multiple things happen at once.
 Liveliness
 Program must not terminate or block waiting for events that will never
occur.
 Heterogeneity
 Different computational styles and implementation technologies
Interact with events occurring
 Reactivity
 React continuously to the environment at the speed of the environment.
Real Time
 The time between presentation of a set of inputs
to a system and the realization of the required
behavior including availability of the associated
outputs, is called the response time of the
system.
 A real-time system is a system that must satisfy
explicit bounded response time constraints or
risk severe consequences including failure
 Soft Real-time systems
Hard real-time systems
Software Quality Measurement
 Dynamic efficiency
 Number of CPU cycles required.
 Static efficiency
 RAM size
 Global variables and stack.
 ROM size
 Fixed constants and program code.
 Power consumption.
 Correctness.
 Easy to understand
 Easy to change
 Flexibility and maintainability
Developing Software
 Determine requirements
 Product functionality
 Design the System Architecture
 Select the Operating System(if any)
 Choose the development platform
 Code the application
 Optimize the code according to the requirement.
 Verify the software on the host system
 Execution within a simulator environment.
 Execution within an emulator environment.
 Verify the software on the target system.
Make Process
Compiling
o Parsing, Semantic Analysis and Object Code Generation
o Processor specific characteristics to be exploited for
efficient code generation
o Cross-compiler or cross-assembler
 Run on host to produce code for target.
Linking
o Merge sections from multiple object files
o Unresolved reference to symbols replaced by reference to actual
variables or function calls
o A special object file that contains compiled start-up code also
included
o Start-up code:
 Small block assembly language code that prepares the way for the
execution of the code
Startup code
o Start-up code usually consists of following actions in
sequence.
 Disable all interrupts.
 Copy any predefined data from ROM to RAM.
 Zero the uninitialized data area.
 Allocate space and initialize the stack.
 Initialize processor’s stack pointer
 Create and initialize the heap
 Enable Interrupts.
 Call main
o Programmer may need to write his own start-up
code and link(if necessary)
Img.jpg
Memory Allocation
o RAM Memory
 Global variables.
 Heap
 Stack
• Local variables
• Return addresses
• Temporary data.
o Content changes at run-time
Memory Allocation
o ROM memory
 Machine Codes
 Fixed constants
o If both ROM and EPROM
 partitioning depending upon the requirements of the
design.
 Configuration data
 Flash
 Data store(RAM buffer)
o Slower compared to RAM
Software for embedded systems complete
Desirable HLL features
o Versatile parameter passing
 Call by value
 Copied into stack at considerable execution time
 Large data structures never passed by value.
 Call by reference
 Indirect instructions used; time for execution of procedure
more.
Desirable features
 Global variables Vs parameter lists
 References to global variables faster- direct
addressing
 Parameters make interfaces clearly defined
 Parameters can increase interrupt latency.
• interrupts disabled during parameter passing
C for Embedded Systems
o The practices that characterize Embedded C
development:
▫ In-line Assembly language
▫ Device knowledge
▫ #pragma directive
▫ Endianness
▫ Mechanical knowledge
▫ knowledge of specific device/peripheral operation
o Processor dependent objects like characters, bytes, bits
and addresses can be handled directly
 to be manipulated to control interrupt controllers, CPU registers etc.
o The @ operator associates port register with identifier in
#pragma port statements
o C provides special variable types like register, volatile,
static, and constant
C for Embedded Systems
o Storage modifiers
 register – variables to be frequently used, compiler
places in a register.
 static – private communication in modules. Static
variables initialized only once, visible within a single
compilation unit.
 extern – extern variables are meant to be allocated
memory only once across several modules.
 auto – by default all local variables are declared as ‘auto’
o Data type Identifiers
 const
• Allocated in ROM or any other NV memory
 volatile – variables whose values may change outside of
the executing software.
Memory management in C
o Static Allocation
 Global variables, variables with static qualifier
 Memory allocated during compile or link time
 Advantage of modularising the data within a
program design.
o Automatic Allocation
 At run time in stack for variables defined in every
function
 Compiler provides support for allocation and access
to these variables
Dynamic Allocation
 Dynamic allocation
 Allocation of memory at run-time on demand
 Allocation and de-allocation under program control.
 Allocated from a large pool of unused memory area
called Heap
 Memory accessed indirectly, via pointer reference
Dynamic Allocation
 Memory space in the heap is not always allocated
and deallocated from one end (like the stack).
If a block of sufficient size is found then it is
allocated and the pointer returned.
If no block is found to satisfy the request then a
heap overflow error is returned.
 Allocation in heap area
 Memory in heap as chunk of unit sizes 16,32, etc.
 Memory is actually acquired or released in the units in
which the memory is divided.
o wastage of memory
o Internal fragmentation
Allocation of Stack and Heap Space
for the Declaration of Array A
Heap Management
 A map of space allocated is kept so that, when a
block is deleted, the correct amount of space is
returned to the free list.
 Smaller unit size minimizes wastage but
increases memory requirement for maintaining
data about the allocated blocks
 free() returns unit to heap
o using free() more than once on the same pointer can
result in inconsistency
Difficulties
 Memory leak
 memory allocated, not freed
 not available subsequently
 “Run forever” can result in system failure due to
cumulative effect of small memory leak
 Dangling pointers
Thank U

More Related Content

What's hot (20)

PPTX
Assembly language
Arafat Hossan
 
PPTX
Simplified instructional computer
Kirby Fabro
 
PPT
My cool new Slideshow!
manishamorya
 
PPT
Introduction to synchronous programming langauges
Akshar Desai
 
PPTX
Analytics tools and Instruments
Krunal Soni
 
DOCX
Assembly language
Ahmedbahri15
 
PPT
Overall 23 11_2007_hdp
Mohd Arif
 
PPTX
Introduction to Simplified instruction computer or SIC/XE
Temesgen Molla
 
PPTX
Ss debuggers
sweety enit
 
PPT
01. introduction
babaaasingh123
 
PPTX
Single pass assembler
Bansari Shah
 
PPTX
Ch 4 linker loader
Malek Sumaiya
 
PDF
Compiler Design Introduction
Kuppusamy P
 
PPSX
Spr ch-01
Vasim Pathan
 
PDF
Higher Order Thinking - Question paper setting
Pradeep Kumar TS
 
PPTX
Direct linking loader
babyparul
 
PPTX
Direct linking loaders
Satyamevjayte Haxor
 
PPTX
Loaders ( system programming )
Adarsh Patel
 
PPT
Top schools in gudgao
Edhole.com
 
Assembly language
Arafat Hossan
 
Simplified instructional computer
Kirby Fabro
 
My cool new Slideshow!
manishamorya
 
Introduction to synchronous programming langauges
Akshar Desai
 
Analytics tools and Instruments
Krunal Soni
 
Assembly language
Ahmedbahri15
 
Overall 23 11_2007_hdp
Mohd Arif
 
Introduction to Simplified instruction computer or SIC/XE
Temesgen Molla
 
Ss debuggers
sweety enit
 
01. introduction
babaaasingh123
 
Single pass assembler
Bansari Shah
 
Ch 4 linker loader
Malek Sumaiya
 
Compiler Design Introduction
Kuppusamy P
 
Spr ch-01
Vasim Pathan
 
Higher Order Thinking - Question paper setting
Pradeep Kumar TS
 
Direct linking loader
babyparul
 
Direct linking loaders
Satyamevjayte Haxor
 
Loaders ( system programming )
Adarsh Patel
 
Top schools in gudgao
Edhole.com
 

Viewers also liked (16)

PPT
Embedded system ppt
Vivek Chamorshikar
 
DOC
Unit 1 embedded systems and applications
Dr.YNM
 
PPTX
ppt on embedded system
manish katara
 
PPT
Introduction to embedded systems
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
 
DOCX
Embedded systems software
alanradley
 
PDF
Introduction to Avr Microcontrollers
Mohamed Tarek
 
PPTX
Embedded systems
Manju Nathan
 
PDF
Introduction to Embedded Systems
Mohamed Tarek
 
PPT
Introduction to Embedded Systems and its Applications
Gaurav Verma
 
PPTX
Embedded System
Sneha Chopra
 
PDF
Embedded systems notes
Shikha Sharma
 
PDF
Introduction to Embedded Systems a Practical Approach
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
 
PDF
Embedded System Design Notes written by Arun Kumar G, Associate Professor, De...
Arunkumar Gowdru
 
PPT
Embedded system
Anmol Bagga
 
PDF
Design of Software for Embedded Systems
Peter Tröger
 
DOCX
Embedded systems class notes
Dr.YNM
 
Embedded system ppt
Vivek Chamorshikar
 
Unit 1 embedded systems and applications
Dr.YNM
 
ppt on embedded system
manish katara
 
Introduction to embedded systems
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
 
Embedded systems software
alanradley
 
Introduction to Avr Microcontrollers
Mohamed Tarek
 
Embedded systems
Manju Nathan
 
Introduction to Embedded Systems
Mohamed Tarek
 
Introduction to Embedded Systems and its Applications
Gaurav Verma
 
Embedded System
Sneha Chopra
 
Embedded systems notes
Shikha Sharma
 
Introduction to Embedded Systems a Practical Approach
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
 
Embedded System Design Notes written by Arun Kumar G, Associate Professor, De...
Arunkumar Gowdru
 
Embedded system
Anmol Bagga
 
Design of Software for Embedded Systems
Peter Tröger
 
Embedded systems class notes
Dr.YNM
 
Ad

Similar to Software for embedded systems complete (20)

PPTX
Embedded system and development
Rajani Bhandari
 
PPTX
Embedded computing platform design
RAMPRAKASHT1
 
PPTX
Embedded and Real Time Systems Unit II.pptx
vanitha292520
 
PPT
13 risc
Sher Shah Merkhel
 
PPTX
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
realme6igamerr
 
PDF
Module4.pdf ,...................................
chetanreddy2212
 
PDF
embeddedsystems-100429081552-phpapp01.pdf
Ashwin180668
 
PPTX
EC 308 Embedded Systems Module 1 Notes APJKTU
Agi George
 
PPT
Introductiojwjwwkwkwjejjejsjsjsjsjsjsjn.ppt
JayPatil347597
 
PPT
UNIT 1 ERTS-1.pptusbce18ugxy8vsxysqvyexv
eeerithanya
 
PDF
C programming session9 -
Keroles karam khalil
 
PPTX
Microcontroller(18CS44) module 1
Swetha A
 
PPTX
Mces MOD 1.pptx
RadhaC10
 
PPTX
lecture03_EmbeddedSoftware for Beginners
MahmoudElsamanty
 
PPT
Reduced instruction set computers
Syed Zaid Irshad
 
PDF
Embedded C - Lecture 3
Mohamed Abdallah
 
PPTX
2024_lecture12_come321.pptx..................
ghada507476
 
PPT
13 risc
dilip kumar
 
PPT
RISC.ppt
AmarDura2
 
PPT
13 risc
Anwal Mirza
 
Embedded system and development
Rajani Bhandari
 
Embedded computing platform design
RAMPRAKASHT1
 
Embedded and Real Time Systems Unit II.pptx
vanitha292520
 
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
realme6igamerr
 
Module4.pdf ,...................................
chetanreddy2212
 
embeddedsystems-100429081552-phpapp01.pdf
Ashwin180668
 
EC 308 Embedded Systems Module 1 Notes APJKTU
Agi George
 
Introductiojwjwwkwkwjejjejsjsjsjsjsjsjn.ppt
JayPatil347597
 
UNIT 1 ERTS-1.pptusbce18ugxy8vsxysqvyexv
eeerithanya
 
C programming session9 -
Keroles karam khalil
 
Microcontroller(18CS44) module 1
Swetha A
 
Mces MOD 1.pptx
RadhaC10
 
lecture03_EmbeddedSoftware for Beginners
MahmoudElsamanty
 
Reduced instruction set computers
Syed Zaid Irshad
 
Embedded C - Lecture 3
Mohamed Abdallah
 
2024_lecture12_come321.pptx..................
ghada507476
 
13 risc
dilip kumar
 
RISC.ppt
AmarDura2
 
13 risc
Anwal Mirza
 
Ad

Recently uploaded (20)

DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
Big Data and Data Science hype .pptx
SUNEEL37
 
PPT
Electrical Safety Presentation for Basics Learning
AliJaved79382
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
PPTX
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
Big Data and Data Science hype .pptx
SUNEEL37
 
Electrical Safety Presentation for Basics Learning
AliJaved79382
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 

Software for embedded systems complete

  • 1. Software for Embedded Systems Designed & Presented by, Anand K
  • 2. Embedded Software  Software interacting with the physical world o it takes time. o it consumes power o it does not terminate.  Embedded software o hidden in watches, mobile phones, iPods o guided missiles, controls satellites o used in automotive instruments.  Varying requirements and hardware platform.
  • 3. Requirements of Software for Embedded Systems  Reliability  Human intervention not possible for error handling  Cost- effectiveness  Low power consumption  Efficient use of memory.  Performance requirement  Timeliness
  • 4. Features of Embedded Software Timeliness  Computation takes time  Even Infinitely fast computer embedded software needs to deal with time because the physical processes with which it interacts evolves over time.  Concurrency  Engage with the physical world where multiple things happen at once.  Liveliness  Program must not terminate or block waiting for events that will never occur.  Heterogeneity  Different computational styles and implementation technologies Interact with events occurring  Reactivity  React continuously to the environment at the speed of the environment.
  • 5. Real Time  The time between presentation of a set of inputs to a system and the realization of the required behavior including availability of the associated outputs, is called the response time of the system.  A real-time system is a system that must satisfy explicit bounded response time constraints or risk severe consequences including failure  Soft Real-time systems Hard real-time systems
  • 6. Software Quality Measurement  Dynamic efficiency  Number of CPU cycles required.  Static efficiency  RAM size  Global variables and stack.  ROM size  Fixed constants and program code.  Power consumption.  Correctness.  Easy to understand  Easy to change  Flexibility and maintainability
  • 7. Developing Software  Determine requirements  Product functionality  Design the System Architecture  Select the Operating System(if any)  Choose the development platform  Code the application  Optimize the code according to the requirement.  Verify the software on the host system  Execution within a simulator environment.  Execution within an emulator environment.  Verify the software on the target system.
  • 8. Make Process Compiling o Parsing, Semantic Analysis and Object Code Generation o Processor specific characteristics to be exploited for efficient code generation o Cross-compiler or cross-assembler  Run on host to produce code for target. Linking o Merge sections from multiple object files o Unresolved reference to symbols replaced by reference to actual variables or function calls o A special object file that contains compiled start-up code also included o Start-up code:  Small block assembly language code that prepares the way for the execution of the code
  • 9. Startup code o Start-up code usually consists of following actions in sequence.  Disable all interrupts.  Copy any predefined data from ROM to RAM.  Zero the uninitialized data area.  Allocate space and initialize the stack.  Initialize processor’s stack pointer  Create and initialize the heap  Enable Interrupts.  Call main o Programmer may need to write his own start-up code and link(if necessary) Img.jpg
  • 10. Memory Allocation o RAM Memory  Global variables.  Heap  Stack • Local variables • Return addresses • Temporary data. o Content changes at run-time
  • 11. Memory Allocation o ROM memory  Machine Codes  Fixed constants o If both ROM and EPROM  partitioning depending upon the requirements of the design.  Configuration data  Flash  Data store(RAM buffer) o Slower compared to RAM
  • 13. Desirable HLL features o Versatile parameter passing  Call by value  Copied into stack at considerable execution time  Large data structures never passed by value.  Call by reference  Indirect instructions used; time for execution of procedure more.
  • 14. Desirable features  Global variables Vs parameter lists  References to global variables faster- direct addressing  Parameters make interfaces clearly defined  Parameters can increase interrupt latency. • interrupts disabled during parameter passing
  • 15. C for Embedded Systems o The practices that characterize Embedded C development: ▫ In-line Assembly language ▫ Device knowledge ▫ #pragma directive ▫ Endianness ▫ Mechanical knowledge ▫ knowledge of specific device/peripheral operation o Processor dependent objects like characters, bytes, bits and addresses can be handled directly  to be manipulated to control interrupt controllers, CPU registers etc. o The @ operator associates port register with identifier in #pragma port statements o C provides special variable types like register, volatile, static, and constant
  • 16. C for Embedded Systems o Storage modifiers  register – variables to be frequently used, compiler places in a register.  static – private communication in modules. Static variables initialized only once, visible within a single compilation unit.  extern – extern variables are meant to be allocated memory only once across several modules.  auto – by default all local variables are declared as ‘auto’ o Data type Identifiers  const • Allocated in ROM or any other NV memory  volatile – variables whose values may change outside of the executing software.
  • 17. Memory management in C o Static Allocation  Global variables, variables with static qualifier  Memory allocated during compile or link time  Advantage of modularising the data within a program design. o Automatic Allocation  At run time in stack for variables defined in every function  Compiler provides support for allocation and access to these variables
  • 18. Dynamic Allocation  Dynamic allocation  Allocation of memory at run-time on demand  Allocation and de-allocation under program control.  Allocated from a large pool of unused memory area called Heap  Memory accessed indirectly, via pointer reference
  • 19. Dynamic Allocation  Memory space in the heap is not always allocated and deallocated from one end (like the stack). If a block of sufficient size is found then it is allocated and the pointer returned. If no block is found to satisfy the request then a heap overflow error is returned.  Allocation in heap area  Memory in heap as chunk of unit sizes 16,32, etc.  Memory is actually acquired or released in the units in which the memory is divided. o wastage of memory o Internal fragmentation
  • 20. Allocation of Stack and Heap Space for the Declaration of Array A
  • 21. Heap Management  A map of space allocated is kept so that, when a block is deleted, the correct amount of space is returned to the free list.  Smaller unit size minimizes wastage but increases memory requirement for maintaining data about the allocated blocks  free() returns unit to heap o using free() more than once on the same pointer can result in inconsistency
  • 22. Difficulties  Memory leak  memory allocated, not freed  not available subsequently  “Run forever” can result in system failure due to cumulative effect of small memory leak  Dangling pointers