Microcontrollers, Basics Fundamentals of Digital Debugging

Slides:



Advertisements
Similar presentations
Cortex-M3 Implementation Overview. Chapter 6 in the reference book.
Advertisements

Lab7: Introduction to Arduino
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.
LOGSYS Development Environment of Embedded Systems Tamás Raikovich Béla Fehér Péter Laczkó Budapest University of Technology and Economics Department of.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
Getting Started with a Cortex-M3 Board
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 1 Introduction.
Introduction Purpose Objectives Content Learning Time
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
Introduction to the Orbit Edu Board Ahmad Rahmati Teaching Assistant, ELEC424 Rice Efficient Computing Group Sep 12, 2007.
Cortex-M3 Debugging System
MDK-ARM Microcontroller Development Kit MDK: Microcontroller Development Kit.
Silicon Labs ToolStick Development Platform
USB host for web camera connection
Windows Debugging Demystified
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
Oppenheimer Technologies Rick King Jonathan Creekmore.
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
Slides created by: Professor Ian G. Harris Test and Debugging  Controllability and observability are required Controllability Ability to control sources.
National Taiwan University JTAG and Multi-ICE Speaker : 沈文中.
Microcontrollers, Basics How Do I Choose the Right MCU? 17 January 2012 Jonathan A. Titus.
25 April 2000 SEESCOASEESCOA STWW - Programma Evaluation of on-chip debugging techniques Deliverable D5.1 Michiel Ronsse.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
1 Program Planning and Design Important stages before actual program is written.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L05I Advanced Debugging on the RX600 Fatih Peksenar.
Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.
ChibiOS/RT Demo A free embedded RTOS
Evaluating the Fault Tolerance Capabilities of Embedded Systems via BDM M. Rebaudengo, M. Sonza Reorda Politecnico di Torino Dipartimento di Automatica.
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
A Quick Start Guide to PIC16F877 microcontroller And Microchip Development Environment A Quick Start Guide to PIC16F877 microcontroller And Microchip Development.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
10- Lock Bits, Fuse Bits and Boot Loader. Boot Loader Support – Read-While-Write Self- Programming: The Boot Loader Support provides a real Read-While-Write.
Jeremy Sandoval University of Washington May 14, 2013
Arduino.
Michael Rahaim, PhD Candidate Multimedia Communications Lab
IoT Milos Hampl.
5.01 Understand Different Types of Programming Errors
Microcontrollers, Basics Tips and Tricks with PIC MCUs
Programming and Debugging with the Dragon and JTAG
Microcontrollers, Basics How Do I Choose the Right MCU?
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
Microcontrollers, Basics Successful Software Development for MCUs
Computer System Laboratory
Implementation of Embedded OS
Microcontroller Applications
DSC - fundamente MPU MCU DSP DSC Alternative Freescale
ACOE301: Computer Architecture II Labs
Arduino Part 1 Topics: Microcontrollers Programming Basics
RAILWAY TRACK SNAP NOTIFICATION
Introduction to Arduino Microcontrollers
Introduction to the Orbit Edu Board
Computer System Laboratory
5.01 Understand Different Types of Programming Errors
Journey: Introduction to Embedded Systems
Controlling Sensors Efficiently with MCUs
CSCI1600: Embedded and Real Time Software
Debugging Debug environments Debug via serial
CSCI1600: Embedded and Real Time Software
Manual Robotics ..
Software Setup & Validation
Aeroponic Engineering and Vertical Farming
JTAG, Multi-ICE and Angel
Arduino Leonardo Setup
Lab #1: Getting Started.
Chapter 13: I/O Systems.
Presentation transcript:

Microcontrollers, Basics Fundamentals of Digital Debugging 19 January 2012 Jonathan A. Titus

Digital Debugging Any discussion of debugging invariable mixes hardware and software. But do not let debug sessions degenerate into battles between hardware and software people.

Digital Debugging Prevent defects from the beginning Create a best-practices document and programming style Use Deming’s error-prevention steps Develop tests and perform unit tests as you go Write code that tests for limits and errors

Digital Debugging Use W Edwards Deming’s error-prevention “loop” Identify a defect Find the defect’s root cause Locate where the defect occurred Implement preventive practices Monitor the process to verify effectiveness

Digital Debugging Use a Pareto chart to classify and identify defects:

Digital Debugging References 1. "Automated Defect Prevention:Best Practices in Software Management," by Dorota Huizinga and Adam Kolawa, Wiley Interscience, 2007. ISBN: 978-0-470- 04212-0.

Digital Debugging References 2. "Test-Driven Development for Embedded C," James W. Grenning, The Pragmatic Programmers, 2011. ISBN: 978- 1-93435-662-3.

Digital Debugging Write code that tests for limits and errors...

Digital Debugging Avoid problems: Carefully define specifications for a project: What happens when someone types an incorrect value, say, $000 at an ATM machine? What happens when someone continues to key-in incorrect PINs? Can you handle a printer-out-of-paper condition? What happens when a communication comes through with an incorrect CRC value? How do you handle a divide-by-zero error?

Simple Hardware Debug Tools An LED and a pushbutton: simple debug friends: Basic on-off test or debug indicator Flash patterns Start-stop code Not a recommended debugging technique! Pushbutton connected to pin for P1.3.

Debugger or Emulator? Debug/programming pods: Direct connection with programming tools Program MCU flash memory Debugging capabilities (vary by MCU) Require 3 to 5 signals Provide a USB or serial connection to host PC JTAG signals, but not IEEE-1149 compliant Often built into dev-kit boards (USB)

Debug & Programming Pods

Debugging “Messages” Helpful to see your own debug information Avoid C printf statements -- high code price Microchip PICKits can operate as a UART IAR Embedded Workbench has text window Some dev-kit boards have virtual serial port for simple text communications with host PC. Jon’s debug “secret weapon”

A Debug Secret Weapon... An inexpensive receipt printer for <$100

A Debug Secret Weapon... Standard logic levels for serial input to printer Only one pin needed (plus ground) No drivers or debug module needed Small amount of code needed for UART Use bit bashing instead of UART, if necessary Immediate record of debug messages and data Good for field testing Inexpensive--many on ebay (serial, NOT USB!) Jon’s: Ithaca Series 80PLUS

What do Good Debug Tools Do? Trace execution of code Watch variables and registers Set breakpoints Step through and over code Quickly make changes to code via IDE and test again They have limits in real-time situations

Presentation of Debug Information

ARM Debugging... Wow!

ARM Reference "The Definitive Guide to the ARM Cortex-M3," by Joseph Yiu, Newnes, 2007. ISBN: 978-0-7506-8534-4.

Debugging Hardware Logic Analyzer Oscilloscope Protocol Analyzer Power-Analysis Hardware and Software

Logic Analyzers I

Logic Analyzers II

Logic Analyzers III

Logic Analyzers IV

Oscilloscopes I

Oscilloscopes II

Protocol Analyzers

Power Analysis I

Power Analysis II

Debug Challenges I Interrupts Direct-Memory Access

Debug Challenges II It’s not always YOUR fault! Check for revised docs, errata sheets, forum comments, app notes... MCU sleep mode did not behave as expected. PWM output did not behave as expected. Shared USB and serial pins! Not documented.

Hed Text Bullets If Needed

Hed Text Bullets If Needed