Freescale Semiconductor Microcontrollers User Manual

5 (1)

Microcontrollers

Debugger Manual

Revised: 22 October 2007

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. CodeWarrior is a trademark or registered trademark of Freescale Semiconductor, Inc. in the United States and/or other countries. All other product or service names are the property of their respective owners.

Copyright © 1989–2007 by Freescale Semiconductor, Inc. All rights reserved.

Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document.

Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals”, must be validated for each customer application by customer's technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part.

 

How to Contact Us

 

 

Corporate Headquarters

Freescale Semiconductor, Inc.

 

7700 West Parmer Lane

 

Austin, TX 78729

 

U.S.A.

 

 

World Wide Web

http://www.freescale.com/codewarrior

 

 

Technical Support

http://www.freescale.com/support

 

 

Table of Contents

Introduction

Manual Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Book I - Debugger Engine

Book I Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

1 Introduction

25

Freescale Debugger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Debugger Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Debugger Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Demo Version Limitations on Components . . . . . . . . . . . . . . . . . . . . . . . . . 26

2 Debugger Interface

27

Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Application Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Starting the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Starting from within the IDE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Debugger Command Line Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Debugger Main Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Debugger Main Window Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Debugger Main Window Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Main Window Menu Bar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Component Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Window Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Help Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Component Associated Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Component Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Microcontrollers Debugger Manual

3

Table of Contents

Component Windows Object Info Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53

Component Context Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53

Highlights of the User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54

Activating Services with Drag and Drop. . . . . . . . . . . . . . . . . . . . . . . . . . . .54

To Drag and Drop an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55

Drag and Drop Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55

3 Debugger Components

61

Component Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61

CPU Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61

Window Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61

Connection Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62

Loading Component Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62

General Debugger Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64

Assembly Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64

Command Line Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

Coverage Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73

DA-C Link Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76

Data Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79

Memory Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90

Module Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102

Procedure Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104

Profiler Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106

Recorder Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109

Register Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111

Source Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115

Terminal Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125

Trace Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130

Visualization Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133

Inspector Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133

Visualization Tool Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141

4 Control Points

157

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157

Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158

4

Microcontrollers Debugger Manual

Table of Contents

Breakpoints Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Multiple Selections in List Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Checking Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Saving Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Setting Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Positions Where a Breakpoint Is Definable . . . . . . . . . . . . . . . . . . . . . . . . 164 Temporary Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Permanent Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Counting Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Conditional Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Deleting Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Associate a Command with a Breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . 169 Watchpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Watchpoints Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Multiple Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Checking Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Setting Watchpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Setting a Read Watchpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Setting a Write Watchpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Defining a Read/Write Watchpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Defining a Counting Watchpoint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Defining a Conditional Watchpoint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Deleting a Watchpoint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Associate a Command with a Watchpoint. . . . . . . . . . . . . . . . . . . . . . . . . . 178 Markpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Markpoints Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Setting Markpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Setting a Source Markpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Setting a Data Markpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Setting a Memory Markpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Deleting a Markpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Halting on a Control Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

5 Real Time Kernel Awareness

185

Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Microcontrollers Debugger Manual

5

Table of Contents

Inspecting Task State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186

Task Description Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186

Application Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188

Inspecting Kernel Data Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189

OSEK Kernel Awareness. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190

OSEK Run Time Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191

ORTI File and Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191

OSEK RTK Inspector Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193

6 How To...

199

How To Configure the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199 For Use from Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199 Starting Debugger from CodeWarrior IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . .200 Automating Debugger Startup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 How To Load an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202 How to Start an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202 How to Stop an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203 How to Step in the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203 On Source Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203 Step Over a Function Call (Flat Step) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 Step on Assembly Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 How to Work on Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 Display Local Variable from a Function . . . . . . . . . . . . . . . . . . . . . . . . . . .205 Display Global Variable from a Module . . . . . . . . . . . . . . . . . . . . . . . . . . .206 Change Format for Variable Value Display . . . . . . . . . . . . . . . . . . . . . . . . .207 Modify a Variable Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208 Get the Address Where a Variable is Allocated. . . . . . . . . . . . . . . . . . . . . .208 Inspect Memory Starting at a Variable Location Address. . . . . . . . . . . . . .209 Load an Address Register with the Address of a Variable . . . . . . . . . . . . .209 How to Work on the Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Change Format of Register Display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Modify a Register Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Start Memory Dump at Address Where Register is Pointing . . . . . . . . . . .211 Modify Content of Memory Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 How to Consult Assembler Instructions Generated by a Source Statement . . .212

