faculty orientation program€¦ · ch 13.1 1 host and target machines ch 13.2 linking and locating...

80
Faculty Orientation Program BE Revised Syllabus ( 2012 course) Under aegis of BOS Electronics, SPPU, Pune UNIT 6: Embedded Software Development, Testing Process and Tools Prof. Varsha K. Harpale Pimpri Chinchwad College of Engg. Pune

Upload: others

Post on 24-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Faculty Orientation Program BE Revised Syllabus ( 2012 course) Under aegis of BOS Electronics, SPPU, Pune

UNIT 6: Embedded Software Development, Testing Process and

Tools

Prof. Varsha K. Harpale

Pimpri Chinchwad College of Engg. Pune

Page 2: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Syllabus Topics (6 Hrs.) Syllabus Topic Reference Topic Hours

Embedded Software development process and tools

R1

CH 13.1 1

Host and Target Machines CH 13.2

Linking and Locating Software CH 13.3

1 Getting Embedded Software into the Target System

CH 13.4

Issues in Hardware- Software Design and Co-design.

CH 13.5 1

Testing on Host Machine CH 14.1 1

Simulators CH 14.2

Laboratory Tools CH 14.3 1

Case study : Automatic Chocolate Vending Machine

CH 11.1

1 Case study : Mobile Phone http://www.ann.ece.ufl.edu/courses/eel6935_10spr/papers/Cellular_Phones_as_Embedded_Systems.pdf 6/13/2015 2

Page 3: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 1a: Embedded Software Development Process and Tools

Page 4: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Development Process

Consists of cycles of editing-testing- debugging.

Processor and hardware part once chosen remains fixed, the application software codes have to be perfected by a number of runs and tests.

6/13/2015 4

Page 5: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Development Process Of An Embedded System

6/13/2015 5

Page 6: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Edit-test-debug Cycle Implementation Phase Of The Development Process

6/13/2015 6

Page 7: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Software Tools Software Development Lit (SDK)

Source-code Engineering Software

RTOS

Integrated Development Environment

Prototyper

Editor

Interpreter

Compiler

Assembler

Cross Assembler

Testing and debugging tools

Locator

6/13/2015 7

Page 8: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Integrated Development Environment (IDE)

Consists of

Simulators

Editors,

Compilers,

Assemblers

Emulators

Logic analyzers

EPROM/EEPROM application codes burner.

6/13/2015 8

Page 9: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Simple IDE

6/13/2015 9

Page 10: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Sophisticated IDE

6/13/2015 10

Page 11: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Features of IDE Facility for defining a processor family

as well as defining its version.

Includes source code engineering tools that incorporate the editor, compiler for C and embedded C++,

Assembler, linker, locator, logic analyser, help to use various platforms

Optimizes the use of memory

6/13/2015 11

Page 12: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Features of IDE

Provides Windows on the screen for the

detailed information of ─

source code part with labels and

symbolic arguments,

registers as the execution continues,

status of peripheral devices,

status of RAM and ports,

status of stack and program flow as it continues

6/13/2015 12

Page 13: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Features of IDE

Verifies the performance of a target system that an emulator built into the development system, which remains independent of a particular targeted system,

Includes a logic analyzer for up to 256 or 512 transactions on the address and data buses after triggering

6/13/2015 13

Page 14: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Features of IDE Simulates on a host system (PC), the hardware unit

like emulator, peripherals, and I/O devices.

Supports conditional and unconditional breakpoints.

Debug by single stepping.

Facilitate for synchronizing the internal peripherals

Facility of a user-definable assembler to support a new version or type of processor.

Provision of a multi-user environment.

Design process divisibility into a number of sub parts.

Each programmer assigned independent but linked tasks

6/13/2015 14

Page 15: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

IDE Example

IDE from Keil μVision 2 with RTX51 for 8051 family of microcontrollers

IDE from Keil μVision 3 RTX51 for ARM family of processors and microcontrollers

6/13/2015 15

Page 16: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture1b: Host and Target Machines

Page 17: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Hardware Components of Host system

High performance processor with caches,

Large RAM memory

ROMBIOS (read only memory basic input-output system)

Very large memory on disk

Keyboard, Mice, Display monitor

Network connection

Program development kit for a high level language program or IDE

Host processor compiler and cross-Compiler, Cross- assembler

6/13/2015 17

Page 18: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Program Development Tool Kit

Editor─ used for writing C codes or assembly

mnemonics or C++ or Java or Visual C++ using the keyboard of the host system (PC) for entering the program.

Using GUIs for allowing the entry, addition, deletion, insert, appending previously written lines or files, merging record and files at the specific positions.

Compiler, cross compiler, assembler, cross assembler

6/13/2015 18

Page 19: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Create source file that stores the edited file.

File given an appropriate name by the programmer

Can use previously created files

Can also integrate the various source files.

Can save different versions of the source files.

6/13/2015

Program Development Tool Kit

19

Page 20: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Target System Board

6/13/2015 20

Page 21: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Sophisticated Target System

6/13/2015 21

Page 22: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Target and Final systems Target system differs from a final system

Target system interfaces with the computer as well works as a standalone system

In target system might be repeated downloading of the codes during the development phase.

Target system copy made that later on functions as embedded system

Designer later on simply copies it into final system or product.

Final system may employs ROM in place of flash, EEPROM or EPROM in embedded system.

6/13/2015 22

Page 23: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 2a: Linking and Locating Software

Page 24: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Linker Links the compiled codes of application

software, object codes from library and OS kernel functions.

Linking necessitates because of the number of codes to be linked for the final binary file.

For example, standard codes for to program a delay task, must link with the assembled codes.

The delay code sequential from a beginning address.

6/13/2015 24

Page 25: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Linker cont......

The assembly software codes also sequential from another beginning address.

Both the codes have to at the distinct addresses as well as at the available addresses in the system. Linker links these

After linking, re-allocation of the sequences of placing the codes before actually placement of the codes in the memory

Linked file in binary for run on a computer commonly known as executable file or simply '.exe' file.

6/13/2015 25

Page 26: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Loader Program loaded in a computer RAM.

Loader program performs the task of reallocating the codes after finding the physical memory addresses available at a given instant.

Loader a part of the operating system and places codes into the memory after reading the '.exe' file.

Step necessary because the available memory addresses may not start from 0x0000, and binary codes have to be loaded at the different addresses during the run.

6/13/2015 26

Page 27: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Loader cont......

Loader finds the appropriate start address.

In a computer, after the loader loads into a section of RAM and after loading the program ready to run

6/13/2015 27

Page 28: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Locator

When the code embeds into ROM or flash, a system design process is locating these codes as a ROM image.

Codes are permanently placed at the actually available addresses in the ROM.

Embedded systems─ no separate program to

keep track of the available addresses at different times during the running, as in a computer .

6/13/2015 28

Page 29: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Locator The locator is specified by the programmer as

per available addresses at the RAM and ROM in target.

Programmer defines the available addresses in embedded systems for loading to load and creating files for permanently locating the codes using a device programmer

Uses cross-assembler output, a memory allocation map and provides the locator program output file.

6/13/2015 29

Page 30: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Locator cont......

Uses the cross compile codes in different cross-compiled segments for (i) instructions, (ii) initialized values and addresses (iii) constant strings (iv) uninitialized data.

Locates the I/O tasks and hardware device driver codes at the unchanged addresses.

These are as per the interfacing circuit between the system buses and ports or devices.

6/13/2015 30

Page 31: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Various software tools and chain of actions of linker at host and locator in an embedded system

6/13/2015 31

Page 32: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Memory Map for coding a locator program Memory map in Harvard Architecture

6/13/2015 32

Page 33: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 2b: Getting Embedded Software into the Target System.

Page 34: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Device PROM or Flash Programmer

Device programmer also called laboratory programmer

A programming system for a selected device

Device may be a PROM or EPROM chip or a flash or a unit in a microcontroller or PLA, GAL or PLC.

Selected device inserts into a socket Programmed (burned the codes) by transfer of the bytes for each address using the software at the host

6/13/2015 34

Page 35: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Burning in of the application software codes, data and tables using a device programmer

6/13/2015 35

Page 36: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Downloading the Finalized Codes into PROM or Flash

A process that places the codes.

Codes downloaded, according to ROM image (locator output)

Burning done in the laboratory using a device programmer into an erased EPROM or EEPROM or PROM or flash

6/13/2015 36

Page 37: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 3: Issues in Hardware- Software Design and Co-design

Page 38: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Two Approaches For The Embedded System Design

(1) When the software development cycle ends then the cycle begins for the process of integrating the software into the hardware at the time when a system is designed.

(2)Both cycles concurrently proceed when co-designing a time critical sophisticated system.

6/13/2015 38

Page 39: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Hardware and Software Co-design Flow

