© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training module provides an overview of debugging features.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Getting started with MPLAB Launch MPLAB Set Toolbar as in the next slide by clicking the leftmost icon Open a new Source file by choosing [FILE][NEW] Type.
Introduction to HT-IDE3000 Micro-C development System Department.
Tutorial 2 IDE for ARM 7 board (2). Outline Introduce the Debug mode of uVision4 2.
Introduction to Assembly language
Code Composer Department of Electrical and Computer Engineering
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
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.
Using PDG with e2studio: Example
CS 2511 Fall  Windows:  Start->Specialized Academic Software- >Programming Languages->NetBeans->NetBeans IDE x.y.z  where x.y.z is a version.
OllyDbg Debuger.
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 1 Introduction.
M16C/Tiny SKP Tutorial 1 Software Development Process using HEW4
Bit-DSP-MicrocontrollerTMS320F2812 Module 2 : Program Development Tools.
Introduction Purpose Objectives Content Learning Time
Chapter 2 Software Tools and Assembly Language Syntax.
Silicon Labs ToolStick Development Platform
The instructor presents the 1st 9 slides
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
P.1ECE 331, Prof. A. Mason Professor Andrew Mason Michigan State University Spring 2013 ECE 331: PC Lab 1: Using HC12 ASM Simulators.
ADAM46P20 Simulator V User’s Manual ETA Chips, Co., Kr., 2011 By W.S.YOU.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L13B David Hedley, Applications Engineer Advanced.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
Introduction Purpose This course describes the process of installing the KPIT GNU toolchain on your PC. Objective Learn how easy it is to get information.
Debugging Projects Using C++.NET Click with the mouse button to control the flow of the presentation.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
ADAM2 Single Remocon MCU IDE User’s Manual S/W Integrated Development Environment - Assembler - Simulator - Code Wizard V1.0 Technical Sales Team, ETA.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Playing Back Scripts In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
CPSC1301 Computer Science 1 Overview of Dr. Java.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Debugging Dwight Deugo Nesa Matic
Debugging. 2 © 2003, Espirity Inc. Module Road Map 1.Eclipse Debugging  Debug Perspective  Debug Session  Breakpoint  Debug Views  Breakpoint Types.
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an overview of the CPU architecture.
Active-HDL Interfaces Debugging C Code Course 10.
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Code Debugging Texas Instruments Incorporated University of Beira Interior.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 5 BACKNEXTEND 5-1 LINKS TO OBJECTIVES Transpose data Paste with mathematical calculation Paste.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced Debugging on the RX600.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced E 2 Studio Topics.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This course gives an overview of the Toolchain feature of the High.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L05I Advanced Debugging on the RX600 Fatih Peksenar.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This course explains how to use Mapview, a utility program for the.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Teaching Digital Logic courses with Altera Technology
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course describes Coverage, a utility that is used.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
Exercise 5: Developing an Embedded Application Write a software application to run on the system that we built in the previous exercise Compile the code.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Tutorial 2 IDE of Keil for the ARM 7 board(2)
Microcontroller Applications
Introduction Purpose Objectives Content Learning Time
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
Computer System Laboratory
Presentation transcript:

© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training module provides an overview of debugging features in H8S Simulator. Objectives  Understand how to use the Simulator.  Explore various debugging features: CPU status, registers, memory, breakpoints, and stepping. Content  21 pages  3 questions Learning Time  35 minutes

© 2008, Renesas Technology America, Inc., All Rights Reserved 2 H8S Simulator What is a simulator?  A software development tool that runs on a PC and substitutes for the MCU  Represents the MCU architecture and operating instructions Advantages of a simulator  Enables debugging when target hardware is not available  Helps reduce overall embedded system development time H8S Simulator functions  CPU instructions  Memory access  Register access Complementary HEW features  Help make the H8S Simulator more “hardware-like”  Include simulated I/O, Trigger, and TCL toolkit

© 2008, Renesas Technology America, Inc., All Rights Reserved 3 Before Debugging Session Begins 1.Begin Project Generation 2.Select the Target CPU 3.Set the Target System for Debugging Selecting this option automatically generates a simulator session

© 2008, Renesas Technology America, Inc., All Rights Reserved 4 /********************************************************/ /* TUTORIAL PROGRAM */ /********************************************************/ #include #include "string.h" #define NAME (short)0 #define AGE (short)1 #define ID (short)2 #define LENGTH 8 const char LED[]={0x12, 0x12, 0x11}; struct namelist { char name[LENGTH]; short age; long idcode; }; struct namelist section1[] = { "Naoko", 17, 1234, "Midori", 22, 8888, "Rie", 19, 7777, "Eri", 20, 9999, "Kyoko", 26, 3333, "", 0, 0 }; int count; void sort(); void main(void) { count = 0; for ( ; ; ){ sort(section1, NAME); count++; sort(section1, AGE); count++; sort(section1, ID); count++; } void sort(list, key) struct namelist list[]; short key; { short i,j,k; long min; char *name; struct namelist worklist; switch(key){ case NAME : for (i = 0 ; *list[i].name != 0 ; i++){ name = list[i].name; k = i; for (j = i+1 ; *list[j].name != 0 ; j++){ if (strcmp(list[j].name, name) < 0){ name = list[j].name; k = j; } worklist = list[i]; list[i] = list[k]; list[k] = worklist; } break; case AGE : for (i = 0 ; list[i].age != 0 ; i++){ min = list[i].age; k = i; for (j = i+1 ; list[j].age != 0 ; j++){ if (list[j].age < min){ min = list[j].age; k = j; } worklist = list[i]; list[i] = list[k]; list[k] = worklist; } break; case ID : for (i = 0 ; list[i].idcode != 0 ; i++){ min = list[i].idcode; k = i; for (j = i+1 ; list[j].idcode != 0 ; j++){ if (list[j].idcode < min){ min = list[j].idcode; k = j; } worklist = list[i]; list[i] = list[k]; list[k] = worklist; } break; } Example: Tutorial program with sorting routine is used for simulation Enter Code Initialization Main Sort Switch to Simulator session