6

Microcontrollers Debugger Manual

Table of Contents

How to View Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 How to Communicate with the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

7

CodeWarrior IDE Integration

215

 

Debugger Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 215

8

Debugger DDE Capabilities

217

 

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 217

 

DDE Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 217

9

Synchronized Debugging Through DA-C IDE

219

Configuring DA-C IDE for Freescale Tool Kit. . . . . . . . . . . . . . . . . . . . . . . . . 219 Create New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Configuring The Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Debugger Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 DA-C IDE and Debugger Communication . . . . . . . . . . . . . . . . . . . . . . . . . 230 Synchronized Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

Book II - HC08 Debug Connections

Book II Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

10 Microcontroller Debugging First Steps

239

Technical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

Full Chip Simulation Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

HC08 Serial Monitor Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

ICS MON08 Interface Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

P&E Multilink/Cyclone Pro Considerations . . . . . . . . . . . . . . . . . . . . . . . . 240

ICS P&E Multilink/Cyclone Pro Considerations . . . . . . . . . . . . . . . . . . . . 240

SofTec HC08 Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

Debugging First Steps Using the Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Switching Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

Microcontrollers Debugger Manual

7

Table of Contents

Loading the Full Chip Simulation Connection . . . . . . . . . . . . . . . . . . . . . .246 Loading the P&E Multilink/Cyclone Pro Connection. . . . . . . . . . . . . . . . .248 Loading the HC(S)08 or RS08 Open Source BDM Connection . . . . . . . . .251

11 HC08 Full Chip Simulation

253

Configuration Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253

Select Device Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255

Full Chip Simulation Module Commands. . . . . . . . . . . . . . . . . . . . . . . . . .255

Peripheral Modules Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257

ADC Module Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258

Clock Generation Module Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260

High-Resolution PWM Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262

Input/Output (I/O) Ports Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265

External Interrupt Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .268

Keyboard Interrupt Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269

Multi-Master Inter-Integrated Circuit Module . . . . . . . . . . . . . . . . . . . . . .272

FCSMSCAN Controller Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .276

FCS Programmable Timer Interrupt Module. . . . . . . . . . . . . . . . . . . . . . . .291

FCS Serial Communications Interface Module. . . . . . . . . . . . . . . . . . . . . .292

FCS Slave LIN Interface Controller Module. . . . . . . . . . . . . . . . . . . . . . . .296

FCS Serial Peripheral Interface Module . . . . . . . . . . . . . . . . . . . . . . . . . . .300

FCSTimer Interface Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304

FCS Universal Serial Bus (USB) Module . . . . . . . . . . . . . . . . . . . . . . . . . .309

12 MON08 Interface Connection

333

Connection Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333

Advanced Settings Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335

Target MCU Security Bytes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338

Active Mode Connection Menu Options. . . . . . . . . . . . . . . . . . . . . . . . . . .342

Device Class Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346

13 ICS MON08 Interface Connection

349

ICS Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349

Connection Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350

Advanced Settings Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352

8

Microcontrollers Debugger Manual

Table of Contents

Cycle Power Radio Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

Target MCU Security Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

STATUS Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

Active Mode Connection Menu Options. . . . . . . . . . . . . . . . . . . . . . . . . . . 358

Device Class Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361

14 HC08 P&E Multilink/Cyclone Pro Connection

365

Connection Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365

Advanced Settings Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368

Target MCU Security Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

STATUS Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

Connection (MultilinkCyclonePro) Menu . . . . . . . . . . . . . . . . . . . . . . . . . 374

Active Mode Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375

Debugging Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379

Debugging Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379

Device Class Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

Class 5 Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

Class 7 Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

Class 8 Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

15 HC08 ICS P&E Multilink/Cyclone Pro Connections

381

Connection Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

Advanced Settings Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

Target MCU Security Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387

STATUS Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387

Active Mode Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

Device Class Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393

Class 5 Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393

Class 7 Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393

Class 8 Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

16 SofTec HC08 Connection

395

SofTec HC08 Technical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

CodeWarrior IDE and SofTec HC08 Connection . . . . . . . . . . . . . . . . . . . . . . . 395

Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396

Microcontrollers Debugger Manual

9

Table of Contents

From Within an Existing Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397

inDart-HC08 Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398

MCU Configuration Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399