6/13/2015 39

Page 40: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Hardware Implementation Advantages

(i) Reduced memory for the program.

(ii) Reduced number of chips but at an increased cost.

(iii) Simple coding for the device drivers.

(iv) Internally embedded codes, which are more secure than at the external ROM

(v) Energy dissipation can be controlled by controlling the clock rate and voltage

6/13/2015 40

Page 41: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Software Implementation Advantages (i) Easier to change when new hardware

versions become available.

(ii) Programmability for complex operations.

(iii) Faster development time.

(iv) Modularity and portability.

(v) Use of standard software engineering, modelling and RTOS tools.

(vi) Faster speed of operation of complex functions with high-speed microprocessors.

(vii) Less cost for simple systems.

6/13/2015 41

Page 42: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Selection of Components

Processor ASIP or ASSP / Multiple processors / System-on-Chip Processor Less System

Memory

Buses

Software Language

RTOS (real-time programming OS)

Code generation tools

Tools for finally embedding the software into binary image

6/13/2015 42

Page 43: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Processor Less System

6/13/2015 43

Page 44: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Microprocessor or Microcontroller or DSP

6/13/2015 44

Page 45: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Factors and Needed Features Taken into Consideration When the 32-bit system, 16kB+ on chip

memory and need of cache, memory management unit or SIMD or MIMD or DSP instructions arise, we use a microprocessor or DSP.

Video game, voice recognition and image-filtering systems− need a DSP.

Microcontroller provides the advantage of on-chip memories and subsystems like the timers.

6/13/2015 45

Page 46: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Factors for On-Chip Feature 8 bit or 16 bit or 32 bit ALU

Cache, Memory Management Unit

DSP calculations unit

Intensive computations at fast rate

Total external and internal Memory up to or more than 64 kB

Internal RAM, Internal ROM/EPROM/EEPROM, Flash

Timer 1, 2 or 3, Watchdog Timer

Serial Peripheral Interface Full duplex, Serial Synchronous Communication Interface (SI) Half Duplex

6/13/2015 46

Page 47: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Factors for On-Chip Feature

Serial UART

Input Captures and Out-compares

PWM

Single or multi-channel ADC with or

without programmable Voltage

reference (single or dual reference)

DMA Controller

Power Dissipation 6/13/2015 47

Page 48: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Porting issues in an Embedded Platform

Porting issues of OS

I/O instructions

Interrupt Servicing Routines

Data types

Interface specific data types

Byte order

Data Alignment

Linked Lists

Memory Page Size

Time Intervals 6/13/2015 48

Page 49: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 4a: Testing on Host Machine

Page 50: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Host and Test Systems During Development Process

Two systems with different CPUs or microcontroller and hardware architecture.

One system─ host, generally PC or

laptop or workstation.

Other system ─target, actual hardware

for the embedded system under development

6/13/2015 50

Page 51: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Host and Target Test Systems During Development Process

6/13/2015 51

Page 52: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Testing Steps at Host Machine

1. Initial Tests─ each module or segment at initial stage itself and

on host itself

2. Test data─ all possible combinations of data designed and taken

as test data

3. Interrupts and Exception condition tests ─ all possible

exceptions for the test.

4. Tests-1: hardware independent code

5. Tests-2:software running on host the target dependent codes and which have same start of code and port and device addresses as at the hardware.

6. Instructions– given from file or keyboard inputs.

7. Test ISR for Hardware dependent and independent interrupts.

8. Timer tests─ Hardware dependent code timing functions, clock

tick set, counts get, counts put, delay

9. Outputs–at host’s LCD display and saves at file 6/13/2015 52

Page 53: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 4b: Simulator

Page 54: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Target Debugging

6/13/2015 54

Page 55: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Simulator

Uses knowledge of target processor or microcontroller, and target system architecture on the host processor.

First does cross compilation of the codes and place these into host system RAM.

Behaviour of target system processor registers simulated

6/13/2015 55

Page 56: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Simulator cont...... Uses linker and locator to port the cross

compiled codes in RAM and functions like the code that would have run at the actual target system.

Simulates hardware units like emulator, peripherals, network and input-output devices on a host.

A simulator remains independent of a particular targeted system

Results expected from codes at target system RAM, peripherals, network and input-output devices obtained at the host system RAM

6/13/2015 56

Page 57: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Development processes using simulator

6/13/2015 57

Page 58: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Simulator Features Defines the processor or processing device

