SlideShare a Scribd company logo
By: Mostafa El-koumy
Day #1
Embedded
Introduction
?
o Introduction to Embedded C.
o Embedded Software Architecture.
o Memory usage.
o Embedded Development Environment.
o Interrupts.
o Keywords.
o Some Embedded Systems concepts.
By: Mostafa El-koumy
INTRODUCTION
 Embedded Systems is all things around you which have
something called electronic brain to make some sort of
artificial intelligence.
 Embedded C is a prober subset of C language suitable for
Embedded systems, it defines only a new concept of
writing software.
 Using Embedded C, we should handle everything used in
the program like Memory Management, HW Registers,
interrupts, …. Etc.
By: Mostafa El-koumy
MISRA RULES
 Motor Industry Software Reliability Association.
 Collaboration between engineering consultancies which
seeks to promote best practice in developing
Automotive Systems and other embedded systems.
 To this end MISRA publishes documents that provide
accessible information for engineers and management,
and holds events to permit the exchange of experiences
between practitioners.
 URL : www.misra.org.uk
 EX:
By: Mostafa El-koumy
EMBEDDED SOFTWARE ARCHITECTURE
By: Mostafa El-koumy
EMBEDDED SOFTWARE ARCHITECTURE (CON’T)
By: Mostafa El-koumy
CODE FLOW
 All the code is running within infinite loop in main except:
 Initialization code.
 Interrupt handlers, interrupt service routines (ISR).
 The other code runs normally
int main (void)
{
intitializeModule();
sei();
while(1){
startApplication();
}
return 0;
}
By: Mostafa El-koumy
BACKGROUND/FOREGROUND TASKS (LOW COST)
By: Mostafa El-koumy
SOFTWARE MODELING
Function
C file
Module
Project
C file(s) H file(s)
SW
module
Uart.c
Uart.h
Uart_irq.c
Uart_cfg.h
MEMORY USAGE BY LINKER SCRIPT
 The HW Registers
 Stack space that grow down
 Local variables
 Functions return address
 Heap Space that grow up
 Zero default initialized variables
 Initialized with value by developer
By: Mostafa El-koumy
I/O Addresses
Stack (grow down)
Heap (Grow up)
Un-initialized data
(.BSS)
Initialized data
DEVELOPMENT ENVIRONMENT
 IDE which has
 Text editor.
 Cross compiler produce machine language
By: Mostafa El-koumy
DEVELOPMENT ENVIRONMENT
 Development Kit
By: Mostafa El-koumy
DEVELOPMENT ENVIRONMENT
 In circuit Debugger (ICD)
 HW device connects to the microprocessor using JTAG/SWD
interface to support external control of the microprocessor
using debugger.
 Restrictions of debugging capabilities is specified by the
microprocessor.
By: Mostafa El-koumy
DEVELOPMENT ENVIRONMENT
 In circuit Emulator (ICE)
 HW device used to debug embedded SW. it replaces the
microprocessor with control over all the aspects of it and it
usually emulate all the microprocessor family.
By: Mostafa El-koumy
PROGRAMMING PROCESS DIAGRAM
By: Mostafa El-koumy
GPIO MODULE
Exercise
1
By: Mostafa El-koumy
INTERRUPTS
 an interrupt is a signal to the processor emitted by
hardware or software indicating an event that needs
immediate attention. An interrupt alerts the processor
to a high-priority condition requiring the interruption of
the current code the processor is executing.
 Interrupt sources
 Internal peripherals.
 External interrupts.
 SW interrupts.
 Exception thrown by processors.
By: Mostafa El-koumy
INTERACTIVE QUESTIONS
 Mask able interrupt?
 Non-Mask able interrupts?
 Level triggered external interrupt?
 Edge triggered external interrupt?
 Interrupt nesting?
By: Mostafa El-koumy
INTERRUPT TIMING
 Interrupt latency?
 Context?
 Interrupt response?
 Interrupt recovery?
By: Mostafa El-koumy
EMBEDDED KEYWORDS (INTERACTIVE)
 Scope and life time with keywords:
 Static local
 Static global
 Volatile
 Const
 Extern
 register
By: Mostafa El-koumy
FUNCTIONS VS MACROS
 Macros in completely text replacement so it increase the
code size and duplications.
 Function is preferred.
By: Mostafa El-koumy
MACROS VS INLINE FUNCTIONS
 In Inline functions Compiler substitute the function call