Communication Settings Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399

About Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400

17 HC08 FSICEBASE Emulator

401

FSICEBASE Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402 System Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402 System Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403 Setting Up the FSICEBASE System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405 Setting Up the Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405 Establishing Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .407 Communication Through Ethernet Port . . . . . . . . . . . . . . . . . . . . . . . . . . .407 Communication Through USB Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .408 Setting Up the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409 Specifying A Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409 Specifying Communication Information . . . . . . . . . . . . . . . . . . . . . . . . . . .410 Assigning an IP Address to FSICEBASE . . . . . . . . . . . . . . . . . . . . . . . . . .412 Specifying a Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414 Specifying the Clock Speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 Emulation System Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419 Setting Up Logic Cables and Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419 Bus State Analyzer (BSA). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421 Using BSA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421

Book III - HCS08 Debug Connections

Book III Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .429

18 HCS08 Full Chip Simulation

431

Configuration Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431

10

Microcontrollers Debugger Manual

Table of Contents

Connection (HCS08FCS) Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432

Peripheral Modules Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435

ADC Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436

Clock Generation Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438

Inter-Integrated Circuit Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440

Input/Output (I/O) Ports Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444

External Interrupt (IRQ) Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447

Keyboard Interrupt Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450

Modulo Timer Interrupt Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

Serial Communications Interface Module. . . . . . . . . . . . . . . . . . . . . . . . . . 453

Serial Peripheral Interface Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457

Timer Interface Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461

19 HCS08 P&E Multilink/Cyclone Pro Connection

467

Connection Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467

MultilinkCyclonePro Menu Description. . . . . . . . . . . . . . . . . . . . . . . . . . . 470

Active Mode Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471

20 HCS08 Open Source BDM Connection

477

HCS08 Open Source BDM Technical Considerations . . . . . . . . . . . . . . . . . . . 477 CodeWarrior IDE and HCS08 Open Source BDM Connection . . . . . . . . . . . . 477 First Steps Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 First Steps From Within an Existing Project . . . . . . . . . . . . . . . . . . . . . . . . . . 479 HCS08 Open Source BDM Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . 480 HCS08 Open Source BDM Setup Dialog Box . . . . . . . . . . . . . . . . . . . . . . 482 Select Derivative Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 Information Required to Unsecure the Device . . . . . . . . . . . . . . . . . . . . . . 484 Show Status Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485

21 HCS08 Serial Monitor Connection

487

Serial Monitor Technical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 CodeWarrior IDE and Serial Monitor Connection . . . . . . . . . . . . . . . . . . . . . . 487 First Steps Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 First Steps from Within an Existing Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 MONITOR-HCS08 Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

Microcontrollers Debugger Manual

11

Table of Contents

Monitor Setup Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493

Derivative Selection Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .495

22 SofTec HCS08 Connection

497

SofTec HCS08 Technical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .497 CodeWarrior IDE and SofTec HCS08 Connection . . . . . . . . . . . . . . . . . . . . . .497 First Steps Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .498 First Steps from Within an Existing Project . . . . . . . . . . . . . . . . . . . . . . . . . . .499 SofTec HCS08 Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500 MCU Configuration Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501 Communication Settings Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501 About Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .502

23 HCS08 On-Chip DBG Module

503

Reference Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .503

DBG Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .503

Specific Connection Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504

Context Menu Entries in Source, Data, Assembly and Memory Windows . . .505

Source and Assembly Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .505

Trigger Stored as Markpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508

Data and Memory Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509

Expert Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .512

Trigger Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514

Trigger Module Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .515

DBG Support Status Bar Item. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .515

Trigger Module Settings Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .516

DBG Module Mode Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .517

Automatic Mode (Default) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .517

Expert Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .518

Expert Mode Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .519

Profiling and Coverage Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .519

Disabled Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .520

Memory Access Triggers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521

Instruction Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .523

Capture Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .526

12

Microcontrollers Debugger Manual

Table of Contents

DBG Module Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 Trigger Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 Trigger Module Settings Window - Display Information . . . . . . . . . . . . . . 530 General Settings Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 Trace Component Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 Instructions Display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 Graphical Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 Textual Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 Column Display and Moving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 Goto Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 Clearing Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 HCS08 DBG V3 New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 MMU and Extended Address Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 LOOP1 mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 Ability to record until Reset and from Reset. . . . . . . . . . . . . . . . . . . . . . . . 539 Expert Triggers tab extended. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543

