Presentation is loading. Please wait.

Presentation is loading. Please wait.

Embedded System Programming Andrew Ho. Agenda Embedded System Overview Embedded System Developing Programming on Embedded System Q&A.

Similar presentations


Presentation on theme: "Embedded System Programming Andrew Ho. Agenda Embedded System Overview Embedded System Developing Programming on Embedded System Q&A."— Presentation transcript:

1 Embedded System Programming Andrew Ho

2 Agenda Embedded System Overview Embedded System Developing Programming on Embedded System Q&A

3 Products with Embedded Systems? Of 4 billions microprocessors/microcontrollers sold (2002), 95% are for embedded products: – VCRs, DVD players – Cell phone – Microwave – Washer – Camera – Cars – Printers, copiers – ….

4 Why are Embedded Systems Different? Dedicated to a specific task or tasks Rich variety of microprocessors (over 300 types) Designs are cost-sensitive May have real-time performance constraints Often used with Real-Time Operating Systems (RTOS) Software failure can be life-threatening May have constraints on power consumption Operate over a wide-range of environmental conditions Fewer system resources than a desktop system All code might be stored in ROM Require specialized design tools May need on-chip debugging resources

5 What’s an Embedded System? From Wikipedia : An embedded system is a special- purpose system in which the computer is completely encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose computer, such as a personal computer, an embedded system performs one or a few pre-defined tasks, usually with very specific requirements. Since the system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, benefiting from economies of scale.computer personal computereconomies of scale Simple : “A programmable component of subsystem providing some intelligence functions to the system of which it is a part.”

6 What’s an Embedded System? This can include: – Any device, or collection of devices, that contain one or more dedicated computers, microprocessors, or microcontrollers. –Microprocessor chips –Programmable logic elements (FPGA, ASIC etc.) –Device(s) may be local - Printer, automobile, etc. –Devices may be distributed - Aircraft, ship, internet appliance. –A PC or workstation may be an embedded system.

7 What’s an Embedded System? Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real-time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs.real-time An embedded system is not always a separate block - very often it is physically built-in to the device it is controlling The software written for embedded systems is often called firmware, and is stored in read-only memory or Flash memory chips rather than a disk drive. It often runs with limited computer hardware resources: small or no keyboard, screen, and little memory. Flash memory

8 Example : ADSL modem router 1. Telephone decoupling electronics (for ADSL).TelephoneADSL 2. Multicolour LED (displaying network status).LED 3. Single colour LED (displaying USB status).LED 4. Main processor, a TNETD7300GDU, a member of Texas Instruments' AR7 product line.processorTexas Instruments 5. JTAG (Joint Test Action Group) test and programming port.JTAG 6. RAM, a single ESMT M12L64164A 8 MB chip.RAM 7. Flash memory, obscured by sticker.Flash memory 8. Power supply regulator.regulator 9. Main power supply fuse.fuse 10. Power connector. 11. Reset button.Reset button 12. Quartz crystal.Quartz crystal 13. Ethernet port.Ethernet 14. Ethernet transformer, Delta LF8505.transformer 15. KS8721B ethernet PHY transmitter receiver.PHY 16. USB port.USB 17. Telephone (RJ11) port.RJ11 18. Telephone connector fuses.

9

10 Characteristics No Architectural Link to Standard Platforms Real-time Constraints –Time sensitive –Time critical May or May Not have OS services available Power Constraints Low Fault Tolerance Often engineered for the highest possible performance at the lowest cost

11 Microprocessor V.S. Microcontroller Microprocessor –An integrated circuit which forms the central processing unit for a computer or embedded controller, but required additional support circuitry to function –MC68000, 80486, Pentium, K6, MicroChip PIC, etc. Microcontroller –A microprocessor plus additional peripheral support devices integrated into a single package –Peripheral support devices may include : Serial ports (COM ), Parallel (Ports ), Ethernet ports, A/D&D/A, Interval timers, watchdog timers, event counter/timers, real time clock (RTC) –Other local processors (DSP, numeric coprocessor, peripheral controller)

12 Microprocessor V.S. Microcontroller

13 An Embedded System Example

14 Embedded System Developing Target system –The embedded system under development Host computer –The standard platform being used to develop the software and link to the target system for debugging Cross-development –Using host-based tools to create a code image running on a different instruction set architecture

15 Development Environment

16 Where to store executable image on target system ? ROM or FLASH –Good for final product –Hold the bits permanently after power is turned off –Impractical during the development stage –Reprogramming the ROM or the FLASH memory is time –consuming RAM –Cannot used in final product –Lose data almost immediately after power is turned off –Good in development stage –Processor writes to memory simply and quickly

17 Development Environment How to transfer the image onto the target? –Image Download To transfer an executable image from host onto the target system. –Possible Approaches Download the image through either a JTAG or BDM interface Downloading the image over a serial (RS-232) or network connection Write the image to EEPROM or Flash

18 Development Lifecycle

19 Design Trade-offs Target Driven – For special purpose Consider : –Implement by H/W or S/W? –Soc ? –Resources? –OS-based? –Cost : Performance ?

20 Considerations Must be dependable: –Reliability –Maintainability –Availability –Safety –Security Must be efficient: –Energy efficient –Code-size efficient (especially for systems on a chip) –Run-time efficient –Weight efficient –Cost efficient

21 Considerations Many ES must meet real-time constraints: –A real-time constraint is called hard, if not meeting that constraint could result in a catastrophe –All other time-constraints are called soft

22 Programming on Embedded System Difference of programming on ES –Maybe no OS Handle all HW by programmer. –Programming and Operating on different platform Host/Target Cross-compiler Upload and Debug –I/O interface –Limited Resources –Highly H/W Dependence

23 Programming on Embedded System There are MANY architectures of programming an embedded system. –Simple control loop –Interrupt controlled system –Cooperative multitasking (nonpreemptive multitasking system) –Preemptive multitasking : OS based –Microkernels and exokernels(MIT) : Step up from RTOS (Real Time OS) –Monolithic kernels (Embedded Linux or Windows CE)

24 Programming on Embedded System What kinds of program should be handled? –Boot loader –Operation system –Device drivers –System services –Applications –User Interface –Communication –………

25 System Developing Steps Survey market and requirements Define the system scale and functions Define the design specifications Review and refine the design spec Division of labor with H/W and S/W

26 System Developing Steps For S/W : –Architecture developing –Module design –Implementation –Module testing/verifying –Integration –System testing –System debugging For H/W –H/W design (IC design, system design) –H/W simulation –H/W emulation –H/W verification

27 System Developing Steps Whole System –System testing/verifying –System debugging –Mass production –System customization Developing new features/applications

28 Example

29 Q & A


Download ppt "Embedded System Programming Andrew Ho. Agenda Embedded System Overview Embedded System Developing Programming on Embedded System Q&A."

Similar presentations


Ads by Google