by function code like MACROS.
 MACROS is supported by preprocessor so all the IDEs
supports it.
 Inline is supported by some compilers.
 Inline function performs type checking but MACROs not.
 Inline function could be traced but MACROs not.
 Some compiler disable inline function when the its code
is large.
Exercise
2
By: Mostafa El-koumy
UART MODULE
Thank you for
your attention!
Any Questions?
By: Mostafa El-koumy
CONTACT DETAILS
 Mostafa El-koumy
 Embedded SW Developer
 mostafa.elkoumy@gmail.com

More Related Content

What's hot

Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
Zakaria Gomaa
 
8255:ppi & 8259:pic
8255:ppi & 8259:pic 8255:ppi & 8259:pic
8255:ppi & 8259:pic
Adarsh Patel
 
Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller
Raghav Shetty
 
8051 block diagram
8051 block diagram8051 block diagram
8051 block diagram
DominicHendry
 
Basic computer architecture
Basic computer architectureBasic computer architecture
Basic computer architecture
Daffodil International University
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
Mazin Alwaaly
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085
Nitin Ahire
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly languageAhmed M. Abed
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copymkazree
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
sonalikharade3
 
C programming language
C programming languageC programming language
C programming language
Mahmoud Eladawi
 
Registers
RegistersRegisters
Registers
Shashi Lata
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
Anil Kumar Pugalia
 
Bootloaders
BootloadersBootloaders
Bootloaders
Anil Kumar Pugalia
 
Introduction to Embedded Systems
Introduction to Embedded Systems Introduction to Embedded Systems
Introduction to Embedded Systems
Emertxe Information Technologies Pvt Ltd
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming
Dr. Pankaj Zope
 
AVR Micro controller Interfacing
AVR Micro controller Interfacing AVR Micro controller Interfacing
AVR Micro controller Interfacing
Raghav Shetty
 
Embedded C - Day 2
Embedded C - Day 2Embedded C - Day 2
Introduzione a Arduino
Introduzione a ArduinoIntroduzione a Arduino
Introduzione a Arduino
Pietro Aiuola
 

What's hot (20)

Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 
8255:ppi & 8259:pic
8255:ppi & 8259:pic 8255:ppi & 8259:pic
8255:ppi & 8259:pic
 
Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller
 
Embedded _c_
Embedded  _c_Embedded  _c_
Embedded _c_
 
8051 block diagram
8051 block diagram8051 block diagram
8051 block diagram
 
Basic computer architecture
Basic computer architectureBasic computer architecture
Basic computer architecture
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copy
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
C programming language
C programming languageC programming language
C programming language
 
Registers
RegistersRegisters
Registers
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
Introduction to Embedded Systems
Introduction to Embedded Systems Introduction to Embedded Systems
Introduction to Embedded Systems
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming
 
AVR Micro controller Interfacing
AVR Micro controller Interfacing AVR Micro controller Interfacing
AVR Micro controller Interfacing
 
Embedded C - Day 2
Embedded C - Day 2Embedded C - Day 2
Embedded C - Day 2
 
Introduzione a Arduino
Introduzione a ArduinoIntroduzione a Arduino
Introduzione a Arduino
 

Viewers also liked

C Programming For Embedded Systems
C Programming For Embedded SystemsC Programming For Embedded Systems
C Programming For Embedded SystemsGanesh Samarthyam
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdpPradeep Kumar TS
 
8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C
Aman Sharma
 
Embedded C
Embedded CEmbedded C
Manufacturing Automation and Digitization
Manufacturing Automation and DigitizationManufacturing Automation and Digitization
Manufacturing Automation and Digitization
HCL Technologies
 
The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...
The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...
The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...
HCL Technologies
 
HCLT Brochure: Embedded Engineering
HCLT Brochure: Embedded EngineeringHCLT Brochure: Embedded Engineering
HCLT Brochure: Embedded Engineering
HCL Technologies
 
Embedded system - embedded system programming
Embedded system - embedded system programmingEmbedded system - embedded system programming
Embedded system - embedded system programming
Vibrant Technologies & Computers
 
C++ for Embedded Programming
C++ for Embedded ProgrammingC++ for Embedded Programming
C++ for Embedded Programming
Colin Walls
 
States & Capitals 111
States & Capitals 111States & Capitals 111
States & Capitals 111Bermanburgh
 