Book IV - RS08 Debug Connections

Book IV Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545

24 RS08 Full Chip Simulation

547

Configuration Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547

Connection (RS08FCS) Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

Peripheral Modules Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

25 RS08 P&E Multilink/Cyclone Pro Connection

553

Connection Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

MultilinkCyclonePro Menu Description. . . . . . . . . . . . . . . . . . . . . . . . . . . 555

Active Mode Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

Microcontrollers Debugger Manual

13

Table of Contents

26 RS08 Open Source BDM Connection

561

RS08 Open Source BDM Technical Considerations. . . . . . . . . . . . . . . . . . . . .561 CodeWarrior IDE and RS08 Open Source BDM Connection . . . . . . . . . . . . .561 First Steps Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .562 First Steps From Within an Existing Project. . . . . . . . . . . . . . . . . . . . . . . . . . .563 RS08 Open Source BDM Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . .564 RS08 Open Source BDM Setup Dialog Box. . . . . . . . . . . . . . . . . . . . . . . .565 Select Derivative Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .566 Show Status Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .566

27 SofTec RS08 Connection

567

SofTec RS08 Technical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .567

CodeWarrior IDE and SofTec RS08 Connection . . . . . . . . . . . . . . . . . . . . . . .567

First Steps Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .568

First Steps From Within an Existing Project. . . . . . . . . . . . . . . . . . . . . . . . . . .570

SofTec RS08 Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .571

MCU Configuration Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .572

Communication Settings Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . .572

About Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .573

Book V - ColdFire® V1.0 Debug

Connections

Book V Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .575

28 ColdFire V1 Full Chip Simulation Connection

577

Full Chip Simulation Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .577

Memory Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .580

Clock Frequency Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .586

Bus Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .587

Full Chip Simulation Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .588

FCS and Silicon On-Chip Peripherals Simulation . . . . . . . . . . . . . . . . . . . . . .592

14

Microcontrollers Debugger Manual

Table of Contents

FCS Visualization Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 Analog Meter Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 IO_LED Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 LED Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 Phone Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 ADC/DAC Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600 Conversion Parameters Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603 IT_Keyboard Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 Interruption Keyboard Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 LCD Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 Monitor Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 Push Buttons Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 Programmable IO_Ports Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 7-Segments Display Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 Stimulation Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 Terminal Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631

True Time I/O Stimulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 Stimulation Program Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 Stimulation Input File Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Electrical Signal Generators and Signals Application to Device Pins . . . . . . . 647 Signal IO Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 Signal Description File EBNF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 Base Signal Files Provided . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 Virtual Wire Connections with the Pinconn IO Component. . . . . . . . . . . . 652 Command Set to Apply Signal on ATD Pin . . . . . . . . . . . . . . . . . . . . . . . . 654 FCS Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 Guess the Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 PWM Sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663

29 ColdFire P&E Multilink/Cyclone Pro Connection

669

P&E Multilink/Cyclone Pro Technical Considerations . . . . . . . . . . . . . . . . . . 669 CodeWarrior IDE and P&E Multilink/Cyclone Pro Connection . . . . . . . . . . . 669 First Steps Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 First Steps From Within an Existing Project . . . . . . . . . . . . . . . . . . . . . . . . . . 671 P&E Multilink/Cyclone Pro Menu Options . . . . . . . . . . . . . . . . . . . . . . . . 673

Microcontrollers Debugger Manual

15

Table of Contents

P&E Multilink/Cyclone Pro Setup Dialog Box. . . . . . . . . . . . . . . . . . . . . .674

Connection Manager Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .675

Set Derivative Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .676

30 SofTec ColdFire Connection

677

SofTec ColdFire Technical Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . .677

CodeWarrior IDE and SofTec ColdFire Connection. . . . . . . . . . . . . . . . . . . . .677

First Steps Using the Stationery Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .678

First Steps From Within an Existing Project. . . . . . . . . . . . . . . . . . . . . . . . . . .679

SofTec ColdFire Menu Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .681

SofTec Coldfire Setup Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .682

Target Connection Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .683

Communication Settings Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . .684

Set Derivative Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .685

About Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .686

31 ColdFire On-Chip DBG Module

687

DBG Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .687

Context Menu Entries in Source, Data, Assembly and Memory Windows . . .688

Trigger Module Settings Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .689

Trigger Module Usage/DBG Module Setup . . . . . . . . . . . . . . . . . . . . . . . .689

General Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .695

Book VI - Connection Common

Features

Book VI Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .697

32 Flash Programming

699

Non-Volatile Memory Control Utility Introduction . . . . . . . . . . . . . . . . . . . . .699

Automated Application Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .699

Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .700

16

Microcontrollers Debugger Manual

Table of Contents

Advanced Options: Erase Prevention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701

NVMC Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702

Modules and Module States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702

NVMC Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703

Flash Module Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705

MCU Speed Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706

Configuration: FPP File Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706

Loading an Application in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708

Hardware Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709

HCS08 CPU devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709

HCS08 CPU devices with banked/paged EEPROM . . . . . . . . . . . . . . . . . . 709

ColdFire CPU devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709

NVMC Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710

33 Debugging Memory Map

715

Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715

The DMM GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715

Edition dialog and memory range edition . . . . . . . . . . . . . . . . . . . . . . . . . . 717

Remarks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720

CPU Core Types and Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721

DMM Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722

Debugging Memory Map Manager command set. . . . . . . . . . . . . . . . . . . . 722

Book VII - Commands

Book VII Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729

34 Debugger Engine Commands

731

Commands Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731

Available Command Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732

Command Syntax Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740

Debugger Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742

Microcontrollers Debugger Manual

17

Table of Contents

Book VIII - Environment Variables

Book VIII Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .839

35 Debugger Engine Environment Variables

841

Debugger Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .842 The Current Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .842 Global Initialization File (MCUTOOLS.INI - PC Only) . . . . . . . . . . . . . .843 Local Configuration File (usually project.ini). . . . . . . . . . . . . . . . . . . . . . . . . .844 Default Layout Configuration (PROJECT.INI) . . . . . . . . . . . . . . . . . . . . . .845 Environment Variable Paths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .848 Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .850 Search Order for Source Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .857 In the Debugger for C Source Files (*.c, *.cpp) . . . . . . . . . . . . . . . . . . . . .857 In the Debugger for Assembly Source Files (*.dbg) . . . . . . . . . . . . . . . . . .857 In the Debugger for Object Files (HILOADER) . . . . . . . . . . . . . . . . . . . . .858

Debugger Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .858

36 Connection-Specific Environment Variables

861

Connection-Specific Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . .861

Book IX - Debugger Legacy

Book IX Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .863

37 Legacy PEDebug Target Interface

865

New P&E Connections for HC(S)08. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .865 “Revert to Full Chip Simulator” Feature Removed . . . . . . . . . . . . . . . . . . . . .865 Connection Selection or Change Always Available within IDE. . . . . . . . . . . .866 Automatic Upgrade Path for Projects Previously Created . . . . . . . . . . . . . . . .866

18

Microcontrollers Debugger Manual

 

 

Table of Contents

 

 

 

38

Legacy Target Interfaces Removed

867

39

HC(S)08 Full-Chip Simulator Components No Longer

 

Supported

869

 

List of HC(S)08 FCS Components No Longer Supported . . . . . . . . . . . . . . . . 869

Index

871

Microcontrollers Debugger Manual

19

Table of Contents

20

Microcontrollers Debugger Manual

Introduction

Manual Contents

The Microcontrollers Debugger Manual consists of the following books:

Book 1: Debugger engine - defines the HC08 and HC(S)08 common and base features, their functionality, and a description of the components that are available in the debugger.

Introduction

Debugger Interface

Debugger Components

Control Points

Real Time Kernel Awareness

How To...

CodeWarrior IDE Integration

Debugger DDE Capabilities

Synchronized Debugging Through DA-C IDE

Book 2: HC08 Debugger Connections - defines the connections available for debugging code written for HC08 CPUs.

Microcontroller Debugging First Steps

HC08 Full Chip Simulation

MON08 Interface Connection

ICS MON08 Interface Connection

HC08 P&E Multilink/Cyclone Pro Connection

HC08 ICS P&E Multilink/Cyclone Pro Connections

SofTec HC08 Connection

HC08 FSICEBASE Emulator

Book 3: HCS08 Debugger Connections - defines the connections available for debugging code written for HCS08 CPUs

HCS08 Full Chip Simulation

HCS08 P&E Multilink/Cyclone Pro Connection

HCS08 Open Source BDM Connection

HCS08 Serial Monitor Connection