family as well as its various versions for the target system.

Monitors the detailed information of a source code

Provides the detailed information of the status of RAM, ports, interfacing devices, registers and status of stack during single stepping execution.

Provides tracing and breakpoints facility

6/13/2015 58

Page 59: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Simulator Features cont......

Facilitates synchronizing the internal peripherals and delays.

Employs RTOS scheduler that preempts task.

Simulates the inputs from the interrupts, the timers, ports and peripherals.

Provides network driver and device driver support

6/13/2015 59

Page 60: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Simulator Limitations

Processor speed at target processor may not be adequately mapped with the host for calculating time responses and calculating output instances and throughputs at the target.

May not be able to take into account portability problems.

A simulator may fail to show a bug from shared data as it arises from an interrupt in some particular situation.

6/13/2015 60

Page 61: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 5: Laboratory Tools

Page 62: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Tools Used In The Embedded Design and Development Process.

6/13/2015 62

Page 63: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Hardware Diagnostic Laboratory Tools Volt-Ohm meter

LED test

Logic Probe

Oscilloscope

Logic Analyser

Bit Rate meter

ICE

System Monitor Codes

6/13/2015 63

Page 64: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Use of Bit rate meter

A measuring device that finds numbers of ‘1’s and ‘0’ in the preselected time spans.

Measures throughput.

Can estimate bits ‘1’s and ‘0’s in a test message and then use bit rate meter to find whether that matches with the message.

6/13/2015 64

Page 65: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

In-Circuit Emulator (ICE)

A circuit for emulating target system remains independent of a particular targeted system and processor

Emulator or ICE provides great flexibility and ease for developing various applications on a single system in place of testing that multiple targeted systems.

6/13/2015 65

Page 66: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Emulator

6/13/2015 66

Page 67: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Emulator cont......

Emulates MCU inputs from sensors

Emulates controlled outputs for the

peripheral interfaces/systems

Emulates target MCU IOs and socket

to connect externally MCU

6/13/2015 67

Page 68: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

ICE

6/13/2015 68

Page 69: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

ICE cont......

Interface COM port of a computer

Emulates target MCU IOs

ICE socket connects MCU externally.

Uses computer developed object files and hex files for the MCU

Uses debugger at the computer developed files for the MCU application

6/13/2015 69

Page 70: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Difference in Emulator and ICE

Emulator uses the circuit consisting of the microcontroller or processor itself.

The emulator emulates the target system with extended memory and with codes downloading ability during the edit-test debug cycles.

ROM Emulator emulates only a ROM.

ICE uses another circuit with a card that connects to target processor (or circuit) through a socket.

6/13/2015 70

Page 71: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Lecture 6: Embedded Case Studies

Page 72: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

AUTOMATIC CHOCOLATE VENDING MACHINE (AVCM)

ACVM Specifications

Alphanumeric display and keypad for user interaction (GUI based)

Function : Displays menus, entered text, pictograms, and welcome, thank and other messages, and time and date.

Coin insertion for depositing coin, delivery slots for delivering chocolate, and Internet port for remote usage.

6/13/2015 72

Page 73: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Basic system in ACVM

6/13/2015 73

Page 74: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

ACVM Design metrics

Power Dissipation:

Performance: One chocolate in two minutes and 256 chocolates before next filling of chocolates into the machine.

Process Deadlines: Machine waits for

maximum 30 s for the coins and machine should deliver the chocolate within 60 s.

6/13/2015 74

Page 75: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

ACVM Design metrics cont......

User Interfaces: Graphic at LCD or touch screen display on LCD and commands by user or machine owner through fingers on keypad or touch screen.

Engineering Cost

Manufacturing Cost

6/13/2015 75

Page 76: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

State Diagram ACVM

6/13/2015 76

Page 77: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Block diagram of ACVM hardware including Microcontroller

6/13/2015 77

Page 78: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

Software architecture (ISRs and Tasks) for ACVM

6/13/2015 78

Page 80: Faculty Orientation Program€¦ · CH 13.1 1 Host and Target Machines CH 13.2 Linking and Locating Software CH 13.3 Getting Embedded Software 1 into the Target System CH 13.4 Issues

References:

R1: Raj Kamal, “Embedded Systems – Architecture, Programming and Design" 2nd edition, Mc Graw Hill.

Other Reference : Arnold S. Berger , “Embedded Systems Design: An Introduction to Processes, Tools, and Techniques” CMP Books

6/13/2015 80