Embedded c programming
Embedded c programmingEmbedded c programming
Embedded c programming
PriyaDYP
 
C prog ppt
C prog pptC prog ppt
C prog ppt
xinoe
 
Module 05 Preprocessor and Macros in C
Module 05 Preprocessor and Macros in CModule 05 Preprocessor and Macros in C
Module 05 Preprocessor and Macros in C
Tushar B Kute
 
Innovation in Medical Devices – Embedded Blood Glucose Meter in Smartphones
Innovation in Medical Devices – Embedded Blood Glucose Meter in SmartphonesInnovation in Medical Devices – Embedded Blood Glucose Meter in Smartphones
Innovation in Medical Devices – Embedded Blood Glucose Meter in Smartphones
HCL Technologies
 
Embedded SW Interview Questions
Embedded SW Interview Questions Embedded SW Interview Questions
Embedded SW Interview Questions PiTechnologies
 
Standard embedded c
Standard embedded cStandard embedded c
Standard embedded cTam Thanh
 

Viewers also liked (20)

C Programming For Embedded Systems
C Programming For Embedded SystemsC Programming For Embedded Systems
C Programming For Embedded Systems
 
Embedded C
Embedded CEmbedded C
Embedded C
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdp
 
8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C
 
Embedded C
Embedded CEmbedded C
Embedded C
 
Manufacturing Automation and Digitization
Manufacturing Automation and DigitizationManufacturing Automation and Digitization
Manufacturing Automation and Digitization
 
The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...
The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...
The Internet of Things. Wharton Guest Lecture by Sandeep Kishore – Corporate ...
 
HCLT Brochure: Embedded Engineering
HCLT Brochure: Embedded EngineeringHCLT Brochure: Embedded Engineering
HCLT Brochure: Embedded Engineering
 
Embedded system - embedded system programming
Embedded system - embedded system programmingEmbedded system - embedded system programming
Embedded system - embedded system programming
 
C++ for Embedded Programming
C++ for Embedded ProgrammingC++ for Embedded Programming
C++ for Embedded Programming
 
States & Capitals 111
States & Capitals 111States & Capitals 111
States & Capitals 111
 
Embedded c programming
Embedded c programmingEmbedded c programming
Embedded c programming
 
C prog ppt
C prog pptC prog ppt
C prog ppt
 
Module 05 Preprocessor and Macros in C
Module 05 Preprocessor and Macros in CModule 05 Preprocessor and Macros in C
Module 05 Preprocessor and Macros in C
 
Innovation in Medical Devices – Embedded Blood Glucose Meter in Smartphones
Innovation in Medical Devices – Embedded Blood Glucose Meter in SmartphonesInnovation in Medical Devices – Embedded Blood Glucose Meter in Smartphones
Innovation in Medical Devices – Embedded Blood Glucose Meter in Smartphones
 
Embedded Technology
Embedded TechnologyEmbedded Technology
Embedded Technology
 
Embedded SW Interview Questions
Embedded SW Interview Questions Embedded SW Interview Questions
Embedded SW Interview Questions
 
Preprocessor
PreprocessorPreprocessor
Preprocessor
 
Standard embedded c
Standard embedded cStandard embedded c
Standard embedded c
 
pre processor directives in C
pre processor directives in Cpre processor directives in C
pre processor directives in C
 

Similar to Embedded C workshop

Fine line between performance and security
Fine line between performance and securityFine line between performance and security
Fine line between performance and security
Almudena Vivanco
 
Eclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersEclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for Microcontrollers
MicroEJ
 
Rodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementationRodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementation
Felipe Prado
 
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CIS 2015 How to secure the Internet of Things? Hannes TschofenigCIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CloudIDSummit
 
Introduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIntroduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIslam Samir
 
EMBEDDED_SYSTEM_INTRODUCTION.pdf
EMBEDDED_SYSTEM_INTRODUCTION.pdfEMBEDDED_SYSTEM_INTRODUCTION.pdf
EMBEDDED_SYSTEM_INTRODUCTION.pdf
NadiSarj2
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
Benjim Thomas Mathew
 
IJSRED-V2I2P57
IJSRED-V2I2P57IJSRED-V2I2P57
IJSRED-V2I2P57
IJSRED
 
Troubleshooting & Tools
Troubleshooting & ToolsTroubleshooting & Tools
Troubleshooting & Tools
Prabu U
 
