
Hitachi Embedded Workshop User Manual
161
Section 3 Preparations for Debugging
This section describes the preparations for debugging your program. You will learn how to select and configure
a debugging platform with which to debug, how to load the user program, and what the debugger sessions are.
3.1
Building before Debugging
To debug your program in the C/C++ source level, your C/C++ program must be compiled and linked with the
[Debug] option enabled. When this option is enabled, the compiler puts all the information necessary for
debugging your C/C++ code into the absolute file or management information file. If either of these files is used
for this purpose, it is usually called a debug object file. When you create your project, the initial setup will
normally be configured for debugging.
Note: Make sure you have the [Debug] option enabled in your compiler and linker, when you generate
an object file for debugging.
Even if your debug object file does not contain any debugging information (for example, the S-
record format), you can still load it into the debugging platform, but you will only be able to debug
it in the assembly-language level.
3.2
Selecting a Debugging Platform
Selecting the debugging platform is very dependent on the installation method of the HEW. If the HEW has a
toolchain installed, the application project generator will be able to set up both the toolchain and the debugger
targets simultaneously. This allows the options for the targets and toolchain to be matched closely so no
inconsistencies occur. If there is no toolchain installed, you will only be able to select debug-only project types.
By default, the HEW will display the debug-only project generation type for each CPU family in the [New
Project Workspace] dialog box. This project type will provide similar behavior to the previous [HDI session]
dialog box.