SlideShare a Scribd company logo
Embedded Firmware
• responsible for controlling the various
peripherals of the embedded hardware
• stored in a permanent memory (ROM)
Designing Embedded firmware
• requires understanding of the particular embedded
product hardware,
• like various component interfacing,
• memory map details,
• I/O port details,
• configuration and register details of various
hardware chips used and
• some programming language (either low level
Assembly Language or High level language like
C/C++ or a combination of the two)
There exist two basic approaches for the design
and implementation of embedded firmware,
namely;
The Super loop based approach
The Embedded Operating System based
approach
The decision on which approach needs to be
adopted for firmware development is purely
dependent on the complexity and system
requirements
Embedded firmware Design Approaches – The Super
loop
Suitable for applications that are not time critical
Very similar to a conventional procedural programming where the
code is executed task by task
The tasks are executed in a never ending loop.
A typical super loop implementation will look like:
1. Configure the common parameters and perform initialization
for various hardware components memory, registers etc.
2. Start the first task and execute it
3. Execute the second task
4. Execute the next task
5. :
6. :
7. Execute the last defined task
8. Jump back to the first task and follow the same flow
void main ()
{
Configurations ();
Initializations ();
While (1)
{
Task 1 ();
Task 2 ();
//:
//:
Task n ();
}
}
The only way to come out of this loop is either hardware reset or
an interrupt assertion
Embedded firmware Design Approaches – Embedded
OS based Approach
The embedded device contains an Embedded Operating
System which can be one of:
• A Real Time Operating System (RTOS)
• A Customized General Purpose Operating System
(GPOS)
• The Embedded OS is responsible for scheduling the
execution of user tasks and the allocation of system
resources among multiple tasks
• Involves lot of OS related overheads apart from
managing and executing user defined tasks
Microsoft® Windows XP Embedded is an
example of GPOS for embedded devices
Point of Sale (PoS) terminals, Gaming Stations,
Tablet PCs etc are examples of embedded devices
running on embedded GPOSs
‘Windows CE’, ‘Windows Mobile’,‘QNX’,
‘VxWorks’, ‘ThreadX’, ‘MicroC/OS-II’,
‘Embedded Linux’, ‘Symbian’ etc are examples of
RTOSs employed in Embedded Product
development
Mobile Phones, PDAs, Flight Control Systems etc
are examples of embedded devices that runs on
RTOSs
Embedded firmware Development Languages/Options
Assembly Language
High Level Language
Subset of C (Embedded C)
Subset of C++ (Embedded C++)
Any other high level language with supported Cross-
compiler
Mix of Assembly & High level Language
Mixing High Level Language (Like C) with Assembly Code
Mixing Assembly code with High Level Language (Like C)
Inline Assembly
Embedded firmware Development Languages/Options
– Assembly Language
Assembly Language’ is the human readable notation of
‘machine language’
‘machine language’ is a processor understandable
language
Machine language is a binary representation and it
consists of 1s and 0s
• Assembly language programming is the process of
writing processor specific machine code in mnemonic
form, converting the mnemonics into actual
processor instructions (machine language) and
associated data using an assembler
The general format of an assembly language
instruction is an Opcode followed by Operands
The Opcode tells the processor/controller what to
do and the
Operands provide the data and information
required to perform the action specified by the
opcode
Each line of an assembly language program is
split into four fields as:
LABEL OPCODE OPERAND COMMENTS
;####################################################################
; SUBROUTINE FOR GENERATING DELAY
; DELAY PARAMETR PASSED THROUGH REGISTER R1
; RETURN VALUE NONE
; REGISTERS USED: R0, R1
;####################################################################
DELAY: MOV R0, #255 ; Load Register R0 with 255
DJNZ R1, DELAY ; Decrement R1 and loop till R1= 0
RET ; Return to calling program
• The Assembly language program written in assembly code is
saved as .asm (Assembly file) file or a .src (source) file or a
format supported by the assembler
• The software utility called ‘Assembler’ performs the translation
of assembly code to machine code
• Assembling of each source file generates a corresponding object
file. The object file does not contain the absolute address of where
the generated code needs to be placed (a re-locatable code) on the
program memory
• The software program called linker/locater is responsible for
assigning absolute address to object files during the linking
process
• A software utility called ‘Object to Hex file converter’ translates
the absolute object file to corresponding hex file (binary file)
Embedded firmware Development Languages/Options – Assembly Language –
Source File to Hex File Translation
Assembly language to machine language Conversion process
Embedded firmware Development Languages/Options – High
Level Language
• The embedded firmware is written in any high level
language like C, C++
• A software utility called ‘cross-compiler’ converts the
high level language to target processor specific machine
code
• The cross-compilation of each module generates a
corresponding object file. The object file does not contain
the absolute address of where the generated code needs to
be placed (a re-locatable code) on the program memory
• The software program called linker/locater is responsible
for assigning absolute address to object files during the
linking process
• A software utility called ‘Object to Hex file converter’
translates the absolute object file to corresponding hex file
(binary file)
Embedded firmware Development Languages/Options – High Level Language –
Source File to Hex File Translation
Source File 1
(.c /.c++ etc)
(Module-1)
Module
Cross-compiler
Source File 2
(.c /.c++ etc)
(Module-2)
Module
Cross-compiler
Object File 1
Object File 2
Library Files
Linker/
Locator
Absolute Object File
Object to Hex File
Converter
Machine Code
(Hex File)
High level language to machine language conversion process
Embedded firmware Development Languages/Options –
Mixing of Assembly Language with High Level Language
Certain situations in Embedded firmware development may require the
mixing of Assembly Language with high level language or vice versa.
Interrupt handling, Source code is already available in high level language
Assembly Language etc are examples
High Level language and low level language can be mixed in three different
ways
Mixing Assembly Language with High level language like ‘C’
Mixing High level language like ‘C’ with Assembly Language
In line Assembly
The passing of parameters and return values between the high level and
low level language is cross-compiler specific
High Level Language – ‘C’ V/s
Embedded C
Embedded C can be considered as a subset of conventional ‘C’
language
Embedded C supports all ‘C’ instructions and incorporates a few
target processor specific functions/instructions
The standard ANSI ‘C’ library implementation is always tailored to
the target processor/controller library files in Embedded C
The implementation of target processor/controller specific
functions/instructions depends upon the processor/controller as well
as the supported cross-compiler for the particular Embedded C
language
A software program called ‘Cross-compiler’ is used for the
conversion of programs written in Embedded C to target
processor/controller specific instructions
High Level Language Based Development – ‘Compiler’ V/s
‘Cross-Compiler’
 Compiler is a software tool that converts a source code written in a high level language on top
of a particular operating system running on a specific target processor architecture (E.g. Intel
x86/Pentium).
 The operating system, the compiler program and the application making use of the source
code run on the same target processor.
 The source code is converted to the target processor specific machine instructions
 A native compiler generates machine code for the same machine (processor) on which it is
running.
 Cross compiler is the software tools used in cross-platform development applications
 In cross-platform development, the compiler running on a particular target processor/OS
converts the source code to machine code for a target processor whose architecture and
instruction set is different from the processor on which the compiler is running or for an
operating system which is different from the current development environment OS
 Embedded system development is a typical example for cross-platform development where
embedded firmware is developed on a machine with Intel/AMD or any other target processors
and the same is converted into machine code for any other target processor architecture (E.g.
8051, PIC, ARM9 etc).
 Keil C51compiler from Keil software is an example for cross-compiler for 8051 family
architecture
Programming in Embedded C
Module-3 embedded system firmware code.ppt
Module-3 embedded system firmware code.ppt
Module-3 embedded system firmware code.ppt
Module-3 embedded system firmware code.ppt
Module-3 embedded system firmware code.ppt
THANK YOU

More Related Content

Similar to Module-3 embedded system firmware code.ppt (20)

PPT
Compilers programmingembedded
Manish Pandey
 
PDF
embeddedsystems-100429081552-phpapp01.pdf
Ashwin180668
 
PPTX
Ppt on embedded system
Pankaj joshi
 
PPTX
T3_Embedded programing_07072022T3_Embedded programing_07072022.pptx
HuyTrn352093
 
PPT
Introductiojwjwwkwkwjejjejsjsjsjsjsjsjn.ppt
JayPatil347597
 
PPTX
Embedded Programming..pnsnsjsejejwwjjwptx
JayPatil347597
 
PPTX
Embedded system
Vinod Srivastava
 
PPTX
Lecture 1 Introduction.pptx
Orchestra2
 
PDF
C programming session9 -
Keroles karam khalil
 
PDF
Embedded Firmware Design and Development, and EDLC
JuliaAndrews11
 
PPT
Embedded systems
PROVAB TECHNOSOFT PVT. LTD.
 
PPT
E.s unit 6
Sneha Chopra
 
PPTX
lecture03_EmbeddedSoftware for Beginners
MahmoudElsamanty
 
PPT
Embedded _c_
Moorthy Peesapati
 
PPT
embededsystemfinal1-170130182030 (1).ppt
kimavathmukeshnaik
 
PPTX
EE8691 – EMBEDDED SYSTEMS.pptx
RockFellerSinghRusse
 
DOCX
Embedded software
Aravind Manu
 
PPTX
Embedded C.pptx
MusthafaKadersha
 
PPTX
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
Arti Parab Academics
 
PPTX
Introduction to Embedded Systems
Sandeep Reddy
 
Compilers programmingembedded
Manish Pandey
 
embeddedsystems-100429081552-phpapp01.pdf
Ashwin180668
 
Ppt on embedded system
Pankaj joshi
 
T3_Embedded programing_07072022T3_Embedded programing_07072022.pptx
HuyTrn352093
 
Introductiojwjwwkwkwjejjejsjsjsjsjsjsjn.ppt
JayPatil347597
 
Embedded Programming..pnsnsjsejejwwjjwptx
JayPatil347597
 
Embedded system
Vinod Srivastava
 
Lecture 1 Introduction.pptx
Orchestra2
 
C programming session9 -
Keroles karam khalil
 
Embedded Firmware Design and Development, and EDLC
JuliaAndrews11
 
Embedded systems
PROVAB TECHNOSOFT PVT. LTD.
 
E.s unit 6
Sneha Chopra
 
lecture03_EmbeddedSoftware for Beginners
MahmoudElsamanty
 
Embedded _c_
Moorthy Peesapati
 
embededsystemfinal1-170130182030 (1).ppt
kimavathmukeshnaik
 
EE8691 – EMBEDDED SYSTEMS.pptx
RockFellerSinghRusse
 
Embedded software
Aravind Manu
 
Embedded C.pptx
MusthafaKadersha
 
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
Arti Parab Academics
 
Introduction to Embedded Systems
Sandeep Reddy
 

More from BEVARAVASUDEVAAP1813 (20)

PPTX
Tasks, functions and User Defined Programss.pptx
BEVARAVASUDEVAAP1813
 
PPTX
Workshop Outline ppt on UVM using sv.pptx
BEVARAVASUDEVAAP1813
 
PDF
Basic electrical properties of MOSFET circuits.pdf
BEVARAVASUDEVAAP1813
 
PDF
introduction and basic electrical properties.pdf
BEVARAVASUDEVAAP1813
 
PPTX
hardware security security-210714143458.pptx
BEVARAVASUDEVAAP1813
 
PPT
FPGA and ASIC technologies comparison.ppt
BEVARAVASUDEVAAP1813
 
PPT
Introduction of Basic Input Output System.ppt
BEVARAVASUDEVAAP1813
 
PPTX
Design your carrier in VLSI and chip design.pptx
BEVARAVASUDEVAAP1813
 
PPTX
ASIC design flow and Stracuture of FPGA.pptx
BEVARAVASUDEVAAP1813
 