Securing Firmware Updates [FOTA/OTA DFU]
Securing Firmware Updates [FOTA/OTA DFU]Securing Firmware Updates [FOTA/OTA DFU]
Securing Firmware Updates [FOTA/OTA DFU]
Vishal Aditya
 
Understanding and Protecting Ourselves from Buggy Device Drivers
Understanding and Protecting Ourselves from Buggy Device DriversUnderstanding and Protecting Ourselves from Buggy Device Drivers
Understanding and Protecting Ourselves from Buggy Device Drivers
Pradeeban Kathiravelu, Ph.D.
 
Embedded system
Embedded systemEmbedded system
Embedded system
Pankaj Upadhyay
 
Real Time Character Recognition on FPGA for Braille Devices
Real Time Character Recognition on FPGA for Braille DevicesReal Time Character Recognition on FPGA for Braille Devices
Real Time Character Recognition on FPGA for Braille Devices
IRJET Journal
 
Report on Advanced Robotics & Programming
Report on Advanced Robotics & ProgrammingReport on Advanced Robotics & Programming
Report on Advanced Robotics & Programming
Surya World - Institutions of Academic Excellence
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Editor IJARCET
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Editor IJARCET
 
Presentation on Embedded system using micro controller by PARAS JHA
Presentation on Embedded system using micro controller  by PARAS JHAPresentation on Embedded system using micro controller  by PARAS JHA
Presentation on Embedded system using micro controller by PARAS JHA
Paras Jha
 
IOT Exploitation
IOT Exploitation	IOT Exploitation
Zigbee enabled hotel menu ordering system
Zigbee enabled hotel menu ordering systemZigbee enabled hotel menu ordering system
Zigbee enabled hotel menu ordering system
Sidharth Mohapatra
 

Similar to Embedded C workshop (20)

embedded systems
embedded systemsembedded systems
embedded systems
 
Fine line between performance and security
Fine line between performance and securityFine line between performance and security
Fine line between performance and security
 
Eclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersEclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for Microcontrollers
 
Rodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementationRodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementation
 
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CIS 2015 How to secure the Internet of Things? Hannes TschofenigCIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
 
Introduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIntroduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and Microcontrollers
 
EMBEDDED_SYSTEM_INTRODUCTION.pdf
EMBEDDED_SYSTEM_INTRODUCTION.pdfEMBEDDED_SYSTEM_INTRODUCTION.pdf
EMBEDDED_SYSTEM_INTRODUCTION.pdf
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
IJSRED-V2I2P57
IJSRED-V2I2P57IJSRED-V2I2P57
IJSRED-V2I2P57
 
Troubleshooting & Tools
Troubleshooting & ToolsTroubleshooting & Tools
Troubleshooting & Tools
 
Securing Firmware Updates [FOTA/OTA DFU]
Securing Firmware Updates [FOTA/OTA DFU]Securing Firmware Updates [FOTA/OTA DFU]
Securing Firmware Updates [FOTA/OTA DFU]
 
Understanding and Protecting Ourselves from Buggy Device Drivers
Understanding and Protecting Ourselves from Buggy Device DriversUnderstanding and Protecting Ourselves from Buggy Device Drivers
Understanding and Protecting Ourselves from Buggy Device Drivers
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Real Time Character Recognition on FPGA for Braille Devices
Real Time Character Recognition on FPGA for Braille DevicesReal Time Character Recognition on FPGA for Braille Devices
Real Time Character Recognition on FPGA for Braille Devices
 
Report on Advanced Robotics & Programming
Report on Advanced Robotics & ProgrammingReport on Advanced Robotics & Programming
Report on Advanced Robotics & Programming
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397
 
Presentation on Embedded system using micro controller by PARAS JHA
Presentation on Embedded system using micro controller  by PARAS JHAPresentation on Embedded system using micro controller  by PARAS JHA
Presentation on Embedded system using micro controller by PARAS JHA
 
IOT Exploitation
IOT Exploitation	IOT Exploitation
IOT Exploitation
 
Zigbee enabled hotel menu ordering system
Zigbee enabled hotel menu ordering systemZigbee enabled hotel menu ordering system
Zigbee enabled hotel menu ordering system
 

Recently uploaded

Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 

Recently uploaded (20)

Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 

