Top Banner

of 24

Cecs285 Lecture1-Embedded Systems and Embedded Programming

Apr 14, 2018

Download

Documents

ssanchez89
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    1/24

    1

    Embedded Systems and the 8051Microcontroller

    By Dr. Min He.

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    2/24

    2

    Overview

    Introducing Embedded Systems

    Difference between Software Development forDesktop and Embedded Systems

    The Process of Developing an EmbeddedSystem

    Embedded Software Development Tool Chain

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    3/24

    Introducing Embedded Systems

    Embedded system: any device thatincludes a programmable computer but

    is not itself a general-purpose computer.

    Take advantage of applicationcharacteristics to optimize the design:

    dont need all the general-purpose bells

    and whistles.

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    4/24

    Other Definitions

    Embedded Systems are computers lodged inother devices where the presence of thecomputers is not immediately obvious.Computer Architecture A Quantitative

    Approach A special-purpose computer system designed

    to perform one or a few dedicated functions,often with real-time constraints. It is usuallyembedded

    as part of a complete deviceincluding hardware and mechanical parts. --Wikipedia

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    5/24

    Embedded Systems are Everywhere

    Personal digital

    assistant

    (PDA).

    Printer.

    Cell phone.

    Automobile:engine, brakes,

    dash, etc.

    Television.

    Household

    appliances. PC keyboard

    (scans keys).

    And more

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    6/24

    Microwave

    Microcontroller: 16 or

    32 bit

    Used to control theclock/timer and the

    on/off cycles of the

    different functions like

    the Defrost or cookingpower.

    CECS347 Embedded Processors 6

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    7/24

    Digital Photo Frame

    32-bit RISC processor

    (based off ARM)

    Image rendering andvideo decoding

    together with provision

    for touch screen

    interfaces.

    CECS347 Embedded Processors 7

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    8/24

    Smartphone and Handheld Games

    32-bit ARM7TDMI Processor

    Plays computer games

    Microprocessor: 32 bit

    Cortex- M3 : The ARMprocessor

    Two features that may make it

    desirable for the lower two

    devices include that it has 32levels of interrupt priority and 4

    GB of addressable memory

    CECS347 Embedded Processors 8

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    9/24

    Universal Remote Control

    8-bit Microprocessor

    Learning capabilitycopies functions from

    original remotes

    CECS347 Embedded Processors 9

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    10/24

    10

    Product: Sonicare Elitetoothbrush.

    Microprocessor: 8-bit

    Has a programmablespeed control, timer,

    and charge gauge

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    11/24

    11

    Product: Any PCMouse, Keyboard, or

    USB Device

    Microprocessor:

    8-bit Microcontroller

    Inside view of a Microsoft Mouse

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    12/24

    12

    Product: AnyPrinter

    Microprocessor:Intel, Motorola, or

    ARM 32-bit RISC

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    13/24

    13

    Product:Vendo Vue

    40 vending

    machine.

    Microprocessor:Two 16-bit Hitachi

    H8/300H

    ProcessorsA robot hand

    dispenses items

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    14/24

    14

    Product: Pavion

    Portable GPSNavigation &

    Multimedia System

    Microprocessor:ARM , DSP

    OS: Windows CE

    Also plays MP3s and

    Videos

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    15/24

    15

    Product: Dresser Wayne Ovation

    iX Gas Pump

    Microprocessor:

    Marvel Xscale (ARM)

    OS: Windows CE

    Displays video ads &

    is networked to a gas stations

    back office computer system.

    Also has remote maintenance

    features.

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    16/24

    16

    Product: Bernina Artista

    200 Sewing Machine

    Microprocessor:

    Marvel StrongARM

    OS: Windows CE

    Can download new images

    from the internet and sew

    them

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    17/24

    17

    Difference Between Software Development

    for Desktop and Embedded Systems

    Desktop Embedded Systems

    The same desktop run many

    different programs.

    The vast majority of embedded

    systems are required to run only

    one program.

    User program and the required

    data are loaded from disk to

    RAM when user need to run it

    and removed from RAM when

    the program is done.

    The program will start running

    from ROM when the

    microcontroller is powered up

    until power is turned off.

    As a consequence, the simplest architecture in an embedded

    system is typically a form of Super Loop.

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    18/24

    18

    A Simple Super Loop Demonstration

    void main (void)

    {

    // Prepare to run function X

    X_Init();

    while (1) // for ever (Super Loop)

    {

    X();

    }}

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    19/24

    19

    The Process of Developing an

    Embedded System

    Edit source files on host machines

    Cross-compile, link for target on hostmachine

    Simulate and test on host machine Building embedded hardware

    Getting the embedded software into thetarget system

    Test on target machine

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    20/24

    20

    Embedded Software Development

    Tool Chain

    Cross-compiler/Assembler vs. native tool Host and target machine

    Linker/Locators for Embedded Software

    Simulate and test on host machine

    Getting embedded software into the targetsystems

    *Tool chain: a set of tools that is compatiblewith the target machine and is used tosupport the whole development process forembedded software.

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    21/24

    21

    Cross-Compiler, Cross-Assembler

    Host Machine vs. Target Machine Host machine: a computer system on

    which all the programming tools run.

    Target machine: the system that is shipped

    to customers.

    Cross-compiler/assembler:A compiler/assembler that runs on your

    host system but produces the binaryinstructions that will be understood byyour target microprocessor.

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    22/24

    22

    Native Tool ChainABBOTT.Cint idunno;whosonfirst(idunno)

    Compiler

    Linker

    1547

    Loader

    COSTELLO.C

    int whosonfirst (int x){

    }

    ABBOTT.OBJ

    MOVE R1, (idunno);CALL whosonfirst

    COSTELLO.OBJ

    whosonfirst:

    Compiler

    HAHAHA.EXE

    MOVE R1, 2388CALL 1547MOV R1, R5(value of idunno)2388

    HAHAHA.EXE

    MOVE R1, 22388CALL 21547MOV R1, R5(value of idunno)

    Memory

    21547

    22388

    20000

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    23/24

    23

    Tool Chain for Building Embedded Software

    C and C++ files

    Cross-compiler

    Object files

    (may be any format)

    Linker/locator

    Executable file(may be of any of various standard formats)

    Assembly files

    Cross-assembler

    Object files

    (may be any format)

    Target System

    Operationson

    thehost

    Executable file is copied to target.

  • 7/30/2019 Cecs285 Lecture1-Embedded Systems and Embedded Programming

    24/24

    2424

    Reference Materials

    An Embedded Software Primer, by David E.Simon, ISBN: 020161569X, Chapter 9 & 10.