Slides created by: Professor Ian G. Harris Test and Debugging  Controllability and observability are required Controllability Ability to control sources.

Slides:



Advertisements
Similar presentations
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
Advertisements

Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
TM Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
9/20/6Lecture 3 - Instruction Set - Al1 The Hardware Interface.
Towards Target-Level Testing and Debugging Tools For Embedded Software Harry Koehnemann, Arizona State University Dr. Timothy Lindquist, Arizona State.
MotoHawk Training Model-Based Design of Embedded Systems.
CS 345 Computer System Overview
Introduction to Operating Systems What is an operating system? Examples How do many programs run at the same time, with one processor?
Memory Management 2010.
Ritu Varma Roshanak Roshandel Manu Prasanna
1 Color Discriminating Tracking System Lloyd Rochester Sam Duncan Ben Schulz Fernando Valentiner.
Coordinate Based Tracking System
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
Microcontroller: Introduction
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Fundamental of Microcontrollers
Introduction Purpose Objectives Content Learning Time
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
Cortex-M3 Debugging System
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
MDK-ARM Microcontroller Development Kit MDK: Microcontroller Development Kit.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Computer Organization
Operating System Overview
1 3-Software Design Basics in Embedded Systems. 2 Development Environment Development processor  The processor on which we write and debug our programs.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Project Management November.
National Taiwan University JTAG and Multi-ICE Speaker : 沈文中.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Slides created by: Professor Ian G. Harris Typical Embedded C Program #include main() { // initialization code while (1) { // main code }  #include is.
4-1 EE 319K Introduction to Microcontrollers Lecture 4: Debugging, Arithmetic Operations, Condition Code Bits.
25 April 2000 SEESCOASEESCOA STWW - Programma Evaluation of on-chip debugging techniques Deliverable D5.1 Michiel Ronsse.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
1 4-Development Environment Development processor  The processor on which we write and debug our programs Usually a PC Target processor  The processor.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced Debugging on the RX600.
Simics: A Full System Simulation Platform Synopsis by Jen Miller 19 March 2004.
1 Software. 2 What is software ► Software is the term that we use for all the programs and data on a computer system. ► Two types of software ► Program.
MICROOCESSORS AND MICROCONTROLLER:
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L05I Advanced Debugging on the RX600 Fatih Peksenar.
July 18, UCSD - R.A. de Callafon Short Intro to Micro Processors and I/O functions of our Kinetic Sculpture Control Box Raymond de Callafon.
Unit - V. Debugging GNU Debugger helps you in getting information about the following: 1.If a core dump happened, then what statement or expression did.
© 2000 Morgan Kaufman Overheads for Computers as Components Host/target design  Use a host system to prepare software for target system: target system.
Lecture 7: Overview Microprocessors / microcontrollers.
Source Level Debugging of Parallel Programs Roland Wismüller LRR-TUM, TU München Germany.
CSE466 - Fall What is an Embedded System  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)  Lacks some or.
HCS12 Technical Training Module 15 – Break Module Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
Evaluating the Fault Tolerance Capabilities of Embedded Systems via BDM M. Rebaudengo, M. Sonza Reorda Politecnico di Torino Dipartimento di Automatica.
Hardware/Software Co-Verification with RTOS Application Code Michael Bradley, Mentor Graphics Kainian Xie, Hyperchip Inc.
Submitted by:.  Project overview  Block diagram  Power supply  Microcontroller  MAX232 & DB9 Connector  Relay  Relay driver  Software requirements.
HOME AUTOMATION USING PC DONE BY RAJESHKUMAR S SRI HARSHA D.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
 Wind River Systems, Inc Chapter - 4 CrossWind.
Popular Microcontrollers and their Selection by Lachit Dutta
Chapter 3 General-Purpose Processors: Software
Introduction to programming
Microcontroller Applications
PC Mouse operated Electrical Load Control Using VB Application
UNIT – Microcontroller.
ACOE301: Computer Architecture II Labs
An Embedded Software Primer
Chapter 1: The 8051 Microcontrollers
Structures Collection of several variables under a single name
Agenda Why simulation Simulation and model Instruction Set model
Bus-Based Computer Systems
Debugging Debug environments Debug via serial
Presentation transcript:

Slides created by: Professor Ian G. Harris Test and Debugging  Controllability and observability are required Controllability Ability to control sources of data used by the system Input pins, input interfaces (serial, ethernet, etc.) Registers and internal memory Observability Ability to observe intermediate and final results Output pins, output interfaces Registers and internal memory

Slides created by: Professor Ian G. Harris I/O Access is Insufficient  Control and observation of I/O is not enough to debug main(){ x = f1(RA0,RA1); foo (x); } foo(x){ y = f2(x); bar (y); } bar(y){ RA2 = f3(y); } RA0 RA1 RA2  If RA2 is incorrect, how do you locate the bug?  Control/observe x and y at function calls?

Slides created by: Professor Ian G. Harris Embedded Debugging Properties of a debugging environment: 1. Run Control of the target - Start and stop the program execution 2. Ability to change code and data on target - Fix errors, test alternatives 3. Real-Time Monitoring of target execution - Non-intrusive in terms of performance 4. Timing and Functional Accuracy - Debugged system should act like the real system

Slides created by: Professor Ian G. Harris Host-Based Debugging  Compile and debug your program on the host system, not target - Compile C to your laptop, not the microcontroller Advantages: 1.Can use a good debugging environment 2.Easy to try it, not much setup (register names, etc) Disadvantages: 1.Timing is way off 2.Peripherals will not work, need to simulate them 3.Interrupts probably implemented differently 4.Different data sizes and “endian”ness

Slides created by: Professor Ian G. Harris Instruction Set Simulator  Instruction Set Simulator (ISS) runs on the host but simulates the target  Each machine instruction on the target is converted into a set of instructions on the host  Example:  Target Instruction - add x : Adds register x to the acc register, result in the acc register  Host equivalent: add acc, x, acc : Adds second reg to third, result in the first reg

Slides created by: Professor Ian G. Harris ISS Tradeoffs Advantages: 1. Total run control 2. Can change code and data easily Disadvantages: 1. Simulator assumptions can cause inaccuracies 2. Timing is off, no real-time monitoring - initial register values, timing assumptions 3. “Hardware environment” of target cannot be easily modeled

Slides created by: Professor Ian G. Harris Hardware Environment RAM PIC RA0 RA1 RA2  PIC communicates with the switch and the RAM  Communications must be modeled to test PIC code  Simulators allow generation of simple event sequences  Responsiveness is more difficult to model

Slides created by: Professor Ian G. Harris Remote Debug/Debug Kernel  Remote debugger on the host interacts with a debug kernel on the target  Communication through a spare channel (serial or ethernet)  Debug kernel responds to commands from remote debugger  Debug kernel is an interrupt, so control is possible at any time Host (PC) Target (PIC) Serial or Ethernet

Slides created by: Professor Ian G. Harris Remote Debug Tradeoffs Advantages: 1.Good run control using interrupts to stop execution 2.Debug kernel can alter memory and registers 3.Perfect functional accuracy Disadvantages: 1.Debug interrupts alter timing so real-time monitoring is not possible 2.Need a spare communication channel 3.Need program in RAM (not flash) to add breakpoints

Slides created by: Professor Ian G. Harris ROM Emulator RAM ucontroller Target ucontroller Host Instructions Serial or ethernet Target ucontroller ROM Instructions  Common to read instructions from a separate ROM on the target  ROM emulator substitutes the ROM for a RAM with a controller

Slides created by: Professor Ian G. Harris ROM Emulator Features  Remote debugger where ROM is replaced by RAM - Debug kernel is in the RAM  Solves the “non-writable ROM” problem of remote debugging  ROM emulator completely controls the instructions - Full data access is possible  ROM emulator can contain a debug communication channel No need for a spare channel

Slides created by: Professor Ian G. Harris ROM Emulator Disadvantages  Instruction ROM must be separate from the microcontroller - No embedded ROM  There must be a way to write to the ROM - May be done with a complex sequence of reads  Alters timing, just as any debug kernel would

Slides created by: Professor Ian G. Harris In-Circuit Emulation (ICE) Target ucontroller ROM Instructions  Replace the microcontroller with an new one  Can select instructions from external ROM (normal mode) or internal shadow RAM (test mode) Shadow RAM Target ucontroller Mux ROM Host

Slides created by: Professor Ian G. Harris ICE Advantages  ICE can always maintain control of the program  - Interrupt cannot be masked  Works even if system ROM is broken  Generally the best solution