UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Code Debugging Texas Instruments Incorporated University of Beira Interior.

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

Introduction to HT-IDE3000 Micro-C development System Department.
UBI >> Contents Chapter 2 Software Development Tools Code Composer Essentials v3: Overview Texas Instruments Incorporated University of Beira Interior.
UBI >> Contents Chapter 15 Advanced Laboratories MSP430 assembly language tutorial: MSP430X CPU MSP430 Teaching Materials Texas Instruments Incorporated.
UBI >> Contents Chapter 7 Timers Laboratories MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
Code Composer Department of Electrical and Computer Engineering
MSP430 Teaching Materials
Slide 1CPU Emulator Tutorial This program is part of the software suite that accompanies the book The Digital Core, by Noam Nisan and Shimon Schocken 2003,
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Processor System Architecture
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
The Web Warrior Guide to Web Design Technologies
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Introducing Algorithms, Pseudocode and.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Finding and Debugging Errors
Chapter 4 H1 Assembly Language: Part 2. Direct instruction Contains the absolute address of the memory location it accesses. ld instruction:
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
JavaScript, Fourth Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
UBI >> Contents Chapter 12 Hardware Multiplier MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
UBI >> Contents Chapter 9 Data Acquisition Introduction MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro.
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Laboratory Texas Instruments Incorporated University of Beira Interior.
Debugging Logic Errors CPS120 Introduction to Computer Science Lecture 6.
Introduction Purpose Objectives Content Learning Time
Cortex-M3 Debugging System
Chapter 2 Software Tools and Assembly Language Syntax.
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.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Debugging applications, using properties Jim Warren – COMPSCI 280 S Enterprise Software Development.
1 Chapter 9 Writing, Testing, and Debugging Access Applications.
Tutorial 11 Using and Writing Visual Basic for Applications Code
MICROPROCESSOR INPUT/OUTPUT
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Wage Calculator Application: Introducing.
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.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
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.
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Creating a project Texas Instruments Incorporated University of Beira.
A Tutorial on Introduction to gdb By Sasanka Madiraju Graduate Assistant Center for Computation and Technology.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training module provides an overview of debugging features.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Lecture 1: Review of Computer Organization
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
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.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Chapter 6 General Purpose Input/Output
Debugging Dwight Deugo
PRU-ICSS Programming with CCS
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
Debugging with Eclipse
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Debugging Dwight Deugo
Code Composer Essentials 3.0
Debugging with Eclipse
Embedded Development Tools
Presentation transcript:

UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Code Debugging Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto Santos University of Beira Interior, Electromechanical Engineering Department MSP430 Teaching Materials Copyright 2009 Texas Instruments All Rights Reserved

UBI >> Contents 2 Copyright 2009 Texas Instruments All Rights Reserved Contents  Code Composer v3: Code debugging: Code Composer v3:Code debugging  Debugging steps Debugging steps  EEM - Enhanced Emulation Module EEM - Enhanced Emulation Module  Breakpoints types Breakpoints types  Predefined breakpoint set Predefined breakpoint set  Variables view Variables view  Expressions view Expressions view  Memory view Memory view  Expanding CCE capabilities with Eclipse JDT and PDE Expanding CCE capabilities with Eclipse JDT and PDE >> Contents

UBI >> Contents 3 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (1/25) Code debugging  TI’s debugger generates an output file as a result of building the project;  Debugging steps:  Select an active project, or click Run > Debug Active Project or select the icon ;  It resets and suspends the execution of code on the device;  The contents of all status registers are modified to their power-up state defaults, in accordance with the device specifications;  The reset command is enabled by > Reset CPU;

UBI >> Contents 4 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (2/25) Code debugging  Debugging steps (continued):  To start program execution, once it has been loaded into the device memory, select the option Run > Run (F8), or click on the button ;  Execution will take place until the program finds a breakpoint;  Program execution may be suspended at any time by using the command Run > Halt, or by clicking the button ;  To re-start the execution of the application, use the command Run > Restart, or click : Does not modify the execution state of the device; Restores the PC to the starting point of the application.

UBI >> Contents 5 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (3/25) Code debugging  Debugging steps (continued):  The Set PC to Cursor feature moves the execution of the application to a particular point in the program memory;  The execution of this command only modifies the contents of the PC register;  No instructions will be executed in order to reach this particular point in program memory.

UBI >> Contents 6 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (4/25) Code debugging  Debugging steps (continued):  There are several ways to run the code until a specific point in the code: Use a breakpoint to stop the program execution when the specific point in code has been reached; Use the command Run > Run to Line, to run the code until the specified location; A special case is to run the code until the main function is reached : –Set a temporary breakpoint at the start of main; –Start the execution of the application; –Once the temporary breakpoint is reached, the breakpoint is removed and execution suspended.

UBI >> Contents 7 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (5/25) Code debugging  Debugging steps (continued):  The stepping commands execute each instruction one at a time;  When a function is reached, the code execution can continue: Into the function (Step Into); Perform the function and pass to the following instruction (Step Over); Once inside a function, the user can continue to execute each instruction individually, or run the rest of the function code until it ends (Step Out);

UBI >> Contents 8 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (6/25) Code debugging  Debugging steps (continued):  The next instruction execution is performed through Run > Step Into (F5), or by clicking the icon ;  The next instruction is processed when this command is executed;  If the following statement is a function call, the debugger passes the execution to the first instruction of the function, and suspends execution at that point;  When the execution point is at the start of a function call, the step over operation can be used by selecting the Run > Step Over (F6) or by clicking the icon.

UBI >> Contents 9 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (7/25) Code debugging  Debugging steps (continued):  The debugger performs the function and suspends the execution when it returns;  A breakpoint in a function suspends the execution;  If the Step Over is used on an instruction that is not a function call, it will work as a Step Into command;  It is possible to force the return of a function through the command Run > Step Return (F7), or by clicking the button ;  The debugger will execute the rest of the function code and return the call point to suspend the execution;  The command Terminate allows the debugging session to finish immediately.

UBI >> Contents 10 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (8/25) Code debugging  EEM - Enhanced Emulation Module:  Non-intrusive monitoring of the operation of the device ;  Does not use processor resources;  Facilitates the development of the application through the verification of the operation.

UBI >> Contents 11 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (9/25) Code debugging  EEM - Enhanced Emulation Module:  Features: Supports up to 8 hardware breakpoints; Operates at all frequencies and with all clock sources; Ability to set complex breakpoints (associate triggers); Suspend the execution of the application (program or data bus access); Access protection (data and program memory areas); All timers and counters can be inhibited (depending on the device); Inhibits generation of PWM signals when the application suspends; Allows real-time execution of the application in the following modes: single step, step into, run to cursor, step over; Supports all low power modes.

UBI >> Contents 12 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (10/25) Code debugging  Events inside the device generate triggers;  These triggers can be classified as events that cause: Access to addressing and data busses; Access to CPU registers.  Depending on the device, it is possible to associate two or more of these triggers. This allows complex event detectors to be built that help locate the point of incorrect operation of the application;  Generally, a trigger can be used to control the following functional blocks of the EEM: breakpoints, trace and sequencer;  The activation of a trigger is conditional on access to the data and program busses or access to CPU registers.

UBI >> Contents 13 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (11/25) Code debugging  Breakpoints types:  Software breakpoint: implemented through the insertion of code in the application, in a way transparent to the user.  Hardware breakpoint: implemented internally by the device hardware.  While the software breakpoints are not limited, the hardware breakpoints depend on the device and have a limit of 2 to 4 breakpoints;  An active breakpoint is identified by the symbol in the sidebar of the code window;  The symbol will identify a hardware breakpoint;  A disabled breakpoint will be identified by the symbol.

UBI >> Contents 14 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (12/25) Code debugging  A breakpoint is set through one or more triggers;  Through these triggers it is possible to set up the following types of breakpoints: Address (simple) breakpoint; Data breakpoint; Register Breakpoint; Mask Register; Range breakpoint.  Address (simple) breakpoint:  Defined using a trigger associated with an instruction read operation by the CPU;  Specifies the instruction address where the trigger should occur.

UBI >> Contents 15 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (13/25) Code debugging  Data Breakpoint:  One of the triggers is used to detect the occurrence of a particular address in the address bus;  The other is used to detect the occurrence of a read or write operation at that address;  It is possible to force the suspension of the execution of the application when there is a match between the value written or read and the one specified.  Register Breakpoint:  Uses a trigger to detect the access to a register.  Mask Register:  Used when the register is composed of several fields, since it can apply a mask to only use specific bits.

UBI >> Contents 16 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (14/25) Code debugging  Range breakpoint:  Suspends the execution of the application on the occurrence of a: Write to flash; Invalid access to memory; Access to an instruction in invalid program space; Access to data on invalid space data.  Hardware breakpoints properties:  Are established through different fields;  The action to perform when all triggers are true can be defined in the Action option of the Hardware Configuration field: Halt; Trigger storage; Halt and trigger storage.

UBI >> Contents 17 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (15/25) Code debugging  Hardware breakpoints properties (continued):  In the Trigger field, specify through the available options, the check condition for a trigger true. The trigger can be: Memory Address bus: –Location: Address of the program code line (e.g.: aes.c, line 30) or data memory address (e.g.: &a); –Mask: the information introduced in this field is used in a logic AND operation with the content; –Operator: Logic operation with the data (==, =, !=); –Access: Memory access type.

UBI >> Contents 18 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (16/25) Code debugging  Hardware breakpoints properties (continued):  In the Trigger field, specify through various options, the check condition for a true trigger. The trigger can be: Memory Data bus: –Value: A mask will be applied to the data on the data bus and to value added by the value and compared, to determine if the trigger is true; –Mask: the information introduced in this field is used in a logic AND operation with the content; –Operator: Logic operation with the data (==, =, !=); –Access: Memory access type (like in Memory Address Bus).

UBI >> Contents 19 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (17/25) Code debugging  Hardware breakpoints properties (continued):  In the Trigger field, specify through various options, the check condition for a true trigger. The trigger can be: Miscellaneous: –Group: Group to which the breakpoint belongs; –Name: Name assigned to the breakpoint.

UBI >> Contents 20 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (18/25) Code debugging  Predefined breakpoint set:  Break in program range: Suspends execution of the application in a range of program memory addresses; Uses two triggers that define the range of addresses.  Break in DMA transfer: Suspends the execution of the application, whenever a DMA read or write operation at the specified programme address occurs; Implemented using only one trigger.  Break in DMA transfer range: Suspends execution of the application, whenever a DMA read or write operation at the specified address range occurs; Implemented using two triggers.

UBI >> Contents 21 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (19/25) Code debugging  Predefined breakpoint set:  Break in stack overflow: Suspends execution of application, whenever the stack pointer (SP) register value assumes a lower value than the one specified; Uses only one trigger.  Breakpoint: Suspends execution of application, whenever the memory bus address takes the specified value; Implemented using only one trigger.  Hardware breakpoint: Suspends execution of the application, whenever the memory bus address takes the specified value; Uses only one trigger.

UBI >> Contents 22 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (20/25) Code debugging  Predefined breakpoint set:  Watch on data address range: Suspends execution of the application, whenever the specified data memory addresses range is accessed; Uses two triggers to define the range of addresses.  Watchpoint: Suspends execution of the application, whenever a specified data memory address is accessed; Uses a trigger to generate the watchpoint.  Watchpoint with data: Suspends execution of the application, whenever a specified data memory address is accessed and the value of the address is equal to specified value; Two triggers are used to implement this watchpoint.

UBI >> Contents 23 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (21/25) Code debugging  Procedure:  Place the cursor at a particular line of code and then use the command to activate a breakpoint;  The command enables or disables a breakpoint at the cursor location;  An alternative method is to use the context menu with the option toggle breakpoint;  The application debugging process often requires access to the current values of the variables.

UBI >> Contents 24 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (22/25) Code debugging  Variables view:  Monitors the local and global variables of the application ;  In this view, CCE automatically displays the names and contents of the local variables of the function that is being executed;  It is also possible to add the name of other local variables or global variables to be monitored in the debugging process;  The values of local variables can be modified;  The values of the variables that have been changed during the last instruction execution are displayed in red;  Variable names cannot be modified.

UBI >> Contents 25 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (23/25) Code debugging  Variables view:  The representation format of a variable can be: Natural; Decimal; Hex.  The variables that contain more than one element, such as arrays, structures, or pointers are presented with a (+) sign immediately after their name;  The (+) sign means that the variable has elements that can be seen through the expansion of the (+) sign. The (-) sign allows the structure to be collapsed;  Local variables can not be added or removed (only disabled - freeze value);  Global variables can be added or removed.

UBI >> Contents 26 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (24/25) Code debugging  Expressions view:  Accepts the entry of expressions to evaluate them as the program is executed;  These expressions are written in a syntax similar to that used by the C programming language;  The available commands allows to: Specify the number of array elements to be displayed; Display the pointer/array elements (Display as Array); Return an expanded variable back to its original state (Remove Array Expansion); Change the value of a variable (Change value); Promote to a different type of variable (Cast to type); Restore the expression’s original data type (Restore Original Type).

UBI >> Contents 27 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE (25/25) Code debugging  Memory view:  Monitor and modify the memory of the device ;  The memory can be examined with a series of Memory Monitors;  Each monitor represents a section of memory specified by location (base address);  Each memory monitor may be presented in different data formats (Memory renderings): Hex (default); Ascii; Integer signed; Unsigned integer.

UBI >> Contents 28 Copyright 2009 Texas Instruments All Rights Reserved Introduction to CCE Expanding CCE capabilities with Eclipse JDT and PDE  CCE can be expanded beyond its default capabilities;  There is a set of Eclipse plug-ins that can be used;  Features can be installed to allow Java programming and the development of Eclipse plug-ins;  These updates should be made only in when the features are needed. Alternatively, they can always co-exist in the same system, one CCE installation and another from Eclipse.  The CCE is based on the Eclipse’s release 3.2;  All plug-ins installed must be compatible with this version;  The installation of plug-ins is extremely easy. Just unpack the releases into the correct directories.