The document discusses various tools and peripherals used in embedded systems development. It describes compilers which translate high-level code to machine code, cross-compilers which target different systems, and decompilers which translate in the reverse direction. It also covers assemblers, simulators for testing code, microcontroller starter kits, emulators, and debugging tools. Finally, it lists various peripherals used in embedded systems and criteria for choosing microcontrollers.
A Critique of the Proposed National Education Policy Reform
Β
Embedded Systems Tools & Debugging
1. Embedded Systems - Tools & Peripherals
Embedded Systems - Tools & Peripherals
Compilers and Assemblers
Compilers and Assemblers
Compiler
Compiler
A compiler is a computer program (or a set of programs) that transforms the source code written in a
A compiler is a computer program (or a set of programs) that transforms the source code written in a
programming language (the source language) into another computer language (normally binary format).
programming language (the source language) into another computer language (normally binary format).
The most common reason for conversion is to create an executable program. The name "compiler" is
The most common reason for conversion is to create an executable program. The name "compiler" is
primarily used for programs that translate the source code from a highlevel programming language to a
primarily used for programs that translate the source code from a highlevel programming language to a
low-level language (e.g., assembly language or machine code).
low-level language (e.g., assembly language or machine code).
Cross-Compiler
Cross-Compiler
If the compiled program can run on a computer having different CPU or operating system than the
If the compiled program can run on a computer having different CPU or operating system than the
computer on which the compiler compiled the program, then that compiler is known as a cross-compiler.
computer on which the compiler compiled the program, then that compiler is known as a cross-compiler.
Decompiler
Decompiler
A program that can translate a program from a low-level language to a high-level language is called a
A program that can translate a program from a low-level language to a high-level language is called a
decompiler.
decompiler.
Language Converter
Language Converter
A program that translates programs written in different high-level languages is normally called a language
A program that translates programs written in different high-level languages is normally called a language
translator, source to source translator, or language converter.
translator, source to source translator, or language converter.
A compiler is likely to perform the following operations β
A compiler is likely to perform the following operations β
Preprocessing
Preprocessing
Parsing
Parsing
Semantic Analysis (Syntax-directed translation)
Semantic Analysis (Syntax-directed translation)
Code generation
Code generation
Code optimization
Code optimization
Assemblers
Assemblers
An assembler is a program that takes basic computer instructions (called as assembly language) and
An assembler is a program that takes basic computer instructions (called as assembly language) and
converts them into a pattern of bits that the computer's processor can use to perform its basic operations.
converts them into a pattern of bits that the computer's processor can use to perform its basic operations.
An assembler creates object code by translating assembly instruction mnemonics into opcodes, resolving
An assembler creates object code by translating assembly instruction mnemonics into opcodes, resolving
symbolic names to memory locations. Assembly language uses a mnemonic to represent each low-level
symbolic names to memory locations. Assembly language uses a mnemonic to represent each low-level
machine operation (opcode).
machine operation (opcode).
Debugging Tools in an Embedded System
Debugging Tools in an Embedded System
2. Debugging is a methodical process to find and reduce the number of bugs in a computer program or a
Debugging is a methodical process to find and reduce the number of bugs in a computer program or a
piece of electronic hardware, so that it works as expected. Debugging is difficult when subsystems are
piece of electronic hardware, so that it works as expected. Debugging is difficult when subsystems are
tightly coupled, because a small change in one subsystem can create bugs in another. The debugging
tightly coupled, because a small change in one subsystem can create bugs in another. The debugging
tools used in embedded systems differ greatly in terms of their development time and debugging features.
tools used in embedded systems differ greatly in terms of their development time and debugging features.
We will discuss here the following debugging tools β
We will discuss here the following debugging tools β
Simulators
Simulators
Microcontroller starter kits
Microcontroller starter kits
Emulator
Emulator
Simulators
Simulators
Code is tested for the MCU / system by simulating it on the host computer used for code development.
Code is tested for the MCU / system by simulating it on the host computer used for code development.
Simulators try to model the behavior of the complete microcontroller in software.
Simulators try to model the behavior of the complete microcontroller in software.
Functions of Simulators
Functions of Simulators
A simulator performs the following functions β
A simulator performs the following functions β
Defines the processor or processing device family as well as its various versions for the target
Defines the processor or processing device family as well as its various versions for the target
system.
system.
Monitors the detailed information of a source code part with labels and symbolic arguments as
Monitors the detailed information of a source code part with labels and symbolic arguments as
the execution goes on for each single step.
the execution goes on for each single step.
Provides the status of RAM and simulated ports of the target system for each single step
Provides the status of RAM and simulated ports of the target system for each single step
execution.
execution.
Monitors system response and determines throughput.
Monitors system response and determines throughput.
Provides trace of the output of contents of program counter versus the processor registers.
Provides trace of the output of contents of program counter versus the processor registers.
Provides the detailed meaning of the present command.
Provides the detailed meaning of the present command.
Monitors the detailed information of the simulator commands as these are entered from the
Monitors the detailed information of the simulator commands as these are entered from the
keyboard or selected from the menu.
keyboard or selected from the menu.
Supports the conditions (up to 8 or 16 or 32 conditions) and unconditional breakpoints.
Supports the conditions (up to 8 or 16 or 32 conditions) and unconditional breakpoints.
Provides breakpoints and the trace which are together the important testing and debugging tool.
Provides breakpoints and the trace which are together the important testing and debugging tool.
Facilitates synchronizing the internal peripherals and delays.
Facilitates synchronizing the internal peripherals and delays.
Microcontroller Starter Kit
Microcontroller Starter Kit
A microcontroller starter kit consists of β
A microcontroller starter kit consists of β
Hardware board (Evaluation board)
Hardware board (Evaluation board)
In-system programmer
In-system programmer
Some software tools like compiler, assembler, linker, etc.
Some software tools like compiler, assembler, linker, etc.
Sometimes, an IDE and code size limited evaluation version of a compiler.
Sometimes, an IDE and code size limited evaluation version of a compiler.
3. A big advantage of these kits over simulators is that they work in real-time and thus allow for easy
A big advantage of these kits over simulators is that they work in real-time and thus allow for easy
input/output functionality verification. Starter kits, however, are completely sufficient and the cheapest
input/output functionality verification. Starter kits, however, are completely sufficient and the cheapest
option to develop simple microcontroller projects.
option to develop simple microcontroller projects.
Emulators
Emulators
An emulator is a hardware kit or a software program or can be both which emulates the functions of one
An emulator is a hardware kit or a software program or can be both which emulates the functions of one
computer system (the guest) in another computer system (the host), different from the first one, so that
computer system (the guest) in another computer system (the host), different from the first one, so that
the emulated behavior closely resembles the behavior of the real system (the guest).
the emulated behavior closely resembles the behavior of the real system (the guest).
Emulation refers to the ability of a computer program in an electronic device to emulate (imitate) another
Emulation refers to the ability of a computer program in an electronic device to emulate (imitate) another
program or device. Emulation focuses on recreating an original computer environment. Emulators have
program or device. Emulation focuses on recreating an original computer environment. Emulators have
the ability to maintain a closer connection to the authenticity of the digital object. An emulator helps the
the ability to maintain a closer connection to the authenticity of the digital object. An emulator helps the
user to work on any kind of application or operating system on a platform in a similar way as the software
user to work on any kind of application or operating system on a platform in a similar way as the software
runs as in its original environment.
runs as in its original environment.
Peripheral Devices in Embedded Systems
Peripheral Devices in Embedded Systems
Embedded systems communicate with the outside world via their peripherals, such as following &mins;
Embedded systems communicate with the outside world via their peripherals, such as following &mins;
Serial Communication Interfaces (SCI) like RS-232, RS-422, RS-485, etc.
Serial Communication Interfaces (SCI) like RS-232, RS-422, RS-485, etc.
Synchronous Serial Communication Interface like I2C, SPI, SSC, and ESSI
Synchronous Serial Communication Interface like I2C, SPI, SSC, and ESSI
Universal Serial Bus (USB)
Universal Serial Bus (USB)
Multi Media Cards (SD Cards, Compact Flash, etc.)
Multi Media Cards (SD Cards, Compact Flash, etc.)
Networks like Ethernet, LonWorks, etc.
Networks like Ethernet, LonWorks, etc.
Fieldbuses like CAN-Bus, LIN-Bus, PROFIBUS, etc.
Fieldbuses like CAN-Bus, LIN-Bus, PROFIBUS, etc.
imers like PLL(s), Capture/Compare and Time Processing Units.
imers like PLL(s), Capture/Compare and Time Processing Units.
Discrete IO aka General Purpose Input/Output (GPIO)
Discrete IO aka General Purpose Input/Output (GPIO)
Analog to Digital/Digital to Analog (ADC/DAC)
Analog to Digital/Digital to Analog (ADC/DAC)
Debugging like JTAG, ISP, ICSP, BDM Port, BITP, and DP9 ports
Debugging like JTAG, ISP, ICSP, BDM Port, BITP, and DP9 ports
Criteria for Choosing Microcontroller
Criteria for Choosing Microcontroller
While choosing a microcontroller, make sure it meets the task at hand and that it is cost effective. We
While choosing a microcontroller, make sure it meets the task at hand and that it is cost effective. We
must see whether an 8-bit, 16-bit or 32-bit microcontroller can best handle the computing needs of a task.
must see whether an 8-bit, 16-bit or 32-bit microcontroller can best handle the computing needs of a task.
In addition, the following points should be kept in mind while choosing a microcontroller β
In addition, the following points should be kept in mind while choosing a microcontroller β
Speed
Speed β What is the highest speed the microcontroller can support?
β What is the highest speed the microcontroller can support?
Packaging
Packaging β Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat package)? This is
β Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat package)? This is
important in terms of space, assembling, and prototyping the end-product.
important in terms of space, assembling, and prototyping the end-product.
Power Consumption
Power Consumption β This is an important criteria for battery-powered products.
β This is an important criteria for battery-powered products.
Amount of RAM and ROM
Amount of RAM and ROM on the chip.
on the chip.
Count of I/O pins and Timers
Count of I/O pins and Timers on the chip.
on the chip.
4. Cost per Unit
Cost per Unit β This is important in terms of final cost of the product in which the microcontroller
β This is important in terms of final cost of the product in which the microcontroller
is to be used.
is to be used.
Further, make sure you have tools such as compilers, debuggers, and assemblers, available with the
Further, make sure you have tools such as compilers, debuggers, and assemblers, available with the
microcontroller. The most important of all, you should purchase a microcontroller from a reliable source.
microcontroller. The most important of all, you should purchase a microcontroller from a reliable source.