SofTec HCS08 Connection

Microcontrollers Debugger Manual

21

Manual Contents

HCS08 On-Chip DBG Module Book 4: RS08 Debug Connections

RS08 Full Chip Simulation

RS08 P&E Multilink/Cyclone Pro Connection

RS08 Open Source BDM Connection

SofTec RS08 Connection

Book 5: ColdFire V1.0 Debug Connections

ColdFire V1 Full Chip Simulation Connection

ColdFire P&E Multilink/Cyclone Pro Connection

SofTec ColdFire Connection

ColdFire On-Chip DBG Module

Book 6: Connection Common Features

Flash Programming

Debugging Memory Map Book 7: Commands

Debugger Engine Commands Book 8: Environment Variables

Debugger Engine Environment Variables

Connection-Specific Environment Variables Book 9: Debugger Legacy

Legacy PEDebug Target Interface

Legacy Target Interfaces Removed

HC(S)08 Full-Chip Simulator Components No Longer Supported

NOTE The Flexis series of devices is the 8- to 32-bit connection point on the Freescale Controller Continuum, where complementary families of HCS08 and ColdFire V1 microcontrollers share a common set of peripherals and development tools to deliver migration flexibility.

These devices include the MC9S08QE128, MC9S08QE64, MC9S08QE96, MCF51QE128, MCF51QE64, and MCF51QE96, which are covered in Book 3 and Book 5 respectively.

22

Microcontrollers Debugger Manual

Book I - Debugger Engine

Book I Contents

Each section of the Debugger manual includes information to help you become more familiar with the Debugger, to use all its functions and help you understand how to use the environment. This book, the Debugger engine, defines the HC(S)08, RS08, and ColdFire® common and base features and their functionality, and gives a description of the components that are available in the debugger.

This book is divided into the following chapters:

This chapter describes the manual and special features of the Debugger.

The Introduction Chapter introduces the Debugger concept.

The Debugger Interface Chapter provides all details about the Debugger user interface environment i.e., menus, toolbars, status bars and drag and drop facilities.

The Debugger Components Chapter contains descriptions of each basic component and visualization utility.

The Control Points Chapter is dedicated to the control points and associated windows.

The Real Time Kernel Awareness Chapter contains descriptions of the Real Time concept and related applications.

The How To... Chapter provides answers for common questions and describes how to use advanced features of the Debugger.

The CodeWarrior IDE Integration chapter explains how to configure the Debugger for use with the CodeWarrior IDE.

The Debugger DDE Capabilities chapter describes the debugger DDE features.

The Synchronized Debugging Through DA-C IDE chapter explains the use of tools with the DA-C IDE from RistanCase

Microcontrollers Debugger Manual

23

Book I Contents

24

Microcontrollers Debugger Manual

1

Introduction

This section is an introduction to the Debugger from Freescale used in 8/16 bit embedded applications.

Freescale Debugger

The Debugger is a member of the tool family for Embedded Development. It is a Multipurpose Tool that you can use for various tasks in the embedded system and industrial control world. Some typical tasks are:

Simulation and debugging of an embedded application.

Simulation and debugging of real-time embedded applications.

Simulation and/or cross-debugging of an embedded application.

Multi-Language Debugging: Assembly, C and C++

True-Time Simulation

User Components creation with the Peripheral Builder

Simulation of a hardware design (e.g., board, processor, I/O chip).

Building a target application using an object oriented approach.

Building a host application controlling a plant using an object oriented approach.

Debugger Application

A Debugger Application contains the Debugger Engine and a set of debugger components bound to the task that the components must perform (for example a simulation and debugging session). The Debugger Engine is the heart of the system. It monitors and coordinates the tasks of the components. Each Debugger Component has its own functionality (e.g., source level debugging, profiling, I/O stimulation).

You can adapt your Debugger application to your specific needs. Integrating or removing the Debugger Components is very easy. You can add additional Debugger Components (for example, for simulation of a specific I/O peripheral chip) and integrate them with your Debugger Application.

You can also open several components of the same type.

Microcontrollers Debugger Manual

25

Introduction

Debugger Features

Debugger Features

True 32-bit application

Powerful features for embedded debugging

Special features for real time embedded debugging

Powerful features for True Time Simulation

Various and Same look Target Interfaces

User Interface