PPTX
Module-4 Embedded target boards and interfacing.pptx
BEVARAVASUDEVAAP1813
 
PPTX
vlsitestingtechniquesand asic flow1.pptx
BEVARAVASUDEVAAP1813
 
PPTX
different sensors used in embedded system.pptx
BEVARAVASUDEVAAP1813
 
PPTX
Module-3 Basic digital and analog circuits.pptx
BEVARAVASUDEVAAP1813
 
PPTX
embedded system on board communication.pptx
BEVARAVASUDEVAAP1813
 
PPTX
introductiontoarduino-130219180141-phpapp01.pptx
BEVARAVASUDEVAAP1813
 
PPT
SEng522Seminar hardware/software codesign.ppt
BEVARAVASUDEVAAP1813
 
PPTX
metastabilityusbdh-13259131170927-phpapp01-120106233309-phpapp01.pptx
BEVARAVASUDEVAAP1813
 
PPT
Dynamic CMOS and Domino logic design .ppt
BEVARAVASUDEVAAP1813
 
PPT
Module-3 Embedded syatem firmware design.ppt
BEVARAVASUDEVAAP1813
 
PDF
ICTBIG 2024 conference on VLSI and ES.pdf
BEVARAVASUDEVAAP1813
 
Tasks, functions and User Defined Programss.pptx
BEVARAVASUDEVAAP1813
 
Workshop Outline ppt on UVM using sv.pptx
BEVARAVASUDEVAAP1813
 
Basic electrical properties of MOSFET circuits.pdf
BEVARAVASUDEVAAP1813
 
introduction and basic electrical properties.pdf
BEVARAVASUDEVAAP1813
 
hardware security security-210714143458.pptx
BEVARAVASUDEVAAP1813
 
FPGA and ASIC technologies comparison.ppt
BEVARAVASUDEVAAP1813
 
Introduction of Basic Input Output System.ppt
BEVARAVASUDEVAAP1813
 
Design your carrier in VLSI and chip design.pptx
BEVARAVASUDEVAAP1813
 
ASIC design flow and Stracuture of FPGA.pptx
BEVARAVASUDEVAAP1813
 
Module-4 Embedded target boards and interfacing.pptx
BEVARAVASUDEVAAP1813
 
vlsitestingtechniquesand asic flow1.pptx
BEVARAVASUDEVAAP1813
 
different sensors used in embedded system.pptx
BEVARAVASUDEVAAP1813
 
Module-3 Basic digital and analog circuits.pptx
BEVARAVASUDEVAAP1813
 
embedded system on board communication.pptx
BEVARAVASUDEVAAP1813
 
introductiontoarduino-130219180141-phpapp01.pptx
BEVARAVASUDEVAAP1813
 
SEng522Seminar hardware/software codesign.ppt
BEVARAVASUDEVAAP1813
 
metastabilityusbdh-13259131170927-phpapp01-120106233309-phpapp01.pptx
BEVARAVASUDEVAAP1813
 
Dynamic CMOS and Domino logic design .ppt
BEVARAVASUDEVAAP1813
 
Module-3 Embedded syatem firmware design.ppt
BEVARAVASUDEVAAP1813
 
ICTBIG 2024 conference on VLSI and ES.pdf
BEVARAVASUDEVAAP1813
 
Ad

Recently uploaded (20)

PPTX
MODULE 04 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PPTX
Distribution reservoir and service storage pptx
dhanashree78
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PDF
Digital water marking system project report
Kamal Acharya
 
PPTX
澳洲电子毕业证澳大利亚圣母大学水印成绩单UNDA学生证网上可查学历
Taqyea
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PDF
AN EMPIRICAL STUDY ON THE USAGE OF SOCIAL MEDIA IN GERMAN B2C-ONLINE STORES
ijait
 
PDF
mbse_An_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PPTX
OCS353 DATA SCIENCE FUNDAMENTALS- Unit 1 Introduction to Data Science
A R SIVANESH M.E., (Ph.D)
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
PPTX
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
PPTX
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
PDF
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
MODULE 04 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
Distribution reservoir and service storage pptx
dhanashree78
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Digital water marking system project report
Kamal Acharya
 