Embedded C workshop

  • 2. Introduction ? o Introduction to Embedded C. o Embedded Software Architecture. o Memory usage. o Embedded Development Environment. o Interrupts. o Keywords. o Some Embedded Systems concepts. By: Mostafa El-koumy
  • 3. INTRODUCTION  Embedded Systems is all things around you which have something called electronic brain to make some sort of artificial intelligence.  Embedded C is a prober subset of C language suitable for Embedded systems, it defines only a new concept of writing software.  Using Embedded C, we should handle everything used in the program like Memory Management, HW Registers, interrupts, …. Etc. By: Mostafa El-koumy
  • 4. MISRA RULES  Motor Industry Software Reliability Association.  Collaboration between engineering consultancies which seeks to promote best practice in developing Automotive Systems and other embedded systems.  To this end MISRA publishes documents that provide accessible information for engineers and management, and holds events to permit the exchange of experiences between practitioners.  URL : www.misra.org.uk  EX: By: Mostafa El-koumy
  • 6. EMBEDDED SOFTWARE ARCHITECTURE (CON’T) By: Mostafa El-koumy
  • 7. CODE FLOW  All the code is running within infinite loop in main except:  Initialization code.  Interrupt handlers, interrupt service routines (ISR).  The other code runs normally int main (void) { intitializeModule(); sei(); while(1){ startApplication(); } return 0; } By: Mostafa El-koumy
  • 8. BACKGROUND/FOREGROUND TASKS (LOW COST) By: Mostafa El-koumy
  • 9. SOFTWARE MODELING Function C file Module Project C file(s) H file(s) SW module Uart.c Uart.h Uart_irq.c Uart_cfg.h
  • 10. MEMORY USAGE BY LINKER SCRIPT  The HW Registers  Stack space that grow down  Local variables  Functions return address  Heap Space that grow up  Zero default initialized variables  Initialized with value by developer By: Mostafa El-koumy I/O Addresses Stack (grow down) Heap (Grow up) Un-initialized data (.BSS) Initialized data
  • 11. DEVELOPMENT ENVIRONMENT  IDE which has  Text editor.  Cross compiler produce machine language By: Mostafa El-koumy
  • 12. DEVELOPMENT ENVIRONMENT  Development Kit By: Mostafa El-koumy
  • 13. DEVELOPMENT ENVIRONMENT  In circuit Debugger (ICD)  HW device connects to the microprocessor using JTAG/SWD interface to support external control of the microprocessor using debugger.  Restrictions of debugging capabilities is specified by the microprocessor. By: Mostafa El-koumy
  • 14. DEVELOPMENT ENVIRONMENT  In circuit Emulator (ICE)  HW device used to debug embedded SW. it replaces the microprocessor with control over all the aspects of it and it usually emulate all the microprocessor family. By: Mostafa El-koumy
  • 17. INTERRUPTS  an interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention. An interrupt alerts the processor to a high-priority condition requiring the interruption of the current code the processor is executing.  Interrupt sources  Internal peripherals.  External interrupts.  SW interrupts.  Exception thrown by processors. By: Mostafa El-koumy
  • 18. INTERACTIVE QUESTIONS  Mask able interrupt?  Non-Mask able interrupts?  Level triggered external interrupt?  Edge triggered external interrupt?  Interrupt nesting? By: Mostafa El-koumy
  • 19. INTERRUPT TIMING  Interrupt latency?  Context?  Interrupt response?  Interrupt recovery? By: Mostafa El-koumy
  • 20. EMBEDDED KEYWORDS (INTERACTIVE)  Scope and life time with keywords:  Static local  Static global  Volatile  Const  Extern  register By: Mostafa El-koumy
  • 21. FUNCTIONS VS MACROS  Macros in completely text replacement so it increase the code size and duplications.  Function is preferred. By: Mostafa El-koumy
  • 22. MACROS VS INLINE FUNCTIONS  In Inline functions Compiler substitute the function call by function code like MACROS.  MACROS is supported by preprocessor so all the IDEs supports it.  Inline is supported by some compilers.  Inline function performs type checking but MACROs not.  Inline function could be traced but MACROs not.  Some compiler disable inline function when the its code is large.
  • 24. Thank you for your attention! Any Questions? By: Mostafa El-koumy
  • 25. CONTACT DETAILS  Mostafa El-koumy  Embedded SW Developer  mostafa.elkoumy@gmail.com