Versatile and intuitive drag and drop functions between components

Folding and unfolding of objects like functions, structures, classes

Graphical editing of user defined objects

Visualization functions

Smart interactions with objects

Extensibility function

Both Powerful Simulation & Debugger

Show Me How Tool

GUI (graphical user interface) version including command line

Context sensitive help

Configurable GUI with Tool Bar

Smooth integration into third party tools

Supports both Freescale and ELF/DWARF Object File Format and S-Records.

Demo Version Limitations on Components

When the Debugger is started in demo mode or with an invalid engine license, then all components that are protected with FLEXlm are in demo mode. The limitations of all components are described in their respective chapter.

26

Microcontrollers Debugger Manual

2

Debugger Interface

This chapter describes the Debugger Graphical User Interface (GUI). Topics include:

Introduction

Application Programs

Starting the Debugger

Debugger Main Window

Component Associated Menus

Highlights of the User Interface

Introduction

The CodeWarrior™ IDE main window acts as a container for windows of debugger components. The main window provides a main menu bar, a tool bar, a status bar for status information, and object information bars for several components.

The Debugger main window allows you to manage the layout of the different component windows (Window menu of the Debugger application). Component windows are organized as follows:

Tiled arrangement - Auto tiled, component windows are automatically resized when the main window is resized

Component windows are overlapped

Component windows that are currently minimized are Debugger Main window icons.

Application Programs

The CodeWarrior IDE installer places executable programs in the prog subdirectory of the CodeWarrior IDE installation directory. For example, installing the CodeWarrior IDE software in C:\Program Files\Freescale, locates all program files in the folder

C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\prog.

Microcontrollers Debugger Manual

27

Debugger Interface

Starting the Debugger

The following list is an overview of files that the CodeWarrior IDE uses for C/C++ debugging:

hiwave.exe Debugger executable file

hibase.dll Debugger main function dll

elfload.dll

Debugger loader dll

*.wnd

Debugger component

*.tgt

Debugger target file

*.cpu

Debugger CPU awareness file

Starting the Debugger

This section explains how you can start the debugger from within the CodeWarrior IDE or from a DOS command line.

Starting from within the IDE

There are two ways to start the debugger from within the IDE, from a Project window icon, or from the IDE Main Window menu bar.

Starting Debug from the Project Window

To start the debugger from the Project window, click the Debug icon (Figure 2.1), at the top of the Project window.

Figure 2.1 Project Window Make and Debug Icons

28

Microcontrollers Debugger Manual

Freescale Semiconductor Microcontrollers User Manual

Debugger Interface

Starting the Debugger

Starting Debug from the Main Window Menu Bar

You can also start the debugger from the main menu bar of the CodeWarrior IDE. To start the debugger from the main menu bar, select Debug from the Project menu:

(Project > Debug.)

Figure 2.2 Main Window Project Menu

Debugger Command Line Start

You can start the debugger from a DOS command line. The command syntax is as follows:

HIWAVE.EXE [<AbsFileName> {-<options>}]

where AbsFileName is the name of the application to load in the debugger. Precede each option with a dash.

Microcontrollers Debugger Manual

29

Debugger Interface

Starting the Debugger

Command Line Options

DOS command line options are:

-T=<time>: Test mode

The debugger terminates after the specified time (in seconds). The default value is 300 seconds. For example:

c:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\prog\hiwave.exe -T=10

The above example instructs the debugger to terminate after 10 seconds.

-Target=<targetname>

This option sets the specified connection. For example:

C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\prog\hiwave.exe c:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\demo\hc12\sim\fibo.abs -w - Target=sim

The command in the above example starts the debugger and loads fibo.abs file.

-W: Wait mode

Debugger waits even when a <exeName> is specified.

-Instance=%currentTargetName

This option defines a build instance name. Once you define a build instance, the debugger uses same build instance the next time you start the debugger. For example:

c:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\prog\hiwave.exe -Instance=%currentTargetName

If you attempt to start the debugger again, the existing instance of the debugger is brought to the foreground.

-Prod= <fileName>

This option specifies the project directory and/or project file to be used at start-up. For example:

c:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\prog\hiwave.exe -Prod=c:\demoproject\test.pjt

30

Microcontrollers Debugger Manual

Loading...
+ 862 hidden pages