澳洲电子毕业证澳大利亚圣母大学水印成绩单UNDA学生证网上可查学历
Taqyea
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Design Thinking basics for Engineers.pdf
CMR University
 
AN EMPIRICAL STUDY ON THE USAGE OF SOCIAL MEDIA IN GERMAN B2C-ONLINE STORES
ijait
 
mbse_An_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
OCS353 DATA SCIENCE FUNDAMENTALS- Unit 1 Introduction to Data Science
A R SIVANESH M.E., (Ph.D)
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
Ad

Module-3 embedded system firmware code.ppt

  • 2. • responsible for controlling the various peripherals of the embedded hardware • stored in a permanent memory (ROM)
  • 3. Designing Embedded firmware • requires understanding of the particular embedded product hardware, • like various component interfacing, • memory map details, • I/O port details, • configuration and register details of various hardware chips used and • some programming language (either low level Assembly Language or High level language like C/C++ or a combination of the two)
  • 4. There exist two basic approaches for the design and implementation of embedded firmware, namely; The Super loop based approach The Embedded Operating System based approach The decision on which approach needs to be adopted for firmware development is purely dependent on the complexity and system requirements
  • 5. Embedded firmware Design Approaches – The Super loop Suitable for applications that are not time critical Very similar to a conventional procedural programming where the code is executed task by task The tasks are executed in a never ending loop. A typical super loop implementation will look like: 1. Configure the common parameters and perform initialization for various hardware components memory, registers etc. 2. Start the first task and execute it 3. Execute the second task 4. Execute the next task 5. : 6. : 7. Execute the last defined task 8. Jump back to the first task and follow the same flow
  • 6. void main () { Configurations (); Initializations (); While (1) { Task 1 (); Task 2 (); //: //: Task n (); } } The only way to come out of this loop is either hardware reset or an interrupt assertion
  • 7. Embedded firmware Design Approaches – Embedded OS based Approach The embedded device contains an Embedded Operating System which can be one of: • A Real Time Operating System (RTOS) • A Customized General Purpose Operating System (GPOS) • The Embedded OS is responsible for scheduling the execution of user tasks and the allocation of system resources among multiple tasks • Involves lot of OS related overheads apart from managing and executing user defined tasks
  • 8. Microsoft® Windows XP Embedded is an example of GPOS for embedded devices Point of Sale (PoS) terminals, Gaming Stations, Tablet PCs etc are examples of embedded devices running on embedded GPOSs ‘Windows CE’, ‘Windows Mobile’,‘QNX’, ‘VxWorks’, ‘ThreadX’, ‘MicroC/OS-II’, ‘Embedded Linux’, ‘Symbian’ etc are examples of RTOSs employed in Embedded Product development Mobile Phones, PDAs, Flight Control Systems etc are examples of embedded devices that runs on RTOSs
  • 9. Embedded firmware Development Languages/Options Assembly Language High Level Language Subset of C (Embedded C) Subset of C++ (Embedded C++) Any other high level language with supported Cross- compiler Mix of Assembly & High level Language Mixing High Level Language (Like C) with Assembly Code Mixing Assembly code with High Level Language (Like C) Inline Assembly
  • 10. Embedded firmware Development Languages/Options – Assembly Language Assembly Language’ is the human readable notation of ‘machine language’ ‘machine language’ is a processor understandable language Machine language is a binary representation and it consists of 1s and 0s • Assembly language programming is the process of writing processor specific machine code in mnemonic form, converting the mnemonics into actual processor instructions (machine language) and associated data using an assembler
  • 11. The general format of an assembly language instruction is an Opcode followed by Operands The Opcode tells the processor/controller what to do and the Operands provide the data and information required to perform the action specified by the opcode Each line of an assembly language program is split into four fields as: LABEL OPCODE OPERAND COMMENTS
  • 12. ;#################################################################### ; SUBROUTINE FOR GENERATING DELAY ; DELAY PARAMETR PASSED THROUGH REGISTER R1 ; RETURN VALUE NONE ; REGISTERS USED: R0, R1 ;#################################################################### DELAY: MOV R0, #255 ; Load Register R0 with 255 DJNZ R1, DELAY ; Decrement R1 and loop till R1= 0 RET ; Return to calling program
  • 13. • The Assembly language program written in assembly code is saved as .asm (Assembly file) file or a .src (source) file or a format supported by the assembler • The software utility called ‘Assembler’ performs the translation of assembly code to machine code • Assembling of each source file generates a corresponding object file. The object file does not contain the absolute address of where the generated code needs to be placed (a re-locatable code) on the program memory • The software program called linker/locater is responsible for assigning absolute address to object files during the linking process • A software utility called ‘Object to Hex file converter’ translates the absolute object file to corresponding hex file (binary file)
  • 14. Embedded firmware Development Languages/Options – Assembly Language – Source File to Hex File Translation Assembly language to machine language Conversion process
  • 15. Embedded firmware Development Languages/Options – High Level Language • The embedded firmware is written in any high level language like C, C++ • A software utility called ‘cross-compiler’ converts the high level language to target processor specific machine code • The cross-compilation of each module generates a corresponding object file. The object file does not contain the absolute address of where the generated code needs to be placed (a re-locatable code) on the program memory • The software program called linker/locater is responsible for assigning absolute address to object files during the linking process • A software utility called ‘Object to Hex file converter’ translates the absolute object file to corresponding hex file (binary file)
  • 16. Embedded firmware Development Languages/Options – High Level Language – Source File to Hex File Translation Source File 1 (.c /.c++ etc) (Module-1) Module Cross-compiler Source File 2 (.c /.c++ etc) (Module-2) Module Cross-compiler Object File 1 Object File 2 Library Files Linker/ Locator Absolute Object File Object to Hex File Converter Machine Code (Hex File) High level language to machine language conversion process
  • 17. Embedded firmware Development Languages/Options – Mixing of Assembly Language with High Level Language Certain situations in Embedded firmware development may require the mixing of Assembly Language with high level language or vice versa. Interrupt handling, Source code is already available in high level language Assembly Language etc are examples High Level language and low level language can be mixed in three different ways Mixing Assembly Language with High level language like ‘C’ Mixing High level language like ‘C’ with Assembly Language In line Assembly The passing of parameters and return values between the high level and low level language is cross-compiler specific
  • 18. High Level Language – ‘C’ V/s Embedded C Embedded C can be considered as a subset of conventional ‘C’ language Embedded C supports all ‘C’ instructions and incorporates a few target processor specific functions/instructions The standard ANSI ‘C’ library implementation is always tailored to the target processor/controller library files in Embedded C The implementation of target processor/controller specific functions/instructions depends upon the processor/controller as well as the supported cross-compiler for the particular Embedded C language A software program called ‘Cross-compiler’ is used for the conversion of programs written in Embedded C to target processor/controller specific instructions
  • 19. High Level Language Based Development – ‘Compiler’ V/s ‘Cross-Compiler’  Compiler is a software tool that converts a source code written in a high level language on top of a particular operating system running on a specific target processor architecture (E.g. Intel x86/Pentium).  The operating system, the compiler program and the application making use of the source code run on the same target processor.  The source code is converted to the target processor specific machine instructions  A native compiler generates machine code for the same machine (processor) on which it is running.  Cross compiler is the software tools used in cross-platform development applications  In cross-platform development, the compiler running on a particular target processor/OS converts the source code to machine code for a target processor whose architecture and instruction set is different from the processor on which the compiler is running or for an operating system which is different from the current development environment OS  Embedded system development is a typical example for cross-platform development where embedded firmware is developed on a machine with Intel/AMD or any other target processors and the same is converted into machine code for any other target processor architecture (E.g. 8051, PIC, ARM9 etc).  Keil C51compiler from Keil software is an example for cross-compiler for 8051 family architecture