Targeting Microcontrollers
Targeting Microcontrollers
CodeWarrior™
Development Studio for
Microcontrollers V10.x
Targeting Manual
How to Contact Us
5 Scripting 395
Tcl Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Resolution of Conflicting Command Names . . . . . . . . . . . . . . . . . . . . . . . 397
Execution of Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Tcl Startup Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Command-Line Debugging Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
launch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
linux::displaylinuxlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
linux::loadsymbolics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
linux::refreshmodules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
linux::selectmodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
linux::unloadsymbolics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
loadsym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
mem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
oneframe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
pwd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
quitIDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
radix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
restart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
setpc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
setpicloadaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
stack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
stepi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
switchtarget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
var . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
watchpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
CCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
USB TAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Index 683
Release Notes
Before using the CodeWarrior IDE, read the developer notes. These notes contain
important information about last-minute changes, bug fixes, incompatible elements, or
other topics that may not be included in this manual.
NOTE The release notes for specific components of the CodeWarrior IDE are located
in the Release_Notes folder in the CodeWarrior installation directory.
If you are new to the CodeWarrior IDE, read this chapter and the Getting Started chapter.
This chapter provides references to resources of interest to new users; the Getting Started
chapter helps you become familiar with the software features.
NOTE Some of the text and screenshots in this document might not match with the
build you are working on, as this document was last updated for the B091211
build.
Working with Projects Explains how to use the CodeWarrior tools to create and
work with projects.
Common Connection Explains how to use the CodeWarrior hardware tools for
Features board bring-up, test, and analysis. Also, explains how to
manipulate target memory.
Related Documentation
This topic provides information about documentation related to the CodeWarrior IDE and
Freescale Microcontrollers development.
• Additional Information Sources
• CodeWarrior Microcontrollers Development Tools
• CodeWarrior Development Process
NOTE The Freescale Eclipse Extension Guide is a general guide that is also part of
other CodeWarrior Eclipse-based products. Therefore, it describes the
following features that are not available in Microcontrollers v10.0 : Cache,
Memory ManagementUnit (MMU) Configurator, and Multicores. Also, it
shows figures that are not just specific to Microcontrollers v10.0, that is
sometimes the screenshots are of other CodeWarrior products, like StarCore
v10.0 or Power Architectures v10.0.
CodeWarrior Microcontrollers
Development Tools
Programming for Microcontroller processors is much like programming for any other
CodeWarrior platform target. If you have not used CodeWarrior tools before, start by
studying the Eclipse IDE, which is used to host the tools. Information on the Eclipse IDE
is available in the next topic.
If you are an experienced CodeWarrior user, note that the CodeWarrior Microcontrollers
V10.x environment uses the Eclipse IDE, whose user interface is substantially different
from the classic CodeWarrior IDE.
NOTE For information on the interface differences, refer the Freescale Eclipse
Extensions Guide.
Eclipse IDE
The Eclipse IDE (Integrated Development Environment) is an open-source development
environment that lets you develop and debug your software. It controls the project
manager, the source code editor, the class browser, the compilers and linkers, and the
debugger.
Those who are more familiar with command-line development tools may find the concept
of a CodeWarrior project new. The Eclipse Workspace organizes all files related to your
project. This lets you see your project at a glance and eases the organization and
navigation between source code files.
The Eclipse IDE has an extensible architecture that uses plug-in compilers and linkers to
target various operating systems and microprocessors. The IDE is hosted on Microsoft
Windows and other platforms. There are many development tools available for the IDE,
including C, C++, and Java compilers for desktop and embedded processors
For more information about the Eclipse IDE, read the Eclipse documentation at:
http://www.eclipse.org/documentation/.
Compiler
The Microcontrollers C Compiler:
• conforms to the American National Standards Institute (ANSI) C standards.
• conforms to version 1 of the Microcontrollers Application Binary Interface (ABI)
standards.
• supports a set of Digital Signal Processor (DSP) extensions.
• supports International Telecommunications Union (ITU)/European
Telecommunications Standards Institute (ETSI) primitives for saturating arithmetic.
Additional parameters are available for non-saturating arithmetic and double-
precision arithmetic.
• allows standard C constructs for representing special addressing modes.
• supports a wide range of runtime libraries and runtime environments.
• optimizes for size, speed, or a combination of both, depending on options that you
select.
The compiler can link all application modules before optimizing. By examining the entire
linked application before optimizing, the compiler produces highly optimized code. The
compiler performs many optimizations, such as:
• software pipelining
• instruction paralleling and scheduling
• data and address register allocation
NOTE For more information, refer to the Microcontrollers Compiler User Guide.
Assembler
The assembler translates assembly-language source code to machine-language object files
or executable programs. You can provide the assembly-language source code, or the
compiler can generate it.
For each assembly-language module in a build target, the Microcontrollers assembler can
generate a file that lists the generated code side-by-side with the assembly-language
source code.
NOTE For more information, refer to the Microcontrollers Assembler User Guide.
Linker
The Linker combines object files into a single executable file. You specify the link
mappings of your program in a Linker Command File (LCF).
NOTE For more information, refer to the Microcontrollers Linker User Guide.
CodeWarrior Debugger
The CodeWarrior debugger lets you debug your software on both simulator and hardware
targets.
NOTE The CodeWarrior debugger is also validated on the host machine running
Microsoft® Vista® Business Edition.
• Export source line information of the performance data generated by the simulator
into an Excel file
• Export the trace and function data generated by simulator and target hardware into an
Excel file
• Apply multi-level filters to isolate data
• Apply multi-level searches to find specific data
• Display results in an intuitive, user friendly manner in the trace, critical code, and
performance views
• Show or hide columns and also reorder the columns
• Copy and paste a cell or a line of the trace, alu-agu and performance data generated
by simulator and target hardware
• Control trace collection by using start and stop tracepoints to reduce the amount of
unwanted trace events in the trace buffer making the trace data easier to read
• View the value of the DPU counters in form of graphs (pie charts and bar charts)
while the application is in debug mode
• Display real time cycle count for simulated targets to allow quick monitoring of
evolution of application in time
NOTE For more information, refer the Profiling and Analysis User Guide.
• Debugging
Project Files
A CodeWarrior project is analogous to a set of make files, because a project can have
multiple settings that are applied when building the project. For example, you can have
one project that has both a debug version and a release version of your program. You can
build one or the other, or both as you wish. The different settings used to launch your
program within a single project are called launch configurations.
The IDE uses the CodeWarrior Projects view to list all the files in a project. The files
listed in the CodeWarrior Projects view include source code files and libraries.
You can add or remove files easily. You can also assign files to one or more different
build configurations within the project, therefore files common to multiple build
configurations can be managed simply.
The IDE automatically manages all the interdependencies between files and tracks which
files have changed since the last build. This speeds the build process because the IDE only
compiles those files that have changed since the last build.
In addition, the IDE stores the settings for compiler and linker options for each build
configuration. You can modify these settings using the IDE, or with #pragma statements
in your code.
Editing Code
The Eclipse IDE has an integral text editor designed for programmers. It handles text files
in MS-DOS/Windows® and UNIX® formats.
To edit a source code file or any other editable file in a project, double-click the filename
in the CodeWarrior Projects view to open the file.
The navigational features of the Editor window lets you switch between related files,
locate a particular function, mark a location within a file, or go to a specific line of code.
Compiling
To compile a source code file, ensure that the file is a part of the current launch
configuration. If the file is in the configuration, select it in the project window and select
Project > Build Project from the IDE menu bar.
To automatically compile all the files in the current launch configuration after you modify
them, select Project > Build Automatically from the IDE menu bar.
Linking
Select Project > Build Project from the IDE menu bar to link object code into a final
binary file. The Build Project command brings the active project up-to-date and then
links the resulting object code into a final output file.
You control the linker through the IDE. There is no need to specify a list of object files.
The Workspace tracks all the object files automatically.
You can modify the build configuration settings to select the name of the final output file.
Debugging
Select Run > Debug from the IDE menu bar to debug your project. This command
downloads the current project’s executable to the target board and starts a debug session.
NOTE You must have previously entered debugger settings for the launch
configuration by choosing Run > Debug Configurations. The IDE uses the
settings in the launch configuration to generate debugging information and
initiate communications with the target board.
You can now use the debugger to step through the program's code, view and change the
value of variables, set breakpoints, and much more. See the Freescale Eclipse Extensions
Guide and the Working with Debugger chapter of this manual for instructions that explain
how to use the debugger.
NOTE The scope of this chapter is limited to the use of the CodeWarrior IDE to write
and debug applications for the target platform.
• Languages Page
• C/C++ Options Page
• ColdFire Build Options Page for ColdFire V1
• ColdFire Build Options Page for ColdFire V2/3/4
• Connections Page
• Rapid Application Development Page
NOTE Based on the your selection, the pages of the New Bareboard Project wizard
may differ.
Option Description
New Project Name Enter the name for the new project in this
text box.
Use default location Stores the files required to build the program
in the Workbench’s current workspace
directory. The project files are located in the
directory you specify. Use the Location
option to select the directory.
NOTE The pages of wizard change depending on the selected derivative or board. If a
ColdFire derivative or board is selected then the wizard will display the
ColdFire Build Options page (Figure 2.6 and Figure 2.7 ).
Option Description
Option Description
Copy files into project Check to add any existing files to your
project.
Clear if no files are to be added to your
project,
Languages Page
Use this page to select the programming language that you want to use when writing the
program’s source code. You can make multiple selections, creating the code in multiple
formats.
NOTE The option you select also sets up default compiler/linker options for the
toolchain. For example, if you plan to use the C language in your source code
files, check the C checkbox. If you plan to write the program using C++, check
the C++ checkbox.
Option Description
Minimal startup code This option produces the best code density.
The startup code initializes the stack pointer
and calls the main function. No initialization
of global variables is done, giving you the
best speed/code density and a fast startup
time. The application code must address
variable initialization. ANSI requires variable
initialization and therefore this option is not
ANSI compliant.
Float is IEEE32, double is IEEE32 All float and double variables are 32-bit
IEEE32.
Float is IEEE32, double is IEEE64 Float variables are 32-bit IEEE32. Double
variables are 64-bit IEEE64.
NOTE This page will appear only a ColdFire V1 derivative or board is selected in the
Device and Connection page (Figure 2.2). To enable the Absolute Assembly
checkbox, you must uncheck the C and C++ options.
Option Description
Option Description
NOTE This page will appear only a ColdFire V2/3/4 derivative or board is selected in
the Device and Connection page (Figure 2.2).
Option Description
Full Board Support Select to provide full support for the selected
board. The created project provides standard
input output support through console and
terminal window.
Option Description
Connections Page
Use this page to select a connection to use for the project. Depending on the selected
derivative or board, the connections will appear enabled or grayed out.
Option Description
Option Description
Select one of the available RAD options to set up special views in the IDE where you can
rapidly configure peripheral devices on the MCU, or pick from a library of field-tested
code modules that can implement various device services such as timer interrupts, or a
high speed serial interface.
NOTE For more information on how to use the features of the Peripheral Initialization
or Processor Expert refer to the Processor Expert Users Manual and the Device
Initialization Users Manual.
Table 2.8 shows the various RAD options available and their purpose.
Option Description
NOTE If you select a RAD option other than None, the specialized views appear in
the C/C++ Perspective after the New MCU Project wizard exits.
used when making your program. For example, the device and connection options lets you
select the ColdFire derivative or board you would like to use.
Other options let you to specify other settings, such as whether the program executes on an
emulator or simulator rather than actual hardware, and the characteristics of the
connection that communicates with a hardware target.
This topic describes the various pages that the wizard displays as it assists you in creating
a bareboard project. The pages that the wizard presents can differ based upon the option of
project type or execution target.
The following topic, explain the pages of the New Linux/uClinux Application Project
wizard.
• Create a Linux/uClinux Application Project Page
• Device used for Linux Application Debug Page
• Project Language and Output Page
• Connections Page
• Application Debug Options Page
Option Description
New Project Name Enter the name for the new project in this
text box.
Use default location Stores the files required to build the program
in the Workbench’s current workspace
directory. The project files are located in the
directory you specify. Use the Location
option to select the directory.
Option Description
ColdFire V4 > ColdFire V4 GNU Linux Select to create ColdFire V2 Core GNU
Linux applications, libraries, and kernel
modules.
ColdFire V4e > ColdFire V4e GNU Select to create ColdFire V4e Core GNU
Linux Linux applications, libraries, and kernel
modules.
NOTE Based on your selection, the IDE may show or hide some options.
Option Description
Option Description
Connections Page
Use this page to select a connection to use for the project. Depending on the selected
derivative or board, the connections will appear enabled or grayed out.
Option Description
Option Description
Kernel source tree path for module Click Browse to specify or enter the kernel
projects source tree path for module projects.
Ignore kernel source tree path Select to ignore the kernel source tree path.
Creating Projects
The New Bareboard Project and New Linux/uClinux Application Project wizards help
you to quickly create new projects. The wizard generates a project with placeholder files
and default settings (build and launch configurations) specific targets. After the project
has been created, you can easily change any default setting to suit your needs.
The following topics explain the steps to create Bareboard and Linux/uClinux Application
projects for HCS08, RS08, Flexis, ColdFire V1, and ColdFire V2-4e derivatives.
• Creating Bareboard Projects
• Creating Linux/uClinux Application Project
NOTE The ColdFire V1, ColdFire V2, ColdFire V3 ColdFire V4, ColdFire V4e, and
ColdFire Evaluation Boards architectures do not support Full Chip Simulation.
2. Click OK to accept the default workspace. To use a workspace different from the
default, click Browse and specify the desired workspace.
The IDE starts and displays the Welcome page.
NOTE You can also select the Use this as the default and do not ask again checkbox
to set default/selected path as a default location for storing all your projects.
NOTE Clear the Use default location checkbox and click Browse to specify different
location for the new project. By default, the Use default location checkbox is
checked.
Figure 2.19 New Bareboard Project Wizard — Create an MCU Bareboard Project Page
6. Click Next.
The Device and Connection page appears (Figure 2.20).
7. Expand the tree control and select the derivative or board you would like to use. For
example, select HCS08 > HCS08A Family > MC9S08AC128.
Figure 2.20 New Bareboard Project Wizard — Device and Connection Page
8. Click Next.
The Add Files page appears.
11. Select the programming language you want to use. For example, check the C
checkbox.
12. Click Next.
The C/C++ Options page appears.
13. Select the appropriate level of startup code, memory model, and floating point format.
14. Click Next.
The Connections page appears.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
Figure 2.25 New Bareboard Project Wizard — Rapid Application Development Page
The new project is ready for use. You can now customize it by adding your own source
code files, changing debugger settings, or adding libraries.
2. Click OK to accept the default workspace. To use a workspace different from the
default, click Browse and specify the desired workspace.
The IDE starts and displays the Welcome page.
NOTE You can also select the Use this as the default and do not ask again checkbox
to set default/selected path as a default location for storing all your projects.
NOTE Clear the Use default location checkbox and click Browse to specify different
location for the new project. By default, the Use default location checkbox is
checked.
Figure 2.29 New Bareboard Project Wizard — Create an MCU Bareboard Project Page
6. Click Next.
The Device and Connection page appears.
7. Expand the tree control and select the derivative or board you would like to use. For
example, select RS08 > RS08KA Family > MC9RS08KA1.
Figure 2.30 New Bareboard Project Wizard — Device and Connection Page
8. Click Next.
The Add Files page appears.
11. Select the programming language you want to use. For example, check the C
checkbox.
12. Click Next.
The C/C++ Options page appears.
13. Select the appropriate level of startup code, memory model, and floating point format.
14. Click Next.
The Connections page appears.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
Figure 2.35 New Bareboard Project Wizard — Rapid Application Development Page
The new project is ready for use. You can now customize it by adding your own source
code files, changing debugger settings, or adding libraries.
2. Click OK to accept the default workspace. To use a workspace different from the
default, click Browse and specify the desired workspace.
The IDE starts and displays the Welcome page.
NOTE You can also select the Use this as the default and do not ask again checkbox
to set default/selected path as a default location for storing all your projects.
NOTE Clear the Use default location checkbox and click Browse to specify different
location for the new project. By default, the Use default location checkbox is
checked.
Figure 2.39 New Bareboard Project Wizard — Create an MCU Bareboard Project Page
6. Click Next.
The Device and Connection page appears.
7. Expand the tree control and select the derivative or board you would like to use. For
example, select ColdFire V1 > MCF51JM Family > MCF51JM128.
Figure 2.40 New Bareboard Project Wizard — Device and Connection Page
8. Click Next.
The Add Files page appears.
Figure 2.42 New Bareboard Project Wizard — ColdFire Build Options Page
11. Select the appropriate options to enable C++, porting processor macro, console, and
floating point supports.
12. Click Next.
The Connections page appears.
13. Check the appropriate connection. For example, check the P&E Cyclone PRO TCP-
IP checkbox.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
Figure 2.44 New Bareboard Project Wizard — Rapid Application Development Page
The new project is ready for use. You can now customize it by adding your own source
code files, changing debugger settings, or adding libraries.
2. Click OK to accept the default workspace. To use a workspace different from the
default, click Browse and specify the desired workspace.
The IDE starts and displays the Welcome page.
NOTE You can also select the Use this as the default and do not ask again checkbox
to set default/selected path as a default location for storing all your projects.
NOTE Clear the Use default location checkbox and click Browse to specify different
location for the new project. By default, the Use default location checkbox is
checked.
Figure 2.48 New Bareboard Project Wizard — Create an MCU Bareboard Project Page
6. Click Next.
The Device and Connection page appears.
7. Expand the tree control and select the derivative or board you would like to use. For
example, select ColdFire V4e > MCF547X > MCF5475.
8. Click Next.
The Add Files page appears.
Figure 2.51 New Bareboard Project Wizard — ColdFire Build Options Page
11. Select the appropriate options to enable C++, porting processor macro, console, and
floating point supports.
12. Click Next.
The Connections page appears.
13. Check the appropriate connection. For example, check the P&E Cyclone MAX TCP-
IP checkbox.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
The new project is ready for use. You can now customize it by adding your own source
code files, changing debugger settings, or adding libraries.
2. Click OK to accept the default workspace. To use a workspace different from the
default, click Browse and specify the desired workspace.
The IDE starts and displays the Welcome page.
NOTE You can also select the Use this as the default and do not ask again checkbox
to set default/selected path as a default location for storing all your projects.
NOTE Clear the Use default location checkbox and click Browse to specify different
location for the new project. By default, the Use default location checkbox is
checked.
6. Click Next.
The Device used for Linux Application Debug page appears.
7. Expand the tree control and select the derivative or board you would like to use. For
example, select ColdFire V2 > ColdFire V2 uClinux.
8. Click Next.
The Project Language and Output page (Figure 2.58) appears.
9. Select the output type and the programming language you want to use for this project.
For example, select Application and C and C++.
10. Click Next.
The Connections page appears.
13. From the list, select the method with which you want the IDE to connect to the target
system.
14. In the Remote download path text box, specify the path. By default, it is /tmp.
15. In the CodeWarrior TRK TCP/IP Address and CodeWarrior TCP/IP text boxes,
enter the IP address and listening port of the target system. By default the is TCP/IP
address is 127.0.0.1 and the port number is 2000.
16. Click Finish.
The wizard closes. The IDE generates a new project according to your specifications.
The project window (Figure 2.61) appears.
Building Projects
CodeWarrior IDE supports two modes of building projects:
• Manual-build Mode
• Auto-build Mode
Manual-build Mode
In large workspaces, building the entire workspace can take a long time if you make
changes with a significant impact on dependent projects. Often there are only a few
projects that really matter to you at a given time.
To build only the selected projects, and any prerequisite projects that need to be built in
order to correctly build the selected projects, select Project > Build Project from the
CodeWarrior IDE menu bar (Figure 2.62).
Auto-build Mode
CodeWarrior IDE takes care of compiling source files automatically. Builds occur
automatically in the background every time you change files in the workspace (for
example saving an editor), if auto-build is enabled.
To automatically build all the projects in a workspace, select Project > Build
Automatically from the CodeWarrior IDE menu bar (Figure 2.65).
Debugging Projects
When you use the New Bareboard Project wizard to create a new project, the wizard
sets the debugger settings of the project's launch configurations to default values. You can
change these default values based on your requirements.
To debug a project, perform these steps.
1. Launch the IDE.
2. From the main menu bar of the IDE, select Run > Debug Configurations. The IDE
uses the settings in the launch configuration to generate debugging information and
initiate communications with the target board.
The Debug Configurations dialog box appears. The left side of this dialog box has a
list of debug configurations that apply to the current application.
NOTE For more information on how to use the debugger, refer to the Freescale
Eclipse Extensions Guide and the Working with Debugger chapter of this
manual.
4. From the expanded list, select the debug configuration that you want to modify.
Figure 2.66 displays the Debug Configurations dialog box with the settings for the
debug configuration you selected.
6. Change the settings on this page as per your requirements. For example, select the
required target processor and simulator/emulator.
NOTE For more information on debugger, refer chapter Working with Debugger.
NOTE You can click Revert to undo any of the unsaved changes. The IDE restores
the last set of saved settings to all pages of the Debug Configurations dialog
box. Also, the IDE disables Revert until you make new pending changes.
Deleting Projects
To delete a project, follow these steps.
1. Select the project you want to delete in the CodeWarrior Projects view.
2. Select Edit > Delete.
The Confirm Project Delete dialog box appears.
NOTE Alternatively, you can also select Delete from the context menu when you
right-click on the project.
3. Select the Also delete contents under <filepath> option if you want to delete the
contents of the selected project. Else, select the Do not delete contents option.
NOTE You will not be able to restore your project using “Undo”, if you select the
Also delete contents under <filepath> option.
4. Click Yes.
The project is removed from the CodeWarrior Projects view.
NOTE Before starting the process ensure that the CodeWarrior HCS08 project you
want to import has all of its files, such as the source, linker command, and
settings file.
3. Click Next.
The first page of the CodeWarrior Project Importer wizard appears.
4. Enter the path and name of the classic CodeWarrior project file to import in the
Project file text box. Alternatively, click Browse and use the Select The
CodeWarrior Project File to Import dialog box to select the project file to import. In
this case, assume that the classic CodeWarrior project filename is
hcs08_projectimporter_test.mcp.
TIP The project file has an extension of .mcp. Select the .mcp file.
Figure 2.69 Select The CodeWarrior Project File to Import Dialog Box
The path of the project file to import appears in the Project file text box.
5. Click Next.
The Options page of the CodeWarrior Project Importer wizard appears.
6. Select the build target that uses the HCS08 toolchain you want the generated Eclipse
project to use, from the Toolchain Target list box.
NOTE The toolchain target linker in the classic project defines the project type of the
generated Eclipse project, including toolchain and build settings.
The build targets table displays all the targets discovered in the project file and is used
to generate equivalent Eclipse build configurations.
7. You can import each build target in the classic CodeWarrior project based upon
predefined configurations of the toolchain. For example: The HCS08 project in the
example lists these values:
• Imported Project Type = Freescale HCS08 Project
• Enabled = true
• CodeWarrior Target Name = <Toolchain Target>
• Eclipse Configuration Name = HCS08
TIP To disable the generation of specific configurations, click a row in the build target
table. In the Edit Table Values dialog box set Enabled to false and click OK.
8. If you want to import sub-projects included in the classic CodeWarrior project, check
the Recursively Import Sub-Projects checkbox.
The CodeWarrior Project Importer wizard imports the sub-projects with the main
project.
NOTE The CodeWarrior Project Importer wizard will copy only those files that are
displayed in the CodeWarrior’s project window. The wizard will not import a
file if it is not displayed or does not include project information.
9. Click Advanced.
WARNING! Checking the Duplicate files included in the .mcp project under the
new project location in the workspace checkbox may cause build
errors.
10. Check the Duplicate files included in the .mcp project under the new project
location in the workspace checkbox.
11. Click OK to close the dialog box.
12. Click Next.
The Globals page of the CodeWarrior Project Importer wizard appears. This page
lets you edit global settings that can effect how the project's build options are
imported.
Table 2.14 lists the options on the CodeWarrior Project Importer — Globals page.
Options Description
Shielded Folder List Previous versions of the CodeWarrior tools let you conceal
the contents of folders from the IDE's search operations
during a build. This was done by placing special characters in
the directory name. For example, sample code was
concealed in a (CodeWarrior Examples) folder.
Source Trees Specifies the location of the source trees. If an access path is
defined relative to a source tree, the source tree should be
listed in this table. The {Project} source tree is defined
automatically.
The Sources Trees table lists these options:
• Name — Lists the source name. For example:
Compiler.
• Compiler — Lists the path source name. For
example: <CW Install>/
<Microcontrollers_version>.
You use the Add, Delete, and Clear buttons to modify the
information in this list. Table 2.15 lists these buttons with their
descriptions.
Button Description
13. To add a new expression to the Shielded Folder List table, perform these steps.
a. Click Add.
(regular_expression) appears in the shielded folder list.
b. Double-click (regular_expression) and type the required expression.
The new expression appears in shielded folder list.
14. To delete an existing expression from the Shielded Folder List table, select the
expression and click Delete.
The selected expression is deleted from the shielded folder list.
15. To remove all the existing expressions from the Shielded Folder List table, click
Clear.
All the expressions are deleted from the shielded folder list.
16. To add a new source to the Source Trees table, perform these steps.
a. Click Add.
SourceName appears in the source trees list.
b. Double-click SourceName.
The Edit Table Values dialog box appears.
NOTE Access paths are directory paths the CodeWarrior tools use to search for
libraries, runtime support files, and other object files.
Table 2.16 lists the options on the CodeWarrior Project Importer — Access Paths
page.
Option Description
Build Target List Box Lets you select the build target whose access
paths you want to modify. For example:
HCS08_TEST
Access Path Table Lists the access paths used by the build target
selected in the Build Target list box. Each row
lists:
• Path — Directory path. For example:
The path is
{Compiler}\lib\HC08c\include.
• Recursive — Whether the path is
searched recursively. For example:
false or true.
• Type — Type of path to be searched.
For example: user or system.
• Error — Unresolved access paths,
marked as “X”, if any.
You use the Add, Delete, and Clear buttons to
modify the information in this list. Table 2.17 lists
these buttons with their descriptions.
Button Description
c. In the Path text box, enter the directory path. Alternatively, click Browse and use
the Browse For Folder dialog box and navigate to the required source.
d. From the Recursive list box, select false or true.
e. From the Type list box, select user or system.
f. Click OK.
The new access path appears in table.
19. Click Next.
The CodeWarrior Project Importer — Files Not Found page appears. This page
displays the project files that the wizard could not locate. You can use the Build Target
list box to select another build target and view the missing files.
NOTE Some old files do not work with the <target> implementation, there will be
some files missing.
22. To specify a name and location to the imported project, perform these steps.
a. Enter a name for the converted Eclipse project, in the New Project Name text box.
By default, the old project name is specified.
b. Check Use default location to save the project to the default Eclipse workspace.
By default, the location of the project is the directory of the classic project and not
the default Eclipse workspace.
TIP If you want to save the converted project to a location other than the default
Eclipse workspace, click Browse and use the Browse To Folder dialog box to
navigate to the desired directory.
NOTE Before debugging the new Eclipse project you might need to edit the build and
launch configuration settings. For information on build properties, refer to the
chapter Build Properties for Bareboard Projects.
NOTE Before starting the process ensure that the CodeWarrior RS08 project you want
to import has all of its files, such as the source, linker command, and settings
file.
3. Click Next.
The first page of the CodeWarrior Project Importer wizard appears.
4. Enter the path and name of the classic CodeWarrior project file to import in the
Project file text box. Alternatively, click Browse and use the Select The
CodeWarrior Project File to Import dialog box to select the project file to import. In
this case, assume that the classic CodeWarrior project filename is
rs08_projectimporter_test.mcp.
TIP The project file has an extension of .mcp. Select the .mcp file.
Figure 2.83 Select The CodeWarrior Project File to Import Dialog Box
The path of the project file to import appears in the Project file text box.
5. Click Next.
The Options page of the CodeWarrior Project Importer wizard appears.
6. Select the build target that uses the RS08 toolchain you want the generated Eclipse
project to use, from the Toolchain Target list box.
NOTE The toolchain target linker in the classic project defines the project type of the
generated Eclipse project, including toolchain and build settings.
The build targets table displays all the targets discovered in the project file and is used
to generate equivalent Eclipse build configurations.
7. You can import each build target in the classic CodeWarrior project based upon
predefined configurations of the toolchain. For example: The RS08 project in the
example lists these values:
• Imported Project Type = Freescale RS08 Project
• Enabled = true
• CodeWarrior Target Name = <Toolchain Target>
• Eclipse Configuration Name = RS08
TIP To disable the generation of specific configurations, click a row in the build target
table. In the Edit Table Values dialog box set Enabled to false and click OK.
8. If you want to import sub-projects included in the classic CodeWarrior project, check
the Recursively Import Sub-Projects checkbox.
The CodeWarrior Project Importer wizard imports the sub-projects with the main
project.
NOTE The CodeWarrior Project Importer wizard will copy only those files that are
displayed in the CodeWarrior’s project window. The wizard will not import a
file if it is not displayed or does not include project information.
9. Click Advanced.
WARNING! Checking the Duplicate files included in the .mcp project under the
new project location in the workspace checkbox may cause build
errors.
10. Check the Duplicate files included in the .mcp project under the new project
location in the workspace checkbox.
11. Click OK to close the dialog box.
12. Click Next.
The Globals page of the CodeWarrior Project Importer wizard appears. This page
lets you edit global settings that can effect how the project's build options are
imported.
Table 2.18 lists the options on the CodeWarrior Project Importer — Globals page.
Options Description
Shielded Folder List Previous versions of the CodeWarrior tools let you conceal
the contents of folders from the IDE's search operations
during a build. This was done by placing special characters in
the directory name. For example, sample code was
concealed in a (CodeWarrior Examples) folder.
Button Description
13. To add a new expression to the Shielded Folder List table, perform these steps.
a. Click Add.
(regular_expression) appears in the shielded folder list.
b. Double-click (regular_expression) and type the required expression.
The new expression appears in shielded folder list.
14. To delete an existing expression from the Shielded Folder List table, select the
expression and click Delete.
The selected expression is deleted from the shielded folder list.
15. To remove all the existing expressions from the Shielded Folder List table, click
Clear.
All the expressions are deleted from the shielded folder list.
16. To add a new source to the Source Trees table, perform these steps.
a. Click Add.
SourceName appears in the source trees list.
b. Double-click SourceName.
The Edit Table Values dialog box appears.
NOTE Access paths are directory paths the CodeWarrior tools use to search for
libraries, runtime support files, and other object files.
Table 2.20 lists the options on the CodeWarrior Project Importer — Access Paths
page.
Option Description
Build Target List Box Lets you select the build target whose access
paths you want to modify. For example:
RS08_TEST
Access Path Table Lists the access paths used by the build target
selected in the Build Target list box. Each row
lists:
• Path — Directory path. For example:
The path is
{Compiler}\lib\rs08c\include.
• Recursive — Whether the path is
searched recursively. For example:
false or true.
• Type — Type of path to be searched.
For example: user or system.
• Error — Unresolved access paths,
marked as “X”, if any.
You use the Add, Delete, and Clear buttons to
modify the information in this list. Table 2.21 lists
these buttons with their descriptions.
Button Description
c. In the Path text box, enter the directory path. Alternatively, click Browse and use
the Browse For Folder dialog box and navigate to the required source.
d. From the Recursive list box, select false or true.
e. From the Type list box, select user or system.
f. Click OK.
The new access path appears in table.
19. Click Next.
The CodeWarrior Project Importer — Files Not Found page appears. This page
displays the project files that the wizard could not locate. You can use the Build Target
list box to select another build target and view the missing files.
NOTE Some old files do not work with the <target> implementation, there will be
some files missing.
22. To specify a name and location to the imported project, perform these steps.
a. Enter a name for the converted Eclipse project, in the New Project Name text box.
By default, the old project name is specified.
b. Check Use default location to save the project to the default Eclipse workspace.
By default, the location of the project is the directory of the classic project and not
the default Eclipse workspace.
TIP If you want to save the converted project to a location other than the default
Eclipse workspace, click Browse and use the Browse To Folder dialog box to
navigate to the desired directory.
NOTE Before debugging the new Eclipse project you might need to edit the build and
launch configuration settings. For information on build properties, refer to the
chapter Build Properties for Bareboard Projects.
NOTE Before starting the process ensure that the ColdFire V1 project you want to
import has all of its files, such as the source, linker command, and settings file.
3. Click Next.
The first page of the CodeWarrior Project Importer wizard appears.
4. Enter the path and name of the classic CodeWarrior project file to import in the
Project file text box. Alternatively, click Browse and use the Select The
CodeWarrior Project File to Import dialog box to select the project file to import. In
this case, assume that the classic CodeWarrior project filename is
cfv1_projectimporter_test.mcp.
TIP The project file has an extension of .mcp. Select the .mcp file.
Figure 2.97 Select The CodeWarrior Project File to Import Dialog Box
The path of the project file to import appears in the Project file text box.
5. Click Next.
The Options page of the CodeWarrior Project Importer wizard appears.
6. Select the build target that uses the ColdFire toolchain you want the generated Eclipse
project to use, from the Toolchain Target list box.
NOTE The toolchain target linker in the classic project defines the project type of the
generated Eclipse project, including toolchain and build settings.
The build targets table displays all the targets discovered in the project file and is used
to generate equivalent Eclipse build configurations.
7. You can import each build target in the classic CodeWarrior project based upon
predefined configurations of the toolchain. For example: The ColdFire project in the
example lists these values:
• Imported Project Type = Freescale ColdFire
• Enabled = true
• CodeWarrior Target Name = <Toolchain Target>
• Eclipse Configuration Name = ColdFire
TIP To disable the generation of specific configurations, click a row in the build target
table. In the Edit Table Values dialog box set Enabled to false and click OK.
8. If you want to import sub-projects included in the classic CodeWarrior project, check
the Recursively Import Sub-Projects checkbox.
The CodeWarrior Project Importer wizard imports the sub-projects with the main
project.
NOTE The CodeWarrior Project Importer wizard will copy only those files that are
displayed in the CodeWarrior’s project window. The wizard will not import a
file if it is not displayed or does not include project information.
9. Click Advanced.
WARNING! Checking the Duplicate files included in the .mcp project under the
new project location in the workspace checkbox may cause build
errors.
10. Check the Duplicate files included in the .mcp project under the new project
location in the workspace checkbox.
11. Click OK to close the dialog box.
12. Click Next.
The Globals page of the CodeWarrior Project Importer wizard appears. This page
lets you edit global settings that can effect how the project's build options are
imported.
Table 2.22 lists the options on the CodeWarrior Project Importer — Globals page.
Options Description
Shielded Folder List Previous versions of the CodeWarrior tools let you conceal
the contents of folders from the IDE's search operations
during a build. This was done by placing special characters in
the directory name. For example, sample code was
concealed in a (CodeWarrior Examples) folder.
Button Description
13. To add a new expression to the Shielded Folder List table, perform these steps.
a. Click Add.
(regular_expression) appears in the shielded folder list.
b. Double-click (regular_expression) and type the required expression.
The new expression appears in shielded folder list.
14. To delete an existing expression from the Shielded Folder List table, select the
expression and click Delete.
The selected expression is deleted from the shielded folder list.
15. To remove all the existing expressions from the Shielded Folder List table, click
Clear.
All the expressions are deleted from the shielded folder list.
16. To add a new source to the Source Trees table, perform these steps.
a. Click Add.
SourceName appears in the source trees list.
b. Double-click SourceName.
The Edit Table Values dialog box appears.
NOTE Access paths are directory paths the CodeWarrior tools use to search for
libraries, runtime support files, and other object files.
Table 2.24 lists the options on the CodeWarrior Project Importer — Access Paths
page.
Option Description
Build Target List Box Lets you select the build target whose access
paths you want to modify. For example:
CFV1_TEST
Access Path Table Lists the access paths used by the build target
selected in the Build Target list box. Each row
lists:
• Path — Directory path. For example:
The path is
{Compiler}\ColdFire_Support\h
cs08_compatibility.
• Recursive — Whether the path is
searched recursively. For example:
false or true.
• Type — Type of path to be searched.
For example: user or system.
• Error — Unresolved access paths,
marked as “X”, if any.
You use the Add, Delete, and Clear buttons to
modify the information in this list. Table 2.25 lists
these buttons with their descriptions.
Button Description
c. In the Path text box, enter the directory path. Alternatively, click Browse and use
the Browse For Folder dialog box and navigate to the required source.
d. From the Recursive list box, select false or true.
e. From the Type list box, select user or system.
f. Click OK.
The new access path appears in table.
19. Click Next.
The CodeWarrior Project Importer — Files Not Found page appears. This page
displays the project files that the wizard could not locate. You can use the Build Target
list box to select another build target and view the missing files.
NOTE Some old files do not work with the <target> implementation, there will be
some files missing.
22. To specify a name and location to the imported project, perform these steps.
a. Enter a name for the converted Eclipse project, in the New Project Name text box.
By default, the old project name is specified.
b. Check Use default location to save the project to the default Eclipse workspace.
By default, the location of the project is the directory of the classic project and not
the default Eclipse workspace.
TIP If you want to save the converted project to a location other than the default
Eclipse workspace, click Browse and use the Browse To Folder dialog box to
navigate to the desired directory.
NOTE Before debugging the new Eclipse project you might need to edit the build and
launch configuration settings. For information on build properties, refer to the
chapter Build Properties for Bareboard Projects.
NOTE Before starting the process ensure that the CodeWarrior V2/3/4 project you
want to import has all of its files, such as the source, linker command, and
settings file.
3. Click Next.
The first page of the CodeWarrior Project Importer wizard appears.
4. Enter the path and name of the classic CodeWarrior project file to import in the
Project file text box. Alternatively, click Browse and use the Select The
CodeWarrior Project File to Import dialog box to select the project file to import. In
this case, assume that the classic CodeWarrior project filename is
cfv2_projectimporter_test.mcp.
TIP The project file has an extension of .mcp. Select the .mcp file.
Figure 2.111 Select The CodeWarrior Project File to Import Dialog Box
The path of the project file to import appears in the Project file text box.
5. Click Next.
The Options page of the CodeWarrior Project Importer wizard appears.
6. Select the build target that uses the ColdFire toolchain you want the generated Eclipse
project to use, from the Toolchain Target list box.
NOTE The toolchain target linker in the classic project defines the project type of the
generated Eclipse project, including toolchain and build settings.
The build targets table displays all the targets discovered in the project file and is used
to generate equivalent Eclipse build configurations.
7. You can import each build target in the classic CodeWarrior project based upon
predefined configurations of the toolchain. For example: The ColdFire project in the
example lists these values:
• Imported Project Type = Freescale ColdFire
• Enabled = true
• CodeWarrior Target Name = <Toolchain Targets>
• Eclipse Configuration Name = ColdFire
TIP To disable the generation of specific configurations, click a row in the build target
table. In the Edit Table Values dialog box set Enabled to false and click OK.
8. If you want to import sub-projects included in the classic CodeWarrior project, check
the Recursively Import Sub-Projects checkbox.
The CodeWarrior Project Importer wizard imports the sub-projects with the main
project.
NOTE The CodeWarrior Project Importer wizard will copy only those files that are
displayed in the CodeWarrior’s project window. The wizard will not import a
file if it is not displayed or does not include project information.
9. Click Advanced.
WARNING! Checking the Duplicate files included in the .mcp project under the
new project location in the workspace checkbox may cause build
errors.
10. Check the Duplicate files included in the .mcp project under the new project
location in the workspace checkbox.
11. Click OK to close the dialog box.
12. Click Next.
The Globals page of the CodeWarrior Project Importer wizard appears. This page
lets you edit global settings that can effect how the project's build options are
imported.
Table 2.26 lists the options on the CodeWarrior Project Importer — Globals page.
To add a new expression to the Shielded Folder List table, perform these steps.
Options Description
Shielded Folder List Previous versions of the CodeWarrior tools let you conceal
the contents of folders from the IDE's search operations
during a build. This was done by placing special characters in
the directory name. For example, sample code was
concealed in a (CodeWarrior Examples) folder.
Button Description
a. Click Add.
(regular_expression) appears in the shielded folder list.
b. Double-click (regular_expression) and type the required expression.
The new expression appears in shielded folder list.
13. To delete an existing expression from the Shielded Folder List table, select the
expression and click Delete.
The selected expression is deleted from the shielded folder list.
14. To remove all the existing expressions from the Shielded Folder List table, click
Clear.
All the expressions are deleted from the shielded folder list.
15. To add a new source to the Source Trees table, perform these steps.
a. Click Add.
SourceName appears in the source trees list.
b. Double-click SourceName.
The Edit Table Values dialog box appears.
NOTE Access paths are directory paths the CodeWarrior tools use to search for
libraries, runtime support files, and other object files.
Table 2.28 lists the options on the CodeWarrior Project Importer — Access Paths
page.
Option Description
Build Target List Box Lets you select the build target whose access
paths you want to modify. For example:
CONSOLE_EXTERNAL_RAM.
Access Path Table Lists the access paths used by the build target
selected in the Build Target list box. Each row
lists:
• Path — Directory path. For example:
The path is
{Compiler}\ColdFire_Support\e
wl.
• Recursive — Whether the path is
searched recursively. For example:
false or true.
• Type — Type of path to be searched.
For example: user or system.
• Error — Unresolved access paths,
marked as “X”, if any.
You use the Add, Delete, and Clear buttons to
modify the information in this list. Table 2.29 lists
these buttons with their descriptions.
Button Description
c. In the Path text box, enter the directory path. Alternatively, click Browse and use
the Browse For Folder dialog box and navigate to the required source.
d. From the Recursive list box, select false or true.
e. From the Type list box, select user or system.
f. Click OK.
The new access path appears in table.
18. Click Next.
The CodeWarrior Project Importer — Files Not Found page appears. This page
displays the project files that the wizard could not locate. You can use the Build Target
list box to select another build target and view the missing files.
NOTE Some old files do not work with the <target> implementation, there will be
some files missing.
21. To specify a name and location to the imported project, perform these steps.
a. Enter a name for the converted Eclipse project, in the New Project Name text box.
By default, the old project name is specified.
b. Check Use default location to save the project to the default Eclipse workspace.
By default, the location of the project is the directory of the classic project and not
the default Eclipse workspace.
TIP If you want to save the converted project to a location other than the default
Eclipse workspace, click Browse and use the Browse To Folder dialog box to
navigate to the desired directory.
NOTE Before debugging the new Eclipse project you might need to edit the build and
launch configuration settings. For information on build properties, refer to the
chapter Build Properties for Bareboard Projects.
NOTE The settings of the CodeWarrior IDE’s build and launch configuration
correspond to an object called a target made by the classic CodeWarrior IDE.
When the wizard completes its process, it generates launch configurations with names that
follow the pattern projectname - configtype - targettype, where:
• projectname represents the name of the project
• configtype represents the project’s name, which usually describes the build
configuration
• targettype represents the type of target software or hardware on which the launch
configuration acts
For each launch configuration, you can specify build properties, such as:
• additional libraries to use for building code
• behavior of the compilers, linkers, assemblers, and other build-related tools
• specific build properties, such as the byte ordering of the generated code
The topics in this chapter are:
• Changing Build Properties
• Restoring Build Properties
6. Use the Configuration drop-down list to specify the launch configuration for which
you want to modify the build properties.
7. Click the Tool Settings tab.
The corresponding page appears.
8. From the list of tools on the Tool Settings page, select the tool for which you want to
modify properties.
9. Change the settings that appear in the page.
10. Click Apply.
The IDE saves your new settings.
You can select other tool pages and modify their settings. When you finish, click OK to
save your changes and close the Properties window.
working build configuration. To undo your modifications to build properties, click the
Restore Defaults button at the bottom of the Properties window.
This changes the values of the options to the absolute default of the toolchain. By default,
the toolchain options are blank.
For example, when a HCS08 project is created the Linker > Input panel has some values
set for the Parameter File and Libraries options, which are specific to the project.
Clicking the Restore Defaults button defaults the values of the Parameter File and
Libraries options to the blank state of the toolchain .
Table 3.1 lists the build properties specific to developing software for HCS08.
The properties that you specify in these panels apply to the selected build tool on the Tool
Settings page of the Properties for <project> window.
Messages Messages
General General
Messages
Use this panel to specify whether to generate symbolic information for debugging the
build target (Figure 3.3).
Option Description
Maximum number of error messages (- Specify the number of errors allowed until
WmsgNe) the application stops processing.
Disable user messages (-WmsgNu) Check to disable user messages and allow
only the normal message categories
(WARNING, INFORMATION, ERROR, or
FATAL); reduces the number of messages,
and simplifies the error parsing of other tools.
General
Use this panel to specify the memory model that the architecture uses. The build tools
(compiler, linker, and assembler) use the properties that you specify.
Figure 3.4 shows the General settings.
Table 3.3 lists and describes the memory model options for HCS08.
Option Description
Memory Model (-M) Specify the memory model for the build tools:
• Tiny — Assumes that data
pointers have 8-bit addresses
unless explicitly specified with the
keyword __far
• Small — Default memory model;
assumes that all functions and
pointers have 16 bit addresses
and requires code and data to be
located in 64 kilobytes address
space
• Banked — Lets you place
program code into atmost 256
pages of 16 kilobytes each, but
does not affect data allocation
Enable Memory Management Unit Check to inform the compiler that CALL and
(MMU) Support (-MMU) RTC instructions are available, enabling code
banking, and that the current architecture
has extended data access capabilities,
enabling support for __linear data types.
This option can be used only when -Cs08 is
enabled.
Disassembler
Use this panel to specify the command, options, and expert settings for HCS08
Disassembler.
Figure 3.5 shows the Disassembler page.
Option Description
Table 3.5 lists and describes the output options for HCS08 disassembler.
Option Description
Print full listing Prints a listing with the header information of the object file.
Write disassembly Check to enable the decoder decoding Freescale object files
listing with source write the source code within the disassembly listing.
code
This option setting is default for the Freescale object files as
input.
Decode DWARF Check to write the DWARF section information in the listing file.
section Decoding from the DWARF section inserts this information in the
listing file. See the following listings for more information.
Decode ELF Check to ensure that the ELF section information is also written to
sections the listing file. Decoding from the ELF section inserts the following
information in the listing file.
Option Description
Dump ELF Check to generate a HEX dump of all ELF sections in a LST file.
sections in LST file
Produce inline Check to ensure that the output listing is an inline assembly file
assembly file without additional information, but in C comments.
Shows the cycle Check to ensure that each instruction line contains the count of
count for each cycles in '[',']' braces. The cycle count is written before the
instruction mnemonics of the instruction. Note that the cycle count display is
not supported for all architectures.
Write disassembly Check to ensure that the Decoder decoding Freescale object files
listing only writes the source code within the disassembly listing only.
Write disassembly Check to write the origin source and its comments within the
listing with source disassembly listing.
and all comments
Linker
Use this panel to specify the command, options, and expert settings for the build tool
linker. Additionally, the Linker tree control includes the general, libraries, and search path
settings.
Figure 3.7 shows the Linker settings.
Table 3.6 lists and describes the linker options for HCS08.
Table 3.6 Tool Settings - Linker Options
Option Description
The IDE first looks for an include file in the current directory, or the directory that you
specify in the INCLUDE directive. If the IDE does not find the file, it continues searching
the paths shown in this panel. The IDE keeps searching paths until it finds the #include
file or finishes searching the last path at the bottom of the Include File Search Paths list.
The IDE appends to each path the string that you specify in the INCLUDE directive.
NOTE The IDE displays an error message if a header file is in a different directory
from the referencing source file. Sometimes, the IDE also displays an error
message if a header file is in the same directory as the referencing source file.
For example, if you see the message Could not open source file myfile.h,
you must add the path for myfile.h to this panel.
Figure 3.8 shows the Input panel.
Table 3.7 lists and describes the linker input options for HCS08.
Option Description
Search paths (-L) Shows the list of all search paths; the ELF
part of the linker searches object files first in
all paths and then the usual environment
variables are considered.
Table 3.8 lists and describes the toolbar buttons that help work with the libraries and the
additional object file search paths.
Button Description
Button Description
The buttons in the Add directory path and Edit directory path dialog boxes help work
with the object file search paths.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
• Workspace — Click to display the Folder Selection dialog box and specify the
object file search path. The resulting path, relative to the workspace, appears in the
appropriate list.
• File system — Click to display the Browse for Folder dialog box and specify the
object file search path. The resulting path appears in the appropriate list.
Table 3.9 lists and describes the toolbar buttons that help work with the libraries and the
additional object files.
Button Description
Figure 3.11 Tool Settings - Linker > Libraries - Add file path Dialog Box
Figure 3.12 Tool Settings - Linker > Libraries - Edit file path Dialog Box
The buttons in the Add file path and Edit file path dialog boxes help work with the file
paths.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
• Workspace — Click to display the File Selection dialog box and specify the file
path. The resulting path, relative to the workspace, appears in the appropriate list.
• File system — Click to display the Open dialog box and specify the file path. The
resulting absolute path appears in the appropriate list.
Table 3.10 lists and describes the linker optimization options for HCS08.
Option Description
Allocation over The linker supports to allocate objects from one ELF section into
segment different segments. The allocation strategy controls where space
boundaries (-Alloc) for the next object is allocated as soon as the first segment is full.
In the AllocNext strategy, the linker always takes the next
segment as soon as the current segment is full. Holes generated
during this process are not used later. With this strategy, the
allocation order corresponds to the definition order in the object
files. Objects defined first in a source file are allocated before
later defined objects.
In the AllocFirst strategy, the linker checks for every object, if
there is a previously only partially used segment, into which the
current object does fit. This strategy does not maintain the
definition order.
In the AllocChange strategy, the linker checks as soon as a object
does no longer fit into the current segment, if there is a previously
only partially used segment, into which the current object does fit.
This strategy does not maintain the definition order, but it does
however use fewer different ranges than the AllocFirst case.
Overlap constants Defines the default if constants and code should be optimized;
in ROM (-COCC) commands DO_OVERLAP_CONSTS and
DO_NOT_OVERLAP_CONSTS take precedence over the option.
Optimize copy Changes the copy down structure to use few spaces.
down (-OCopy)
The optimization does assume that the application does perform
both the zero out and the copy down step of the global
initialization. If a value is set to zero by the zero out, then zero
values are removed from the copy down information. The
resulting initialization is not changed by this optimization if the
default startup code is used.
Table 3.11 lists and describes the linker output options for HCS08.
Option Description
Link as ROM Check to link the application as a ROM library. This option has
library (-AsROMlib) the same effect as specifying AS ROM_LIB in the linker
parameter file.
Check if objects Check to instruct the linker to check if objects overlap, taking into
overlap in the account their address space.
absolute file (even
if different address
spaces) (-
CheckAcrossAddr
Space)
Generate map file Check to scan source files for dependencies and emit a Makefile,
(-M) without generating object code.
Option Description
Specify statistic file Specify the name of the linker statistic file. The statistic file reports
(e.g. statistic.txt) (- each allocated object and its attributes. Every attribute is
StatF) separated by a tab character, so it can be easily imported into a
spreadsheet/database program for further processing.
Table 3.12 lists and describes the general linker options for HCS08.
Table 3.12 Tool Settings - Linker > General Options
Option Description
Other flags Specify additional command line options for the linker; type in
custom flags that are not otherwise available in the UI.
Default value is: -WmsgSd1100 -WmsgSd1912
Burner
Use the Burner for HCS08 Preference Panel to map *.bbl (batch burner language) files to
the Burner Plug-In. When the project folder contains a *.bbl file, *.bbl file processing
during the post-link phase uses the settings in the Burner preference panel.
Figure 3.16 shows the HCS08 Burner settings.
Table 3.15 lists and describes the burner options for HCS08.
Option Description
Table 3.14 lists and describes the general options for HCS08 burner.
Option Description
HCS08 Compiler
Use this panel to specify the command, options, and expert settings for the build tool
compiler. Additionally, the HCS08 Compiler tree control includes the general, include file
search path settings.
Figure 3.18 shows the HCS08 Compiler settings.
Table 3.15 lists and describes the compiler options for HCS08.
Option Description
Table 3.16 lists and describes the preprocessor options for HCS08 Compiler.
Option Description
Table 3.17 lists and describes the toolbar buttons that help work with preprocessor macro
definitions.
Button Description
Button Description
Figure 3.20 Tool Settings - HCS08 Compiler > Preprocessor - Enter Value Dialog Box
Figure 3.21 Tool Settings - HCS08 Compiler > Preprocessor - Edit Dialog Dialog Box
The buttons in the Enter Value and Edit dialog boxes help work with the preprocessor
macros.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
The IDE first looks for an include file in the current directory, or the directory that you
specify in the INCLUDE directive. If the IDE does not find the file, it continues searching
the paths shown in this panel. The IDE keeps searching paths until it finds the #include
file or finishes searching the last path at the bottom of the Include File Search Paths list.
The IDE appends to each path the string that you specify in the INCLUDE directive.
NOTE The IDE displays an error message if a header file is in a different directory
from the referencing source file. Sometimes, the IDE also displays an error
message if a header file is in the same directory as the referencing source file.
For example, if you see the message Could not open source file myfile.h,
you must add the path for myfile.h to this panel.
Figure 3.22 shows the Input panel.
Table 3.18 lists and describes the input options for HCS08 Compiler.
Option Description
Include files only once (-Pio) Check to include every header file only once;
duplicates are ignored.
Table 3.19 lists and describes the toolbar buttons that help work with the file paths.
Table 3.19 Include File Path (-I) Toolbar Buttons
Button Description
Table 3.20 lists and describes the toolbar buttons that help work with the search paths.
Button Description
Figure 3.23 Tool Settings - HCS08 Compiler > Input - Add file path Dialog Box
Figure 3.24 Tool Settings - HCS08 Compiler > Input - Edit file path Dialog Box
The buttons in the Add file path (Figure 3.23) and Edit file path (Figure 3.24) dialog
boxes help work with the paths.
Table 3.21 lists and describes the language options for HCS08.
Option Description
Table 3.21 Tool Settings - HCS08 Compiler > Language Options (continued)
Option Description
Cosmic compatibility mode for space Check to allow Cosmic style @near, @far
modifiers @near, @far, and @tiny (- and @tiny space modifiers as well as
Ccx) @interrupt in your C code. The -ANSI option
must be switched off. It is not necessary to
remove the Cosmic space modifiers from
your application code. There is no need to
place the objects to sections addressable by
the Cosmic space modifiers.
The following is done when a Cosmic
modifier is parsed:
The objects declared with the space modifier
are always allocated in a special Cosmic
compatibility (_CX) section (regardless of
which section pragma is set) depending on
the space modifier, on the const qualifier or if
it is a function or a variable.
Space modifiers on the left hand side of a
pointer declaration specify the pointer type
and pointer size, depending on the target.
Bigraph and trigraph support (-Ci) Check to replace certain unavailable tokens
with the equivalent keywords.
Propagate const and colatile qualifiers Check to propagate const and volatile
for structs (-Cq) qualifiers for structures. If all members of a
structure are constant or volatile, the
structure itself is constant or volatile. If the
structure is declared as constant or volatile,
all its members are constant or volatile,
respectively.
Conversion from ‘const T*’ to ‘T*’ (-Ec) Check to enable this non-ANSI compliant
extension allows the compiler to treat a
pointer to a constant type like a pointer to the
non-constant equivalent of the type. Earlier
Compilers did not check a store to a constant
object through a pointer. This option is useful
when compiling older source code.
Table 3.22 lists and describes the possible type size options for HCS08 Compiler using the
-T option.
Option Description
Table 3.22 Tool Settings - HCS08 Compiler > Type Sizes (continued)
Option Description
long long double Selects the size of the long long double
type. Options are:
• Default (IEEE64)
• IEEE32
• IEEE64
Table 3.23 lists and describes the code generation options for HCS08 compiler.
Table 3.23 Tool Settings - HCS08 Compiler > Code Generation Options
Option Description
Bit field gap limits (-BfaGapLimitBits) Check to affect the maximum allowable
number of gap bits. The bitfield allocation
tries to avoid crossing a byte boundary
whenever possible. To optimize accesses,
the compiler may insert some padding or gap
bits.
Bit field type size reduction This option is configurable whether or not the
compiler uses type-size reduction for
bitfields. Type-size reduction means that the
compiler can reduce the type of an int bitfield
to a char bitfield if it fits into a character. This
allows the compiler to allocate memory only
for one byte instead of for an integer. Options
are:
• Enabled (-BfaTSRON)
• Disabled (-BfaTSROFF)
Table 3.23 Tool Settings - HCS08 Compiler > Code Generation Options (continued)
Option Description
Maximum load factor for switch tables (- Allows changing the default strategy of the
100) (-CswMaxLF) Compiler to use tables for switch statements;
is only available if the compiler supports
switch tables.
Minimum number of labels for switch Allows changing the default strategy of the
tables (-CswMinLB) Compiler using tables for switch statements;
is only available if the compiler supports
switch tables.
Minimum load factor for switch tables Allows the Compiler to use tables for switch
(100) (-CswMinLF) statements; is only available if the compiler
supports switch tables.
Qualifier for virtual table pointers (-Qvtp) Using a virtual function in C++ requires an
additional pointer to virtual function tables.
The Compiler cannot access the pointer and
generates the pointer in every class object
when virtual function tables are associated.
Options are:
• None
• Near
• Far
Use IEEE32 for double (default is Check to use doubles that are in IEEE32
IEEE64) instead of IEEE64 (default).
Assume HLI code saves modified With this option set, the compiler assumes
registers that registers touched in HLI are saved or
restored in the HLI code as well. If this option
is not set, the compiler saves or restores the
H, X, and A registers.
Table 3.24 lists and describes the optimization options for HCS08 compiler.
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options
Option Description
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options (continued)
Option Description
Loop unrolling (i[number]) (-Cu) Enables loop unrolling with the following
restrictions:
• Only simple for statements are
unrolled, e.g., for (i=0; i<10; i++)
• Initialization and test of the loop
counter must be done with a
constant.
• Only <, >, <=, >= are permitted in a
condition.
• Only ++ or -- are allowed for the
loop variable increment or
decrement.
• The loop counter must be integral.
• No change of the loop counter is
allowed within the loop.
• The loop counter must not be used
on the left side of an assignment.
• No address operator (&) is allowed
on the loop counter within the loop.
• Only small loops are unrolled:
Loops with few statements within
the loop.
Loops with fewer than 16
increments or decrements of the
loop counter.
The bound may be changed with
the optional argument =
i<number>.
The -Cu=i20 option unrolls loops
with a maximum of 20 iterations.
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options (continued)
Option Description
Main Optimize Target: Optimize for There are various points where the Compiler
has to select between two possibilities: it can
either generate fast, but large code, or small
but slower code.
The Compiler generally optimizes on code
size. It often has to decide between a
runtime routine or an expanded code. The
programmer can decide whether to select
between the slower and shorter or the faster
and longer code sequence by setting a
command line switch.
• The Code Size (-Os) option
directs the Compiler to optimize
the code for smaller code size.
The Compiler trades faster-larger
code for slower-smaller code.
• The Execution Time (-Ot) option
directs the Compiler to optimize
the code for faster execution time.
The Compiler replaces slower/
smaller code with faster/larger
code. This option only affects
some special code sequences.
This option has to be set together
with other optimization options
(e.g., register optimization) to get
best results.
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options (continued)
Option Description
Dynamic options configuration for Allows the Compiler to select from a set of
functions (-OdocF) options to reach the smallest code size for
every function. Without this feature, you must
set fixed Compiler switches over the whole
compilation unit. With this feature, the
Compiler finds the best option combination
from a user-defined set for every function.
Disable alias checking (-Ona) Prevents the Compiler from redefining these
variables, which lets you reuse already-
loaded variables or equivalent constants.
Use this option only when you are sure no
real writes of aliases to a variable memory
location will occur.
Do generate copy down information for Using this option, the compiler does not
zero values (-OnCopyDown) generate a copy down for i.
The initialization with zero optimization
shown for the arr array only works in the
HIWARE format. The ELF format requires
initializing the whole array to zero.
Disable CONST variable by constant Lets you switch OFF the replacement of
replacement (-OnCstVar) CONST variable by the constant value.
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options (continued)
Option Description
Disable tree optimizer (-Ont) Disables the tree optimizer. Use this option
for debugging and to force the Compiler to
produce 'straightforward' code. Note that the
optimizations below are just examples for the
classes of optimizations.
Large return value type Compiler supports this option even though
returning a 'large' return value may be not as
efficient as using an additional pointer. The
Compiler introduces an additional parameter
for the return value if the return value cannot
be passed in registers. Options are:
• Default
• Large return value pointer,
always with temporary (-Rpt)
• Large return value pointer and
temporary elimination (-Rpe)
Optimize bitfields and volatile bitfields Use this option to optimize bitfields and
volatile bitfields. The compiler changes the
access order or combines many accesses
into one, even if the bitfields are declared as
volatile.
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options (continued)
Option Description
Keep loop induction variables in Limits the number of loop induction variables
registers the Compiler keeps in registers. Specify any
number down to zero (no loop induction
variables). The compiler reads and writes
loop induction variables within the loop (e.g.,
loop counter), and attempts to keep the
variables in registers to reduce execution
time and code size. The Compiler takes the
optimal number (code density) when this
option is not specified. Specifying a high
number of loop induction variables may
increase code size, particularly for spill and
merge code.
Disable ICG level branch tail merging Switches the ICG level branch tail merging
off. This simplifies debugging and produces
more readable code.
Disable any constant folding Prevents the Compiler from folding constants
over statement boundaries. All arithmetical
operations are coded. This option must be
set when using the library functions setjmp()
and longjmp(), or the Compiler makes wrong
assumptions.
Disable any constant folding in the case Prevents the Compiler from folding constants
of a new constant when the resulting constant is new. The
option affects only those processors where
constants are difficult to load (e.g., RISC
processors). On other processors this option
makes no change.
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options (continued)
Option Description
Disable any low level common Prevents the Compiler from reusing common
subexpression elimination subexpressions, such as array indexes and
array base addresses. The code size may
increase. The low-level CSE does not have
the alias problems of the frontend CSE and
is therefore switched on by default.
The two CSE optimizations do not cover the
same cases. The low-level CSE has a finer
granularity but does not handle all cases of
the frontend CSE.
Use this option only to generate more
readable code for debugging.
Allocate local variables into registers Allocates local variables (char or int) in
registers. The number of local variables
allocated in registers depends on the number
of available registers. Use this option when
using variables as loop counters or switch
selectors or when the processor requires
register operands for multiple operations
(e.g., RISC processors). Compiling with this
option may increase your code size (spill and
merge code).
This optimization may increase code
complexity when using High-Level
Languages, making debugging more difficult.
Table 3.24 Tool Settings - HCS08 Compiler > Optimization Options (continued)
Option Description
Disable frame pointer optimization (- Prevents the Compiler from converting stack
OnX) pointer-relative accesses into X-relative
accesses. The frame optimizer tries to
convert all SP-relative accesses (local
variables, spills) into shorter and faster X-
relative accesses. In addition, the Compiler
traces the value of H:X and removes useless
TSX and AIX instructions. Using -OnX to
switch the frame optimizer off facilitates
debugging.
Table 3.25 lists and describes the output options for HCS08 compiler.
Table 3.25 Tool Settings - HCS08 Compiler > Output Options
Option Description
Allocate CONST objects in ROM (-Cc) Check if you want the compiler to assign
const objects into the ROM_VAR segment,
which the Linker parameter file assigns to a
ROM section.
Encrypt Files (e.g. %f.e%e) (-Eencrypt) Encrypts all files passed together with this
option, using the given key with the -Ekey:
Encryption Key option.
Encryption key (-EKey) Encrypts files with the given key number (-
Eencrypt option).
Table 3.25 Tool Settings - HCS08 Compiler > Output Options (continued)
Option Description
Log predefined defines to file (e.g. Enables the Compiler to generate a text file
predef.h) (-Ldf) that contains a list of the compiler-defined
#define. The default filename is predef.h, but
may be changed (e.g., -Ldf="myfile.h"). The
file is generated in the directory specified by
the TEXTPATH: Text File Path environment
variable. The defines written to this file
depend on the actual Compiler option
settings (e.g., type size settings or ANSI
compliance).
Table 3.25 Tool Settings - HCS08 Compiler > Output Options (continued)
Option Description
List of included files to ‘.inc’ file (-Li) Enables the Compiler to generate a text file
which contains a list of the #include files
specified in the source. This text file shares
the same name as the source file but with
the extension, *.inc. The Compiler stores the
file in the path specified by the TEXTPATH:
Text File Path environment variable. The
generated file may be used in make files.
Write statistic output to file (e.g. Enables the Compiler to append statistical
logfile.txt) (-Ll) information about the compilation session to
the specified file. The information includes
Compiler options, code size (in bytes), stack
usage (in bytes) and compilation time (in
seconds) for each procedure of the compiled
file. The Compiler appends the information to
the specified filename (or the file make.txt, if
no argument given). Set the TEXTPATH:
Text File Path environment variable to store
the file into the path specified by the
environment variable. Otherwise the
Compiler stores the file in the current
directory.
Table 3.26 lists and describes the general options for HCS08 compiler.
Option Description
HCS08 Assembler
Use this panel to specify the command, options, and expert settings for the build tool
assembler.
Figure 3.31 shows the Assembler settings.
Table 3.27 lists and describes the assembler options for HCS08.
Table 3.27 Tool Settings - Assembler Options
Option Description
Table 3.28 lists and describes the toolbar buttons that help work with the file search paths.
Button Description
Button Description
Table 3.29 lists and describes the language options for HCS08 Assembler.
.
Option Description
Case insensitivity Turns off case sensitivity on label names. When this option is
on label name (-Ci) activated, the Assembler ignores case sensitivity for label names.
If the Assembler generates object files but not absolute files
directly (-FA2 assembler option), the case of exported or imported
labels must still match. Or, the -Ci assembler option should be
specified in the linker as well.
Define label ( use Lets you define labels and assign them values. The labels are
spaces to separate used for conditional compilation, where a common source file can
labels ) (-D) be used to generate code for different processor derivatives,
based on the labels supplied here.
Support for Enables the Macro Assembler support the definition and usage of
structured types (- structured types. This is interesting for application containing both
Struct) ANSI-C and Assembly modules.
Angle brackets for Controls whether the < > syntax for macro invocation argument
macro arguments grouping is available. When it is disabled, the Assembler does not
grouping (- recognize the special meaning for < in the macro invocation
CMacAngBrack) context. There are cases where the angle brackets are
ambiguous. In new code, use the [? ?] syntax instead.
Options are:
• Allow
• Disallow
Square braces for Controls the availability of the [? ?] syntax for macro invocation
macro arguments argument grouping. When it is disabled, the Assembler does not
grouping (- recognize the special meaning for [? in the macro invocation
CMacBrackets) context.
Options are:
• Allow
• Disallow
Table 3.29 Tool Settings - HCS08 Assembler > Language Options (continued)
Option Description
Maximum Controls how deep macros calls can be nested. Its main purpose
MacroNest nesting is to avoid endless recursive macro invocations.
(-MacroNest)
Table 3.30 lists and describes the output options for HCS08 Assembler.
Option Description
Object File Format Defines the format for the output file generated by the Assembler.
(-F)
Show label Enables the Compiler to append statistical information about the
statistics (-Ll) compilation session to the specified file. The information includes
Compiler options, code size (in bytes), stack usage (in bytes) and
compilation time (in seconds) for each procedure of the compiled
file. The Compiler appends the information to the specified
filename (or the file make.txt, if no argument given). Set the
TEXTPATH: Text File Path environment variable to store the file
into the path specified by the environment variable. Otherwise the
Compiler stores the file in the current directory.
Generate listing file Specifies the name, %n, of the assembly listing file. The file is
( for example, placed in the directory specified by %TEXTPATH. If this option is
%(TEXTPATH)/ left blank, no listing file is output.
%n.lst ) (-L)
Address size in the Specifies the size of the addresses displayed in the listing.
listing file (-Lasms) Options are:
• 1 to display addresses as xx
• 2 to display addresses as xxxx
• 3 to display addresses as xxxxxx
• 4 to display addresses asf xxxxxxxx
Do not print macro Specifies whether macro calls encountered in the source code
call in listing file (- are expanded and appear in the listing file.
Lc)
Do not print macro Instructs the Assembler to generate a listing file but not including
definition in listing any macro definitions. The listing file contains macro invocation
file (-Ld) and expansion lines as well as expanded include files.
Do not print macro Switches on the generation of the listing file, but macro
expansion in listing expansions are not present in the listing file. The listing file
file (-Le) contains macro definition and invocation lines as well as
expanded include files.
Table 3.30 Tool Settings - HCS08 Assembler > Output Options (continued)
Option Description
Do not print Switches on the generation of the listing file, but include files are
included files in not expanded in the listing file. The listing file contains macro
listing file (-Li) definition, invocation, and expansion lines.
Associate debug Enables the Assembler to produce debugging information for the
information to generated files and associate the debug information to the
assembly source assembly source file.
file (-AsmDbg)
Table 3.31 lists and describes the general assembler options for HCS08.
Option Description
MMU Support (- Check to inform the compiler that CALL and RTC instructions are
MMU) available, enabling code banking, and that the current
architecture has extended data access capabilities, enabling
support for __linear data types. This option can be used only
when -Cs08 is enabled.
Other Flags Specify additional command line options for the assembler; type
in custom flags that are not otherwise available in the UI.
Table 3.32 lists the build properties specific to developing software for HCS08.
The properties that you specify in these panels apply to the selected build tool on the Tool
Settings page of the Properties for <project> window.
Messages Messages
General General
Messages
Use this panel to specify whether to generate symbolic information for debugging the
build target
Figure 3.37 shows the Messages panel.
Option Description
Maximum number of error Specify the number of errors allowed until the
messages (-WmsgNe) application stops processing
Option Description
Disable user messages (-WmsgNu) The application produces some messages which
are not in the normal message categories
(WARNING, INFORMATION, ERROR, or
FATAL). With this option such messages can be
disabled. The purpose for this option is to reduce
the amount of messages and to simplify the error
parsing of other tools.
General
Use this panel to specify the memory model that the architecture uses. The build tools
(compiler, linker, and assembler) use the properties that you specify.
Figure 3.38 shows the General panel.
Table 3.34 lists and describes the memory model options for RS08.
Option Description
Memory Model (-M) Specify the memory model for the build tools:
• Tiny — Assumes that data
pointers have 8-bit addresses
unless explicitly specified with the
keyword __far
• Small — Default memory model;
assumes that all functions and
pointers have 16 bit addresses
and requires code and data to be
located in 64 kilobytes address
space
• Banked — Lets you place
program code into atmost 256
pages of 16 kilobytes each, but
does not affect data allocation
Enable Memory Management Unit Check to inform the compiler that CALL and
(MMU) Support (-MMU) RTC instructions are available, enabling code
banking, and that the current architecture
has extended data access capabilities,
enabling support for __linear data types.
This option can be used only when -Cs08 is
enabled.
Disassembler
Use this panel to specify the command, options, and expert settings for RS08
Disassembler.
Figure 3.39 shows the Disassembler page.
Option Description
Table 3.36 lists and describes the output options for RS08 disassembler.
Option Description
Print full listing Prints a listing with the header information of the object file.
Write disassembly Check to enable the decoder decoding Freescale object files
listing with source write the source code within the disassembly listing.
code
This option setting is default for the Freescale object files as
input.
Decode DWARF Check to write the DWARF section information in the listing file.
section Decoding from the DWARF section inserts this information in the
listing file. See the following listings for more information.
Decode ELF Check to ensure that the ELF section information is also written to
sections the listing file. Decoding from the ELF section inserts the following
information in the listing file.
Option Description
Dump ELF Check to generate a HEX dump of all ELF sections in a LST file.
sections in LST file
Produce inline Check to ensure that the output listing is an inline assembly file
assembly file without additional information, but in C comments.
Shows the cycle Check to ensure that each instruction line contains the count of
count for each cycles in '[',']' braces. The cycle count is written before the
instruction mnemonics of the instruction. Note that the cycle count display is
not supported for all architectures.
Write disassembly Check to ensure that the Decoder decoding Freescale object files
listing only writes the source code within the disassembly listing only.
Write disassembly Check to write the origin source and its comments within the
listing with source disassembly listing.
and all comments
Linker
Use this panel to specify the command, options, and expert settings for the build tool
linker. Additionally, the Linker tree control includes the general, libraries, and search path
settings.
Figure 3.41 shows the Linker settings.
Table 3.37 lists and describes the linker options for RS08.
Table 3.37 Tool Settings - Linker Options
Option Description
the paths shown in this panel. The IDE keeps searching paths until it finds the #include
file or finishes searching the last path at the bottom of the Include File Search Paths list.
The IDE appends to each path the string that you specify in the INCLUDE directive.
NOTE The IDE displays an error message if a header file is in a different directory
from the referencing source file. Sometimes, the IDE also displays an error
message if a header file is in the same directory as the referencing source file.
For example, if you see the message Could not open source file myfile.h,
you must add the path for myfile.h to this panel.
Figure 3.42 shows the Input panel.
Table 3.38 lists and describes the linker input options for RS08.
Option Description
Search paths (-L) Shows the list of all search paths; the ELF
part of the linker searches object files first in
all paths and then the usual environment
variables are considered.
Table 3.39 lists and describes the toolbar buttons that help work with the libraries and the
additional object file search paths.
Button Description
The buttons in the Add directory path and Edit directory path dialog boxes help work
with the object file search paths.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
• Workspace — Click to display the Folder Selection dialog box and specify the
object file search path. The resulting path, relative to the workspace, appears in the
appropriate list.
• File system — Click to display the Browse for Folder dialog box and specify the
object file search path. The resulting path appears in the appropriate list.
Table 3.40 lists and describes the toolbar buttons that help work with the libraries and the
additional object files.
Button Description
Figure 3.45 Tool Settings - Linker > Libraries - Add file path Dialog Box
Figure 3.46 Tool Settings - Linker > Libraries - Edit file path Dialog Box
The buttons in the Add file path and Edit file path dialog boxes help work with the file
paths.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
• Workspace — Click to display the File Selection dialog box and specify the file
path. The resulting path, relative to the workspace, appears in the appropriate list.
• File system — Click to display the Open dialog box and specify the file path. The
resulting absolute path appears in the appropriate list.
Table 3.41 lists and describes the linker optimization options for RS08.
Option Description
Allocation over segment The linker supports to allocate objects from one ELF
boundaries (-Alloc) section into different segments. The allocation strategy
controls where space for the next object is allocated as
soon as the first segment is full. Options are:
• Always use next segment: In the AllocNext
strategy, the linker always takes the next
segment as soon as the current segment is
full. Holes generated during this process are
not used later. With this strategy, the
allocation order corresponds to the definition
order in the object files. Objects defined first
in a source file are allocated before later
defined objects.
• Always check for free previous segment:
In the AllocFirst strategy, the linker checks
for every object, if there is a previously only
partially used segment, into which the
current object does fit. This strategy does
not maintain the definition order.
• Check for free previous segment when
current is full: In the AllocChange strategy,
the linker checks as soon as a object does
no longer fit into the current segment, if
there is a previously only partially used
segment, into which the current object does
fit. This strategy does not maintain the
definition order, but it does however use
fewer different ranges than the AllocFirst
case.
Option Description
Overlap constants in ROM (- Defines the default if constants and code should be
COCC) optimized. The commands DO_OVERLAP_CONSTS
and DO_NOT_OVERLAP_CONSTS take precedence
over the option.
Options are:
• Default
• Overlap constant data and code
• Overlap constant data
• Overlap code
Optimize copy down (-OCopy) Changes the copy down structure to use few spaces.
The optimization does assume that the application
does perform both the zero out and the copy down
step of the global initialization. If a value is set to zero
by the zero out, then zero values are removed from the
copy down information. The resulting initialization is
not changed by this optimization if the default startup
code is used.
Options are:
• Enable
• Disable
Table 3.42 lists and describes the linker output options for RS08.
Option Description
Link as ROM Check to link the application as a ROM library. This option has
library (-AsROMlib) the same effect as specifying AS ROM_LIB in the linker
parameter file.
Check if objects Check to instruct the linker to check if objects overlap, taking into
overlap in the account their address space.
absolute file (even
if different address
spaces) (-
CheckAcrossAddr
Space)
Generate map file Forces the generation of a map file after a successful linking
(-M) session.
Option Description
Specify statistic file Specify the name of the linker statistic file. The statistic file reports
(e.g. statistic.txt) (- each allocated object and its attributes. Every attribute is
StatF) separated by a tab character, so it can be easily imported into a
spreadsheet/database program for further processing.
Table 3.43 lists and describes the general linker options for RS08.
Option Description
Other flags Specify additional command line options for the linker; type in
custom flags that are not otherwise available in the UI. default
value is -WmsgSd1100 -WmsgSd1912.
Burner
Use the Burner for RS08 Preference Panel to map *.bbl (batch burner language) files to
the Burner Plug-In. When the project folder contains a *.bbl file, *.bbl file processing
during the post-link phase uses the settings in the Burner preference panel.
Figure 3.50 shows the RS08 Burner settings.
Table 3.44 lists and describes the burner options for RS08.
Option Description
Table 3.45 lists and describes the general options for RS08 burner.
Option Description
RS08 Compiler
Use this panel to specify the command, options, and expert settings for the build tool
compiler. Additionally, the RS08 Compiler tree control includes the general, include file
search path settings.
Figure 3.52 shows the RS08 Compiler settings.
Table 3.46 lists and describes the compiler options for RS08
.
Option Description
Table 3.47 lists and describes the preprocessor options for RS08 Compiler.
Option Description
Table 3.48 lists and describes the toolbar buttons that help work with preprocessor macro
definitions.
Button Description
Figure 3.54 Tool Settings - RS08 Compiler > Preprocessor - Enter Value Dialog Box
Figure 3.55 Tool Settings - RS08 Compiler > Preprocessor - Edit Dialog Dialog Box
The buttons in the Enter Value and Edit dialog boxes help work with the preprocessor
macros.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
NOTE The IDE displays an error message if a header file is in a different directory
from the referencing source file. Sometimes, the IDE also displays an error
message if a header file is in the same directory as the referencing source file.
For example, if you see the message Could not open source file myfile.h,
you must add the path for myfile.h to this panel.
Figure 3.56 shows the Input panel.
Table 3.49 lists and describes the input options for RS08 Compiler.
Option Description
Include files only once Check to include every header file only once;
duplicates are ignored.
Table 3.50 lists and describes the toolbar buttons that help work with the file paths.
Button Description
Table 3.51 lists and describes the toolbar buttons that help work with the search paths.
Button Description
Button Description
Figure 3.57 Tool Settings - RS08 Compiler > Input - Add file path Dialog Box
Figure 3.58 Tool Settings - RS08 Compiler > Input - Edit file path Dialog Box
The buttons in the Add file path (Figure 3.57) and Edit file path (Figure 3.58) dialog
boxes help work with the paths.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
• Workspace — Click to display the File Selection dialog box and specify the path.
The resulting path, relative to the workspace, appears in the appropriate list.
• File system — Click to display the Open dialog box and specify the path. The
resulting path appears in the appropriate list.
Table 3.52 lists and describes the language options for RS08.
Option Description
Table 3.52 Tool Settings - RS08 Compiler > Language Options (continued)
Option Description
Cosmic compatibility mode for space Check to allow Cosmic style @near, @far
modifiers @near, @far, and @tiny (- and @tiny space modifiers as well as
Ccx) @interrupt in your C code. The -ANSI option
must be switched off. It is not necessary to
remove the Cosmic space modifiers from
your application code. There is no need to
place the objects to sections addressable by
the Cosmic space modifiers.
The following is done when a Cosmic
modifier is parsed:
The objects declared with the space modifier
are always allocated in a special Cosmic
compatibility (_CX) section (regardless of
which section pragma is set) depending on
the space modifier, on the const qualifier or if
it is a function or a variable.
Space modifiers on the left hand side of a
pointer declaration specify the pointer type
and pointer size, depending on the target.
Bigraph and trigraph support (-Ci) Check to replace certain unavailable tokens
with the equivalent keywords.
Propagate const and colatile qualifiers Check to propagate const and volatile
for structs (-Cq) qualifiers for structures. If all members of a
structure are constant or volatile, the
structure itself is constant or volatile. If the
structure is declared as constant or volatile,
all its members are constant or volatile,
respectively.
Conversion from ‘const T*’ to ‘T*’ (-Ec) Check to enable this non-ANSI compliant
extension allows the compiler to treat a
pointer to a constant type like a pointer to the
non-constant equivalent of the type. Earlier
Compilers did not check a store to a constant
object through a pointer. This option is useful
when compiling older source code.
Table 3.53 lists and describes the type size options for RS08 Compiler.
Option Description
Table 3.53 Tool Settings - RS08 Compiler > Type Sizes (continued)
Option Description
long long double Selects the size of the long long double
type. Options are:
• Default (IEEE32)
• IEEE32
Table 3.54 lists and describes the code generation options for RS08 compiler.
Table 3.54 Tool Settings - RS08 Compiler > Code Generation Options
Option Description
Bit field gap limits (-BfaGapLimitBits) Check to affect the maximum allowable
number of gap bits. The bitfield allocation
tries to avoid crossing a byte boundary
whenever possible. To optimize accesses,
the compiler may insert some padding or gap
bits.
Bit field type size reduction This option is configurable whether or not the
compiler uses type-size reduction for
bitfields. Type-size reduction means that the
compiler can reduce the type of an int bitfield
to a char bitfield if it fits into a character. This
allows the compiler to allocate memory only
for one byte instead of for an integer. Options
are:
• Enabled (-BfsTSRON)
• Disabled (-BfsTSOFF)
Table 3.54 Tool Settings - RS08 Compiler > Code Generation Options (continued)
Option Description
Maximum load factor for switch tables (- Allows changing the default strategy of the
100) (-CswMaxLF) Compiler to use tables for switch statements;
is only available if the compiler supports
switch tables.
Minimum number of labels for switch Allows changing the default strategy of the
tables (-CswMinLB) Compiler using tables for switch statements;
is only available if the compiler supports
switch tables.
Minimum load factor for switch tables Allows the Compiler to use tables for switch
(100) (-CswMinLF) statements; is only available if the compiler
supports switch tables.
Qualifier for virtual table pointers (-Qvtp) Using a virtual function in C++ requires an
additional pointer to virtual function tables.
The Compiler cannot access the pointer and
generates the pointer in every class object
when virtual function tables are associated.
Use IEEE32 for double Check to use IEEE32 for doubles instead of
IEEE64 (default).
Table 3.55 lists and describes the optimization options for RS08 compiler.
Option Description
Loop unrolling i[number]) (-Cu) Enables loop unrolling with the following
restrictions:
• Only simple for statements are unrolled,
e.g., for (i=0; i<10; i++)
• Initialization and test of the loop counter
must be done with a constant.
• Only <, >, <=, >= are permitted in a
condition.
• Only ++ or -- are allowed for the loop
variable increment or decrement.
• The loop counter must be integral.
• No change of the loop counter is
allowed within the loop.
• The loop counter must not be used on
the left side of an assignment.
• No address operator (&) is allowed on
the loop counter within the loop.
• Only small loops are unrolled:
Loops with few statements within the
loop.
Loops with fewer than 16 increments or
decrements of the loop counter.
The bound may be changed with the
optional argument = i<number>.
The -Cu=i20 option unrolls loops with a
maximum of 20 iterations.
Table 3.55 Tool Settings - RS08 Compiler > Output Options (continued)
Option Description
Main Optimize Target: Optimize for There are various points where the Compiler has
to select between two possibilities: it can either
generate fast, but large code, or small but slower
code.
The Compiler generally optimizes on code size. It
often has to decide between a runtime routine or
an expanded code. The programmer can decide
whether to select between the slower and shorter
or the faster and longer code sequence by setting
a command line switch.
• The Code Size (-Os) option directs the
Compiler to optimize the code for
smaller code size. The Compiler trades
faster-larger code for slower-smaller
code.
• The Execution Time (-Ot) option
directs the Compiler to optimize the
code for faster execution time. The
Compiler replaces slower/smaller code
with faster/larger code. This option only
affects some special code sequences.
This option has to be set together with
other optimization options (e.g., register
optimization) to get best results.
Table 3.55 Tool Settings - RS08 Compiler > Output Options (continued)
Option Description
Dynamic options configuration for Allows the Compiler to select from a set of options
functions (-OdocF) to reach the smallest code size for every function.
Without this feature, you must set fixed Compiler
switches over the whole compilation unit. With this
feature, the Compiler finds the best option
combination from a user-defined set for every
function.
Optimize library function (-OiLib) Enables the compiler to optimize specific known
library functions to reduce execution time. The
Compiler frequently uses small functions such as
strcpy(), strcmp(), and so forth.
Disable alias checking (-Ona) Prevents the Compiler from redefining these
variables, which lets you reuse already-loaded
variables or equivalent constants. Use this option
only when you are sure no real writes of aliases to
a variable memory location will occur.
Disable CONST variable by Lets you switch OFF the replacement of CONST
constant replacement (-OnCsfVar) variable by the constant value.
Table 3.55 Tool Settings - RS08 Compiler > Output Options (continued)
Option Description
Disable code generation for NULL Before assigning a pointer to a member in C++,
Pointer to Member check (- you must ensure that the pointer to the member is
OnPMNC) not NULL in order to generate correct and safe
code. In embedded systems development, the
difficulty becomes generating the denser code
while avoiding overhead whenever possible (this
NULL check code is a good example). This option
enables you to switch off the code generation for
the NULL check.
Disable tree optimizer (-Ont) Disables the tree optimizer. Use this option for
debugging and to force the Compiler to produce
'straightforward' code. Note that the optimizations
below are just examples for the classes of
optimizations.
Large return value type Compiler supports this option even though
returning a 'large' return value may be not as
efficient as using an additional pointer. The
Compiler introduces an additional parameter for
the return value if the return value cannot be
passed in registers. Options are:
• Default
• Large return value pointer, always
with temporary (-Rpt)
• Large return value pointer and
temporary elimination (-Rpe)
Disable mid level optimizations The backend of this compiler is based on the
second generation intermediate code generator
(SICG). All intermediate language and processor
independent optimizations (cf. NULLSTONE) are
performed by the SICG optimizer using the
powerful static single assignment form (SSA
form). The optimizations are switched off using -
od. Currently four optimizations are implemented.
Disable mid level branch Disables branch optimizations on the SSA form
optimizations based on control flows.
Label rearranging sorts all labels of the control
flow to generate a minimum amount of branches.
Table 3.55 Tool Settings - RS08 Compiler > Output Options (continued)
Option Description
Disable far to near optimization Disables the JSR to BSR optimization. The
compiler checks the range of the call to determine
if a BSR can be generated instead of a JSR. If -
Onbsr is used this optimization will be disabled.
Disable reload from register Disables the low level register trace optimizations.
optimization If you use the option the code becomes more
readable, but less optimal.
Disable tail call optimizations Allows the compiler to remove all the entry and
exit code from the current function.By default, the
compiler replaces trailing calls (JSR/BSR) with
JMP instructions if the function does not contain
any other function calls.
Reuse locals of stack frame Instructs the compiler to reuse the location of local
variables/temporaries whenever possible. When
used, the compiler analyzes which local variables
are alive simultaneously. Based on that analysis
the compiler selects the best memory layout for
for variables. Two or more variables may end up
sharing the same memory location.
Table 3.56 lists and describes the output options for RS08 compiler.
Table 3.56 Tool Settings - RS08 Compiler > Output Options
Option Description
Allocate CONST objects in ROM (-Cc) Check to enables the Compiler assign const
objects into the ROM_VAR segment, which
the parameter file assigns to a ROM section.
Encrypt File (e.g. %f.e%e) (-Eencrypt) Encrypts using the given key with the -Ekey:
Encryption Key option.
Encryption key (-EKey) Encrypt files with the given key number (-
Eencrypt option).The default encryption key
is 0. Using this default is not recommended.
Table 3.56 Tool Settings - RS08 Compiler > Output Options (continued)
Option Description
Table 3.56 Tool Settings - RS08 Compiler > Output Options (continued)
Option Description
Log predefined defines to file (e.g. Enables the Compiler to generate a text file
predef.h) (-Ldf) that contains a list of the compiler-defined
#define. The default filename is predef.h, but
may be changed (e.g., -Ldf="myfile.h"). The
file is generated in the directory specified by
the TEXTPATH: Text File Path environment
variable. The defines written to this file
depend on the actual Compiler option
settings (e.g., type size settings or ANSI
compliance).
Note: The defines specified by the
command line (-D: Macro Definition
option) are not included.
This option may be very useful for SQA. With
this option it is possible to document every
#define which was used to compile all
sources.
Note: This option only has an effect if a file is
compiled. This option is unusable if you are
not compiling a file.
List of included files to ‘.inc’ file (-Li) Enables the Compiler to generate a text file
which contains a list of the #include files
specified in the source. This text file shares
the same name as the source file but with
the extension, *.inc. The files are stored in
the path specified by the TEXTPATH: Text
File Path environment variable. The
generated file may be used in make files.
Table 3.56 Tool Settings - RS08 Compiler > Output Options (continued)
Option Description
Write statistic output to file (e.g. Enables the Compiler append statistical
logfile.txt) (-Ll) information about the compilation session to
the specified file. The information includes
Compiler options, code size (in bytes), stack
usage (in bytes) and compilation time (in
seconds) for each procedure of the compiled
file. The Compiler appends the information to
the specified filename (or the file make.txt, if
no argument given). Set the TEXTPATH:
Text File Path environment variable to store
the file into the path specified by the
environment variable. Otherwise the
Compiler stores the file in the current
directory.
Table 3.57 lists and describes the general options for RS08 compiler.
Option Description
RS08 Assembler
Use this panel to specify the command, options, and expert settings for the build tool
assembler.
Figure 3.65 shows the Assembler settings.
Table 3.58 lists and describes the assembler options for RS08.
Option Description
Table 3.59 lists and describes the toolbar buttons that help work with the file search paths.
Button Description
Button Description
Table 3.29 lists and describes the language options for RS08 Assembler.
Option Description
Case insensitivity Turns off case sensitivity on label names. When this option is
on label name (-Ci) activated, the Assembler ignores case sensitivity for label names.
If the Assembler generates object files but not absolute files
directly (-FA2 assembler option), the case of exported or imported
labels must still match. Or, the -Ci assembler option should be
specified in the linker as well.
Define label ( use Lets you define labels and assign them values. The labels are
spaces to separate used for conditional compilation, where a common source file can
labels ) (-D) be used to generate code for different processor derivatives,
based on the labels supplied here.
Support for Enables the Macro Assembler to support the definition and usage
structured types (- of structured types. This allows an easier way to access ANSI-C
Struct) structured variable in the Macro Assembler.
Angle brackets for Controls whether the < > syntax for macro invocation argument
macro arguments grouping is available. When it is disabled, the Assembler does not
grouping (- recognize the special meaning for < in the macro invocation
CMacAngBrack) context. There are cases where the angle brackets are
ambiguous. In new code, use the [? ?] syntax instead.
Options are:
• Allow
• Disallow
Square braces for Controls the availability of the [? ?] syntax for macro invocation
macro arguments argument grouping. When it is disabled, the Assembler does not
grouping (- recognize the special meaning for [?] in the macro invocation
CMacBrackets) context.
Options are:
• Allow
• Disallow
Maximum Controls how deep macros calls can be nested. Its main purpose
MacroNest nesting is to avoid endless recursive macro invocations.
(-MacroNest)
Table 3.30 lists and describes the output options for RS08 Assembler.
Option Description
Object File Format Defines the format for the output file generated by the Assembler.
Show label Using the -Ll option, the Compiler appends statistical information
statistics (-Li) about the compilation session to the specified file. The
information includes Compiler options, code size (in bytes), stack
usage (in bytes) and compilation time (in seconds) for each
procedure of the compiled file. The Compiler appends the
information to the specified filename (or the file make.txt, if no
argument given). Set the TEXTPATH: Text File Path environment
variable to store the file into the path specified by the environment
variable. Otherwise the Compiler stores the file in the current
directory.
Generate listing file The -Lasm option causes the Compiler to generate an assembler
( e.g. listing file directly. The Compiler also prints all assembler-
%(TEXTPATH)/ generated instructions to this file. The option specifies the name
%n.lst ) (-L) of the file. If no name is specified, the Compiler takes a default of
%n.lst. If the resulting filename contains no path information the
Compiler uses the TEXTPATH: Text File Path environment
variable.
The syntax does not always conform with the inline assembler or
the assembler syntax. Therefore, use this option only to review
the generated code. It cannot currently be used to generate a file
for assembly.
Address size in the Specifies the size of the addresses displayed in the listing.
listing file (-Lasms) Options are:
• 1 to display addresses as xx
• 2 to display addresses as xxxx
• 3 to display addresses as xxxxxx
• 4 to display addresses asf xxxxxxxx
Do not print macro Specifies whether macro calls encountered in the source code
call in listing file (- are expanded and appear in the listing file.
Lc)
Do not print macro Instructs the Assembler to generate a listing file but not including
definition in listing any macro definitions. The listing file contains macro invocation
file (-Ld) and expansion lines as well as expanded include files.
Table 3.61 Tool Settings - RS08 Assembler > Output Options (continued)
Option Description
Do not print macro Switches on the generation of the listing file, but macro
expansion in listing expansions are not present in the listing file. The listing file
file (-Le) contains macro definition and invocation lines as well as
expanded include files.
Do not print Switches on the generation of the listing file, but include files are
included files in not expanded in the listing file. The listing file contains macro
listing file (-Li) definition, invocation, and expansion lines.
Associate debug Enables the Assembler to produce debugging information for the
information to generated files and associate debug information to the assembly
assembly source source file.
file (-AsmDbg)
Table 3.31 lists and describes the general assembler options for RS08.
Option Description
MMU Support (- Check to inform the compiler that CALL and RTC instructions are
MMU) available, enabling code banking, and that the current
architecture has extended data access capabilities, enabling
support for __linear data types. This option can be used only
when -Cs08 is enabled.
Other Flags Specify additional command line options for the assembler; type
in custom flags that are not otherwise available in the UI.
Table 3.63 lists the build properties specific to developing software for ColdFire Debug.
The properties that you specify in these panels apply to the selected build tool on the Tool
Settings page of the Properties for <project> window.
Debugging Debugging
Messages Messages
Librarian Librarian
ColdFire CPU
Use this panel to specify the CPU type, and the memory model that the architecture uses.
The build tools (compiler, linker, and assembler) then use the properties set in this panel to
generate CPU-specific code.
Option Description
Debugging
Use this panel to specify the whether to generate symbolic information for debugging the
build target (Figure 3.72).
Option Description
Messages
Use this panel to specify the whether to generate symbolic information for debugging the
build target (Figure 3.73).
Option Description
Option Description
Librarian
Use this panel to select whether the linker will identify standard libraries (Figure 3.74).
Option Description
Enable automatic library configurations Select to let the compiler identify standard
libraries.
Burner
Use the Burner for ColdFire Preference Panel to map *.bbl (batch burner language) files to
the Burner Plug-In. When the project folder contains a *.bbl file, *.bbl file processing
during the post-link phase uses the settings in the Burner preference panel.
Figure 3.75 shows the ColdFire Burner settings.
Table 3.68 lists and describes the burner options for ColdFire.
Option Description
Table 3.69 lists and describes the general options for ColdFire burner.
Option Description
ColdFire Linker
Use this panel to specify ColdFire linker behavior. You can specify the command, options,
and expert settings for the build tool linker. Additionally, the Linker tree control includes
the input, general, and output settings.
Figure 3.77 shows the ColdFire Linker settings.
Table 3.70 lists and describes the linker options for ColdFire.
Option Description
Table 3.71 lists and describes the input options for ColdFire.
Option Description
Table 3.71 Tool Settings - ColdFire Linker > Input Options (continued)
Option Description
Library Search Paths (-L +path) Specifies the search pathname of libraries or
other resources related to the project. Type
the pathname into this text box. Alternatively,
click Workspace or File system, then use
the subsequent dialog box to browse to the
correct location.
Table 3.72 lists and describes the general linker options for ColdFire.
Option Description
Other Flags Specify additional command line options for the linker; type in
custom flags that are not otherwise available in the UI.
Table 3.73 lists and describes the output settings for ColdFire linker.
Option Description
Generate Link Map Check to generate link map and list unused objects; appears
- List Inused grayed out if the Generate Link Map checkbox is not checked.
Objects
Generate Link Map Check to generate link map and show transitive closure; appears
-Show Transitive grayed out if the Generate Link Map checkbox is not checked.
Closure
Generate Link Map Check to generate link map and always keep the map; appears
-Always Keep Map grayed out if the Generate Link Map checkbox is not checked.
Generate Link Map Check to generate link map and generate a S-record file.
- Generate S-
Record File
Table 3.73 Tool Settings - ColdFire Linker > Output Options (continued)
Option Description
Max S-Record Specify the maximum length for S-record; appears grayed out if
Length the Generate S-Record File checkbox is not checked. The default
value is 252.
EOL Character Specify the end-of-line character; appears grayed out if the
Generate S-Record File checkbox is not checked. The default
value is DOS.
Max Bin Record Specify the maximumvalue for bin record; appears grayed out if
the Generate Binary Image checkbox is not checked. The default
value is 252.
Generate Warning Select whether you want to generate warning messages, warn
Messages superseded definitions, or treat warnings as errors.
ColdFire Compiler
Use this panel to specify the command, options, and expert settings for the build tool
compiler. Additionally, the ColdFire Compiler tree control includes the general, include
file search path settings.
Figure 3.81 shows the ColdFire Compiler settings.
Table 3.74 lists and describes the compiler options for ColdFire.
Option Description
Table 3.75 lists and describes the input options for ColdFire compiler.
Option Description
Compile only, So Nt Link (-c) Check if you want to compile only and do not
want to link the file.
Always Search User Paths (-nosyspath) Check if you want to always search user
paths.
Table 3.76 lists and describes the toolbar buttons that help work with the user and system
search paths.
Button Description
The buttons in the Add directory path and Edit directory path dialog boxes help work
with the object file search paths.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
• Workspace — Click to display the Folder Selection dialog box and specify the
object file search path. The resulting path, relative to the workspace, appears in the
appropriate list.
• File system — Click to display the Browse for Folder dialog box and specify the
object file search path. The resulting path appears in the appropriate list.
Table 3.77 lists and describes the warnings options for ColdFire compiler.
Option Description
Treat All Warnings As Errors Check to treat all warnings as errors. The
compiler will stop if it generates a warning
message.
Table 3.77 Tool Settings - ColdFire Compiler > Warnings Options (continued)
Option Description
Unused Result From Non-Void- Check to warn of unused result from non-
Returning Function void-returning functions.
Table 3.77 Tool Settings - ColdFire Compiler > Warnings Options (continued)
Option Description
Table 3.77 Tool Settings - ColdFire Compiler > Warnings Options (continued)
Option Description
Token not formed by ## operator Check to enable warnings for the illegal uses
of the preprocessor’s token concatenation
operator (##). It is equivalent to the pragma
warn_illtokenpasting on.
Table 3.78 lists and defines each option of the Optimization panel.
Option Description
Optimization Level (-opt) Specify the optimizations that you want the
compiler to apply to the generated object code:
• 0—Disable optimizations. This setting is
equivalent to specifying the -O0
command-line option. The compiler
generates unoptimized, linear
assembly-language code.
• 1—The compiler performs all target-
independent (that is, non-parallelized)
optimizations, such as function inlining.
This setting is equivalent to specifying
the -O1 command-line option.
The compiler omits all target-specific
optimizations and generates linear
assembly-language code.
• 2—The compiler performs all
optimizations (both target-independent
and target-specific). This setting is
equivalent to specifying the -O2
command-line option. The compiler
outputs optimized, non-linear,
parallelized assembly-language code.
• 3—The compiler performs all the level 2
optimizations, then the low-level
optimizer performs global-algorithm
register allocation. This setting is
equivalent to specifying the -O3
command-line option.
At this optimization level, the compiler generates
code that is usually faster than the code
generated from level 2 optimizations.
Table 3.78 Tool Settings - ColdFire Compiler > Optimization Options (continued)
Option Description
Table 3.79 lists and defines each option of the Processor panel.
Option Description
Table 3.79 Tool Settings - ColdFire Compiler > Processor Options (continued)
Option Description
Generate Code for Profiling (-profile) Check to enable the processor generate
code for use with a profiling tool. Checking
this box corresponds to using the command-
line option -profile. Clearing this
checkbox is equivalent to using the
command-line option -noprofile
Register Coloring (-coloring) Clear to enable the Compiler force all local
variables to be stack-based except for
compiler generated temporaries.
Table 3.79 Tool Settings - ColdFire Compiler > Processor Options (continued)
Option Description
Table 3.80 lists and defines each option of the Language Settings panel.
Table 3.80 Tool Settings - ColdFire Compiler > Language Settings Options
Option Description
Enable C++ ‘bool’ type, ‘true’ and ‘false’ Check to enable the C++ compiler
Constants (-bool) recognize the bool type and its true and false
values specified in the ISO/IEC 14882-1998
C++ standard; is equivalent to pragma bool
and the command-line option -bool.
Table 3.80 Tool Settings - ColdFire Compiler > Language Settings Options (continued)
Option Description
Force C++ Compilation (-lang c99) Check to translates all C source files as C++
source code and is equivalent to pragma
cplusplus and the command-line option -
lang c++.
Enable RTTI (-RTTI) Check to allow the use of the C++ runtime
type information (RTTI) capabilities,
including the dynamic_cast and typeid
operators; is equivalent to pragma RTTI and
the command-line option -RTTI.
Table 3.80 Tool Settings - ColdFire Compiler > Language Settings Options (continued)
Option Description
Table 3.80 Tool Settings - ColdFire Compiler > Language Settings Options (continued)
Option Description
ColdFire Assembler
Use this panel to specify the command, options, and expert settings for the build tool
assembler. Additionally, the Assembler tree control includes the general and include file
search path settings.
Figure 3.89 shows the Assembler settings.
Table 3.81 lists and defines each option of the ColdFire Assembler panel.
Option Description
Table 3.82 lists and describes the input options for ColdFire assembler.
Option Description
Table 3.83 lists and describes the toolbar buttons that help work with the user and system
search paths.
Button Description
The buttons in the Add directory path and Edit directory path dialog boxes help work
with the object file search paths.
• OK — Click to confirm the action and exit the dialog box.
• Cancel — Click to cancel the action and exit the dialog box.
• Workspace — Click to display the Folder Selection dialog box and specify the
object file search path. The resulting path, relative to the workspace, appears in the
appropriate list.
• File system — Click to display the Browse for Folder dialog box and specify the
object file search path. The resulting path appears in the appropriate list.
Figure 3.85 lists and describes the general assembler options for ColdFire.
Option Description
Label Must End Clear if system does not require labels to end with colons. By
With ‘:’ default, the option is checked.
Directives Begin Clear if the system does not require directives to start with
With ‘.’ periods. By default, the option is checked.
Allow Space In Clear to restrict the assembler from adding spaces in operand
Operand Field fields. By default, the option is checked.
Other Flags Specify additional command line options for the assembler; type
in custom flags that are not otherwise available in the UI.
ColdFire Preprocessor
Use this panel to specify preprocessor behavior and define macros.
Figure 3.94 shows the Preprocessor panel.
Figure 3.46 lists and describes the preprocessor options for ColdFire.
Option Description
Table 3.86 lists and describes the preprocessor options for ColdFire.
Option Description
Emit file change (-ppopt break) Check to notify file changes (or #line
changes) appear in the output.
Show full path (-ppopt full) Check to display file changes in comments
(as before) or in #line directives.
Table 3.86 Tool Settings - ColdFire Compiler > Preprocessor Options (continued)
Option Description
Use #include line (-ppopt line) Check to display file changes in comments
(as before) or in #line directives.
ColdFire Disassembler
Use this panel to specify the command, options, and expert settings for ColdFire
Disassembler.
Figure 3.96 shows the ColdFire Disassembler page.
Option Description
Option Description
Show Symbol and String Tables Check to display symbol and string tables
directives to the listing file
Show Core Modules Check to show core modules in the listing file
Show Addresses and Object Code Check to show the addresses and object
code in the listing file
Show Source Code Check to show the source code in the listing
file
Show Data Modules Check to show the data modules in the listing
file
5. In the group of tabs in the upper-right side of the window, click the Debugger tab.
The debugger setting page appears in the area beneath the tabs (Figure 4.2.)
6. Change the settings on this page as per your requirements. Refer Table 4.1 for details
on the various settings of this page.
7. Click Apply to save the new settings.
8. Click Revert to undo any of the unsaved changes.
The IDE restores the last set of saved settings to all pages of the Debug
Configurations dialog box. Also, the IDE disables Revert until you make new
pending changes.
Download Tab
PIC Tab
Symbolics Tab
Download Tab
PIC Tab
Symbolics Tab
Download Tab
PIC Tab
Symbolics Tab
Symbolics Tab
HCS08-specific Settings
The following debugger tab manages the settings specific to the HCS08 microcontroller.
HCS08 Tab
Use this tab to specify the processor derivative, simulator/emulator option, target
initialization files, and memory configuration files. Figure 4.3 shows the HCS08 tab.
Table 4.2 describes the debugger settings for the HCS08 tab.
Option Description
Target Processor Specifies the target hardware on which you debug the generated
binary file.
Option Description
Initialize Target Specifies the target initialization file to be used by the debugger at
the start of each debugging session
Check this option to activate the Target Initialization File text box
where you can specify the path of the initialization file.
Alternatively, you can specify the file path by using any of the
buttons listed below:
• Workspace — Opens a dialog box where you can
specify the initialization file in terms of a location
relative to the IDE's workspace directory. After you
select the file, the path to that file appears in the Target
Initialization File text box, relative to the path of the
variable workspace_loc. The IDE resolves this
variable to the absolute file system path of the
workspace directory root.
• File System — Opens a dialog box where you can
browse for the initialization file. After you select the file,
the absolute path to that file appears in the Target
Initialization File text box.
• Variables — Opens a dialog box where you can
specify the initialization file in terms of IDE path
variables. After you specify the file, the path to that file
appears in the Target Initialization File text box, relative
to the path variables that you use. The IDE resolves
each path variable as explained in the Variable
Description box at the bottom of the Select Variable
dialog box.
Clear this option if you want the debugger to use a default target
initialization file.
Option Description
Use Default Check this checkbox to use the default memory configuration file.
Option Description
Option Description
Option Description
The following topics explain how to add, modify, and delete entries in the Attribute/Value
table:
• Add Attribute/Value
• Edit Existing Attribute/Value
• Remove Attribute/Value
Add Attribute/Value
To add a new attribute/value pair, perform these steps.
1. Click Add.
The default entry New attribute appears in the Attribute column of the table, and
the default entry value appears in the Value column. The new attribute’s name is
highlighted.
2. Type in a name for an attribute into this field, using alphanumeric characters only. The
text replaces the default name.
3. Click on value.
The text in this text box is highlighted.
4. Type in a value to replace the default value.
5. To save the changes, click Apply.
2. Type in the name of the new attribute into this field, using alphanumeric characters
only.
The text replaces the previous name.
3. Click on the value field.
The text in this text box is highlighted.
4. Type in a value to replace the previous value.
5. To save the changes, click Apply.
Remove Attribute/Value
To delete an existing attribute/pair in the table:
1. Double-click on the row of an attribute/pair in the table.
The row is highlighted.
2. Click Remove.
The row containing the selected attribute/value is deleted.
3. Click Apply to save any changes.
NOTE For more information on the physical connection options presented with the
option of probe, refer to the chapter Connections — HCS08.
RS08-specific Settings
The following debugger tabs manage the settings specific to the RS08 microcontroller.
RS08 Tab
Use this tab to specify the target processor, simulator/emulator option, target initialization
files, and memory configuration files. Figure 4.5 shows the RS08 tab.
Option Description
Target Processor Specifies the target hardware on which you debug the generated
binary file.
Option Description
Initialize Target Specifies the target initialization file to be used by the debugger at
the start of each debugging session
Check this option to activate the Target Initialization File text box
where you can specify the path of the initialization file.
Alternatively, you can specify the file path by using any of the
buttons listed below:
• Workspace — Opens a dialog box where you can
specify the initialization file in terms of a location
relative to the IDE's workspace directory. After you
select the file, the path to that file appears in the Target
Initialization File text box, relative to the path of the
variable workspace_loc. The IDE resolves this
variable to the absolute file system path of the
workspace directory root.
• File System — Opens a dialog box where you can
browse for the initialization file. After you select the file,
the absolute path to that file appears in the Target
Initialization File text box.
• Variables — Opens a dialog box where you can
specify the initialization file in terms of IDE path
variables. After you specify the file, the path to that file
appears in the Target Initialization File text box, relative
to the path variables that you use. The IDE resolves
each path variable as explained in the Variable
Description box at the bottom of the Select Variable
dialog box.
Clear this option if you want the debugger to use a default target
initialization file.
Option Description
Use Default Check this checkbox to use the default memory configuration file.
Option Description
Option Description
The following topics explain how to add, modify, and delete entries in the Attribute/Value
table:
• Add Attribute/Value
• Edit Existing Attribute/Value
• Remove Attribute/Value
Add Attribute/Value
To add a new attribute/value pair, perform these steps.
1. Click Add.
The default entry New attribute appears in the Attribute column of the table, and
the default entry value appears in the Value column. The new attribute’s name is
highlighted.
2. Type in a name for an attribute into this field, using alphanumeric characters only. The
text replaces the default name.
3. Click on value.
The text in this text box is highlighted.
4. Type in a value to replace the default value.
5. To save the changes, click Apply.
Remove Attribute/Value
To delete an existing attribute/pair in the table:
1. Double-click on the row of an attribute/pair in the table.
The row is highlighted.
2. Click Remove.
The row containing the selected attribute/value is deleted.
3. Click Apply to save any changes.
NOTE For more information on the physical connection options presented with the
option of probe, consult the chapter, Connections — RS08.
ColdFire-specific Settings
The following debugger tab manage the settings specific to the ColdFire microcontroller.
ColdFire Tab
Use this tab to specify the target processor, simulator/emulator option, target initialization
files, and memory configuration files. Figure 4.7 shows the ColdFire tab.
Option Description
Target Processor Specifies the target hardware on which you debug the generated
binary file. The options are:
• Generic — The debugger uses those hardware
features that are common to all ColdFire processors.
• ColdFire derivative — The debugger uses the
hardware features available on the selected processor.
Execute Reset Specifies that the debugger resets the target hardware before
downloading a program for debugging purposes.
Check this option to have the debugger reset the target before
downloading the program to it.
Clear this option to have the debugger download a program to the
target without resetting that target.
Run Out of Reset Determines what the ColdFire Microcontroller does after it is
reset.
Check this option to have the Microcontroller begin executing the
program after it is reset.
Clear this option to have the Microcontroller remain in debug
mode after it it reset.
Option Description
Initialize Target Specifies the target initialization file to be used by the debugger at
the start of each debugging session
Check this option to activate the Target Initialization File text box
where you can specify the path of the initialization file.
Alternatively, you can specify the file path by using any of the
buttons listed below:
• Workspace — Opens a dialog box where you can
specify the initialization file in terms of a location
relative to the IDE's workspace directory. After you
select the file, the path to that file appears in the Target
Initialization File text box, relative to the path of the
variable workspace_loc. The IDE resolves this
variable to the absolute file system path of the
workspace directory root.
• File System — Opens a dialog box where you can
browse for the initialization file. After you select the file,
the absolute path to that file appears in the Target
Initialization File text box.
• Variables — Opens a dialog box where you can
specify the initialization file in terms of IDE path
variables. After you specify the file, the path to that file
appears in the Target Initialization File text box, relative
to the path variables that you use. The IDE resolves
each path variable as explained in the Variable
Description box at the bottom of the Select Variable
dialog box.
Clear this option if you want the debugger to use a default target
initialization file.
Option Description
NOTE For this release of the tools, Linux application debugging is not supported.
Option Description
Target Processor Specifies the target hardware on which you debug the generated
binary file. The options are:
• Generic — The debugger uses those hardware
features that are common to all ColdFire processors.
• ColdFire derivative — The debugger will use the
hardware features available on the selected processor.
example, if the VBR address is 0x0000 0000, the new vector at address 0x0000 0408
catches and handles the checked exceptions.
The debugger writes a Halt instruction and a Return from Exception instruction at this
same location.
NOTE If your exceptions are in Flash or ROM, do not check any boxes in the CF
Exceptions panel. Abatron ignores this tab, using instead the exception
definitions in the Abatron firmware.
Option Purpose
Option Purpose
Option Purpose
Option Description
Fetch SP and PC from Reset Vector When selected, the debugger fetches the
base of the stack and the start address from
the reset vector, and loads them into the
Microcontroller’s SP and PC, respectively.
Used for ROM build targets.
Set PC to program Entry Point When selected, the debugger sets the
Microcontroller’s PC to the program’s start
address. Used to emulate reset for RAM
build targets.
Set PC and SP to specified value When selected, the debugger takes the user-
supplied values for the SP and PC and loads
them the corresponding Microcontroller
registers. Used to reference the entry point
of a boot loader.
When selected, the SP: and PC: text entry
boxes are active. Enter the hexadecimal
addresses for the SP and PC in these boxes.
Use this tab to inhibit or allow interrupts. When inhibiting interrupts, you can mask
interrupts below a level that you specify. Figure 4.11 shows the Interrupts tab.
Option Description
NOTE The exact definitions of interrupt levels are different for each target
microcontroller, and masking all interrupts can cause erratic behavior. This
means that finding the best interrupt level to mask can involve trial and error.
Be alert for any code statements that change the interrupt mask; stepping over
such a statement can modify the settings in the tab.
Table 4.11 describes the settings available on the Connection Settings tab.
Option Description
Enable Logging Check this option to have the debugger output connection-
protocol activity to a console in the Console view.
Clear this option if you do not want the debugger to output
connection-protocol activity to a console.
Option Description
<When the connection For the CCS option, the Connection drop-down list contains
protocol is CCS> the following values:
• Generic — The debugger does not configure the
connection protocol for any particular physical
connection. Use this setting if you manually
launch and configure the connection-protocol
service (such as CCS), or if you are debugging
code with a simulator.
• USB TAP — The debugger uses a USB TAP
probe to connect to the target hardware. If you
have multiple USB TAP probes available, check
the USB TAP Serial Number checkbox and enter
the serial number (in hexadecimal notation) of the
probe to which you want the debugger to connect.
• Ethernet TAP — The debugger uses an Ethernet
TAP probe to connect to the target hardware.
Enter in the Hostname/IP Address text box the
host name or Internet Protocol address of the
probe to which you want the debugger to connect
By default, the Ethernet TAP probe uses Dynamic
Host Configuration Protocol (DHCP) to acquire an
IP address, netmask, and default gateway
settings. If your network has a DHCP server which
registers host names to the network’s name
server, you can use the default host name to
access the Ethernet TAP probe. Access is
available when the HEARTBEAT LED starts
flashing green.
Option Description
<When the connection For the GDI option, the Connection drop-down list contains
protocol is GDI> the following values:
• Generic — The debugger does not configure the
connection protocol for any particular physical
connection. Use this setting if you manually
launch and configure the connection-protocol
service (such as CCS), or if you are debugging
code with a simulator.
• Software ColdFire V1 in-DART — This option
specifies a hardware connection of a SofTec
inDART debugger/programmer using the BDM
interface. The Connection tab displays a table of
named attributes and their assigned values .
These attribute/value pairs are used to configure
the connection parameters for the interface.
• OSBDM - JM60 ColdFire V2\3\4 — This option
specifies a hardware connection for OSBDM -
JM60 ColdFire V2\3\4.
• P&E ColdFire V1 Multilink\Cyclone Pro — This
option specifies that the hardware connection is
either a P&E Microsystems Multilink or a P&E
Multisystems Cyclone Pro.
• P&E ColdFire V234 Multilink\Cyclone Max — This
option specifies that the hardware connection is
either a P&E Microsystems Multilink or a P&E
Multisystems Cyclone Max.
<When the connection For the Abraton BDI option, the Connection drop-down list
protocol is Abraton BDI> contains the following values:
• TCP/IP — This option specifies that the physical
connection uses TCP/IP as the interface for
debugging communications.
• Serial — This option specifies that the physical
connection uses a serial connection as the
interface for debugging communications.
The following topics explain how to add, modify, and delete entries in the Attribute/Value
table:
• Add Attribute/Value
• Edit Existing Attribute/Value
• Remove Attribute/Value
Add Attribute/Value
To add a new attribute/value pair, perform these steps.
1. Click Add.
The default entry New attribute appears in the Attribute column of the table, and
the default entry value appears in the Value column. The new attribute’s name is
highlighted.
2. Type in a name for an attribute into this field, using alphanumeric characters only. The
text replaces the default name.
3. Click on value.
The text in this text box is highlighted.
4. Type in a value to replace the default value.
5. To save the changes, click Apply.
Remove Attribute/Value
To delete an existing attribute/pair in the table:
1. Double-click on the row of an attribute/pair in the table.
The row is highlighted.
2. Click Remove.
The row containing the selected attribute/value is deleted.
3. Click Apply to save any changes.
NOTE For more information on the physical connection options presented with the
option of probe, consult the chapter, Connections — ColdFire V1.
Option Description
Use Remote Check this option to specify the Hostname/IP Address of the remote
CCS Server CCS instance with which you want the debugger to communicate.
Clear this option if you want the debugger to communicate with a
CCS instance that runs on your own computer.
Option Description
Specify CCS Check this option to specify the path to the CCS executable file
Executable (other than the default executable file) that the debugger launches if
no CCS service is running at the time you start a debugging session.
Enter the full path in the text box, or, you can specify the file path by
using any of the buttons listed below:
• Workspace — Opens a dialog box where you can specify
the CCS executable file in terms of a location relative to
the IDE's workspace directory. After you select the file, the
path to that file appears in the CCS Executable File text
box, relative to the path of the variable workspace_loc.
The IDE resolves this variable to the absolute file system
path of the workspace directory root.
• File System — Opens a dialog box where you can browse
for the executable file. After you select the file, the
absolute path to that file appears in the CCS Executable
File text box.
• Variables — Opens a dialog box where you can specify
the executable file in terms of IDE path variables. After you
specify the file, the path to that file appears in the CCS
Executable File text box, relative to the path variables that
you use. The IDE resolves each path variable as
explained in the Variable Description box at the bottom of
the Select Variable dialog box.
Clear this option if you want the debugger to launch the default CCS
executable file if no CCS service is running at the time you start a
debugging session.
This setting holds true only when no CCS service is running at the
time the debugging session starts. For example, if you check this
checkbox and specify C:\ccs\ccs.exe, but you have
C:\otherccs\ccs.exe already running when you start a
debugging session, this setting has no effect. The IDE uses this
setting just when it cannot find a local running CCS session.
BDM Clock Use the text box to specify the default clock speed (in kilohertz) of
Speed the connection between your computer and the BDM header of the
target-hardware chain.
Option Description
CCS Timeout Enter the number of seconds after which you want the debugger to
treat CCS as unresponsive. The debugger treats the time interval
that you specify as a window of validity in which CCS must complete
debugger requests. If CCS does not complete the requests during
the specified time interval, the debugger treats CCS as
unresponsive.
For example, you might specify 30 seconds to give intensive CCS
operations enough time to succeed during a debugging session. You
don't want to wait 30 seconds for the initial connect operation,
however, if you mistyped the Ethernet TAP probe's IP address, or if
you forgot to turn on the target hardware. For these reasons, the
debugger treats the specified value differently for initial-connect
operations.
Disable Check this option to have the debugger use a standard (slow)
Synchronous procedure to write to memory on the target system.
Clocking
Clear this option to have the debugger use an optimized (fast)
download procedure to write to memory on the target system. The
fast download mechanism is used by default when writing to target
memory.
Check this option if the fast download procedure results in load
failures.
Use the Target OS list box to specify the OS that runs on the target device, or specify
None to have the debugger use the bare board.
Option Description
Option Description
Option Description
Option Description
Download Tab
Use this tab to specify which program sections the debugger downloads to the target, and
whether the debugger should read back those sections and verify them.
Figure 4.17 shows the Download tab. Briefly, the section data types are:
• Executable — These sections contain your program’s code.
• Constant Data — These sections contain your program’s constants. These values can
not be modified
• Initialized Data — Initialized data sections contain your program’s modifiable data.
PIC Tab
Use this tab to specify an alternate address for the debugger to load a PIC module on a
target board. Usually, Position Independent Code (PIC) is linked in such a way that the
entire image starts at address 0x00000000. The PIC tab lets you specify an alternate
address at which the debugger will load the PIC module in target memory. Figure 4.18
shows the PIC tab.
Check the Alternate Load Address option and then enter the address (in hexadecimal
notation) in the corresponding text box. The address that you specify is the starting
address at which the debugger loads your program. You can also use this setting when you
have an application which is built with ROM addresses and then relocates itself to RAM
(such as U-Boot). Specifying a relocation address lets the debugger map the symbolic
debugging information contained in the original ELF file (built for ROM addresses) to the
relocated application image in RAM.
NOTE The debugger does not verify whether your code can execute at the specified
address. As a result, the PIC generation settings of the compiler, linker and
your program's startup routines must correctly set any base registers and
perform any required relocations.
Clear the Alternate Load Address option to have the debugger load your program at a
default starting address.
Option Description
File list Shows files and projects that the debugger uses during each debug
session
Add Click to open the Debug Other Executable dialog box. Use the
dialog box to specify the following settings:
• Specify the location of the additional executable — Enter the path
to the executable file that the debugger controls in addition to the
current project's executable file. Alternatively, click Browse to
specify the file path.
• Load symbols — Check this option to have the debugger load
symbols for the specified file. Clear to prevent the debugger from
loading the symbols. The Debug column of the File list corresponds
to this setting.
• Download to device — Check this option to have the debugger
download the specified file to the target device. Clear this option to
prevent the debugger from downloading the file to the device. The
Download column of the File list corresponds to this setting.
• OK — Click to add the information that you specify in the Debug
Other Executable dialog box to the File list.
Change Click to open the Debug Other Executable dialog box. The dialog
box shows the current settings for selected executable file in the File
list column.
Change this information as required and click OK to update the
entry in the File list.
Remove Click to remove the entry currently selected in the File list.
Symbolics Tab
Use this tab to specify whether the debugger keeps symbolics in memory. Symbolics
represent an application's debugging and symbolic information. Keeping symbolics in
NOTE Caching symbolics provides significant benefit for large applications, where
doing so speeds up application-launch time. If you debug a small application,
caching symbolics does not significantly improve the launch time.
Option Description
Cache Symbolics Check this option to have the debugger cache symbolics
Between Sessions between debugging sessions. If you check this checkbox
and clear the Create and Use Copy of Executable
checkbox, the executable file remains locked after the
debugging session ends. In the Debug view, right-click on
the locked file and select Un-target Executables to have
the debugger delete its symbolics cache and release the
file lock. The IDE enables this menu command when
there are currently unused cached symbolics that it can
purge.
Clear this option so that the debugger does not cache
symbolics between debugging sessions.
Create and Check this option to have the debugger create and use a
Use Copy of Executable copy of the executable file. Using the copy helps avoid
file-locking issues with the build system. If you check this
checkbox, the IDE can build the executable file in the
background during a debugging session.
Clear this option so that the debugger does not create
and use a copy of the executable file.
Debugging Code
This section explains how to use the CodeWarrior™ debugger to debug source-code
features specific to Freescale microcontrollers.
Using the CodeWarrior debugger to debug an application follows this overall process:
1. Configure the target.
2. Download program to the target.
3. Load symbolics into the debugger.
4. Start a debugging session.
You can use the default CodeWarrior launch configurations to perform or skip specific
steps of the overall process. Table 4.18 shows the steps of the debugging process that each
default launch configuration supports. Yes indicates that the launch configuration supports
the step. No indicates that the launch configuration does not support the step.
NOTE The CodeWarrior Attach launch configuration does not support restarting a
debugging session.
NOTE These commands are available in the Debug Configurations dialog box.
Select Run > Debug Configurations to open the Debug Configurations
dialog box.
NOTE The debugger assumes that the current build target’s generated executable
matches the code currently running on the target.
• The Connect command runs the target initialization file specified in the HCS08,
RS08, or ColdFire tab of the Debug Configurations dialog box. This file is
responsible for setting up the board before connecting to it. The Connect function
does not load any symbolic debugging information for the current build target’s
executable. You therefore do not have access to source-level debugging and variable
display. The Connect command resets the target if the launch configuration specifies
this action. Further, the command stops the target, (optionally) runs an initialization
script, does not load symbolics, download an ELF file, or modify the program
counter (PC).
• The Debug command resets the target if the launch configuration specifies the
action. Further, the command stops the target, (optionally) runs an initialization
script, downloads the specified ELF file, and modifies the PC.
Table 4.19 Effect of Each Launch Configuration Type
Attach Debug a target system without modifying its state at all initially,
but allow use of symbolics during actual debug. Useful for
debugging a system that is already up and running.
NOTE The default debugger configuration causes the debugger to cache symbolics
between sessions. However, the Connect command invalidates this cache. If
you must preserve the contents of the symbolics cache, and you plan to use the
Connect command, uncheck the Cache Symbolics Between Sessions
checkbox in the Symbolics page of the Debug Configurations dialog box just
before you issue the Connect command.
Attaching Processes
In a debugging session, the CodeWarrior Attach launch configuration skips setting up the
target hardware, and downloading the program image to that target hardware. The code
image might reside on the target hardware already, or you might want to skip setting up
the target hardware. Like the CodeWarrior Connect launch configuration, the settings in
the Arguments and Environment panels do not apply.
Although similar to a debugging session, the goal of attaching the debugger to a process is
to get insight into the current state of that process, and to do so with minimal disturbance
to its state of execution. Having the debugger attach to a process skips most of the state-
altering steps involved in starting a debugging session, such as resetting the target,
initializing the target, and downloading code. When the debugger finishes attaching to the
process, you have many of the debugging capabilities that you would have in a debugging
session (such as source-level debugging, line breakpoints, watchpoints, console input/
output, and so on).
NOTE The debugger does not support restarting debugging sessions that you start by
attaching the debugger to a process.
NOTE If the CodeWarrior Attach group does not yet have any existing configuration,
select the CodeWarrior Attach title and click the New launch configuration
toolbar button of the Debug Configurations dialog box to create a new
configuration.
Connecting Target
In a debugging session, the CodeWarrior Connect launch configuration skips
downloading the code image to the target hardware, and loading symbolics into the
debugger. Skipping these steps is useful for board initialization and bringup. The code
might reside on the target hardware already, or you might want to skip loading symbolics
into the debugger.
Like the CodeWarrior Attach launch configuration, the settings in the Arguments and
Environment panels do not apply. The Source tab is available, however, so that you can
specify source paths in order to load an image after connecting the debugger to the target.
Similar to starting a debugging session, you use the Debug Configurations dialog box to
connect to a target:
1. In the C/C++ Projects view, select Run > Debug Configurations.
2. Expand the CodeWarrior Connect group.
3. Select an existing configuration from the expanded CodeWarrior Connect group.
NOTE If the CodeWarrior Connect group does not yet have any existing
configuration, select the CodeWarrior Connect title and click the New launch
configuration toolbar button of the Debug Configurations dialog box to
create a new configuration.
• Removing Breakpoints
• Setting Stack Crawl Depth
• Hard Resetting
TIP You can also view and update registers by issuing the reg, change, and
display commands in the CodeWarrior Debugger Shell view.
3. Enter in the Group Name text box a descriptive name for the new group. For example,
MyGroup.
4. Check the checkbox adjacent to each register you want to appear in the new group.
TIP Click Select All to check all of the checkboxes. Click Deselect All to clear all the
checkboxes.
5. Click OK.
The Register Group dialog box closes. The new group name appears in the Registers
view.
TIP Click Select All to check all of the checkboxes. Click Deselect All to clear all the
checkboxes.
5. Click OK.
The Register Group dialog box closes. The new group name appears in the Registers
view.
NOTE To display the register details, first you have to select a register, then expand
the view by clicking and dragging the areas at the bottom of the Registers view
to reveal the Bit Field, Description, and Actions portions of the view.
Bit Fields
The Bit Fields group of the Registers view (Figure 4.25) shows a graphical representation
of the selected register's bit values. This graphical representation shows how the register
organizes bits. You can use this representation to select and change the register's bit
values. Hover the cursor over each part of the graphical representation in order to see
additional information.
TIP You can also view register details by issuing the reg command in the Debugger
Shell view.
A bit field is either a single bit or a collection of bits within a register. Each bit field has a
mnemonic name that identifies it. You can use the Field list box to view and select a
particular bit field of the selected register. The list box shows the mnemonic name and bit-
value range of each bit field. In the Bit Fields graphical representation, a box surrounds
each bit field. A red box surrounds the bit field shown in the Field list box.
After you use the Field list box to select a particular bit field, you see its current value in
the = text box. If you change the value shown in the text box, the Registers view shows
the new bit-field value.
The minimum resolution of bit-field descriptions is 2 bits. Consequently, register details
are not available for single-bit overflow registers.
The maximum resolution of bit-field descriptions is 32 bits.
4. From the expanded register group above the register details, select the name of the
register that contains the bit field that you want to change.
The Bit Fields group displays a graphical representation of the selected bit field. The
Description group displays explanatory information about the selected bit field and
parent register.
5. In the Bit Fields group, click the bit field that you want to change. Alternatively, use
the Field list box to specify the bit field that you want to change.
6. In the = text box, type the new value that you want to assign to the bit field.
7. In the Action group, click the Write button.
NOTE The Revert and Write buttons appear enabled if the value in the = field is
changed or you reset the values.
The debugger updates the bit-field value. The bit values in the Value column and the
Bit Fields group change to reflect your modification.
NOTE Click the Reset button to discard your changes and restore the original bit-field
value. Click the Revert button to revert to the last changes made.
Description
The Description group of the Registers view (Figure 4.27) shows explanatory information
for the selected register.
Actions
Use the Actions group of the Registers view (Figure 4.28) to perform various operations
on the selected register's bit-field values.
Table 4.21 lists each item in the Actions group and explains the purpose of each.
Item Description
Revert Discard your changes to the current bit-field value and restore the last
change you made.
The debugger disables this button if you have not made any changes to
the bit-field value.
Write Save your changes to the current bit-field value and write those changes
into the register's bit field.
The debugger disables this button after writing the new bit-field value, or
if you have not made any changes to that value.
Reset Change each bit of the bit-field value to its register-reset value. The
register takes on this value after a target-device reset occurs.
To confirm the bit-field change, click Write. To cancel the change, click
Reset.
Summary Display Description group content in a pop-up window. Press the Esc
key to close the pop-up window.
Select All Selects the entire contents of the current bit-field value
Display as Array Opens a dialog box that you can use to display the
selected bit fields as an array of bit values
Cast to Type Opens a dialog box that you can use to cast the selected
bit field values to a different data type
Restore Original Type Reverts the selected bit-field values to their default data
types
Find Opens a dialog box that you can use to select a particular
register or bit field
Change Value Opens a dialog box that you can use to change the
current bit field value
Show Details As Lets you specify how the debugger displays the register’s
contents. The options are:
Register Details Pane — The register’s values are
display in a bit format, along with a description of their
purpose.
Default Viewer — The register’s contents are displayed
as a hexadecimal value
Add Register Group Opens a dialog box that you can use to create a new
collection of registers to display in the Registers view
Edit Register Group Opens a dialog box that you can use to modify the
collection of registers that the Registers view displays for
the selected register group
Remove Register Group Deletes the selected register group from the Registers
view
2. Click the toolbar’s menu button (the inverted triangle highlighted in Figure 4.29 ).
3. Select Layout > Vertical View Orientation or Layout > Horizontal View
Orientation to see the register details.
NOTE Selecting Layout > Registers View Only hides the register details.
NOTE Use the Format list box to specify the format of data that appears in the
Registers view.
TIP To enlarge the Registers view, click Maximize of the view's toolbar. After you
finish looking at the register details, click Restore of the view's toolbar to return
the view to its previous size. Alternatively, right-click the Registers tab and select
Detached. The Registers view becomes a floating window that you can resize.
After you finish looking at the register details, right-click the Registers tab of the
floating window and select Detached again. You can rearrange the re-attached
view by dragging its tab to a different collection of view tabs.
Viewing Cache
NOTE Cache not supported at this time.
Setting Watchpoints
A watchpoint is another name for a data breakpoint. The debugger halts execution each
time the watchpoint location is read, written, or accessed (read or written). The debugger
lets you set a watchpoint on an address or range of addresses in memory.
NOTE The debugger does not support setting a watchpoint on a stack variable or a
register variable. Watchpoint set on a local variable may result in halt of
execution at unexpected locations.
• a memory range
• an access type on which to trigger
To open the Add Watchpoint dialog box:
1. Open the Debug perspective.
2. Click one of these tabs:
• Breakpoints
• Memory
• Variables
The corresponding view appears.
3. Right-click the appropriate content inside the view as mentioned in Table 4.23.
Memory the cell or range of cells on which you want to set the watchpoint.
Variables a global variable. Note that the debugger does not support setting
a watchpoint on a stack variable or a register variable.
Option Description
Option Description
Removing Watchpoints
To remove a watchpoint, perform these steps.
1. Open the Breakpoints view if it is not already open by choosing Window > Show
View > Breakpoints.
The Breakpoint view appears, displaying a list of watchpoints.
2. Right-click on the watchpoint you wish to remove and select Remove from the menu
that appears.
The selected watchpoint is removed, and it disappears from the list in the Breakpoints
view.
Setting Breakpoints
The different breakpoint types that you can set are listed below:
• Software
The debugger sets a software breakpoint into target memory. When program
execution reaches the breakpoint, the processor stops and activates the debugger. The
breakpoint remains in the target memory until you remove it.
The breakpoint can only be set in writable memory like SRAM or DDR. You cannot
use this type of breakpoints in ROM.
• Hardware
Selecting the Hardware menu option causes the debugger to use the internal
processor breakpoints. These breakpoints are usually very few and can be used with
all types of memories (ROM/RAM) because they are implemented by using
processor registers.
TIP You can also set breakpoint types by issuing the bp command in the CodeWarrior
Debugger Shell view.
To set a breakpoint:
1. In the IDE's Debug perspective, click the Debug tab.
Figure 4.31 shows the Debug view.
2. Right clicking on a code line will set a breakpoint.
5. In the editor view, place the cursor on the line that has this statement:
printf(“Hello World in C++!\n\r”);
6. Select Run > Toggle Line Breakpoint.
7. A blue dot appears in the marker bar to the left of the line as seen in Figure 4.33. This
dot indicates an enabled breakpoint. After the debugger installs the breakpoint, a blue
checkmark appears beside the dot. The debugger installs a breakpoint by loading into
the Java™ virtual machine the code in which you set that breakpoint.
TIP An alternate way to set a breakpoint is to double-click the marker bar to the left of
any source-code line. If you set the breakpoint on a line that does not have an
executable statement, the debugger moves the breakpoint to the closest subsequent
line that has an executable statement. The marker bar shows the installed
breakpoint location. If you want to set a hardware breakpoint instead of a software
breakpoint, use the bp command in the Debugger Shell view. You can also right-
click on the marker bar to the left of any source-code line, and select Set Special
Breakpoint from the context menu.
Removing Breakpoints
To remove a breakpoint from your program, you have two options. These are:
• Remove Breakpoint Using Marker Bar
• Remove Breakpoint Using Breakpoints View
NOTE To remove all of the breakpoints from the program at once, select Remove All
from the context menu.
Viewing Memory
Use the Memory view to examine the active memory rendering of a specified expression
or address. To display this view from the Debug perspective, Select Window > Show
View > Memory, and the Memory view appears.
The Memory view supports the display of multiple memory spaces. Figure 4.36 shows the
Memory view with the Expression:baseaddr <name> tree active memory rendering tab.
3. Click the plus-sign icon on the Monitors pane toolbar. Alternatively, right-click
in the Monitors pane and select Add Memory Monitor from the context menu.
4. The Monitor Memory dialog box (Figure 4.37) appears.
NOTE The Enter memory space and address option appears only when the
debugger associated with the active debugging context supports memory
spaces, and the currently debugged process has multiple memory spaces.
Option Description
6. Click OK.
The memory monitor appears in the Memory view (Figure 4.36).
NOTE To create a memory monitor, right-click a blank area in the Monitors pane and
select Add Memory Monitor. Alternatively, click the plus-sign icon in
the Monitors pane toolbar.
5. Select a rendering type from the Select rendering(s) to create list and click the Add
Rendering(s) button. Alternatively, right-click in the Renderings pane and select
Add Memory Rendering from the context menu. For example, select Disassembly.
6. Click OK.
The selected memory rendering type appears in the Memory view.
3. Click the cross-sign icon on the Renderings pane toolbar. Alternatively, right-
click on the Renderings pane and select Remove Rendering from the context menu.
The memory rendering is removed from the Memory view.
Go to Address
The memory view provides graphical controls to display memory at a specific address. To
go to a specific address, perform these steps.
1. Open the Memory view.
2. In the Renderings pane, select the tab that corresponds to the disassembly rendering
for which you want to display a specific address.
3. Right-click in the Renderings pane and select Go to Address from the context menu.
A group of controls appears on the Renderings pane (Figure 4.40).
4. In the blank text box, enter the address that you want to display.
NOTE Check the Input as Hex checkbox only if you enter the address in hexadecimal
notation.
Hard Resetting
Use the reset hard command in the Debugger Shell view to send a hard reset signal
to the target processor.
NOTE The Hard Reset command is enabled only if the debug hardware you are using
supports it.
The main purpose of the MCU Executable Import wizard is to create a CodeWarrior for
Microcontrollers Eclipse project that can be readily debugged starting from an executable
file build with a Microcontrollers toolchain.
The MCU Executable Import wizard lets you import a *.elf, *.abs, or *.flt file
and associate it to a project.
This topic describes the various pages that the wizard displays as it assists you in
importing and associating an executable (*.elf, *.abs, or *.flt) file to a project.
• Import a MCU Executable File Page
• Select MCU executable file to be imported Page
• Device and Connection Page
• Connections Page
• Debug an Externally Built Executable File
Figure 4.41 Import MCU Executable — Import a MCU Executable File Page
Option Description
New Project Name Enter the name for the new project in this
text box.
Use default location Stores the files required to build the program
in the Workbench’s current workspace
directory. The project files are located in the
directory you specify. Use the Location
option to select the directory.
Figure 4.42 Import MCU Executable — Select MCU executable file to be imported Page
Option Description
Option Description
Connections Page
Use this page to select a connection to use for the project. Depending on the selected
derivative or board, the connections will appear enabled or grayed out.
2. Click OK to accept the default workspace. To use a workspace different from the
default, click Browse and specify the desired workspace.
The IDE starts and displays the Welcome page.
NOTE You can also select the Use this as the default and do not ask again checkbox
to set default/selected path as a default location for storing all your projects.
7. Click Next.
The Import a MCU executable file page (Figure 4.47) appears.
8. Specify a name for the new project. For example, enter the project name as
ImportProject_1.
NOTE Clear the Use default location checkbox and click Browse to specify different
location for the new project. By default, the Use default location checkbox is
checked.
Figure 4.47 Import MCU Executable — Import a MCU executable file Page
9. Click Next.
The Select MCU executable file to be imported page appears.
5. Click Next.
The Device and Connection page appears.
Select Connection
1. Select the desired connection from the Connection to be used group. For example,
check the P&E Full Chip Simulation checkbox.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
2. Click Finish.
The Import MCU Executable window closes and the wizard creates a project
according to your specifications. You can access the project from the CodeWarrior
Projects view in the Workbench window.
3. Right-click on the project and from the context menu select Build Project.
The new project is ready for use. You can now customize it by adding your own source
code files, changing debugger settings, or adding libraries.
2. Click Add.
The Add Source dialog box appears.
3. Select Path Mapping (Figure 4.53).
4. Click OK.
The Add Source dialog box closes. The IDE selects the new mapping in the Source
Lookup Path list of the Source page.
7. Click Add.
The Path Mapping dialog box (Figure 4.56) appears.
8. In the Compilation path text box, enter the path to the parent project of the executable
file, relative to the computer that generated the file.
TIP You can use the IDE to discover the path to the parent project of the executable
file, relative to the computer that generated the file. In the C/C++ Projects view of
the C/C++ perspective, expand the project that contains the executable file that
you want to debug. Next, expand the group that has the name of the executable file
itself. A list of paths appears, relative to the computer that generated the file.
Search this list for the names of source files used to build the executable file. The
path to the parent project of one of these source files is the path you should enter in
the Compilation path text box.
9. In the Local file system path text box, enter the path to the parent project of the
executable file, relative to your computer. Alternatively, click the Browse button to
specify the parent project.
10. Click OK.
The Path Mapping dialog box closes. The mapping information now appears in the
Path Mappings dialog box.
NOTE Alternatively, select Window > Show View > Other. Expand the Debug tree
control in the Show View dialog box, select Debugger Shell, and click OK.
To issue a command-line command, type the desired command at the command prompt
(%>) in the Debugger Shell view, then press Enter or Return. The command-line
debugger executes the specified command.
If you work with hardware as part of your project, you can use the command-line
debugger to issue commands to the debugger while the hardware is running.
NOTE To list the commands the command-line debugger supports, type help at the
command prompt and press Enter. The help command lists each supported
command along with a brief description of each command.
TIP To view page-wise listing of the debugger shell commands, right-click in the
Debugger Shell view and select Paging from the context menu. Alternatively,
click the Enable Paging icon.
When you debug from the command line, you can use:
• Tcl Support
• Command-Line Debugging Tasks
• Debugger Shell Command List
• Microcontrollers-Specific HIWARE Commands
Tcl Support
This topic describes command-line debugger’s Tcl support.
Command Resolution
set x 0;
while {$x < 5}
{
set x [expr $x + 1]
NOTE The run debug command synchronizes debug events between blocks in a
script file. For example, after a go, next, or step command, run polls the
debug thread state and does not execute the next line or block until the debug
thread terminates.
However, the Tcl source command does not consider the debug thread state.
Consequently, use the run debug command to execute script files that contain
these debug commands: debug, go, next, stop, and kill.
Open the Select Windows > The Debugger Shell view appears.
Debugger Shell Show View > Others >
Debugger Shell
Use the help 1. On the Debugger shell The Command List for CodeWarrior
command command prompt (%>), is appears.
type help.
2. Press Enter.
View debug Type alias followed by a The syntax for the rest of the
command hints space command appears.
about
Lists the version information.
Syntax
about
alias
Creates an alias for a debug command, removes such an alias, or lists all current aliases.
Syntax
alias [<alias> [<command>]]
Parameters
alias
Lists current aliases.
Examples
Table 5.3 lists and defines examples of the alias command.
Command Description
bp
Sets a breakpoint, removes a breakpoint, or lists the current breakpoints.
Syntax
bp [-{hw|sw|auto}] {<func>|[<ms>:]<addr>|<file> <line>
[<column>]}
bp all|#<id>|<func>|<addr> off|enable|disable
Examples
Table 5.4 lists and defines examples of the bp command.
Command Description
Command Description
bp #4 cond Hit Break every third time. Hit Count corresponds to the breakpoint
Count % 3 == 0 property of the same name.
cd
Changes to a different directory or lists the current directory. Pressing the Tab key
completes the directory name automatically.
Syntax
cd [<path>]
Parameter
path
Directory pathname; accepts asterisks and wildcards.
Examples
Table 5.5 lists and defines examples of the cd command.
Command Description
cd c:p*s Changes to any C: drive directory whose name starts with p and
ends with s.
change
Changes the contents of register, memory location, block of registers, or memory
locations.
Syntax
change <addr-spec> [<range>] [-s|-ns] [%<conv>] <value>
change <addr-spec>{..<addr>|#<n>} [<range>] [-s|-
ns] [%<conv>] <value>
change <reg-spec> [<n>] [-s|-ns] [%<conv>] <value>
change <reg-spec>{..<reg>|#<n>} [-s|-ns] [%<conv>]
<value>
change <var-spec> [-s|-ns] [%<conv>] <value>
change v <var> [-s|-ns] [%<conv>] <value>
Parameter
<addr-spec> [<ms>:]<addr>
On architectures supporting multiple memory spaces, specifies the memory space
in which <addr> is to be found.
See the help for the option -ms of display or mem for more information on memory
spaces. If unspecified, the setting config MemIdentifier is used.
<addr>
Target address in hex format.
<count>
Number of memory cells.
x<cell-size>
Memory is displayed in units called cells, where each cell consists of <cell-
size> bytes. If unspecified, the setting config MemWidth is used.
h<access-size>
Memory is accessed with a hardware access size of <access-size> bytes.
If unspecified, the setting config MemWidth is used.
%<conv>
Specifies the type of the data. Possible values for <conv> are given below. The
default conversion is set by the radix command for memory and registers and by
the config var command for variables.
• %x Hexadecimal
• %d Signed decimal
• %u Unsigned decimal
• %f Floating point
Examples
The examples assume the following settings:
• radix x
• config MemIdentifier 0
• config MemWidth 32
• config MemAccess 32
• config MemSwap off
Table 5.6 lists and defines Memory examples of the change command.
Command Description
change 10000 Change memory range 0x10000-3 to 0x10 (because radix is hex).
10
change 10000 Change each of 16, 1-byte cells to 0x31, using a hardware
16x1h8 31 access size of 8-bytes per write.
Table 5.7 lists and defines Register examples of the change command.
Command Description
Table 5.8 lists and defines Variable examples of the change command.
Command Description
cls
Clears the command line debugger window.
Syntax
cls
config
Lists current configuration information, provides the name of the default project or build
target, or configures:
• command-line debugger window colors.
• command-line debugger window scrolling size.
• command-line debugger window mode.
• Default build target
• Hexadecimal prefix
• Memory identifier
• Processor name
• Subprocessor name
Syntax
conf[ig] [ c[olor] [r | m | c | s | e | n]
text_color [background_color] |
m[ode] [ dsp | tcl | auto] |
s[croll] number_of_lines |
h[exprefix] hexadecimal_prefix |
mem[identifier] memory_identifier |
p[rocessor] processor_name [subprocessor_name] ]
Parameter
color text indicators —
r (registers), m (memory), c (commands), s (script), e (errors), or n (normal)
text_color
Text color values for red, green, and blue, each from 0 through 255.
background_color
Background color values for red, green, and blue, each from 0 through 255.
mode
Command-name conflict resolution mode:
• dsp: use command-line debug commands
• tcl: use tcl commands
• auto: resolve automatically
number_of_lines
Number of lines to scroll.
hexadecimal_prefix
Prefix for display of hexadecimal values.
memory_identifier
Memory identifier.
processor_name
Examples
Table 5.9 lists and defines examples of the config command.
Command Description
copy
Copies contents of a memory address or address block to another memory location.
Syntax
copy [<ms>:]<addr>[..<addr>|#<bytes>] [<ms>:]<addr>
Parameter
<addr>
One of these memory-address specifications:
• A single address
• First address of the destination memory block.
Examples
Table 5.10 lists and defines examples of the copy command.
Command Description
debug
Launches a debug session.
Syntax
debug [<index> | <debug-config-name>]
Examples
Table 5.11 lists and defines examples of the debug command.
Command Description
dir
Lists directory contents.
Syntax
dir [path|files]
Examples
Table 5.12 lists and defines examples of the dir command.
Command Description
di *.txt Lists all current-directory files that have the .txt file name
extension.
dir c:/tmp Lists all files in the tmp directory on the C: drive.
disassemble
Disassembles the instructions of the specified memory block.
Syntax
disassemble
disassemble pc|[<ms>:]<addr> [<count>]
disassemble reset
disassemble [<ms>:]<a1>{..<a2>|#<n>}
Parameter
[none]
With no options, the next block of instructions is listed. After a target stop event,
the next block starts at the PC.
[<ms>:]<addr>
Target address in hex. On targets with multiple memory spaces, a memory space id
can be specified.
pc
The current program counter.
<count>
Number of instructions to be listed.
reset
Reset the next block to the PC and the instruction count to one screen.
<a1>{..<a2>|#<n>}
Specifies a range of memory either by two endpoints, <a1> and <a2>, or by a
startpoint and a count, <a1> and <n>.
Examples
Table 5.13 lists and defines examples of the disassemble command.
Command Description
disassemble Reset the next block to the PC and the instruction count to one
reset screenful.
disassemble pc Lists 4 instructions starting at the PC. Sets the instruction count to
4 4.
Command Description
display
Lists the contents of a register or memory location; lists all register sets of a target; adds
register sets, registers, or memory locations; or removes register sets, registers, or memory
locations.
Syntax
display <addr-spec> [<range>] [-s|-ns] [%<conv>] [-np]
display -ms
display <addr-spec>{..<addr>|#<n>} [<range>] [-s|-ns]
[%<conv>] [-np]
display <reg-spec> [<n>] [-{d|nr|nv|np} ...] [-s|-ns]
[%<conv>]
display <reg-spec>{..<reg>|#<n>} [-{d|nr|nv|np} ...] [-s|-ns]
[%<conv>]
display all|r:|nr: [-{d|nr|nv|np} ...] [-s|-ns] [%<conv>]
display [-]regset
display <var-spec> [-np] [-s|-ns] [%<conv>]
display v: [-np] [-s|-ns] [%<conv>]
Parameter
<ms>
On architectures supporting multiple memory spaces, specifies the memory space
in which <addr> is to be found.
<addr>
Target address in hex.
<range>
Examples
The examples assume the following settings:
• radix x
• config MemIdentifier 0
• config MemWidth 32
• config MemAccess 32
• config MemSwap off
Table 5.14 lists and defines examples of the display command.
Command Description
display 10000 Display 16, 1-byte cells, with a hardware access size of 8-bytes
16x1h8 per read.
display 10000 Display one byte, with a hardware access size of one byte.
8bit
display 10000 Return one cell, but don't print it to the Command Window.
-np
Command Description
display - List all the available register sets on the target chip.
regset
display Beginning with register R1, display the next 25 registers. Register
"nr:General groups are not recursively searched.
Purpose
Registers/R1"
25
evaluate
Lists variable or expression.
Syntax
evaluate [#<format>] [-l] [<var|expr>]
Parameter
<format>
Output format and possible values:
#-, #Default
#d, #Signed
#u, #Unsigned
#h, #x, #Hex
#c, #Char
#s, #CString
#p, #PascalString
#f, #Float
#e, #Enum
#i, #Fixed
#o, #w, #Unicode
#b, #Binary
<none>, #Fract
<none>, #Boolean
<none>, #SignedFixed
Examples
Table 5.15 lists and defines examples of the evaluate command.
Command Description
evaluate List the types for all the variables in current and global stack.
finish
Execute until the current function returns.
Syntax
finish
fl::blankcheck
Test that the flash device is in the blank state.
Syntax
fl::blankcheck
fl::checksum
Calculate a checksum.
Syntax
fl::checksum
fl::device
Define the flash device.
Syntax
fl::device
fl::disconnect
Close the connection to the target.
Syntax
fl::disconnect
fl::dumps
Dumps the content of entire flash.
Syntax
fl::dump [all | -range start_addr end_addr] -o <file>
Parameter
-all
Dumps content of entire flash.
-range <start_addr> <end_addr>
Sets the range of flash region to be dumped.
-t <type>
Sets the type of flash region to be dumped .
-o <file>
Dumps the flash to the specified file.
fl::erase
Erase the flash device.
Syntax
fl::erase
fl::image
Define the flash image settings.
Syntax
fl::image
fl::protect
Protects the sectors.
Syntax
fl::protect [on | off]
Parameter
[on | off]
Enable or disable protection of sectors.
l::target
Define the target configuration settings.
Syntax
fl::target
fl::verify
Verify the flash device.
Syntax
fl::verify
fl::write
Write the flash device.
Syntax
fl::write
funcs
Displays information about functions.
Syntax
funcs [-all] <file> <line>
Parameter
[-all]
Displays information about the functions using all debug contexts.
<file>
Specifies the file name.
<line>
Specifies the line number.
gdi
Forwards third party custom commands.
Syntax
gdi
getpid
List the ID of the process being debugged.
Syntax
getpid
go
Starts to debug your program from the current instruction.
Syntax
go [nowait | <timeout_s>]
Parameter
<none>
Run the default thread. The command may wait for a thread break event before
returning, depending on the settings config runControlSync and config
autoThreadSwitch.
nowait
Return immediately without waiting for a thread break event.
<timeout_s>
Maximum number of seconds to wait for a thread break event. Can be set to
nowait.
Examples
Table 5.16 lists and defines examples of the go command.
Command Description
go nowait Run the default thread without waiting for a thread break event.
help
Lists debug command help in the command-line debugger window.
Syntax
help [-sort | -tree | <cmd>]
Parameter
command
Name or short-cut name of a command.
Examples
Table 5.17 lists and defines examples of the help command.
Command Description
history
Lists the history of the commands entered during the current debug session.
Syntax
history
kill
Stops one or all current debug sessions.
Syntax
kill [<index> ...]
Parameter
all
Specifier for all debug sessions.
Examples
Table 5.18 lists and defines examples of the help command.
Command Description
jtagclock
Read or update the current JTAG clock speed.
Syntax
jtagclock
kill
Close the specified debug session.
Syntax
kill
launch
Lists the launch configurations.
Syntax
launch
linux::displaylinuxlist
Lists the expression for each element of a Linux list.
Syntax
linux::displaylinuxlist
linux::loadsymbolics
Load the symbolics for the selected module.
Syntax
linux::loadsymbolics
linux::refreshmodules
Lists loaded modules.
Syntax
linux::refreshmodules
linux::selectmodule
Sets the current module.
Syntax
linux::selectmodules
linux::unloadsymbolics
Unloads the symbolics for the specified module.
Syntax
linux::unloadsymbolics
loadsym
Load a symbolic file.
Syntax
loadsym
log
Logs the commands or lists entries of a debug session. If issued with no parameters, the
command lists all open log files.
Syntax
log c|s <filename>
log off [c|s] [all]
log
Parameter
c
Command specifier.
s
Lists entry specifier.
<filename>
Name of a log file.
Examples
Table 5.19 lists and defines examples of the log command.
Command Description
mem
Read and write memory.
Syntax
mem
next
Runs to next source line or assembly instruction in current frame.
Syntax
next
Remarks
If you execute the next command interactively, the command returns immediately,
and target-program execution starts. Then you can wait for execution to stop (for
example, due to a breakpoint) or type the stop command.
If you execute the next command in a script, the command-line debugger polls
until the debugger stops (for example, due to a breakpoint). Then the command line
debugger executes the next command in the script. If this polling continues
indefinitely because debugging does not stop, press the ESC key to stop the script.
next
Run to next source line or assembly instruction in current frame.
Syntax
next
oneframe
Query or set the one-frame stack crawl mode for the current thread.
Syntax
oneframe
protocol
Executes a protocol plugin command (internal).
Syntax
protocol
pwd
Lists current working directory.
Syntax
pwd
quitIDE
Quits the IDE.
Syntax
quitIDE
radix
Lists or changes the default input radix (number base) for command entries, registers and
memory locations. Entering this command without any parameter values lists the current
default radix.
Syntax
radix [x|d|u|b|f|h]
Parameter
x
Hexadecimal
d
Decimal
u
Unsigned decimal
b
Binary
f
Fractional
h
Hexadecimal
Examples
Table 5.20 lists and defines examples of the radix command.
Command Description
refresh
Discard all cached target data and refresh views.
Syntax
refresh
reg
Read and write registers.
Syntax
reg
reset
Reset the target hardware.
Syntax
reset
restart
Restarts the current debug session.
Syntax
restart
restore
Write file contents to memory.
Syntax
restore
run
Launch a process
Syntax
run
save
Saves the contents of memory locations to a binary file or a text file containing
hexadecimal values.
Syntax
save -h|-b [<ms>:]<addr>... <filename> [-a|-o]
[8bit|16bit|32bit|64bit]
Parameter
-h|-b
Sets the output file format to hex or binary. For hex format, the address is also
saved so that the contents can easily be restored with the restore command.
[<ms>:]<addr>
Address to read from. For architectures with multiple memory spaces, a memory
space id may be specified.
-a
Append specifier. Instructs the command-line debugger to append the saved
memory contents to the current contents of the specified file.
-o
Overwrite specifier: tells the debugger to overwrite any existing contents of the
specified file.
Examples
Table 5.21 lists and defines examples of the save command.
Command Description
set Dumps contents of two memory blocks to the text file hexfile.lod
addressBlock1 (in append mode).
"p:10..`31"
set
addressBlock2
"p:10000#20"
save -h
$addressBlock1
$addressBlock2
hexfile -a
setpc
Set the value of the program counter register.
Syntax
setpc
setpicloadaddr
Indicate where a PIC executable is loaded.
Syntax
setpicloadaddr
stack
Print the call stack.
Syntax
stack
status
Lists the debug status of all existing active targets.
Syntax
status
step
Steps through a program, automatically executing the display command.
Syntax
step [asm|src] [into|over|out]
step [nve|nxt|fwd|end|aft]
Parameter
asm|src
Controls whether the step is performed at the assembly instruction level or the
source code level.
into|over|out
Controls the type of step operation. If unspecified, into is used.
nve
Examples
Table 5.22 lists and defines examples of the step command.
Command Description
stepi
Execute to the next assembly instruction.
Syntax
stepi
stop
Stops a running program (started by a go, step, or next command).
Syntax
stop
Examples
Table 5.23 lists and defines examples of the stop command.
Command Description
stop Using it after command go/step out/next, this will stop the target
program.
switchtarget
Selects a thread for subsequent commands.
Syntax
switchtarget [<index> | -cur | -ResetIndex]
Parameter
index
Session Index number.
Examples
Table 5.24 lists and defines examples of the switchtarget command.
Command Description
system
execute system command.
Syntax
system [command]
Parameter
command
Any system command that does not use a full screen display.
Examples
Table 5.25 lists and defines examples of the system command.
Command Description
system del Delete from the current directory all files that have the .tmp
*.tmp filename extension.
var
Read and write variables or C-expressions.
Syntax
var
wait
Tells the debugger to wait for a specified amount of time, or until you press the space bar.
Syntax
wait <time-ms>
Parameter
time-ms
Number of milliseconds to wait.
Examples
Table 5.26 lists and defines examples of the wait command.
Command Description
watchpoint
Sets, removes, disables, enables or list watchpoints. You can also set condition on
watchpoint.
Syntax
watchpoint
watchpoint [-{r|w|rw}] {<var>|[<ms>:]<addr> <length>}
watchpoint all|#<id>|<var>|[<ms>:]<addr> off|enable|disable
watchpoint #<id> cond <c-expr>
Examples
Table 5.27 lists and defines examples of the watchpoint command.
Table 5.27 watchpoint Command-Line Debugger Command—Examples
Command Description
Command Description
Microcontrollers-Specific HIWARE
Commands
This topic lists and defines Microcontrollers-specific HIWARE commands.
Command List
Table 5.28 lists the HIWARE commands that are: supported followed by the CodeWarrior
debugger shell syntax, partially supported, command that are not applicable in
CodeWarrior, commands supported in script files with TCL control flow statements, and
unsupported commands.
The following columns represent the status in the CodeWarrior Eclipse IDE:
• S-CW — Command is supported followed by the CodeWarrior debugger shell syntax
• P — Command is partially supported, meaning some options/parameters are not
supported
• NA — Command is not applicable in CodeWarrior
• S-TCL — Commands is supported in script files with TCL control flow statements
• U — Command is not supported
Table 5.28 Microcontrollers-Specific Debugger Command Lis
HIWARE
HIWARE Engine
BS P Sets breakpoint
Syntax
bp [-{hw|sw|auto}]
{<func>|[<ms>:]<addr>|<file>
<line> [<column>]}
bp all|#<id>|<func>|<addr>
enable|disable|{ignore <count>}
Configuration Example
• radix x
• config MemIdentifier 0
• config MemWidth 32
• config MemAccess 32
config MemSwap off
Source
Assembly
Procedure
Register
Memory
Data
Command
1. Select Project > Change Device/Connection from the IDE menu bar.
The Device/Connection Change wizard appears.
2. Type a name for the project, in the New Project Name text box. By default, it is the
existing project name.
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
3. Click Next.
The Device and Connection page appears.
4. Expand the HCS08 tree control and select the derivative or board you would like to
use. For example, select HCS08 > HCS08D Family > 9S08DE32.
5. Click Next.
The Connections page appears.
6. Check the P&E Full Chip Simulation checkbox.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
7. Click Finish.
The wizard creates a simulator project for the HCS08 architecture according to your
specifications. You can access the project from the CodeWarrior Projects view in the
Workbench window.
8. Build the new project. For more information, refer to the topic Building Projects.
9. Debug the new project. For more information, refer to the topic Debugging Projects.
Chip View
Chip View is an innovative feature designed to simplify Full Chip Simulation (FCS) and
In-Circuit Debugging (ICD) sessions. The Chip View provides instantaneous access to
internal modules of the chip and lets you instantly change any of the pin properties by
clicking the pins. Each pin features the current pin direction, input/output value, and the
name of the signal that reflects the current module that controls it. These data features are
updated every 50ms throughout a running FCS or ICD session.
2. From the IDE menu bar, select Window > Show View > Others (Figure 6.3).
4. To change direction and values of the pin, double-click the corresponding arrow or the
number value. Details are listed below.
NOTE If you close the Chip View Window during debug session, the Chip View will
not be accessible. You must reopen the Chip View window and restart the
current debugging session and to open the Chip View window again. Closing
Chip View should slightly improve the performance during existing debug
session.
Figure 6.6 is an example of the PTA2 pin value being changed from 0 to 1 by double-
clicking on the number value.
When you double-click the pin’s value or the direction, a pin configuration dialog appears
beneath the Chip View diagram (Figure 6.7). In the pin configuration options, you can
change the I/O settings for a given pin. You can select a pin from the pin-number drop-
down list, select between analog and digital signals, and switch the pin directions. For the
digital I/O signal, you can switch between high or low signals (Figure 6.7).
For the analog input signal, you can use the slider to change the analog signal value
(Figure 6.8).
Module Options
The PEMicro menu (Figure 6.10) includes the Full Chip Simulation options for the
modules that have specialty commands associated with them for a chosen device.
input buffer values. Input values can be entered while the window is open. An arrow
points to the next value to be used as input to the ADC. The conversion takes place after a
proper value is written to the ADC Status and Control register. Once the conversion
occurs, the arrow moves to the next value in the ADC Buffer.
The ADCLR command can be used at any point to flush the input buffer for the ADC
simulation.
After the conversion is complete, the first queued value is passed from the data buffer into
the ADC data register. It can be observed in the Memory window by displaying the
memory location corresponding to the ADC data register.
When the conversion is complete, FCS sets the appropriate flag. If interrupts are enabled,
the Program Counter changes flow to the interrupt routine (as defined in the vector space
of the MCU).
NOTE For more information on ADC configuration, refer to the Freescale user
manual for your microprocessor.
ADDI Command
The ADDI command lets you input the data into the ADC converter. If a data parameter is
given, the value is placed into the next slot in the input buffer. Otherwise, if no parameter
is given, a window is displayed with the input buffer values. Input values can be entered
while the window is open. An arrow points to the next value to be used by the ADC. The
maximum number of input values is 256 bytes.
Syntax
Where:
<n> The value to be entered into the next location in the input buffer.
Example
ADCLR Command
Use the ADCLR command to flush the input buffer for ADC simulation. This resets the
input data buffer and clears out all values. Notice that if the ADC is currently using a
value, this command does not prevent the ADC from using it.
NOTE See the ADDI command for information on how to access the input buffer of
the ADC interface.
Syntax
>gdi ADCLR
Example
>gdi ADCLR
Clear the input buffer for ADC simulation.
Once you select the MCU Clocks menu, the Cycles window displays all of the
aforementioned Clock Frequencies, or you can select the Show Cycle Counter option
within the FCS menu to get the same window.
Within the FCS menu, you can select the Run till Cycle option, which lets you begin code
execution and stop execution when the specified cycle count is reached. Note that the
parameter given is not the number of cycles that executed, but rather the total cycle-count
of the simulator (displayed in the Register Window).
This command is extremely useful for verifying specific timings of a given event, running
until a given event is complete, or just before it completes to enable stepping through the
event or any application where cycle-timed execution is desired.
You can also select the Clear Cycle Counter option within the FCS menu, which clears the
cycle counter. If you select the Show Cycle Counter option within the FCS menu, you can
check to make sure that the cycle counter is zero.
Once the ICG is properly configured, you can monitor the status of the PLL by polling the
corresponding flag. If PLL interrupt is enabled, FCS jumps to an appropriate subroutine,
as long as the interrupt vector is properly defined. To observe the flag going up as a result
of the corresponding CPU event, situate your Memory window on the memory location of
the ICG Status and Control register.
For more information on how to properly configure Clock Generation, refer to the
Freescale reference manual for your microprocessor.
XTAL Command
Use the XTAL command to change the value of the simulated external oscillator. This in
turn affects the input to the PLL/DCO, and therefore the bus frequency. The P&E
simulator is a cycle-based simulator, so changing the XTAL value does not affect the
speed of simulation. It does, however, affect the ratio in which peripherals receive cycles.
Certain peripherals that run directly from the XTAL will run at different speeds than those
that run from the bus clock.
Syntax
>gdi XTAL <n>
where, <n>, by default, is a hexadecimal number, representing the simulated frequency of
an external oscillator. Adding the suffix ‘t’ to the ’n’ parameter forces the input value
to be interpreted as base 10.
Example
>gdi XTAL
Brings up an input window. The default base for this input value is 10. However, this
value can be forced to a hexadecimal format through use of the suffix ‘h’.
EEPROM Module
In Full Chip Simulation (FCS) mode, this module simulates all functionality of EEPROM
module including sector erase abort, burst programming capability, security feature,
flexible block protection and vector redirection, and command interface for fast program
and erase operation.
EEPROM<x> Command
The EEPROM<x> command simulates changing of the EEPROM page for devices that
have paged EEPROM.
Syntax
>gdi EEPROM<x>
Where:
Example
Flash Module
In Full Chip Simulation (FCS) mode, this module simulates all functionality of Flash
module including sector erase abort, burst programming capability, security feature,
flexible block protection and vector redirection, and command interface for fast program
and erase operation.
Syntax
Where:
Example
>gdi PPAGE 1
Simulate change to PPAGE 1.
FCS mode uses the buffered input/output structure to simulate IIC inputs. You can queue
up to 256 data bytes into the input buffer. The output buffer of the USB module can also
hold 256 output bytes. To queue the IIC Input Packets, use the IICDI <...> command
in the command prompt. For a more detailed description of the command, refer to the IIC
Commands section. If the IIC packet parameters are properly defined, the packet is placed
into the next slot in the input buffer. Otherwise, if no parameters are provided, an IIC
Input Buffer window is displayed.
You can enter different IIC packet parameters while the window is open, including
START, STOP, ACK, NACK and data bytes. An arrow points to the next byte to be used
as input to the IIC. The data from the IIC input buffer is written to the IIC module registers
once the IIC module is turned on and properly configured for receiving data from an
external IIC device. Once simulation of the data transmission is over, the arrow moves to
the next value in the IIC Input Buffer.
The IIC data input/output log buffer simulation lets you gain access to the past 256 IIC
data bytes that have been shifted in and out of the module. To bring up the IIC IN/OUT
LOG buffer dialog box, use the IICDO command.
At any point, use the IICCLR command to flush the input as well as input/output log IIC
buffers. After the IIC simulated input is received, the first queued-in data byte is passed
from the data buffer into the corresponding IIC module registers. It can be observed in the
Memory Window by displaying the appropriate register location there.
You can also observe different IIC flags in the Memory window. If you run the module in
Flag Polling mode, poll the flag corresponding to the expected IIC event. If the IIC
interrupts are enabled, FCS jumps to an appropriate subroutine as long as the IIC interrupt
vectors are properly defined.
NOTE For more information on how to configure IIC module for desired operation,
refer to the Freescale user manual for your microprocessor.
IICDI Command
The IICDI command lets you input data into a buffer of data to shift into the IIC module
when it receives data from an external device. If a data parameter is given, the value is
placed into the next slot in the input buffer. Otherwise, if no parameter is given, a window
is displayed with the input buffer values. Input values can be entered while the window is
open. The maximum number of input values is 256. This command is useful for either
inputting response data from a slave target or for inputting data packets from an external
master. Note that when the microprocessor attempts to read an acknowledge from an
external device, and the next value in the buffer is neither ACK nor NACK, the
microprocessor automatically receives an ACK signal (i.e. assumes ACK unless NACK is
specified).
Syntax
Where:
• <n> indicates the value to be entered into the next location in the input buffer
• START indicates the incoming START signal
• STOP indicates the incoming STOP signal
• ACK corresponds to ACK signal
• NACK corresponds to NACK signal
NOTE For a detailed description of the IIC protocol and a proper way to configure the
IIC module, refer to the Freescale user manual for your microprocessor.
Example
>gdi IICDI
Pulls up the data window with all the input values
>gdi IICDI 22 33
This is an example of data being returned from a slave device. Once the MCU transmits a
start signal and the target address, it receives an ACK from the slave device. An ACK is
implied unless a NACK is specified via the IICDI command. The next two data bytes
read are 22 and 23. If the microprocessor attempts to read another byte, it gets an $FF
value followed by a NACK signal (NACK because nothing remains in the input buffer).
The receiving device then generates a STOP signal. A more exact input from a device
designed to return two bytes is:
>gdi IICDI ACK 22 ACK 23 NACK
IIC in master mode transmits to a slave:
• If the slave device acknowledges all output bytes of the transmitting device, there is no
need to specify an input packet. If the master device is going to transmit an address and
two bytes, the following packet is equivalent to no packet:
>gdi IICDI ACK ACK ACK
• If, however, the slave receiver is designed to generate a NACK signal after the second
received data byte, the proper response packet is:
>gdi IICDI ACK ACK NACK
• The address result being the first ACK, the first data result being the second ACK, and
the second data byte being the NACK.
IIC in MASTER mode is not acknowledged by any Slave:
>gdi IICDI NACK
• If the NACK signal is entered before the master device transmits a START signal, then
the master device gets a NACK when it tries to read an acknowledge after the address is
output. The master device then generates a STOP signal and releases the BUS.
IIC in SLAVE mode receives a Write from an external Master:
This example is for an external master that is writing to the microprocessor configured to
simulate the slave mode operation. The packet contains both START and STOP signals
which puts the simulated device into the slave mode.
>gdi IICDI START 55 AA 22 STOP
This input adds five values to the input queue, which is a packet from an external master,
including the following procedure values:
• A start signal comes in
• The address $55 comes in specifying a write (slave receive). The Address Register in the
current simulated device has been previously set to $55
• The data byte $AA comes in
• The data byte $22 comes in
• A STOP signal comes in
IICDO Command
The IICDO command displays a window, which shows data both shifted in and shifted out
of the IIC peripheral. An arrow points to the last output value transmitted/received. The
maximum number of output values that the buffer can hold is 256.
Syntax
>gdi IICDO
Example
>gdi IICDO
View data from the input/output log buffer for IIC simulation.
IICCLR Command
Use the IICCLR command to flush the input and output buffers for IIC simulation. This
resets the buffers and clears all values. Notice that if the IIC is currently shifting a value,
this command does not prevent the IIC from finishing the transfer.
Syntax
>gdi IICCLR
Example
>gdi IICCLR
Clear input and output buffers for IIC simulation.
An IRQ event occurrence sets the appropriate flag in the corresponding IRQ register. You
can poll the IRQ flag if the Polling Mode is simulated. In the Interrupt Mode, the simulator
branches to an appropriate interrupt subroutine as long as the IRQ interrupt vector is
properly configured.
NOTE For more information on IRQ configuration, refer to the Freescale user manual
for your microprocessor.
Following the IRQ event, you can observe the IRQ Flag being set in the IRQ Status and
Control register.
IRQ Commands
The following interrupt request command is available for the HC08/HCS08 processors.
INPUTS Command
In FCS and CPU-Only Simulation mode, the INPUTS command opens the Simulated Port
Inputs dialog box shown in Figure 6.26. You may then use this box to specify the input
states of port pins and IRQ.
When using In-Circuit Simulation mode, the INPUTS command shows the simulated
input values for any applicable port.
Syntax
>gdi INPUTS
Example
>gdi INPUTS
Show I/O port input values.
NOTE The IRQ pin state can be directly manipulated with the IRQ command. For
example, IRQ 1 simulates a high state on the IRQ pin; likewise, IRQ 0
simulates a logic-low state on the IRQ pin.
Use the Simulated Port Inputs dialog box to reconfigure the input value to any I/O port.
To trigger the event, manipulate the inputs to the port in the appropriate manner,
depending on whether the KBI is configured for edge-only or edge and level. Once the
KBI event takes place, you can observe the KEYF Flag bit, which is a part of the
Keyboard Status and Control register, in the Memory window.
You can poll the KBI Interrupt Pending flag if the Polling Mode is simulated. In Interrupt
Mode, the simulator branches to an appropriate interrupt subroutine as long as the KBI
interrupt vector is properly configured.
NOTE For more information on KBI configuration, refer to the Freescale user manual
for your microprocessor.
INPUT<x> Command
The INPUT<x> command sets the simulated inputs to port <x>. The CPU reads this input
value when port <x> is set as an input port.
Syntax
Where:
Example
>gdi INPUTA AA
Simulate the input AA on port A.
INPUTS Command
In FCS and CPU-Only Simulation mode, the INPUTS command opens the Simulated Port
Inputs dialog box shown in Figure 6.29. You may then use this box to specify the input
states of port pins and IRQ.
When using In-Circuit Simulation mode, the INPUTS command shows the simulated
input values to any applicable port.
Syntax
>gdi INPUTS
Example
>gdi INPUTS
Show I/O port input values.
If the MTIM interrupt is enabled, the FCS jumps to an appropriate subroutine as long as
the MTIM interrupt vector is properly defined.
command to bring up the Simulated Port Inputs for all general I/O ports. It displays the
current simulated values to all applicable input ports.
NOTE See the Input/Output Ports User Commands and IRQ Commands for more
information about the various forms of this command.
Use the Simulated Port Inputs dialog box to reconfigure the input value to any I/O port.
Use the INPUTS command to reconfigure the output values on any relevant I/O port. You
can observe the manipulation of I/O port pins in the Memory window.
Note that if the regular I/O pins are multiplexed to be used by a different MCU Module,
they might not be available for general I/O functionality.
NOTE For more information on how to properly configure I/O pins, refer to the
Freescale user manual for your microprocessor.
INPUT<x> Command
The INPUT<x> command sets the simulated inputs to port <x>. The CPU reads this input
value when port <x> is set as an input port.
Syntax
Where:
Example
>gdi INPUTA AA
Simulate the input AA on port A.
INPUTS Command
In FCS and CPU-Only Simulation mode, the INPUTS command opens the Simulated Port
Inputs dialog box shown in Figure 6.33. You may then use this box to specify the input
states of port pins and IRQ.
When using In-Circuit Simulation mode, the INPUTS command shows the simulated
input values to any applicable port.
Syntax
>gdi INPUTS
Example
>gdi INPUTS
Show I/O port input values.
SCI Data Output Buffer simulation lets you gain access to the past 256 SCI data values
transmitted out of the module. To bring up the SCI OUT buffer dialog box, use the SCDO
command.
The SCCLR command may be used at any point to flush the input and output SCI buffers.
After the SCI simulated input is received, the first queued value is passed from the data
buffer into the SCI data register. It can be observed in the memory window by displaying
the memory location corresponding to the SCI data register.
You can also observe different SCI flags in the Memory window. If the module is run in
Flag Polling mode, poll the flag corresponding to the expected SCI event. If the SCI
interrupts are enabled, the FCS jumps to an appropriate subroutine as long as the SCI
interrupt vectors are properly defined.
NOTE For more information on how to configure the SCI module for desired
operation, refer to the Freescale user manual for your microprocessor.
SCI Commands
The following serial communication interface commands are available for the HC08/
HCS08.
SCCLR Command
Use the SCCLR command to flush the input and output buffers for SCI simulation. This
resets the buffers and clears out all values. Note that if the SCI is in the process of shifting
a value, this command allows the SCI to finish the transfer. See the SCDI and SCDO
commands for accessing the input and output buffers of the SCI interface.
Syntax
>gdi SCCLR
Example
>gdi SCCLR
Clear input and output buffer for SCI simulation
SCDI Command
The SCDI command lets you input data into the SCI. If a data parameter is given, the
value is placed into the next slot in the SCI input buffer. If no parameter is given, a
window displays the input buffer values. Input values can be entered while the window is
open. An arrow points to the next value to be used as input to the SCI. The maximum
number of input values is 256 bytes.
Syntax
Where:
<n> The value to be entered into the next location in the input buffer
Example
SCDO Command
The SCDO command displays the output buffer from the SCI. A window is opened that
shows all the data that the SCI has shifted out. An arrow points to the last output value
transmitted. The maximum number of output values that the buffer holds is 256 bytes.
Syntax
>gdi SCDO
Example
>gdi SCDO
View data from the output buffer for the SCI simulation.
SPI data output buffer simulation lets you gain access to the past 256 SPI data values
transmitted out of the module. To bring up the SPI OUT buffer dialog box, use the SPDO
command.
The SPCLR command may be used at any point to flush the input and output SPI buffers.
After the SPI simulated input is received, the first queued value is passed from the data
buffer into the SPI data register. It can be observed in the Memory Window by displaying
the memory location corresponding to the SPI data register.
You can also observe different SPI flags in the Memory window. If the module is run in
Flag Polling mode, poll the flag corresponding to the expected SPI event. If the SPI
interrupts are enabled, the FCS jumps to an appropriate subroutine as long as the SPI
channel interrupt vectors are properly defined.
To simulate the frequency of the SPI slave input clock, use the SPFREQ <n> command. If
the SPI is configured for slave mode, this command let you enter the number of cycles
<n> in the period of the input clock. If the SPFREQ command is not used, then clocking is
set by the SPI control register.
NOTE For more information on how to configure the SPI module for desired
operation, refer to the Freescale user manual for your microprocessor.
SPI Commands
The following serial peripheral interface commands are available for the HCS08.
SPCLR Command
Use the SPCLR command to flush the input and output buffers for SPI simulation. This
resets the buffers and clears out all values. Notice that if the SPI is currently shifting a
value, this command allows the SPI to finish the transfer. See the SPDI and SPDO
commands for accessing the input and output buffers of the SPI interface.
Syntax
>gdi SPCLR
Example
>gdi SPCLR
Clear input and output buffer for SPI simulation
SPDI Command
The SPDI command lets you input data into the SPI. If a data parameter is given, the value
is placed into the next slot in the SPI input buffer. If no parameter is given, a window
displays the input buffer values. You can enter input values while the window is open. An
arrow points to the next input value to the SPI. The maximum number of input values is
256 bytes.
Syntax
Where:
<n> The value to be entered into the next location in the input buffer
Example
SPDO Command
The SPDO command displays the output buffer from the SPI. A window opens that shows
all the data that the SPI has shifted out. An arrow points to the last output value
transmitted. The maximum number of output values that the buffer holds is 256 bytes.
Syntax
>gdi SPDO
Example
>gdi SPDO
View data from the output buffer for the SPI simulation.
SPFREQ Command
The SPFREQ command lets you set the frequency of the SPI slave input clock. If the SPI
is configured for the slave mode, this command lets you enter the number of cycles <n>
per one input clock period. If no value is given, a window appears and you are prompted
for a value. If this command is not used, then the clocking is assumed to be set by the SPI
control register.
Syntax
Where:
<n> The number of cycles for the period of the input clock.
Example
>gdi SPFREQ 8
Set the period of the input slave clock to 8 cycles (total shift = 8*8 cycles per bit =
64 cycles)
Use the Simulated Port Inputs dialog box to reconfigure the input value to any I/O port.
To trigger the event, first set the port inputs high or low and then invert them to an
opposite value, depending on whether the input capture is set for rising/falling edge. Once
the Input Capture event takes place you can observe the CHxF in the Channel Status and
Control register in the Memory window.
If the Timer module is configured for an Output Compare event, then once the event takes
place you can observe the same CHxF Flag via the Memory window. If the timer channel
interrupt is enabled, the FCS jumps to an appropriate subroutine as long as the Timer
channel interrupt vector is properly defined. To observe the Timer Overflow Flag (TOF)
flag being set as a result of the corresponding CPU event, situate your Memory window on
the memory location of the Timer Status and Control register.
To observe the Pulse Width Modulation (PWM) operation, properly configure the Timer
to operate in the Modulo up count mode, select the toggle-on-overflow or clear/set output
on compare events to create the desired duty cycle wave. Once a PWM event takes place,
you can observe pin toggle/clear/set behavior corresponding to the Timer configuration in
the Memory window displaying the I/O port associated with a given timer channel.
To observe the accuracy of the Timer module operation, you can observe the number of
CPU cycles that it takes for the event to occur. The cycle counter is only incremented as
the you step through the code. To determine the exact amount of cycles over which the
event occurs, one can either observe the cycle display in the Register window or use the
built in simulation commands. To display the current number of cycles in the Command
window, use the CYCLES command. To change the number of cycles in the cycle
counter, use CYCLES <n>, where <n> is the new cycle value. If the event has a pre-
calculated number of cycles, use CYCLE 00 to reset the number of cycles and
GOTOCYCLE <n> to run through the code until you reach the expected event.
CYCLES Command
The CYCLES command changes the value of the cycles counter. The cycles counter
counts the number of the processor cycles that have passed during execution. The Cycles
window shows the cycle counter. The cycle count can be useful for timing procedures.
Syntax
Where:
Examples
>gdi CYCLES 0
Reset cycles counter
>gdi CYCLES 1000
Set cycle counter to 1000.
GOTOCYCLE Command
The GOTOCYCLE command executes the program in the simulator beginning at the
address in the program counter (PC). Execution continues until the cycle counter is equal
to or greater than the specified value, until a key or the Stop button on the toolbar is
pressed, until it reaches a break point, or until an error occurs.
Syntax
Where:
Example
INPUT<x> Command
The INPUT<x> command sets the simulated inputs to port <x>. The CPU reads this input
value when port <x> is set as an input port.
Syntax
Where:
Example
>gdi INPUTA AA
Simulate the input AA on port A.
INPUTS Command
In FCS and CPU-Only Simulation mode, the INPUTS command opens the Simulated Port
Inputs dialog box shown in Figure 6.47. You may then use this box to specify the input
states of port pins and IRQ.
When using In-Circuit Simulation mode, the INPUTS command shows the simulated
input values to any applicable port.
Syntax
>gdi INPUTS
Example
>gdi INPUTS
Show I/O port input values.
bi-directional endpoint 0, the other endpoints can be set up for data transfer in the input or
output direction.
Some of the microcontrollers in the HCS08 family contain USB compliant peripheral
devices. These can be low-speed or high-speed USB slave devices. This means that all
USB transfers are initiated by a host (i.e. a personal computer) and that the microcontroller
needs to be set up to respond with the appropriate acknowledgement messages. According
to the USB specification, there are a series of messages that go back and forth between the
host and the device in order to set up and describe the channel for data transfer. All of
these messages can be set up through the USB I/O commands built into the simulator. This
section goes through an example of this, showing how the simulator can be used to test out
code for driving the USB peripheral.
Chip View
Chip View is an innovative feature designed to simplify Full Chip Simulation (FCS) and
In-Circuit Debugging (ICD) sessions. The Chip View grants you instantaneous access to
internal modules of the chip, and also lets you instantly change any of the features by
clicking them. Each pin features the current pin direction, input/output value, and the
name of signal that reflects the current module that controls it. These data features are
updated every 50ms throughout a running FCS or ICD session.
2. From the IDE menu bar, select Window > Show View > Others (Figure 6.50).
4. To change direction and values of the pin, double-click the corresponding arrow or the
number value. Details are listed below.
NOTE If you close the Chip View window during debug session, you will not be able
to access to the Chip View.You must reopen the Chip View window and
restart the current debugging session to open the Chip View window again.
Closing Chip View should slightly improve performance during existing
debug session.
When you double-click the pin’s value or direction, a pin configuration dialog appears
underneath the Chip View diagram (Figure 6.54). In the pin configuration options, you
have the option of changing analog and digital I/O settings for a given pin.You can select
a pin from the pin-number drop-down list, select between analog and digital signals, and
switch pin directions. For the digital I/O signal, you can switch between high or low
signals (Figure 6.54).
Connection Options
This topic describes all P&E Multilink\Cyclone connection options, which are common to
all P&E USB BDM Multilink, P&E Cyclone Pro Serial, P&E Cyclone PRO USB, and
P&E Cyclone PRO TCP-IP connections.
The connection options include:
• Changing P&E Connections Settings
• Connection Assistant
• Launch Configuration Settings
• Active Mode Menu Options
• Advanced Programming/Debug Options
• View Register Files Option
• Socket Programming Options Button
• P&E HCS08 Multilink\Cyclone Pro Connection-Specific Options
Table 6.1 describes the options for the Debugger tab page.
Option Description
(Cyclone Pro only) Provide power to This option determines whether the Cyclone
target Pro (circuitry) provides power to the target
hardware via the probe.
Check this option to have the Cyclone Pro
(circuitry) supply power to the hardware
target
Uncheck this option to not provide power.
Table 6.1 Connection Parameter Options for P&E Multilink/Cyclone Pro (continued)
Option Description
(Cyclone Pro only) Power off target This option determines whether the Cyclone
upon software exit PRO hardware interface provides power to
the target hardware via the VDD of the BDM
cable.
Check this option to turn off the power when
the program terminates.
Uncheck this option to leave the hardware
target powered continuously.
(Cyclone Pro only) Regulator Output This option adjusts the output voltage that
Voltage powers the hardware target.
Select a voltage value from this option’s list
box.
(Cyclone Pro only) Power down delay This option specifies amount of time for
which the target will be turned off during a
RESET power cycling sequence.
Enter the delay interval (in milliseconds) in
this option’s text box.
(Cyclone Pro only) Power up delay This option specifies amount of time for
which the target will remain powered prior to
a RESET power cycling sequence.
Enter the delay interval (in milliseconds) in
this option’s text box.
NOTE It is assumed that you have created a project and built it.
2. Select Run > Debug Configurations from the main menu bar of the IDE.
The Debug Configurations dialog box appears.
3. Expand the CodeWarrior Download tree control in the left pane and select the launch
configuration you want to debug.
NOTE The port displayed may vary depending on the interface. For example, if you
select interface as Cyclone PRO - Serial Port, the available port
option is COM1 : Serial Port 1.
11. Specify settings in the Cyclone Pro Power Control (Voltage --> Power -Out Jack)
group.
NOTE This group will be enabled for Cyclone PRO interface only.
12. Check the Provide power to target checkbox to have the Cyclone PRO (circuitry)
provide power to the target else clear the checkbox if you do not want to provide
power to the target.
13. Check the Power off target upon software exit checkbox to turn off the power when
the program terminate else clear the checkbox to leave the hardware target powered
continuously.
14. Select a voltage value from the Regulator Output Voltage drop-down list.
This adjusts the output voltage that powers the hardware target.
15. Enter the delay interval (in milliseconds) in the Power Down Delay text box.
This option specifies the time interval to wait before shutting off the power to the
hardware target.
16. Enter the delay interval (in milliseconds) in the Power Up Delay text box.
This option specifies the time interval to wait before turning on the power to the
hardware target.
17. Click Apply to save changes to the P&E Connections settings.
18. Click Close to close the Debug Configurations dialog box.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Multilink/Cyclone Pro as your debugger connection:
1. Select the P&E device that you are using from the first drop-down list and click
Refresh. See Figure 6.56.
2. Using the second drop-down list, select the port on which the interface is connected.
3. Click the Retry button
Trim Options
The Calculate Trim and Program the Non-Volatile Trim Register checkbox enables
automatic calculation and programming of the trim value to a designated Non-Volatile
memory location.
programmed immediately afterwards, thereby preserving the data in these ranges. Any
attempt to program data into a preserved range is ignored. When entering an address into
the preserved range field (hexadecimal input is expected), the values are masked
according to the row size of the device. This ensures that the reprogramming of preserved
data does not cause any conditions that disturb programming.
Trim Control
The Use custom trim reference frequency option lets you select a custom trim value for the
target device (valid only for devices with an Internal Clock). The allowable trim value is
limited only by the device itself; you can input any value within the valid internal clock
frequency range. Note that the valid internal clock frequency range and the default trim
value for the currently selected device/algorithm are displayed as well. For more
information about the specific functionality of the internal clock source, see the Freescale
Data Sheet for your specific device.
TIP Selecting a wrong programming algorithm may damage you device, lead to under/
over programming situations, or simply not program portions of the project file.
Therefore it is recommended to use the default algorithm unless there is a
compelling reason to do otherwise.
1. Select the Advanced Programming/Debug Options selection from the PEMicro menu.
3. Click the Choose Alternative Algorithm button, which lets you browse for an
alternative algorithm.
4. Once you select the alternative algorithm, the name of the algorithm along with its full
path appears in the text field below the Choose Alternative Algorithm button.
At this point, the current project performs all future Flash programming operations using
the alternative algorithm. You may revert to the default algorithm at any time by clearing
the Use Alternative Algorithm checkbox.
To view the Register Files of the device that you have chosen:
1. Find the debugger icon and click it to enter debug mode and open the debugging
window
2. Select the “Registers” tab on the right side of the debugging window, or select the
Window menu -> Show View -> Registers to open the Register window.
3. Expand a module by clicking on the plus/minus button to view the registers within the
module
4. Select a desired register to view its bit fields and bit descriptions in the window below.
In the Registers tab, all of the available modules are listed, and under each module all of
its registers are displayed with their current values. Selecting a register brings up the Bit
field, Actions box, and Description box. In the Bit field, you can view the bits in binary
format. The Actions box is used when a bit needs to be modified. You can revert changes,
write a new value, reset all of the bits, and view a summary of the register. You can also
change the format of the value written in the bit field. The Description box displays the
values and significance of each bit in the register. When a bit is modified, the description
will change.
You can modify each bit by selecting it in the drop-down list under the Bit field, or by
clicking the bit on the Bit field. Note that bits that are read-only will not allow you to
modify the bit values. A new value can be written into the edit box, or you can click the
light bulb button next to the edit box to view all of the options, and then double-click the
changes.
NOTE Clear the Use default location checkbox and click Browse to specify a different
location for the new project. By default, the Use default location checkbox is
checked.
7. Click Finish.
The wizard creates a project for the HCS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E USB BDM Multilink as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down list and click Refresh. See
Figure 6.67.
2. Using the second drop-down list, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
7. Click Finish.
The wizard creates a project for the HCS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro Serial as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down list and click Refresh. See
Figure 6.69.
2. Using the second drop-down list, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a different
location for the new project. By default, the Use default location checkbox is
checked.
7. Click Finish.
The wizard creates a project for the HCS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro USB as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down list and click Refresh. See
Figure 6.71.
2. Using the second drop-down list, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
7. Click Finish.
The wizard creates a project for the HCS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro TCP-IP as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down list and click Refresh. See
Figure 6.73.
2. Using the second drop-down list, select the port on which the interface is connected.
3. Click the Retry button
Softec
This topic will contain information specific to Softec connection.
2. Type a name for the project, in the New Project Name text box. By default, it is the
existing project name.
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
3. Click Next.
The Device and Connection page appears.
4. Expand the RS08 tree control and select the derivative or board you would like to use.
For example, select RS08 > RS08KA Family > MC9RS08KA1.
5. Click Next.
The Connections page appears.
6. Check the P&E Full Chip Simulation checkbox.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
7. Click Finish.
The wizard creates a simulator project for the HCS08 architecture according to your
specifications. You can access the project from the CodeWarrior Projects view in the
Workbench window.
8. Build the new project. For more information, refer to the topic Building Projects.
9. Debug the new project. For more information, refer to the topic Debugging Projects.
Chip View
Chip View is an innovative feature designed to simplify Full Chip Simulation (FCS) and
In-Circuit Debugging (ICD) sessions. The Chip View provides instantaneous access to
internal modules of the chip and lets you instantly change any of the features by clicking
them. Each pin features the current pin direction, input/output value, and the name of the
signal that reflects the current module that controls it. These data features are updated
every 50ms throughout a running FCS or ICD session.
2. From the IDE menu bar, select Window > Show View > Others (Figure 7.3).
4. To change direction and values of the pin, double-click on the corresponding arrow or
the number value. Details are listed below.
NOTE If you close the Chip View window during debug session, you will not be able
to access to the Chip View.You must reopen the Chip View window and
restart the current debugging session to open the Chip View window again.
Closing Chip View should slightly improve performance during existing
debug session.
When you double-click a pin’s value or direction, a pin configuration dialog appears
beneath the Chip View diagram (Figure 7.7). In the pin configuration options, you have
the option of changing analog and digital I/O settings for a given pin. You can select a pin
from the pin-number drop-down box, select between analog and digital signals, and switch
pin directions. For the digital I/O signal, you can switch between high or low signals
(Figure 7.7).
For the Analog input signal, you can use the slider to change the analog signal value
(Figure 7.8).
Module Options
The PEMicro menu (Figure 7.10) includes the Full Chip Simulation options for the
modules that have specialty commands associated with them for a chosen device.
ADC Module
In Full Chip Simulation (FCS) mode, this module simulates all functionality of the Analog
to Digital Conversion (ADC) module including data input on all ADC channels, flag
polling, interrupt operation, and the bus and CGMXCLK reference clock sources. FCS
mode uses the buffered input structure to simulate the ADC inputs. You can queue up to
256 data values. To queue the ADC Input Data, use the ADDI command in the command
prompt. If the data parameter is given, the value is placed into the next slot in the input
buffer. Otherwise, if no parameter is provided, a window is displayed with the input buffer
values. Input values can be entered while the window is open. An arrow points to the next
value to be used as input to the ADC. The conversion takes place after a proper value is
written to the ADC Status and Control register. Once the conversion occurs, the arrow
moves to the next value in the ADC Buffer.
The ADCLR command can be used at any point to flush the input buffer for the ADC
simulation.
After the conversion is complete, the first queued value is passed from the data buffer into
the ADC data register. It can be observed in the Memory window by displaying the
memory location corresponding to the ADC data register.
When the conversion is complete, FCS sets the appropriate flag. If interrupts are enabled,
the Program Counter changes flow to the interrupt routine (as defined in the vector space
of the MCU).
NOTE For more information on ADC configuration, refer to the Freescale user
manual for your microprocessor.
ADDI Command
The ADDI command lets you input the data into the ADC converter. If a data parameter is
given, the value is placed into the next slot in the input buffer. Otherwise, if no parameter
is given, a window is displayed with the input buffer values. Input values can be entered
while the window is open. An arrow points to the next value to be used by the ADC. The
maximum number of input values is 256 bytes.
Syntax
Where:
<n> The value to be entered into the next location in the input buffer.
Example
ADCLR Command
Use the ADCLR command to flush the input buffer for ADC simulation. This resets the
input data buffer and clears out all values. Notice that if the ADC is currently using a
value, this command does not prevent the ADC from using it. See ADDI command for
information on how to access the input buffer of the ADC interface.
Syntax
>gdi ADCLR
Example
>gdi ADCLR
Clear the input buffer for ADC simulation.
• Tracking
• Flag polling
FCS mode uses a simulated External Oscillator Frequency change command (XTAL) lets
you input the desired XTAL value. To check the current value of the External Oscillator,
Bus Frequency and ICSCLK Frequency, open the RS08FCS menu and select Clocks
Module > Show MCU Clocks.
Once you select the MCU Clocks menu, the Cycles window displays all of the
aforementioned Clock Frequencies, or you can select the Show Cycle Counter option
within the FCS menu to get the same window.
Within the FCS menu, you can select the Run till Cycle option, which lets you begin code
execution and stop execution when the specified cycle count is reached. Note that the
parameter given is not the number of cycles that executed, but rather the total cycle-count
of the simulator (displayed in the Register Window).
This command is extremely useful for verifying specific timings of a given event, running
until a given event is complete, or just before it completes to enable stepping through the
event or any application where cycle-timed execution is desired.
You can also select the Clear Cycle Counter option within the FCS menu, which clears the
cycle counter. If you select the Show Cycle Counter option within the FCS menu, you can
check to make sure that the cycle counter is zero.
Once the ICG is properly configured, you can monitor the status of the PLL by polling the
corresponding flag. If PLL interrupt is enabled, FCS jumps to an appropriate subroutine,
as long as the interrupt vector is properly defined. To observe the flag going up as a result
of the corresponding CPU event, situate your Memory window on the memory location of
the ICG Status and Control register.
For more information on how to properly configure Clock Generation, refer to the
Freescale reference manual for your microprocessor.
XTAL Command
Use the XTAL command to change the value of the simulated external oscillator. This in
turn affects the input to the PLL/DCO, and therefore the bus frequency. The P&E
simulator is a cycle-based simulator, so changing the XTAL value does not affect the
speed of simulation. It does, however, affect the ratio in which peripherals receive cycles.
Certain peripherals that run directly from the XTAL will run at different speeds than those
that run from the bus clock.
Syntax
Where:
Example
>gdi XTAL
Brings up an input window. The default base for this input value is 10. However, this
value can be forced to a hexadecimal format through use of the suffix ’h’.
• Flag polling
• Interrupt enabled mode
• Transmission and reception of external data
• Master and slave modes of operation
• START and STOP signal generation detection
• Acknowledge bit generation detection
FCS mode uses the buffered input/output structure to simulate IIC inputs. You can queue
up to 256 data bytes into the input buffer. The output buffer of the USB module can also
hold 256 output bytes. To queue the IIC Input Packets, use the IICDI <...> command in the
command prompt. For a more detailed description of the command, refer to the IIC
Commands section. If the IIC packet parameters are properly defined, the packet is placed
into the next slot in the input buffer. Otherwise, if no parameters are provided, an IIC
Input Buffer window is displayed.
You can enter different IIC packet parameters while the window is open, including
START, STOP, ACK, NACK and data bytes. An arrow points to the next byte to be used
as input to the IIC. The data from the IIC input buffer is written to the IIC module registers
once the IIC module is turned on and properly configured for receiving data from an
external IIC device. Once simulation of the data transmission is over, the arrow moves to
the next value in the IIC Input Buffer.
The IIC data input/output log buffer simulation lets you gain access to the past 256 IIC
data bytes that have been shifted in and out of the module. To bring up the IIC IN/OUT
LOG buffer dialog box, use the IICDO command.
The IICCLR command may be used at any point to flush the input as well as input/output
log IIC buffers. After the IIC simulated input is received, the first queued-in data byte is
passed from the data buffer into the corresponding IIC module registers. It can be
observed in the Memory window by displaying the appropriate register location there.
You can also observe different IIC flags in the Memory window. If you run the module in
Flag Polling mode, poll the flag corresponding to the expected IIC event. If the IIC
interrupts are enabled, FCS jumps to an appropriate subroutine as long as the IIC interrupt
vectors are properly defined.
NOTE For more information on how to configure IIC module for desired operation,
refer to the Freescale user manual for your microprocessor.
IICDI Command
The IICDI command lets you input data into a buffer of data to shift into the IIC module
when it receives data from an external device. If a data parameter is given, the value is
placed into the next slot in the input buffer. Otherwise, if no parameter is given, a window
is displayed with the input buffer values. Input values can be entered while the window is
open. The maximum number of input values is 256. This command is useful for either
inputting response data from a slave target or for inputting data packets from an external
master. Note that when the microprocessor attempts to read an acknowledge from an
external device, and the next value in the buffer is neither ACK nor NACK, the
microprocessor automatically receives an ACK signal (i.e. assumes ACK unless NACK is
specified).
Syntax
Where:
• <n> indicates the value to be entered into the next location in the input buffer
• START indicates the incoming START signal
• STOP indicates the incoming STOP signal
• ACK corresponds to ACK signal
• NACK corresponds to NACK signal
NOTE For a detailed description of the IIC protocol and a proper way to configure the
IIC module, refer to the Freescale user manual for your microprocessor.
Example
>gdi IICDI
Pulls up the data window with all the input values
>gdi IICDI 22 33
This is an example of data being returned from a slave device. Once the MCU transmits a
start signal and the target address, it receives an ACK from the slave device. An ACK is
implied unless a NACK is specified via the IICDI command. The next two data bytes read
are 22 and 23. If the microprocessor attempts to read another byte, it gets an $FF value
followed by a NACK signal (NACK because nothing remains in the input buffer). The
receiving device then generates a STOP signal. A more exact input from a device designed
to return two bytes is:
>gdi IICDI ACK 22 ACK 23 NACK
IIC in master mode transmits to a slave:
• If the slave device acknowledges all output bytes of the transmitting device, there is no
need to specify an input packet. If the master device is going to transmit an address and
two bytes, the following packet is equivalent to no packet:
>gdi IICDI ACK ACK ACK
• If, however, the slave receiver is designed to generate a NACK signal after the second
received data byte, the proper response packet is:
>gdi IICDI ACK ACK NACK
• The address result being the first ACK, the first data result being the second ACK, and
the second data byte being the NACK.
IIC in MASTER mode is not acknowledged by any Slave:
>gdi IICDI NACK
• If the NACK signal is entered before the master device transmits a START signal, then
the master device gets a NACK when it tries to read an acknowledge after the address is
output. The master device then generates a STOP signal and releases the BUS.
IIC in SLAVE mode receives a Write from an external Master:
This example is for an external master that is writing to the microprocessor configured to
simulate the slave mode operation. The packet contains both START and STOP signals
which puts the simulated device into the slave mode.
>gdi IICDI START 55 AA 22 STOP
This input adds five values to the input queue, which is a packet from an external master,
including the following procedure values:
• A start signal comes in
• The address $55 comes in, specifying a write (slave receive). The Address Register in the
current simulated device has been previously set to $55
• The data byte $AA comes in
• The data byte $22 comes in
• A STOP signal comes in
IICDO Command
The IICDO command displays a window, which shows data shifted in as well as shifted
out of the IIC peripheral. An arrow points to the last output value transmitted/received.
The maximum number of output values that the buffer can hold is 256.
Syntax
>gdi IICDO
Example
>gdi IICDO
View data from the input/output log buffer for IIC simulation.
IICCLR Command
Use the IICCLR command to flush the input and output buffers for IIC simulation. This
resets the buffers and clears all values. Notice that if the IIC is currently shifting a value,
this command does not prevent the IIC from finishing the transfer.
Syntax
>gdi IICCLR
Example
>gdi IICCLR
Clear input and output buffers for IIC simulation.
Use the Simulated Port Inputs dialog box to reconfigure the input value to any I/O port. To
trigger the event, manipulate the inputs to the port in the appropriate manner, depending
on whether the KBI is configured for edge-only or edge and level. Once the KBI event
takes place, you can observe the KEYF Flag bit, which is a part of the Keyboard Status
and Control register, in the Memory window.
You can poll the KBI Interrupt Pending flag if the Polling Mode is simulated. In Interrupt
Mode, the simulator branches to an appropriate interrupt subroutine as long as the KBI
interrupt vector is properly configured.
NOTE For more information on KBI configuration, refer to the Freescale user manual
for your microprocessor.
INPUT<x> Command
The INPUT<x> command sets the simulated inputs to port <x>. The CPU reads this input
value when port <x> is set as an input port.
Syntax
Where:
Example
>gdi INPUTA AA
Simulate the input AA on port A.
INPUTS Command
In FCS and CPU-Only Simulation mode, the INPUTS command opens the Simulated Port
Inputs dialog box shown in Figure 7.24. You may then use this box to specify the input
states of port pins and IRQ.
When using In-Circuit Simulation mode, the INPUTS command shows the simulated
input values to any applicable port.
Syntax
>gdi INPUTS
Example
>gdi INPUTS
Show I/O port input values.
If the MTIM interrupt is enabled, the FCS jumps to an appropriate subroutine as long as
the MTIM interrupt vector is properly defined.
This dialog box lets you set the frequency of the TCLK signal for the MTIM peripheral. In
order for this value to have any effect, the TCLK must be selected as the clock source for
the MTIM.
NOTE See Input/Output Ports User Commands and IRQ Commands for more
information about the various forms of this command.
Use the Simulated Port Inputs dialog box to reconfigure the input value to any I/O port.
Use the INPUTS command to reconfigure the output values on any relevant I/O port. You
can observe the manipulation of I/O port pins in the Memory window.
Note that if the regular I/O pins are multiplexed to be used by a different MCU Module,
they might not be available for general I/O functionality.
NOTE For more information on how to properly configure I/O pins, refer to the
Freescale user manual for your microprocessor.
INPUT<x> Command
The INPUT<x> command sets the simulated inputs to port <x>. The CPU reads this input
value when port <x> is set as an input port.
Syntax
Where:
Example
>gdi INPUTA AA
Simulate the input AA on port A.
INPUTS Command
In FCS and CPU-Only Simulation modes, the INPUTS command opens the Simulated
Port Inputs dialog box shown in Figure 7.29. You may then use this box to specify the
input states of port pins and IRQ.
When using In-Circuit Simulation mode, the INPUTS command shows the simulated
input values to any applicable port.
Syntax
>gdi INPUTS
Example
>gdi INPUTS
Show I/O port input values.
SCI Data Output Buffer simulation lets you gain access to the past 256 SCI data values
transmitted out of the module. To bring up the SCI OUT buffer dialog box, use the SCDO
command.
At any point, the SCCLR command may be used to flush the input and output SCI buffers.
After the SCI simulated input is received, the first queued value is passed from the data
buffer into the SCI data register. It can be observed in the memory window by displaying
the memory location corresponding to the SCI data register.
You can also observe different SCI flags in the Memory window. If the module is run in
Flag Polling mode, poll the flag corresponding to the expected SCI event. If the SCI
interrupts are enabled, the FCS jumps to an appropriate subroutine as long as the SCI
interrupt vectors are properly defined.
NOTE For more information on how to configure the SCI module for desired
operation, refer to the Freescale user manual for your microprocessor.
SCI Commands
Use the following commands for serial communication interface manipulation.
SCCLR Command
Use the SCCLR command to flush the input and output buffers for SCI simulation. This
resets the buffers and clears out all values. Note that if the SCI is in the process of shifting
a value, this command allows the SCI to finish the transfer. See the SCDI and SCDO
commands for accessing the input and output buffers of the SCI interface.
Syntax
>gdi SCCLR
Example
>gdi SCCLR
Clear input and output buffer for SCI simulation
SCDI Command
The SCDI command lets you input data into the SCI. If a data parameter is given, the
value is placed into the next slot in the SCI input buffer. If no parameter is given, a
window displays the input buffer values. Input values can be entered while the window is
open. An arrow points to the next value to be used as input to the SCI. The maximum
number of input values is 256 bytes.
Syntax
Where:
<n> The value to be entered into the next location in the input buffer
Example
SCDO Command
The SCDO command displays the output buffer from the SCI. A window is opened that
shows all the data that the SCI has shifted out. An arrow points to the last output value
transmitted. The maximum number of output values that the buffer holds is 256 bytes.
Syntax
>gdi SCDO
Example
>gdi SCDO
View data from the output buffer for the SCI simulation.
SPI data output buffer simulation lets you gain access to the past 256 SPI data values
transmitted out of the module. To bring up the SPI OUT buffer dialog box, use the SPDO
command.
The SPCLR command may be used at any point to flush the input and output SPI buffers.
After the SPI simulated input is received, the first queued value is passed from the data
buffer into the SPI data register. It can be observed in the Memory window by displaying
the memory location corresponding to the SPI data register.
You can also observe different SPI flags in the Memory window. If the module is run in
Flag Polling mode, poll the flag corresponding to the expected SPI event. If the SPI
interrupts are enabled, the FCS jumps to an appropriate subroutine as long as the SPI
channel interrupt vectors are properly defined.
To simulate the frequency of the SPI slave input clock, use the SPFREQ <n> command. If
the SPI is configured for slave mode, this command lets you enter the number of cycles
<n> in the period of the input clock. If the SPFREQ command is not used, then clocking is
set by the SPI control register.
NOTE For more information on how to configure the SPI module for desired
operation, refer to the Freescale user manual for your microprocessor.
SPI Commands
The following serial peripheral interface commands are available for the RS08.
SPCLR Command
Use the SPCLR command to flush the input and output buffers for SPI simulation. This
resets the buffers and clears out all values. Notice that if the SPI is currently shifting a
value, this command allows the SPI to finish the transfer. See the SPDI and SPDO
commands for accessing the input and output buffers of the SPI interface.
Syntax
>gdi SPCLR
Example
>gdi SPCLR
Clear input and output buffer for SPI simulation
SPDI Command
The SPDI command lets you input data into the SPI. If a data parameter is given, the value
is placed into the next slot in the SPI input buffer. If no parameter is given, a window
displays the input buffer values. You can enter input values while the window is open. An
arrow points to the next input value to the SPI. The maximum number of input values is
256 bytes.
Syntax
Where:
<n> The value to be entered into the next location in the input buffer
Example
SPDO Command
The SPDO command displays the output buffer from the SPI. A window opens that shows
all the data that the SPI has shifted out. An arrow points to the last output value
transmitted. The maximum number of output values that the buffer holds is 256 bytes.
Syntax
>gdi SPDO
Example
>gdi SPDO
View data from the output buffer for the SPI simulation.
SPFREQ Command
The SPFREQ command lets you set the frequency of the SPI slave input clock. If the SPI
is configured for the slave mode, this command lets you enter the number of cycles <n>
per one input clock period. If no value is given, a window appears and you are prompted
for a value. If this command is not used, then the clocking is assumed to be set by the SPI
control register.
Syntax
Where:
<n> The number of cycles for the period of the input clock.
Example
>gdi SPFREQ 8
Set the period of the input slave clock to 8 cycles (total shift = 8*8 cycles per bit =
64 cycles)
Use the Simulated Port Inputs dialog box to reconfigure the input value to any I/O port. To
trigger the event, first set the port inputs high or low and then invert them to an opposite
value, depending on whether the input capture is set for rising/falling edge. Once the Input
Capture event takes place, you can observe the CHxF in the Channel Status and Control
register in the Memory window.
If the Timer module is configured for an Output Compare event, then once the event takes
place you can observe the same CHxF Flag via the Memory window. If the timer channel
interrupt is enabled, the FCS jumps to an appropriate subroutine as long as the Timer
channel interrupt vector is properly defined. To observe the Timer Overflow Flag (TOF)
flag being set as a result of the corresponding CPU event, situate your Memory window on
the memory location of the Timer Status and Control register.
To observe the Pulse Width Modulation (PWM) operation, properly configure the Timer
to operate in the Modulo up count mode, then select the toggle-on-overflow or clear/set
output on compare events to create the desired duty cycle wave. Once a PWM event takes
place, you can observe pin toggle/clear/set behavior corresponding to the Timer
configuration in the Memory window that is displaying the I/O port associated with a
given timer channel.
To observe the accuracy of the Timer module operation, you can observe the number of
CPU cycles that it takes for the event to occur. The cycle counter is only incremented as
you step through the code. To determine the exact amount of cycles over which the event
occurs, one can either observe the cycle display in the Register window or use the built in
simulation commands. To display the current number of cycles in the Command window,
use the CYCLES command. To change the number of cycles in the cycle counter, use
CYCLES <n>, where <n> is the new cycle value. If the event has a pre-calculated number
of cycles, use CYCLE 00 to reset the number of cycles and GOTOCYCLE <n> to run
through the code until you reach the expected event.
CYCLES Command
The CYCLES command changes the value of the cycles counter. The cycles counter
counts the number of the processor cycles that have passed during execution. The Cycles
Window shows the cycle counter. The cycle count can be useful for timing procedures.
Syntax
Where:
Examples
>gdi CYCLES 0
Reset cycles counter
>gdi CYCLES 1000
Set cycle counter to 1000.
GOTOCYCLE Command
The GOTOCYCLE command executes the program in the simulator beginning at the
address in the program counter (PC). Execution continues until the cycle counter is equal
to or greater than the specified value, until a key or the Stop button on the toolbar is
pressed, until it reaches a break point, or until an error occurs.
Syntax
Where:
Example
INPUT<x> Command
The INPUT<x> command sets the simulated inputs to port <x>. The CPU reads this input
value when port <x> is set as an input port.
Syntax
Where:
Example
>gdi INPUTA AA
Simulate the input AA on port A.
INPUTS Command
In FCS and CPU-Only Simulation modes, the INPUTS command opens the Simulated
Port Inputs dialog box shown in Figure 7.43. You may then use this box to specify the
input states of port pins and IRQ.
When using In-Circuit Simulation mode, the INPUTS command shows the simulated
input values to any applicable port.
Syntax
>gdi INPUTS
Example
>gdi INPUTS
Show I/O port input values.
Chip View
Chip View is an innovative feature designed to simplify Full Chip Simulation (FCS) and
In-Circuit Debugging (ICD) sessions. The Chip View provides instantaneous access to
internal modules of the chip and lets you instantly change any of the features by clicking
them. Each pin features the current pin direction, input/output value, and the name of the
signal that reflects the current module that controls it. These data features are updated
every 50ms throughout a running FCS or ICD session.
2. From the IDE menu bar, select Window > Show View > Others (Figure 7.46).
4. To change direction and values of the pin, double-click on the corresponding arrow or
the number value. Details are listed below.
NOTE If you close the Chip View Window during debug session, the Chip View will
not be accessible. You must reopen the Chip View window and restart the
current debugging session and to open the Chip View window again. Closing
Chip View should slightly improve the performance during existing debug
session.
When you double-click the pin’s value or the direction, a pin configuration dialog appears
underneath the Chip View diagram (Figure 7.50). In the pin configuration options, you
have the option of changing analog and digital I/O settings for a given pin. You can select
a pin from the pin-number drop-down box, select between analog and digital signals, and
switch pin directions. For the digital I/O signal, you can switch between high or low
signals (Figure 7.50).
Connection Options
This topic describes all P&E Multilink\Cyclone connection options, which are common to
all P&E USB BDM Multilink, P&E Cyclone Pro Serial, P&E Cyclone PRO USB, and
P&E Cyclone PRO TCP-IP connections.
The options include:
• Changing P&E Connection Settings
• Connection Assistant
• Launch Configuration Settings
• Active Mode Menu Options
• Advanced Programming/Debug Options
• View Register Files Option
• P&E RS08 Multilink\Cyclone Pro Connection-Specific Options
Table 7.1 Connection Parameter Options for P&E RS08 Multilink/Cyclone Pro
Option Description
(Cyclone Pro only) Provide power to This option determines whether the Cyclone
target Pro (circuitry) provides power to the target
hardware via the probe.
Check this option to have the Cyclone Pro
(circuitry) supply power to the hardware
target
Uncheck this option to not provide power.
Table 7.1 Connection Parameter Options for P&E RS08 Multilink/Cyclone Pro
Option Description
(Cyclone Pro only) Power off target This option determines whether Cyclone Pro
upon software exit hardware interface provides power to the
target hardware via VDD of the BDM cable.
Check this option to turn off the power when
the program terminates.
Uncheck this option to leave the hardware
target powered continuously.
(Cyclone Pro only) Regulator Output This option adjusts the output voltage that
Voltage powers the hardware target.
Select a voltage value from this option’s list
box.
(Cyclone Pro only) Power down delay This option specifies amount of time for
which the target will be turned off during a
RESET power cycling sequence.
Enter the delay interval (in milliseconds) in
this option’s text box.
(Cyclone Pro only) Power up delay This option specifies amount of time for
which the target will remain powered prior to
a RESET power cycling sequence.
Enter the delay interval (in milliseconds) in
this option’s text box.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Multilink/Cyclone Pro as your debugger connection:
1. Select the P&E device that you are using from the first drop-down menu and click
Refresh. See Figure 7.52.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
Trim Options
The Calculate Trim and Program the Non-Volatile Trim Register checkbox enables
automatic calculation and programming of the trim value to a designated Non-Volatile
memory location.
Trim Control
The Use custom trim reference frequency option lets you select a custom trim value for the
target device (valid only for devices with an Internal Clock). You can input any value
within the valid internal clock frequency range; the allowable trim value is limited only by
the device itself.
NOTE The valid internal clock frequency range and the default trim value for the
currently selected device/algorithm are displayed as well.
NOTE For more information about the specific functionality of the internal clock
source, see the Freescale Data Sheet for your specific device.
CAUTION Selecting the wrong programming algorithm may damage their device,
lead to under/over programming situations, or simply not program
portions of the project file. You are recommended to use the default
algorithm unless there is a compelling reason to do otherwise.
3. Click the Choose Alternative Algorithm button, which lets you browse for an
alternative algorithm.
4. Once you select the alternative algorithm, the name of the algorithm along with its full
path appears in the text field below the Choose Alternative Algorithm button.
At this point, the current project performs all future Flash programming operations using
the alternative algorithm. You may revert to the default algorithm at any time by clearing
the Use Alternative Algorithm checkbox.
To view the Register Files of the device that you have chosen:
1. Find the debugger icon and click it to enter debug mode and open the debugging
window
2. Select the “Registers” tab on the right side of the debugging window, or select the
Window menu -> Show View -> Registers to open the Register window.
3. Expand a module by clicking on the plus/minus button to view the registers within the
module
4. Select a desired register to view its bit fields and bit descriptions in the window below.
In the Registers tab, all of the available modules are listed, and under each module all of
its registers are displayed with their current values. Selecting a register brings up the Bit
field, Actions box, and Description box. In the Bit field, you can view the bits in binary
format. The Actions box is used when a bit needs to be modified. You can revert changes,
write a new value, reset all of the bits, and view a summary of the register. You can also
change the format of the value written in the bit field. The Description box displays the
values and significance of each bit in the register. When a bit is modified, the description
will change.
You can modify each bit by selecting it in the drop-down box under the Bit field, or by
clicking the bit on the Bit field. Note that bits that are read-only will not allow you to
modify the bit values. A new value can be written into the edit box, or you can click the
light bulb button next to the edit box to view all of the options, and then double-click the
changes.
1. Select Project > Change Device/Connection from the IDE menu bar. The Device/
Connection Change wizard appears.
2. Type a name for the project, in the New Project Name text box. By default, it is the
existing project name.
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
7. Click Finish.
The wizard creates a project for the RS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E USB BDM Multilink as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 7.62.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
3. Click Next.
The Device and Connection page appears.
4. Expand the RS08 tree control and select the derivative or board you would like to use.
For example, select RS08 > RS08KA Family > RS08KA2.
5. Click Next.
The Connections page appears.
6. Check the P&E Cyclone Pro Serial checkbox. See Figure 7.63.
7. Click Finish.
The wizard creates a project for the RS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro Serial as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 7.64.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
3. Click Next.
The Device and Connection page appears.
4. Expand the RS08 tree control and select the derivative or board you would like to use.
For example, select RS08 > RS08KA Family > RS08KA2.
5. Click Next.
The Connections page appears.
6. Check the P&E Cyclone Pro USB checkbox. See Figure 7.65.
7. Click Finish.
The wizard creates a project for the RS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro USB as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 7.66.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button.
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
7. Click Finish.
The wizard creates a project for the RS08 architecture according to your specifications.
You can access the project from the CodeWarrior Projects view in the Workbench
window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro TCP-IP as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 7.68.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
Softec
This topic will contain information specific to Softec connection.
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
3. Click Next.
The Device and Connection page appears.
4. Expand the tree control and select the derivative or board you would like to use.
5. Click Next.
The Connections page appears.
6. Select the desired connection.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
7. Click Finish.
The wizard creates a simulator project according to your specifications. You can
access the project from the CodeWarrior Projects view in the Workbench window.
8. Build the new project. For more information, refer to the topic Building Projects.
9. Debug the new project. For more information, refer to the topic Debugging Projects.
Option Description
Table 8.1 Connection Parameter Options for P&E Multilink/Cyclone Pro (continued)
Option Description
(Cyclone Pro only) Provide power to This option determines whether the Cyclone
target Pro (circuitry) provides power to the target
hardware via the probe.
Check this option to have the Cyclone Pro
(circuitry) supply power to the hardware
target
Uncheck this option to not provide power.
(Cyclone Pro only) Power off target This option determines whether Cyclone Pro
upon software exit hardware interface provides power to the
target hardware via VDD of the BDM cable.
Check this option to turn off the power when
the program terminates.
Uncheck this option to leave the hardware
target powered continuously.
(Cyclone Pro only) Regulator Output This option adjusts the output voltage that
Voltage powers the hardware target.
Select a voltage value from this option’s list
box.
Note: An improper voltage setting can
damage the board.
(Cyclone Pro only) Power down delay This option specifies amount of time for
which the target will be turned off during a
RESET power cycling sequence.
Enter the delay interval (in milliseconds) in
this option’s text box.
(Cyclone Pro only) Power up delay This option specifies amount of time for
which the target will remain powered prior to
a RESET power cycling sequence.
Enter the delay interval (in milliseconds) in
this option’s text box.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug but the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Multilink/Cyclone Pro as your debugger connection:
1. Select the P&E device that you are using from the first drop-down menu and click
Refresh. See Figure 8.2.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
Trim Options
The Calculate Trim and Program the Non-Volatile Trim Register checkbox enables
automatic calculation and programming of the trim value to a designated Non-Volatile
memory location.
well). Ranges that are designated as “preserved” are read before an erase and re-
programmed immediately afterwards, thereby preserving the data in these ranges. Any
attempts to program data into a preserved range are ignored. When entering an address
into the preserved range field (hexadecimal input is required), the values are masked
according to the row size of the device. This ensures that the reprogramming of preserved
data does not cause any conditions that disturb programming.
Trim Control
The Use custom trim reference frequency option lets you select a custom trim value for the
target device (valid only for devices with an Internal Clock). You can input any value
within the valid internal clock frequency range; the allowable trim value is limited only by
the device itself. Note that the valid internal clock frequency range and the default trim
value for the currently selected device/algorithm are displayed as well. For more
information about the specific functionality of the internal clock source, see the Freescale
Data Sheet for your specific device.
CAUTION Selecting the wrong programming algorithm may damage their device,
lead to under/over programming situations, or simply not program
portions of the project file. It is therefore recommended using the default
algorithm unless there is a compelling reason to do otherwise.
1. Select the Advanced Programming/Debug Options selection from the PEMicro menu.
3. Click the Choose Alternative Algorithm button, which lets you browse for an
alternative algorithm.
4. Once you select the alternative algorithm, the name of the algorithm along with its full
path appears in the text field below the Choose Alternative Algorithm button.
At this point, the current project performs all future Flash programming operations using
the alternative algorithm. You may revert to the default algorithm at any time by clearing
the Use Alternative Algorithm checkbox.
To view the Register Files of the device that you have chosen:
1. Find the debugger icon and click it to enter debug mode and open the debugging
window
2. Select the “Registers” tab on the right side of the debugging window, or select the
Window menu -> Show View -> Registers to open the Register window.
3. Expand a module by clicking on the plus/minus button to view the registers within the
module
4. Select a desired register to view its bit fields and bit descriptions in the window below.
In the Registers tab, all of the available modules are listed, and under each module all of
its registers are displayed with their current values. Selecting a register brings up the Bit
field, Actions box, and Description box. In the Bit field, you can view the bits in binary
format. The Actions box is used when a bit needs to be modified. You can revert changes,
write a new value, reset all of the bits, and view a summary of the register. You can also
change the format of the value written in the bit field. The Description box displays the
values and significance of each bit in the register. When a bit is modified, the description
will change.
You can modify each bit by selecting it in the drop-down box under the Bit field, or by
clicking the bit on the Bit field. Note that bits that are read-only will not allow you to
modify the bit values. A new value can be written into the edit box, or you can click the
light bulb button next to the edit box to view all of the options, and then double-click the
changes.
NOTE Clear the Use default location checkbox and click Browse to specify a different
location for the new project. By default, the Use default location checkbox is
checked.
4. Expand the RS08 tree control and select the derivative or board you would like to use.
For example, select ColdFire V1 > MCF51QE Family > MCF51QE128.
5. Click Next. The Connections page appears.
6. Check the P&E USB BDM Multilink checkbox. See Figure 8.10.
7. Click Finish.
The wizard creates a project for the ColdFire V1 architecture according to your
specifications. You can access the project from the CodeWarrior Projects view in the
Workbench window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E USB BDM Multilink as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 8.11.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a different
location for the new project. By default, the Use default location checkbox is
checked.
7. Click Finish.
The wizard creates a project for the ColdFire V1 architecture according to your
specifications. You can access the project from the CodeWarrior Projects view in the
Workbench window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro Serial as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 8.13.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a different
location for the new project. By default, the Use default location checkbox is
checked.
7. Click Finish.
The wizard creates a project for the ColdFire V1 architecture according to your
specifications. You can access the project from the CodeWarrior Projects view in the
Workbench window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro USB as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 8.15.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
NOTE Clear the Use default location checkbox and click Browse to specify a different
location for the new project. By default, the Use default location checkbox is
checked.
7. Click Finish.
The wizard creates a project for the ColdFire V1 architecture according to your
specifications. You can access the project from the CodeWarrior Projects view in the
Workbench window.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug and the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Cyclone Pro TCP-IP as your debugger connection:
1. Select USB Multilink – USB Port from the first drop-down menu and click Refresh.
See Figure 8.17.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
Abatron
This section discusses the option of different hardware probes supported by the Abatron
BDI debugger protocol and their settings options. The supported hardware connections
are:
• TCP/IP
• Serial
TCP/IP
This option specifies that the physical connection uses TCP/IP as the interface for
debugging communications. The tab view displays the connection parameters this
connection type uses (Figure 8.18).
Option Description
Serial
This option specifies that the physical connection uses a serial connection as the interface
for debugging communications. The tab view displays the connection parameters this
connection type uses (Figure 8.19).
Table 8.3 explains the various settings used to configure the serial connection. Adjust
these to match the configuration of the serial port on the hardware target.
Option Description
Table 8.3 Connection Parameters Option for Abatron Serial Connection (continued)
Option Description
CCS
This section discusses the option of different hardware probes supported by the CCS
debugger protocol and their settings options. The supported hardware connections are:
• Generic
• USB TAP
• Ethernet
USB TAP
This option specifies that the physical connection uses USB TAP run control as the
interface for debugging communications. The tab view displays the connection parameters
this connection type uses (Figure 8.20).
You use the option USB TAP Serial Number (hex) to enter an optional serial number for
the USB hardware probe. Enter the serial number into the text box as a hexadecimal value.
NOTE For more information on the Advanced option presented on these views,
consult the section Connection Tab — ColdFire in the Working with the
Debugger chapter,
Ethernet
This option specifies that the physical connection uses Ethernet run control as the interface
for debugging communications. The tab view displays the connection parameters this
connection type uses ().
Enter the IP address of the Ethernet TAP into the Hostname/IP Address text box. Enter
this value as a dotted decimal number, such as 127.0.0.1.
NOTE For more information on the Advanced option presented on these views,
consult the section Connection Tab — ColdFire in the Working with the
Debugger chapter,
1. Select Project > Change Device/Connection from the IDE menu bar.
The Device/Connection Change wizard appears.
2. Type a name for the project, in the New Project Name text box. By default, it is the
existing project name.
NOTE Clear the Use default location checkbox and click Browse to specify a
different location for the new project. By default, the Use default location
checkbox is checked.
3. Click Next.
The Device and Connection page appears.
4. Expand the tree control and select the derivative or board you would like to use.
5. Click Next.
The Connections page appears.
6. Select the desired connection.
NOTE You can select multiple connections by checking appropriate checkboxes in the
Connections page.
7. Click Finish.
The wizard creates a simulator project according to your specifications. You can
access the project from the CodeWarrior Projects view in the Workbench window.
8. Build the new project. For more information, refer to the topic Building Projects.
9. Debug the new project. For more information, refer to the topic Debugging Projects.
Option Description
Table 9.1 Connection Parameter Options for P&E Multilink/Cyclone MAX (continued)
Option Description
BDM Debug Shift Freq. This option lets you to set the BDM shift
clock speed of P&E's BDM interfaces. This
integer value may be used to determine the
speed of communications according to the
following equations:
Cyclone Max : (50000000/(2*N+5)) Hz
USB-ML-CF : ( 1000000/(N+1)) Hz
The value n should be between 0 and 31.
This shift clock takes effect after the
commands in the top of the programming
algorithm are executed so that these
commands can increase the target
frequency and allow a faster shift clock. This
clock can't generally exceed a div 4 of the
processor bus frequency.
Use PST Signals When the checkbox is set, the software will
use the PST pins to determine if the part is
running in user mode or halted in debug
mode. When the checkbox is cleared, the
software will use the BDM communications
pins to determine the processor status.
Using the BDM communications pins to
determine the status results in a slight
slowdown in communication and download
rates. The advantage is that the target board
no longer has to wire the PST signals to the
debug connectors.
Connection Assistant
The P&E Connection Assistant is displayed when you attempt to debug but the program
cannot connect to the interface hardware specified in the Launch Configuration Dialog. To
select the P&E Multilink/Cyclone Pro as your debugger connection:
1. Choose the P&E device that you are using from the first drop-down menu and click
Refresh. See Figure 9.2.
2. Using the second drop-down menu, select the port on which the interface is connected.
3. Click the Retry button
To view the Register Files of the device that you have chosen:
1. Find the debugger icon and click it to enter debug mode and open the debugging
window
2. Select the “Registers” tab on the right side of the debugging window, or select the
Window menu -> Show View -> Registers to open the Register window.
3. Expand a module by clicking on the plus/minus button to view the registers within the
module
4. Select a desired register to view its bit fields and bit descriptions in the window below.
In the Registers tab, all of the available modules are listed, and under each module all of
its registers are displayed with their current values. Selecting a register brings up the Bit
field, Actions box, and Description box. In the Bit field, you can view the bits in binary
format. The Actions box is used when a bit needs to be modified. You can revert changes,
write a new value, reset all of the bits, and view a summary of the register. You can also
change the format of the value written in the bit field. The Description box displays the
values and significance of each bit in the register. When a bit is modified, the description
will change.
You can modify each bit by selecting it in the drop-down box under the Bit field, or by
clicking the bit on the Bit field. Note that bits that are read-only will not allow you to
modify the bit values. A new value can be written into the edit box, or you can click the
light bulb button next to the edit box to view all of the options, and then double-click the
changes.
Abatron
This section discusses the option of different hardware probes supported by the Abatron
BDI debugger protocol and their settings options. The supported hardware connections
are:
• TCP/IP
• Serial
TCP/IP
This option specifies that the physical connection uses TCP/IP as the interface for
debugging communications. The tab view displays the connection parameters this
connection type uses (Figure 9.6).
Option Description
Serial
This option specifies that the physical connection uses a serial connection as the interface
for debugging communications. The tab view displays the connection parameters this
connection type uses (Figure 9.7).
Table 9.3 explains the various settings used to configure the serial connection. Adjust
these to match the configuration of the serial port on the hardware target.
Option Description
Table 9.3 Connection Parameters Option for Abatron Serial Connection (continued)
Option Description
CCS
This section discusses the option of different hardware probes supported by the CCS
debugger protocol and their settings options. The supported hardware connections are:
• Generic
• USB TAP
• Ethernet
USB TAP
This option specifies that the physical connection uses USB TAP run control as the
interface for debugging communications. The tab view displays the connection parameters
this connection type uses (Figure 9.8).
You use the option USB TAP Serial Number (hex) to enter an optional serial number for
the USB hardware probe. Enter the serial number into the text box as a hexadecimal value.
NOTE For more information on the Advanced option presented on these views,
consult the section Connection Tab — ColdFire in the Working with the
Debugger chapter,
Ethernet
This option specifies that the physical connection uses Ethernet run control as the interface
for debugging communications. The tab view displays the connection parameters this
connection type uses ().
Enter the IP address of the Ethernet TAP into the Hostname/IP Address text box. Enter
this value as a dotted decimal number, such as 127.0.0.1.
NOTE For more information on the Advanced option presented on these views,
consult the section Connection Tab — ColdFire in the Working with the
Debugger chapter,
3. Click OK.
The Target Tasks view appears. See Figure 10.2.
4. Right-click in the Target Tasks view and select Import. Alternatively, click the
icon on the Target Tasks view toolbar.
The Open dialog box appears.
5. Navigate to the pre-defined tasks folder at <CW MCU
install>\MCU_10.0\bin\plugins\support\TargetTask\Flash_Pr
ogrammer\ and select the desired .xml file for your hardware target. For example,
select MCF5213_INTFLASH.xml
6. Click Open.
The selected task appears in the Target Tasks view (Figure 10.3).
NOTE When a predefined flash programmer task is imported, its Run Configuration
is set as Active Debug Context. If the task is imported without any
active debug session, then the icon will be disabled as in Figure 10.3.
Associate the selected target task to a different Run Configuration to enable the
icon.
8. Double-click on the task’s name, to examine the task’s stored Flash Programmer
actions.
The <target> Flash Programmer Task editor window appears, and displays the
actions in the Flash Programmer Actions group (Figure 10.4).
Figure 10.4 <target> Flash Programmer Task Editor Window Displaying Stored Actions
If you are working with special hardware that require a different sequence of Flash
Programmer actions, you can create your own target tasks.
NOTE For more information on creating Flash Programmer target tasks, refer to the
Create Flash Programmer Task topic.
For more information on the various options available in the <target> Flash
Programmer Task editor window, refer to the Freescale Eclipse Extensions
Guide.
3. Click OK.
The Target Tasks view appears. See Figure 10.6.
4. Click from the Target Tasks view toolbar to create a new target task.
The Create New Target Task wizard appears.
5. In the Task Name text box, enter the name of the target task.
6. From the Run Configuration drop-down list, select a configuration.
NOTE Select Active Debug Context from the Run Configuration drop-down list, if
you want to use Flash Programmer over an active debug session, else select
any of the specified debug context from the list.
7. From the Task Type drop-down list, select the appropriate Flash Programmer. See
Figure 10.7. If necessary, select Flash Programmer for HCS08/ColdFire
V1 from the drop-down list.
8. Click Finish.
The <target> Flash Programmer Task editor window appears as seen in Figure 10.8.
NOTE The <target> Flash Programmer Task editor window has groups to define
flash devices, Flash Programmer actions, and target RAM settings.
9. Click Add Device from the Flash Devices group to add a new hardware device.
The Add Device dialog box appears with a list of supported devices.
a. Select the specific device from the list.
b. Change the device’s memory organization (if required).
NOTE To change the device memory organization, click the adjacent value in the
Organization column. Click the icon, and select the required
organization.
Button Usage
Add Erase / Blank Check Action Lets you add erase or blank check actions
for flash devices
Add Program / Verify Action Lets you add program or verify flash actions
for flash devices
Add Checksum Action Lets you add checksum actions for flash
devices
Add Dump Flash Action Lets you dump a portion of the flash or the
entire flash.
NOTE See the Freescale Eclipse Extension Guide for detailed documentation on the
various options available in the Flash Programmer window.
Table 10.2 lists the icons available on the Target Task toolbar.
NOTE The icons provide fast access to the view, import predefined tasks, and execute
recently executed tasks.
Option Description
Option Description
Import Flash Task Select to import a Flash task using the Open
dialog box.
Flash File to Target Select to flash file using the Simple Flash
dialog box.
Option Description
Option Description
Open Import Export Memory Select to open the Target Tasks view.
NOTE The Flash Programmer for RS08 works only if OSBDM connection is used.
TIP If it is not visible, perform the steps in the Working with Flash Programmer topic
to open the Target Tasks view.
After you have launched CodeWarrior and connected the DEMOS908QG8 board to the
workstation using a USB cable, perform these steps.
1. Go to the Target Tasks view in either the C/C++ or Debug perspective.
2. Right-click on this view and select Import. Alternatively, click the icon on the
Target Tasks view toolbar.
The Open dialog box appears.
3. Navigate to CWInstallDir/MCU_version/bin/plugins/support/
TargetTask/Flash_Programmer/HC08 and select the XML file for the
board’s microcontroller. For this tutorial, select MC9S08QG8.xml.
4. Click Open.
The MC9S08QG8 task appears in the Target Tasks view.
5. Double-click on the MC9S08QG8 task to examine its contents.
The <target> Flash Programmer Task editor window appears, and displays the
memory settings and actions for the task (Figure 10.11). Notice the actions to erase,
program, and verify the contents of flash memory in the Flash Programmer Actions
group. These actions execute in the order as they are displayed in the table, from top to
bottom.
After you have connected an MCF5213-based evaluation board to the workstation with a
USB cable, perform these steps.
1. Go to the Target Tasks view in either the C/C++ or Debug perspective.
2. Right-click on this view and select Import. Alternatively, click the icon on the
Target Tasks view toolbar.
The Open dialog box appears.
3. Navigate to CWInstallDir/MCU_version/bin/plugins/support/
TargetTask/Flash_Programmer/ColdFire and select the XML file for the
board’s microcontroller. For this tutorial, select MCF5213_INTFLASH.xml.
4. Click Open.
The MCF5213_INTFLASH task appears in the Target Tasks view.
Figure 10.12 Memory Settings and Actions for the MCF5213_INTFLASH Task
Congratulations! You have selected and used a target task that erased and programmed the
flash memory on the MCF5213 microcontroller.
After you have launched CodeWarrior and connected the DEMOS908QG8 board to the
host system using a USB cable, perform these steps.
1. Go to the Target Tasks view in either the C/C++ or Debug perspective.
2. Right-click on this view and select New Task.
The Create New Target Task wizard appears.
3. In the Task Name text box, enter the name of the target task. For example, enter
Erase Flash DEMO9S08QG8.
4. From the Run Configuration drop-down list, select a run configuration. For example,
select DEMO9S08QG8_test - HCS08 - MC9S08AC128 - PnE
Multilink_Cyclone PRO TCP-IP .
5. From the Task Type drop-down list, select Flash Programmer for HCS08/
ColdFire V1 from the listbox.
The dialog box should appear as in Figure 10.13.
Figure 10.14 <target> Flash Programmer Task Editor Window to Erase HCS08 Flash
Figure 10.16 <target> Flash Programmer Task Editor Window Settings for
DEMO9S08QG8
14. Click the icon to save the settings and close the <target> Flash Programmer Task
editor window.
You can access the newly-made Erase Flash DEMO9S08QG8 task from the
Target Tasks view.
Congratulations! You have erased the on-chip Flash memory in the DEMO9S08QG8
board’s microcontroller.
After you have connected an MCF5213-based evaluation board to the workstation with a
USB cable, perform these steps.
1. Go to theTarget Tasks view in either the C/C++ or Debug perspective.
2. Right-click on this view and select New Task.
The Create New Target Task wizard appears.
3. In the Task Name text box, enter the name of the target task. For example, enter
Erase portion of Flash.
4. From the Run Configuration drop-down list, select a run configuration. For example,
select ColdFire_test - MCF52213 Internal Flash - Freescale
USB-TAP BDM.
5. From the Task Type drop-down list, select Flash Programmer for ColdFire
V234 from the listbox.
The Create New Target Task wizard should appear as in Figure 10.17.
Figure 10.20 Add Erase / Blank Action Dialog Box for ColdFire
NOTE To erase of all Flash memory at the same time, check Erase All Sectors Using
Chip Erase Command.
You return to the <target> Flash Programmer Target editor window, and the action
appears in the Flash Programmer Actions group.
15. To allocate a buffer of RAM to hold the erasure algorithm.
a. Enter the start address of the RAM buffer in Address text box of the Target RAM
group.
b. In the Size option, enter the amount of RAM that makes up the buffer.
c. Check the Verify Target Memory Writes checkbox. For this example, the start
address of the buffer was 0X20000000, and its size was 0X00008000.
The Target RAM group displays the start address of the RAM memory buffer, and
its size (Figure 10.21).
Figure 10.21 Flash Programmer Task Editor Window with ColdFire Erase Settings
16. Click the icon to save the settings and close the <target> Flash Programmer Task
editor window.
You can access the newly-made Erase portion of Flash task from the Target
Tasks view.
3. Select Execute. Alternatively, click the Execute icon on the Target Tasks view
toolbar.
In the Console view, status messages appear as the IDE connects to the board and
erases the flash memory.
You have erased the selected on-chip Flash memory sectors in the MCF5123
microcontroller.
After you have connected an MCF5213-based evaluation board to the workstation with a
USB cable, perform these steps.
1. Go to the Target Tasks view in either the C/C++ or Debug perspective.
2. Right-click on this view and double-click on the task Erase portion of Flash
that you made in the previous topic.
The ColdFire V234 Flash Programmer Task editor window appears (Figure 10.22).
3. Allocate a buffer of RAM that holds the programming algorithm, along with any
program code as it is written into flash.
a. Enter the start address of the RAM buffer in Address text box of the Target RAM
group.
b. In the Size text box, enter the amount of RAM that makes up the buffer.
c. Check the Verify Target Memory Writes option. For this example, the start
address of the buffer was 0X20000000, and its size was 0X00008000.
NOTE Since this configuration was taken care of when the Erase action was set up,
you do not have to enter anything for this step. However, it is described here
for the sake of completeness.
The Target RAM group displays the start address of the RAM memory buffer, and its
size.
Figure 10.23 Adding File to Add Program / Verify Action Dialog Box
NOTE If you want to download a file other than the launch configuration’s default
file, click on the Workspace, File System, or Variables button and navigate to
the file.
8. Click the icon to save the settings and close the <target> Flash Programmer Task
editor window.
The revised Erase portion of Flash task is available from the Target Tasks
view.
After you have launched CodeWarrior and connected the M52277EVB_SPI board to the
host system using a USB cable, perform these steps.
1. Go to the Target Tasks view in either the C/C++ or Debug perspective.
2. Right-click in the Target Tasks view and select Import. Alternatively, click the
icon on the Target Tasks view toolbar.
The Open dialog box appears.
3. Navigate to the pre-defined tasks folder at <CW MCU
install>\MCU_10.0\bin\plugins\support\TargetTask\Flash_Pr
ogrammer\ and select the desired .xml file for your hardware target. For example,
select M52277EVB_SPI.xml.
4. Click Open.
The selected task appears in the Target Tasks view (Figure 10.25).
NOTE The predefined erase/program tasks are not mandatory for diagnostics.
NOTE When a predefined flash programmer task is imported, its Run Configuration
is set as Active Debug Context. If the task is imported without any active
debug session, then the icon will be disabled as in Figure 10.25. Associate
the selected target task to a different Run Configuration to enable the icon.
6. Double-click on the task name, to examine the task stored Flash Programmer actions.
The <target> Flash Programmer Task editor window appears, as shown in Figure
10.26.
NOTE The full diagnostics does the same thing as diagnostics but also prints the blank
status for sectors. It can take significantly longer to complete.
NOTE If more than one flash is available in Flash Devices table, the Add Diagnostics
Action table lets you select the flash where you want to run the diagnostics.
8. Check the Perform Full Diagnostics checkbox if you want to perform complete
diagnostics on the selected flash device.
9. Click the Add Diagnostics Actions button (Figure 10.27).
You get a popup with a status that the device is added (Figure 10.28).
Figure 10.28 Add Diagnostics Actions Dialog Box — Popup with Status
2. Specify the file name in the File text box. The flash is dumped in this selected file.
3. Select the file type from the File Type drop-down list. You can select any one of the
following file types:
• Srec — Saves files in Motorola S-record format.
• Binary — Saves files in binary file format.
4. Specify the memory range for which you want to add dump flash action.
• Type the start address of the range in the Start text box.
• Type the end address of the range in the End text box.
5. Click Add Dump Flash Action.
6. Click Done.
The Add Dump Flash Action dialog box closes and the added dump flash action
appear in the Flash Programmer Actions table in the Flash Programmer Task
editor window (Figure 10.31).
2. Select a sector from the Sectors table and click the Add Protect Action button to add
a protect operation on the selected sector.
NOTE Press CTRL or SHIFT keys for selecting multiple sectors from the Sectors
table.
3. Click the Add Unprotect Action button to add an unprotect action on the selected
sector.
NOTE Check the All Device checkbox to add action on full device.
4. Click Done.
The Add Protect/ Unprotect Action dialog box closes and the added protect or
unprotect actions appear in the Flash Programmer Actions table in the Flash
Programmer Task editor window (Figure 10.33).
NOTE Changing the task will also save changes to the file in the project. The save is
done to the file in project only if the task has been imported from a project
(with double click). Otherwise, it will prompt to save the file.
5. In the Task Path text box, specify the path where you want to store the task. You can
use the Workspace, File System, or Variables buttons to navigate to the desired
location.
6. From the Project drop-down list select the project where you want to store you target
task.
NOTE Check the Do not ask me again for this task checkbox to save these settings
for the current target task.
7. Click OK.
The dialog box closes and associates the file to the specified project and saves in target
task framework and not necessarily in the project.
NOTE The above mentionde feature has a preference that will not display the save as
dialog and always save in target task framework. The settings are located in
Windows > Preferences > C/C++ >Debug > CodeWarrior Debugger >
Show "Save As" dialog when saving a new task.
1. Click the Flash Programmer icon on the IDE toolbar (Figure 10.37).
NOTE If a connection is already established with the target, this control is disabled.
The Flash Configuration drop-down list is updated with the supported configurations
for the processor from the launch configuration.
5. Select a flash configuration from the Flash Configuration drop-down list.
6. Click the Erase Device button.
Programming a File
1. Click the Flash Programmer icon on the IDE toolbar (Figure 10.38).
NOTE If a connection is already established with the target, this control is disabled.
The Flash Configuration drop-down list is updated with the supported configurations
for the processor from the launch configuration.
5. Select a flash configuration from the Flash Configuration drop-down list.
6. Type the file name in the File text box. You can use the Workspace, File System, or
Variables buttons to select the desired file.
7. Type the offset location in the Offset text box.
8. Click the Program with Erase button.
3. Click OK.
4. Click from the Target Tasks view toolbar to create a new target task.
The Create New Target Task wizard appears.
5. In the Task Name text box, enter the name of the target task.
6. From the Run Configuration drop-down list, select a configuration.
NOTE Select Active Debug Context from the Run Configuration drop-down list, if
you want to use hardware diagnostics over an active debugger session, else
select any of the specified debug context from the list.
• Memory Access — Configures diagnostic tests for performing memory reads and
writes over the remote connection interface.
• Loop Speed — Configures diagnostic tests for performing repeated memory reads
and writes over the remote connection interface.
• Memory Tests — Configures the memory tests that you can run on the target.
NOTE The Use Target CPU group appears grayed-out and is not applicable for the
HCS08 and RS08 Target Tasks.
NOTE See the Freescale Eclipse Extensions Guide for detailed documentation of the
various options available in the Hardware Diagnostics Action window.
3. Right-click in the Target Tasks view and select New Task from the context menu.
The Create New Target Task wizard appears (Figure 10.41).
4. In the Task Name text box, enter a name for the new task. For example,
Importing_Memory.
5. Use the Run Configuration list box to specify the configuration that the task launches
and uses to connect the target. For example, select Active Debug Context.
NOTE If the task does not successfully launch the configuration that you specify, the
Execute button of the Target Tasks view toolbar stays disabled.
7. Click Next.
The Select the task type page (Figure 10.42) of the Configure Import/Export
Memory task dialog box appears.
8. Select Import data from a file into memory task type option.
Figure 10.42 Create New Target Task Wizard — Select Task Type
9. Click Next.
The Import data from a file into memory page (Figure 10.43) of the Configure
Import/Export Memory task dialog box appears. This page lets you read encoded
data from a user specified file, decode it, and copy it into a user specified memory
range.
NOTE CodeWarrior IDE validates information as you enter it. If there are errors, a
message appears near the page title.
Table 10.6 Import Data from a File into memory Page Options
Item Description
Memory space and Enter the literal address and memory space on which the data
address transfer is performed.
The Literal address field allows only decimal and hexadecimal
values.
Table 10.6 Import Data from a File into memory Page Options (continued)
Item Description
Access size Denotes the number of addressable units of memory that the
debugger accesses in transferring one data element.
The default values shown are 1, 2, 4, and 8 units. When target
information is available, this list shall be filtered to display the
access sizes that are supported by the target.
File type Defines the format in which the wizard encodes the data it
imports. By default, the following file types are supported:
• Annotated Hex Text
• Hex Text
• Motorola S-Record
• Raw Binary
• Signed Decimal Text
• Unsigned decimal Text
Input File Enter the path to the file that contains the data to be imported.
Click the Browse button to select the import file through the
standard File Open dialog box.
Verify Memory Writes Check the option to verify success of each data write to the
memory.
NOTE Alternatively, click Finish and Execute to save your changes and execute the
newly created import task immediately.
3. Right-click in the Target Tasks view and select New Task from the context menu.
The Create New Target Task wizard appears (Figure 10.45).
4. In the Task Name text box, enter a name for the new task. For example,
Exporting_Memory.
5. Use the Run Configuration list box to specify the configuration that the task launches
and uses to connect the target. For example, Active Debug Context.
NOTE If the task does not successfully launch the configuration that you specify, the
Execute button of the Target Tasks view toolbar stays disabled.
7. Click Next.
The Select the task type page (Figure 10.46) appears.
8. Select Export data from memory into a file task type option.
Figure 10.46 Create New Target Task Wizard — Select Task Type
9. Click Next.
The Export data from memory into a file page (Figure 10.47) appears. This page lets
you read data from a user specified memory range, encode it in a user specified format,
and store this encoded data in a user specified output file.
NOTE CodeWarrior IDE validates information as you enter it. If there are errors, a
message appears near the page title.
Item Description
Memory space and Enter the literal address and memory space on which the data
address transfer is performed.
The Literal address field allows only decimal and hexadecimal
values.
Item Description
Access Size Denotes the number of addressable units of memory that the
debugger accesses in transferring one data element.
The default values shown are 1, 2, 4, and 8 units. When target
information is available, this list shall be filtered to display the
access sizes that are supported by the target.
File Type Defines the format in which the wizard encodes the data it
imports. By default, the following file types are supported:
• Annotated Hex Text
• Hex Text
• Motorola S-Record
• Raw Binary
• Signed Decimal Text
• Unsigned decimal Text
Output File Enter the path of the file to which the wizard will write data.
Click the Browse button to save the export file through the
standard File Save As dialog box.
NOTE Alternatively, click Finish and Execute to save your changes and execute the
newly created export task immediately.
3. Right-click in the Target Tasks view and select New Task from the context menu.
The Create New Target Task wizard appears as shown in Figure 10.49.
4. In the Task Name text box, enter a name for the new task. For example, Fill Memory.
5. Use the Run Configuration list box to specify the configuration that the task launches
and uses to connect the target. For example, Active Debug Context.
NOTE If the task does not successfully launch the configuration that you specify, the
Execute button of the Target Tasks view toolbar stays disabled.
7. Click Next.
The Select the task type page (Figure 10.50) appears.
8. Select Fill memory with a data pattern task type option.
Figure 10.50 Create New Target Task Wizard — Select Task Type
9. Click Next.
The Fill memory with a data pattern page (Figure 10.51) appears. This page lets you
fill a user specified memory range with a user specified data pattern.
NOTE CodeWarrior IDE validates information as you enter it. If there are errors, a
message appears near the page title.
Item Description
Memory space and Enter the literal address and memory space on which the fill
address operation is performed.
The Literal address field allows only decimal and hexadecimal
values.
Item Description
Access Size Denotes the number of addressable units of memory that the
debugger accesses in modifying one data element.
The default values shown are 1, 2, 4, and 8 units. When target
information is available, this list shall be filtered to display the
access sizes that are supported by the target.
Fill Pattern Denotes the sequence of bytes, ordered from low to high
memory, the wizard mirrors in the target.
The field accept only hexadecimal values. If the width of the
pattern exceeds the access size, the wizard displays an error
message.
Verify Memory Writes Check the option to verify success of each data write to the
memory.
NOTE Alternatively, click Finish and Execute to save your changes and execute the
newly created fill task immediately.
U
Unused Arguments 277
Unused Variables 277
USB cable 639
Use #include line (-ppopt line) 298
Use default location 25, 380
User Path (-i) 273, 292
V
value 453
Verify 627
Verify Memory Writes 674, 682
W
Warnings 275
Workbench window 54, 63, 71, 78, 450, 524, 586,
612
Working with Projects 23
WorkSpace Launcher 46, 55, 64, 72, 79, 384
write 11
writing 638
writing to flash memory 638
X
xml file 629, 657