© 2008, Renesas Technology America, Inc., All Rights Reserved 5 Basic Debugging ViewDebug

© 2008, Renesas Technology America, Inc., All Rights Reserved 6 Basic Debugging: View Menu ViewDebug Display assembly code View CPU registers View memory View peripheral registers View CPU status View simulated I/O View/configure simulated interrupts View/configure labels View/modify variables View/modify local variables

© 2008, Renesas Technology America, Inc., All Rights Reserved 7 Basic Debugging: Debug Menu ViewDebug Execute code Reset CPU and execute code Execute until PC reaches the cursor position Set PC value and execute Display PC value Step into deeper level Step to the next line Step out to the higher level Download into target

© 2008, Renesas Technology America, Inc., All Rights Reserved 9 Download Module 1. Right click and select “Download module” to load module into simulator target 2. After downloading, the Simulator displays starting address for each line of C code Download into target

© 2008, Renesas Technology America, Inc., All Rights Reserved 10 View Status 1. Select to view CPU status 2. Status window shows memory and downloaded module information

© 2008, Renesas Technology America, Inc., All Rights Reserved 11 Disassembly 1. Select “Disassembly” to view corresponding assembly code 2. Right-click on “Disassembly” and select “Set Address” to set the starting address 3. Enter “000800” and click OK

© 2008, Renesas Technology America, Inc., All Rights Reserved 12 View Assembly Instructions 4. Disassembly window shows assembly code, starting from address (“main” function)

© 2008, Renesas Technology America, Inc., All Rights Reserved 13 Registers Window 2. Register values can be edited directly in the Registers window 1. Select to open Registers window

© 2008, Renesas Technology America, Inc., All Rights Reserved 14 Watch Window 2. Right-click in Watch window and select “Add Watch” 3. Enter “section1” and click OK 4. View values of “section1” array in Watch window 1. Select to open Watch window

© 2008, Renesas Technology America, Inc., All Rights Reserved 15 Examine Memory Content 1. Select to view memory content 3. Memory window appears. (Values of “section1” won’t be updated until “Reset Go” is executed) 2. Enter address of “section1” (from Watch window)

© 2008, Renesas Technology America, Inc., All Rights Reserved 16 Set and View Breakpoints 1. Right-click on line, then select “Toggle Breakpoint” 3. Select to open Eventpoint window 4. See all breakpoints in program 2. Red dot appears

© 2008, Renesas Technology America, Inc., All Rights Reserved 18 Execute Program 1. Select “Reset Go” to begin executing program 2. Execution stops at breakpoint. (Yellow arrow indicates current position of program counter.) 3. Register values are updated in Registers window. (Program counter value corresponds to position marked by yellow arrow in Edit menu.) Program Counter stopped at Breakpoint

© 2008, Renesas Technology America, Inc., All Rights Reserved 19 Content of Memory Window 4. See values of “section1” array

© 2008, Renesas Technology America, Inc., All Rights Reserved 20 Stepping Through the Code HEW also supports flexible stepping, which is accessible from the “Step...” menu option. Three basic levels of stepping: Step In - Takes you deeper into function call - Moves PC to start of sub-function Step Over - Executes current line of source code, including all instructions in sub-function - Moves PC to next line Step Out - Lets you go back to next-higher level of code; i.e., return from the function call

© 2008, Renesas Technology America, Inc., All Rights Reserved 21 Step In 2. Arrow in Edit window shows program counter position at the beginning of the called function after stepping Example: 3. Registers window updates program counter value If source line does not call a function, a Step-In operation is the same as a Step-Over operation. 1. Select “Step In” to go deeper into function call

© 2008, Renesas Technology America, Inc., All Rights Reserved 22 Step Over 2. Arrow in Edit window shows program counter position after stepping 3. Registers window updates program counter value 1. Select “Step Over” to step to the next line Example: If source line does not call a function, a Step-In operation is the same as a Step-Over operation.

© 2008, Renesas Technology America, Inc., All Rights Reserved 23 Step Out 2. Arrow in Edit window shows program counter position at the next line of the calling function after stepping 1. Select “Step Out” to go back to next higher level of code Example: 3. Registers window updates program counter value Before Step Out After Step Out

© 2008, Renesas Technology America, Inc., All Rights Reserved 24 Track Variable in Watch Window 2. “Step Over” to next line 1. Add the variable “count” to Watch window 3. Value of “count” is updated in Watch window Breakpoint Program Counter

© 2008, Renesas Technology America, Inc., All Rights Reserved 26 Definition of a simulator Key features of H8S Simulator Using H8S features for debugging Course Summary Download a free evaluation copy of HEW at: