This document has been discontinued and thus will no
longer be updated. Please refer instead to Zilog Developer
Studio’s Online Help feature.
ZDS II Online Help can be accessed from the Help menu in ZDS II. So that
we can offer continual improvements to your ZDS II On-Line Help
experience, we welcome your inputs and suggestions. Please feel free to
contact us via our Customer Service page
ZILOG’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE
SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF
THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION.
As used herein
Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b)
support or sustain life and whose failure to perform when properly used in accordance with instructions for
use provided in the labeling can be reasonably expected to result in a significant injury to the user. A critical component is any componen t in a li fe supp ort device o r syste m whose failure to p erform ca n be re asonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness.
Z8 Encore!, Z8 Encore! XP and Z8 Encore! XM are trademarks or registered trademarks of Zilog, Inc. All
other product or service names are the property of their respective owners.
UM013037-1212
Revision History
Each instance in the following revision history table reflects a change to this document
from its previous version. For more details, refer to the corresponding pages provided in
the table.
Revision
Date
Dec
2012
Nov
2012
Nov
2012
Dec
2010
May
2008
Dec
2006
Jul
2006
Sep
2005
LevelDescriptionPage
37Restored all pages to document for current reference purposes. Document
will not be updated; please refer instead to Zilog Developer Studio Online
Help.
36Updated title page to note discontinuation of this document; readers are
instead referred to Zilog Developer Studio’s Online Help, which contains
this manual in its entirety. Removed all pages but title page.
35Added Linker Command Files for C Programs section to Using the ANSI
CCompiler chapter.
34Updated for the ZDS II 5.0.0 release; updated the Using the Integrated
Development Environment chapter; added new section to the Using the
Editor chapter.
33Updated for the ZDS II 4.11.0 release.All
32Added description of the Use Page Erase Before Flashing check; described
new Place ISR into PRAM checkboxes; added description of the Use Page
Erase checkbox; added path for Ethernet Smart Cab le upgrade information;
updated the note about PRAM; deleted PL, PW, PAGEWIDTH, and
PAGELENGTH; added the checksum, fillmem, loadmem, and savemem
commands.
31Updated for the ZDS II 4.10.0 release.All
30Added Ethernet target.111
Zilog Developer Studio II – Z8 Encore!
User Manual
All
All
247
1, 138,
, 149
141
, 94,
49
, 125,
110
, 277,
133
, 312,
307
, 489,
391
523
, 114,
, 273
263
iii
UM013037-1212Revision History
Zilog Developer Studio II – Z8 Encore!
User Manual
The following sections provide an introduction to the Zilog Developer Studio II:
•
ZDS II System Requirements – see page 1
•
Zilog T echnical Support – see page 6
ZDS II System Requirements
T o effectively use Zilog Developer System II, you need a basic understanding of the C and
assembly languages, the device architecture, and Microsoft Windows.
The following sections describe the ZDS II system requirements:
Zilog Developer Studio II – Z8 Encore!
User Manual
1
•
Supported Operating Systems – see page 1
•
Recommended Host System Configuration – see page 2
•
Minimum Host System Configuration – see page 2
•
When Using the Serial Smart Cable – see page 2
•
When Using the USB Smart Cable – see page 3
•
When Using the Opto-Isolated USB Smart Cable – see page 3
•
When Using the Ethernet Smart Cable – see page 3
•
When Using the Z8 Encore! MC Emulator – see page 3
•
Z8 Encore! Product Support – see page 3
Supported Operating Systems
•
Windows 7 64-bit
•
Windows 7 32-bit
•
Windows Vista 64-bit
•
Windows Vista 32-bit
•
Windows XP Professional 32-bit
The USB Smart Cable is not supported on 64-bit Windows Vista and Windows XP for
ZDS II – Z8 Encore! versions 4.10.1 or earlier.
UM013037-1212Introduction
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
2
•
Windows 2000 SP4
Recommended Host System Configuration
•
Windows XP Professional SP3 or later
•
Pentium IV 2.2 GHz processor or higher
•
1024 MB RAM or mor
•
135 MB hard disk space (includes application and documentation)
•
Super VGA video adapter
•
CD-ROM drive for installation
•
USB high-speed port (when using the USB Smart Cable)
•
RS-232 communication port with hardware flow control
•
Internet browser (Internet Explorer or Netscape)
Minimum Host System Configuration
•
Windows XP Professional SP2
•
Pentium IV 2.2 GHz processor
•
512 MB RAM
•
50 MB hard disk space (application only)
•
Super VGA video adapter
•
CD-ROM drive for installation
•
USB full-speed port (when using the USB Smart Cable)
•
RS-232 communication port with hardware flow control
•
Internet browser (Internet Explorer or Netscape)
When Using the Serial Smart Cable
•
RS-232 communication port with hardware flow and modem control signals
Some USB to RS-232 devices are not compatible because they lack the necessary hardware
signals and/or they use proprietary auto-sensing mechanisms which prevent the Smart
Cable from connecting.
Introduction UM013037-1212
Zilog Developer Studio II – Z8 Encore!
Note:
Note:
When Using the USB Smart Cable
•
High-speed USB (fully compatible with original USB)
•
Root (direct) or self-powered hub connection
The USB Smart Cable is a high-power USB device. Windows NT is not supported.
When Using the Opto-Isolated USB Smart Cable
•
High-speed USB (fully compatible with original USB)
•
Root (direct) or self-powered hub connection
User Manual
3
The USB Smart Cable is a high-power USB device. Windows NT is not supported.
When Using the Ethernet Smart Cable
•
Ethernet 10Base-T compatible connection
When Using the Z8 Encore! MC Emulator
•
Internet browser (Internet Explorer or Netscape)
•
Ethernet 10Base-T compatible connection
•
One or more RS-232 communication ports with hardware flow control
Z8 Encore! Product Support
CPU FamilyCPUPin CountEvaluation Kit Name
Z8Encore_F0830_SeriesZ8F013x20, 28Not applicable
Z8F023x
Z8F043x
Z8F083x
Z8F123x
Z8Encore_F083A_SeriesZ8F043A20, 28Z8F083A0128ZCOG
Z8F083A
UM013037-1212When Using the USB Smart Cable
Zilog Developer Studio II – Z8 Encore!
User Manual
Zilog Developer Studio II – Z8 Encore!
User Manual
6
Zilog Technical Support
For technical questions about our products and tools, or for design assistance, please visit
http://www.zilog.com
the following information in your support ticket:
•
Product release number (Located in the heading of the toolbar)
•
Product serial number
•
Type of hardware you are using
•
Exact wording of any error or warning messages
•
Attach any applicable files to your email
Before Using Technical Support
, navigate via the Support menu to Technical Support, and provide
Before you use technical support, consult the following documentation:
•
readme.txt file
Refer to the
mation about problems that might occur while installing or running ZDS II:
ZILOGINSTALL\ZDSII_product_version\
In the above filepath:
–ZILOGINSTALL is the ZDS II installation directory. For example, the default
installation directory is
–product is the specific Zilog product. For example, product can be Z8Encore!,
ZNEO, eZ80Acclaim!, Crimzon, or Z8GP.
–version is the ZDS II version number. For example, version can be
5.0.0.
•
FAQ.html file
The
FAQ.html file contains answers to frequently asked questions and other informa-
tion about good practices for getting the best results from ZDS II. The information in
this file does not generally go out of date from release to release as quickly as the
information in the
directory:
readme.txt file in the following directory for last minute tips and infor-
C:\Program Files\Zilog.
4.11.0 or
readme.txt file. You can find the FAQ.html file in the following
ZILOGINSTALL\ZDSII_product_version\
In the above filepath:
–ZILOGINSTALL is the ZDS II installation directory. For example, the default
installation directory is
Introduction UM013037-1212
C:\Program Files\Zilog.
Zilog Developer Studio II – Z8 Encore!
User Manual
–product is the specific Zilog product. For example, product can be Z8Encore!,
ZNEO, eZ80Acclaim!, Crimzon, or Z8GP.
–version is the ZDS II version number. For example, version can be
5.0.0.
•
Troubleshooting section
–Appendix A. Zilog Standard Library Notes and Tips
on page 409
4.11.0 or
7
UM013037-1212Zilog Technical Support
Zilog Developer Studio II – Z8 Encore!
User Manual
8
Introduction UM013037-1212
Getting Started
This section provides a tutorial of the developer’s environment, so you can be working
with the ZDS II graphical user interface in a short time. The following topics are covered:
•
Installing ZDS II – see page 9
•
Developer’s Environment Tutorial – see page 9
Installing ZDS II
There are two ways to install ZDS II:
•
From a CD
a.Insert the CD in your CD-ROM drive.
b.Follow the setup instructions on your screen. The installer displays a default loca-
tion for ZDS II. You can change the location if you want to.
Zilog Developer Studio II – Z8 Encore!
User Manual
9
•
From the home page of the Zilog website:
a.Navigate to
b.Click the link for the version that you want to download.
c.Click
d.In the
e.Navigate to a location on your hard drive in which you want to save ZDS II.
f.Click
g.Double-click the executable file.
h.Follow the setup instructions on your screen. The installer displays a default loca-
tion for ZDS II. You can change the location if you want to.
http://www.zilog.com/software/zds2.asp.
Download.
File Download dialog box, click Save.
Save.
Developer’s Environment Tutorial
This tutorial shows you how to use the Zilog Developer Studio II. To begin this tour, you
need a basic understanding of Microsoft Windows. Estimated time for completing this
exercise is 15 minutes.
In this tour, you’ll perform the following tasks:
•
Create a New Project – see page 10
•
Add a File to the Project – see page 14
•
Set Up the Project – see page 16
UM013037-1212Getting Started
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
10
•
Save the Project – see page 22
When you complete this tour, you have a
Be sure to read the Using the Integrated Development Environment section on page 23 to
learn more about all of the dialog boxes and their options discussed in this tutorial.
For the purpose of this quick tour , your Z8 Encore! developer’ s environment directory will
be referred to as <ZDS Installation Directory>, which equates to the following path:
<ZILOGINSTALL>\ZDSII_Z8Encore!_<version>\
In the above filepath:
•
ZILOGINSTALL is the ZDS II installation directory. For example, the default installation directory is
•
version is the ZDS II version number. For example, version can be 4.11.0 or 5.0.0.
C:\Program Files\Zilog.
sample.lod file that is used in debugging.
Create a New Project
1.To create a new projec t, select New Project from the File menu. The New Project
dialog box is displayed, as shown in Figure 1.
Figure 1. New Project Dialog Box
2.From the
directory into which you want to save your project. The
box is displayed.
Getting StartedUM013037-1212
New Project dialog box, click the Browse button () to navigate to the
Select Project Name dialog
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
11
Figure 2. Select Project Name Dialog Box
3.Use the Look In drop-down list box to navigate to the directory in which you want to
save your project. For this tutorial, place your project in the following directory:
<ZDS Installation Directory>\samples\Tutorial
If Zilog Developer Studio was installed in the default directory, the following is the
actual path:
You can create a new folder in which you want to save your project. For example:
C:\<New Folder>.
4.In the
5.Click
File Name field, enter sample for the name of your project. The Z8 Encore!
developer’s environment creates a project file. Project files have the
sion (for example, <project name>
.zdsproj. It is added automatically.
Select to return to the New Project dialog box.
.zdsproj). You do not have to type the extension
.zdsproj exten-
6.In the
7.In the
8.In the
UM013037-1212Create a New Project
Project Type field, select Standard because the sample project uses .c files.
CPU Family drop-down list box, select Z8Encore_XP_F1680_Series_16K.
CPU drop-down list box, select Z8F1680XJ.
Zilog Developer Studio II – Z8 Encore!
User Manual
12
9.In the Build Type drop-down list box, select Executable to build an application.
Figure 3. New Project Dialog Box
10. Click
Continue. The New Project Wizard dialog box is displayed. It allows you to
modify the initial values for some of the project settings during the project creation
process.
Figure 4. New Project Wizard Dialog Box, Build Options Step
Getting StartedUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
11. Accept the defaults by clicking Next. The Target and Debug Tool Selection step of
New Project Wizard dialog box is displayed.
the
13
The options displayed in the
selected in the
General page of the Project Settings dialog box (see the General Page section on
the
New Project dialog box (see the New Project section on page 49) or
Configure Target dialog box depend on the CPU you
page 69). For this tutorial project, there are two targets displayed.
Z8F16800128ZCOG is the Z8F1680 28-Pin Development Kit’s evaluation board;
Z8F16800144ZCOG is the Z8F1680 Dual 44-Pin Development Kit’s evaluation
board. For more information about which products each target supports, see the Z8
Encore! Product Support section on page 3.
Clicking
Configure Target dialog box allows you to select the clock source and the appropriate
Setup in the Target area displays the Configure Target dialog box. The
clock frequency. For the emulator, this frequency must match the clock oscillator on
Y4. For the development kit, this frequency must match the clock oscillator on Y1.
For more information about configuring the target, see the Setup
section on page 111.
For details about the available debug tools and how to configure them, see the Debug
Tool section on page 114.
12. Select the
Z8F16800128ZCOG checkbox.
Figure 5. New Project Wizard Dialog Box, Target and Debug Tool Selection Step
UM013037-1212Create a New Project
Zilog Developer Studio II – Z8 Encore!
User Manual
14
13. Click Next.
The Target Memory Configuration step of the
played.
Project Workspace window (Standard Project Files and External Dependencies) on
sample. Two empty folders are displayed in the
the left side of the integrated development environment (IDE).
Add a File to the Project
In this section, you add the provided C source file main.c file to the sample project.
1.From the
played.
Getting StartedUM013037-1212
Project menu, select Add Files. The Add Files to Project dialog box is dis-
Zilog Developer Studio II – Z8 Encore!
User Manual
15
Figure 7. Add Files to Project Dialog Box
2.In the Add Files to Project dialog box, use the Look In drop-down list box to navi-
gate to the tutorial directory:
<ZDS Installation Directory>\samples\Tutorial
3.Select the main.c file and click Add.
The
main.c file is displayed under the Standard Project Files folder in the Project
Workspace
window on the left side of the IDE.
UM013037-1212Add a File to the Project
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
16
Figure 8. Sample Project
To view any of the files in the Edit window during the quick tour, double-click the file in
the Project Workspace window.
Set Up the Project
Before you save and build the sample project, check the settings in the Project Settings
dialog box.
1.From the
played. It provides various project configuration pages that can be accessed by selecting the page name in the pane on the left side of the dialog box. There are several
Getting StartedUM013037-1212
Project menu, select Settings. The Project Settings dialog box is dis-
Zilog Developer Studio II – Z8 Encore!
User Manual
pages grouped together for the C (Compiler) and Linker that allow you to set up subsettings for those tools. For more information, see the Settings
section on page 68.
17
2.In the
Configuration drop-down list box, make sure that the Debug build configura-
tion is selected. For your convenience, the Debug configuration is a predefined configuration of defaults set for debugging. For more information about project
configurations such as adding your own configuration , se e the Set Active Configura-
tion section on page 118.
Figure 9. General Page of the Project Settings Dialog Box
3.Select the
4.Make sure that the
UM013037-1212Set Up the Project
Assembler page.
Generate Assembly Listing Files (.lst) checkbox is selected.
Zilog Developer Studio II – Z8 Encore!
User Manual
18
Figure 10. Assembler Page of the Project Settings Dialog Box
5.Select the Code Generation page.
6.Make sure that the
Getting StartedUM013037-1212
Limit Optimizations for Easier Debugging checkbox is selected.
Zilog Developer Studio II – Z8 Encore!
User Manual
19
Figure 11. Code Ge neration Page of the Project Settings Dialog Box
7.Select the Advanced page.
8.Make certain that the
UM013037-1212Set Up the Project
Generate Printfs Inline checkbox is selected.
Zilog Developer Studio II – Z8 Encore!
User Manual
20
Figure 12. Advanced Page of the Project Settings Dialog Box
9.Select the Output page.
10. Make certain that both the IEEE 695 and Intel Hex32 - Records checkboxes are
selected.
Getting StartedUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
21
Figure 13. Output Page of the Project Settings Dialog Box
The executable format defaults to IEEE 695 when you create an executable project
.lod). T o change the executable format, see the Linker: Output Page section on page
(
107.
11. Click
OK to save all of the settings on the Project Settings dialog box.
The Development Environment prompts you to build the project when changes are
made to the project settings that would effect the resulting build program. The message is as follows: “
build. Would you like to rebuild the affected files?
12. Click
Yes to build the project.
The developer’s environment builds the
13. Watch the compilation process in the
UM013037-1212Set Up the Project
The project settings have changed since the last
”
sample project.
Build Output window.
Zilog Developer Studio II – Z8 Encore!
User Manual
22
Figure 14. Build Output Window
When the Build completed message is displayed in the Build Output window, you
have successfully built the sample project and created a
sample.lod file to debug.
Save the Project
You must save your project. From the File menu, select Save Project.
Getting StartedUM013037-1212
Zilog Developer Studio II – Z8 Encore!
Using the Integrated Development
Environment
The following sections discuss how to use the integrated development environment (IDE):
•
Toolbars – see page 24
•
Windows – see page 38
•
Menu Bar – see page 47
•
Shortcut Keys – see page 146
To effectively understand how to use the developer’s environment, be sure to go through
the tutorial in the Getting Started
section on page 9.
User Manual
23
After the discussion of the toolbars and windows, this section discusses the menu bar from
left to right – File, Edit, View, Project, Build, Debug, Tools, Window, and Help – and the
dialog boxes accessed from the menus. For example, the
discussed as a part of the Project menu section.
Project Settings dialog box is
UM013037-1212Using the Integrated Development Environment
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
24
Toolbars
Figure 15. Z8 Encore! Integrated Development Environment Window
For a table of all of the shortcuts used in the Z8 Encore! developer’s environment, see the
Shortcut Keys
The toolbars give you quick access to most features of the Z8 Encore! developer’s environment. You can use these buttons to perform any task.
There are cue cards for the toolbars. As you move the mouse pointer across the toolbars,
the main function of the button is displayed. Also, you can drag and move the toolbars to
different areas on the screen.
The following toolbars are available:
•
File Toolbar – see page 25
section on page 146.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
•
Build Toolbar – see page 26
•
Find Toolbar – see page 30
•
Command Processor Toolbar – see page 31
•
Bookmarks Toolbar – see page 32
•
Debug Toolbar – see page 32
•
Debug Windows Toolbar – see page 36
For more information about Debugging, see the Using the Debugger section on page 385.
File Toolbar
25
The File toolbar allows you to perform basic functions with your files u sing the foll owing
buttons:
•
New Button – see page 25
•
Open Button – see page 26
•
Save Button – see page 26
•
Save All Button – see page 26
•
Cut Button – see page 26
•
Copy Button – see page 26
•
Paste Button – see page 26
•
Delete Button – see page 26
•
Print Button – see page 26
•
Workspace Window Button – see page 26
•
Output Window Button – see page 26
Figure 16. File Toolbar
New Button
The New button creates a new file.
UM013037-1212File Too lbar
Zilog Developer Studio II – Z8 Encore!
User Manual
26
Open Button
The Open button opens an existing file.
Save Button
The Save button saves the active file.
Save All Button
The Save All button saves all open files and the currently loaded project.
Cut Button
The Cut button deletes selected text from the active file and puts it on the Windows clipboard.
Copy Button
The Copy button copies selected text from the active file and puts it on the Windows clipboard.
Paste Button
The Paste button pastes the current contents of the clipboard into the active file at the current cursor position.
Delete Button
The Delete button deletes selected text from the active file.
Print Button
The Print button prints the active file.
Workspace Window Button
The Workspace Window button shows or hides the Project Workspace window.
Output Window Button
The Output Window button shows or hides the Output window.
Build Toolbar
The Build toolbar allows you to build your project, set breakpoints, and select a project
configuration with the following controls and buttons:
•
Select Build Configuration List Box – see page 27
Using the Integrated Development EnvironmentUM013037-1212
•
Compile/Assemble File Button – see page 27
•
Build Button – see page 27
•
Rebuild All Button – see page 27
•
Stop Build Button – see page 27
•
Connect to Target Button – see page 28
•
Download Code Button – see page 28
•
Reset Button – see page 34
•
Go Button – see page 29
•
Insert/Remove Breakpoint Button – see page 30
•
Enable/Disable Breakpoint Button – see page 30
Zilog Developer Studio II – Z8 Encore!
User Manual
27
•
Remove All Breakpoints Button – see page 30
Figure 17. Build Toolbar
Select Build Configuration List Box
The Select Build Configuration drop-down list box lets you activate the build configuration for your project. See the Set Active Configuration
mation.
Compile/Assemble File Button
The Compile/Assemble File button compiles or assembles the active source file.
Build Button
The Build button builds your project by compiling and/or assembling any files that have
changed since the last build and then links the project.
Rebuild All Button
section on page 118 for more infor -
The Rebuild All button rebuilds all files and links the project.
Stop Build Button
The Stop Build button stops a build in progress.
UM013037-1212Build Toolbar
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
28
Connect to Target Button
The Connect to Target button starts a debug ses sion using the following process:
1.Initializes the communication to the target hardware.
2.Resets the device.
3.Configures the device using the settings in the
4.Configures and executes the debugger options selected in the
Options dialog box. The following options are ignored if selected:
Reset to Symbol 'main' (Where Applicable) checkbox
–
–
Verify File Downloads – Read After Write checkbox
–
Verify File Downloads – Upon Completion checkbox
Configure Target dialog box.
Debugger tab of the
This button does not download the software. Use this button to access target registers,
memory, and so on without loading new code or to avoid overwriting the target’s code
with the same code. This button is not enabled when the target is the simulator. This button
is available only when not in
Debug mode.
For the Serial Smart Cable, ZDS II performs an on-chip debugger reset and resets the CPU
at the vector reset location.
Download Code Button
The Download Code button downloads the executable file for the currently open project
to the target for debugging. The button also initializes the communication to the target
hardware if it has not been done yet. Starting in version 4.10.0, the
ton can also program Flash memory. A page erase is done instead of a mass erase for both
internal and external Flash memory. Use this button anytime during a debug session. This
button is not enabled when the target is the simulator.
Download Code but-
The current code on the target is overwritten.
If ZDS II is not in
Debug mode when the Download Code button is clicked, the following
process is executed:
1.Initializes the communication to the target hardware.
2.Resets the device with a hardware reset by driving pin #2 of the debug header low.
3.Configures the device using the settings in the
Configure Target dialog box.
4.Downloads the program.
5.Issues a software reset through the debug header serial interface.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
6.Configures and executes the debugger options selected in the Debugger tab of the
Options dialog box. If it is a C project, ZDS II resets to the main function if it is
found.
29
If ZDS II is already in
Debug mode when the Download Code button is clicked, the fol-
lowing process is executed:
1.Resets the device using a software reset.
2.Downloads the program.
You might need to reset the device before execution because the program counter might
have been changed after the download.
Reset Button
Click the Reset button in the Build or Debug toolbar to reset the program counter to the
beginning of the program.
If ZDS II is not in
ing process:
1.Initializes the communication to the target hardware.
2.Resets the device.
3.Configures the device using the settings in the
4.Downloads the program.
5.Configures and executes the debugger options selected in the
Options dialog box. If it is a C project, ZDS II resets to the main function if it is
found.
Debug mode, the Reset button starts a debug session using the follow-
Configure Target dialog box.
Debugger tab of the
If ZDS II is already in
Debug mode, the Reset button uses the following process:
1.ZDS II performs a hardware reset.
2.Configures the device using the settings in the
Configure Target dialog box.
3.If files have been modified, ZDS II asks, “Would you like to rebuild the project?”
before downloading the modified program. If there has been no file modification, the
code is not reloaded.
For the Serial Smart Cable, ZDS II performs an on-chip debugger reset.
Go Button
Click the Go button to execute project code from the current program counter.
If not in
1.Initializes the communication to the target hardware.
2.Resets the device.
UM013037-1212Build Toolbar
Debug mode when the Go button is clicked, the following process is executed:
Zilog Developer Studio II – Z8 Encore!
User Manual
30
3.Configures the device using the settings in the Configure Target dialog box.
4.Downloads the program.
5.Configures and executes the debugger options selected in the
Options dialog box. If it is a C project, ZDS II resets to the main function if it is
found.
6.Executes the program from the reset location.
Debugger tab of the
Insert/Remove Breakpoint Button
The Insert/Remove Breakpoint button sets a new breakpoint or removes an existing breakpoint at the line containing the cursor in the active file or the
breakpoint must be placed on a valid code line (a C source line with a blue dot displayed
in the gutter or any instruction line in the
about breakpoints, see the Using Breakpoints
Disassembly window). For more information
section on page 404.
Disassembly window. A
Enable/Disable Breakpoint Button
The Enable/Disable Breakpoint button activates or deactivates the existing breakpoint at
the line containing the cursor in the active file or the
indicates an enabled breakpoint; a white octagon indicates a disabled breakpoint. For more
information about breakpoints, see the Using Breakpoints
Disassembly window . A red octagon
section on page 404.
Remove All Breakpoints Button
The Remove All Breakpoints button deletes all breakpoints in the currently loaded project.
To deactivate breakpoints in your program, use the Disable All Breakpoints button.
Find Toolbar
The Find toolbar provides access to text search functions with the following controls:
•
Find in Files Button – see page 30
•
Find Field – see page 31
Figure 18. Find Toolbar
Find in Files Button
This button opens the Find in Files dialog box, allowing you to search for text in multiple
files.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
Find Field
T o locate text in the active file, enter the text in the Find field and press the Enter key. The
search term is highlighted in the file. To search again, press the
Enter key again.
Command Processor Toolbar
The Command Processor toolbar allows you to execute IDE and debugger commands
with the following controls:
•
Run Command Button – see page 31
•
Stop Command Button – see page 31
•
Command Field – see page 31
31
Figure 19. Command Processor Toolbar
See the Supported Script File Commands
mands.
section on page 495 for a list of supported com-
Run Command Button
The Run Command button executes the command in the Command field. Output from
the execution of the command is displayed in the
Command tab of the Output window.
Stop Command Button
The Stop Command button stops any currently running commands.
Command Field
The Command field allows you to enter a new command. Click the Run Command button or press the
mand is displayed in the
To modify the width of the
1.Select
2.Click in the
Enter key to execute the command. Output from the execution of the com-
Command tab of the Output window.
Command field, perform the following tasks:
Customize from the Tools menu.
Command field. A hatched rectangle highlights the Command field.
3.Use your mouse to select and drag the side of the hatched rectangle. The new size of
Command field is saved with the project settings.
the
UM013037-1212Command Processor Toolbar
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
32
Bookmarks Toolbar
The Bookmarks toolbar allows you to set, remove, and find bookmarks with the following buttons:
•
Set Bookmark Button – see page 32
•
Next Bookmark Button – see page 32
•
Previous Bookmark Button – see page 32
•
Delete Bookmarks Button – see page 32
Figure 20. Bookmarks Toolbar
This toolbar is not displayed in the default IDE window.
Set Bookmark Button
Click the Set Bookmark button to insert a bookmark in the active file for the line at which
your cursor is located.
Next Bookmark Button
Click the Next Bookmark button to position the cursor at the line at which the next bookmark in the active file is located.
Previous Bookmark Button
Click the Previous Bookmark button to position the cursor at the line at which the next
bookmark in the active file is located.
Delete Bookmarks Button
Click the Delete Bookmarks button to remove all of the bookmarks in the currently loaded
project.
Debug Toolbar
The Debug toolbar allows you to perform debugger functions with the followi ng buttons:
•
Download Code Button – see page 33
Using the Integrated Development EnvironmentUM013037-1212
•
Note:
Verify Download Button – see page 34
•
Reset Button – see page 34
•
Stop Debugging Button – see page 35
•
Go Button – see page 35
•
Run to Cursor Button – see page 35
•
Break Button – see page 35
•
Step Into Button – see page 35
•
Step Over Button – see page 36
•
Step Out Button – see page 36
•
Set Next Instruction Button – see page 36
Zilog Developer Studio II – Z8 Encore!
User Manual
33
•
Insert/Remove Breakpoint Button – see page 30
•
Enable/Disable Breakpoint Button – see page 30
•
Disable All Breakpoints Button – see page 36
•
Remove All Breakpoints Button – see page 36
Figure 21. The Debug Toolbar
Download Code Button
The Download Code button downloads the executable file for the currently open project
to the target for debugging. The button also initializes the communication to the target
hardware if it has not been done yet. Starting in version 4.10.0, the
ton can also program Flash memory. A page erase is done instead of a mass erase for both
internal and external Flash memory. Use this button anytime during a debug session. This
button is not enabled when the target is the simulator.
The current code on the target is overwritten.
Download Code but-
If ZDS II is not in
process is executed:
1.Initializes the communication to the target hardware.
2.Resets the device with a hardware reset by driving pin #2 of the debug header low.
UM013037-1212Debug Toolbar
Debug mode when the Download Code button is clicked, the following
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
34
3.Configures the device using the settings in the Configure Target dialog box.
4.Downloads the program.
5.Issues a software reset through the debug header serial interface.
6.Configures and executes the debugger options selected in the
Options dialog box. If it is a C project, ZDS II resets to the main function if it is
Debugger tab of the
found.
If ZDS II is already in
Debug mode when the Download Code button is clicked, the fol-
lowing process is executed:
1.Resets the device using a software reset.
2.Downloads the program.
You might need to reset the device before execution because the program counter might
have been changed after the download.
Verify Download Button
The Verify Download button determines download correctness by comparing executable
file contents to target memory.
Reset Button
Click the Reset button in the Build or Debug toolbar to reset the program counter to the
beginning of the program.
If ZDS II is not in
Debug mode, the Reset button starts a debug session using the follow-
ing process:
1.Initializes the communication to the target hardware.
2.Resets the device.
3.Configures the device using the settings in the
Configure Target dialog box.
4.Downloads the program.
5.Configures and executes the debugger options selected in the
Options dialog box. If it is a C project, ZDS II resets to the main function if it is
Debugger tab of the
found.
If ZDS II is already in
Debug mode, the Reset button uses the following process:
1.ZDS II performs a hardware reset.
2.Configures the device using the settings in the
Using the Integrated Development EnvironmentUM013037-1212
Configure Target dialog box.
Zilog Developer Studio II – Z8 Encore!
User Manual
3.If files have been modified, ZDS II asks, “Would you like to rebuild the project?”
before downloading the modified program. If there has been no file modification, the
code is not reloaded.
For the Serial Smart Cable, ZDS II performs an on-chip debugger reset.
Stop Debugging Button
The Stop Debugging button ends the current debug session.
35
To stop program execution, click the
Break button.
Go Button
Click the Go button to execute project code from the current program counter.
If not in
Debug mode when the Go button is clicked, the following process is executed:
1.Initializes the communication to the target hardware.
2.Resets the device.
3.Configures the device using the settings in the
Configure Target dialog box.
4.Downloads the program.
5.Configures and executes the debugger options selected in the
Options dialog box. If it is a C project, ZDS II resets to the main function if it is
Debugger tab of the
found.
6.Executes the program from the reset location.
Run to Cursor Button
The Run to Cursor button executes the program code from the current program counter to
the line containing the cursor in the active file or the
must be placed on a valid code line (a C source line with a blue dot displayed in the gutter
or any instruction line in the
Disassembly window).
Disassembly window. The cursor
Break Button
The Break button stops program execution at the current program counter.
Step Into Button
The Step Into button executes one statement or instruction from the current program
counter, following the execution into function calls. When complete, the program counter
resides at the next program statement or instruction unless a function was entered, in
which case the program counter resides at the first statement or instruction in the function.
UM013037-1212Debug Toolbar
Zilog Developer Studio II – Z8 Encore!
User Manual
36
Step Over Button
The Step Over button executes one statement or instruction from the current program
counter without following the execution into function calls. When complete, the program
counter resides at the next program statement or instruction.
Step Out Button
The Step Out button executes the remaining statements or instructions in the current function and returns to the statement or instruction following the call to the current function.
Set Next Instruction Button
The Set Next Instruction button sets the program counter to the line containing the cursor
in the active file or the
Insert/Remove Breakpoint Button
Disassembly window.
The Insert/Remove Breakpoint button sets a new breakpoint or removes an existing
breakpoint at the line containing the cursor in the active file or the
A breakpoint must be placed on a valid code li ne (a C source line with a blue dot displayed
in the gutter or any instruction line in the
about breakpoints, see the Using Breakpoints
Disassembly window). For more information
section on page 404.
Disassembly window.
Enable/Disable Breakpoint Button
The Enable/Disable Breakpoint button activates or deactivates the existing breakpoint at
the line containing the cursor in the active file or the
indicates an enabled breakpoint; a white octagon indicates a disabled breakpoint. For more
information about breakpoints, see the Using Breakpoints
Disassembly window . A red octagon
section on page 404.
Disable All Breakpoints Button
The Disable All Breakpoints button deactivates all breakpoints in the currently loaded
project. To delete breakpoints from your program, use the
ton.
Remove All Breakpoints but-
Remove All Breakpoints Button
The Remove All Breakpoints button deletes all breakpoints in the currently loaded project. To deactivate breakpoints in your program, use the
Disable All Breakpoints button.
Debug Windows Toolbar
The Debug Windows toolbar allows you to display the Debug windows with the following buttons:
•
Registers Window Button – see page 37
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
•
Special Function Registers Window Button – see page 37
•
Clock Window Button – see page 37
•
Memory Window Button – see page 37
•
Watch Window Button – see page 37
•
Locals Window Button – see page 38
•
Call Stack Window Button – see page 38
•
Symbols Window Button – see page 38
•
Disassembly Window Button – see page 38
•
Simulated UART Output Window Button – see page 38
User Manual
37
Figure 22. Debug Windows Toolbar
Registers Window Button
The Registers Window button displays or hides the Registers window. This window is
described in the Registers Window
section on page 388.
Special Function Registers Window Button
The Special Function Registers Wind ow button displays or hides the Special Fu nction
Registers
section on page 389.
window. This window is described in the Special Function Registers Window
Clock Window Button
The Clock Window button displays or hides the Clock window . This window is described
in the Clock Window
section on page 390.
Memory Window Button
The Memory Window button displays or hides the Memory window. This window is
described in the Memory Window
section on page 391.
Watch Window Button
The Watch Window button displays or hides the Watch window. This window is
described in the Watch Window
UM013037-1212Debug Windows Toolbar
section on page 397.
Zilog Developer Studio II – Z8 Encore!
User Manual
38
Locals Window Button
The Locals Window button displays or hides the Locals window. This window is
described in the Locals Window
Call Stack Window Button
The Call Stack Window button displays or hides the Call Stack window. This window is
described in the Call Stack Window
Symbols Window Button
The Symbols Window button displays or hides the Symbols window. This window is
described in the Symbols Window
Disassembly Window Button
section on page 399.
section on page 400.
section on page 401.
Windows
Project Workspace Window
The Disassembly Window button displays or hides the Disassembly window. This win-
dow is described in the Disassembly Window
section on page 402.
Simulated UART Output Window Button
The Simulated UART Output Window button displays or hides the Simulated UART
Output
tion on page 403.
The following ZDS II windows allow you to see various aspects of the tools while working
with your project:
•
•
•
The Project Workspace window on the left side of the developer’s environment allows
you to view your project files.
window. This window is described in the Simulated UART Output Window sec-
Project Workspace Window – see page 38
Edit Window – see page 40
Output Windows – see page 44
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
39
Figure 23. Project Workspace Window for Standard Projects
Figure 24. Project Workspace Window for Assembly Only Projects
The Project Workspace window provides access to related functions using context
menus. To access context menus, right-click a file or folder in the window. Depending on
UM013037-1212Project Workspace Window
Zilog Developer Studio II – Z8 Encore!
User Manual
40
which file or folder is highlighted, the context menu allows you to perform the following
tasks:
•
Dock the Project Workspace window
•
Hide the Project Workspace window
•
Add files to the project
•
Remove the highlighted file from the project
•
Build project files or external dependencies
•
Assemble or compile the highlighted file
•
Undock the Project Workspace window, allowing it to float in the Edit window
Edit Window
The Edit window on the right side of the developer’s environment allows you to edit the
files in your project.
Figure 25. Edit Window
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
The Edit window supports the shortcuts listed in Table 35.
Table 35. Edit Window Shortcuts
ShortcutsFunction
Ctrl + ZUndo
Ctrl + YRedo
Ctrl + XCut
Ctrl + CCopy
Ctrl + VPaste
Ctrl + FFind
F3Repeat the previous search
Ctrl + GGo to
Ctrl + E
Ctrl + ]
Go to matching { or }.
Place your cursor at the right or left of an
opening or closing brace and press Ctrl + E
or Ctrl +] to move the cursor to the matching
opening or closing brace.
User Manual
41
This section covers the following topics:
•
Using the Context Menus – see page 41
•
Using Bookmarks – see page 42
Using the Context Menus
There are two context menus in the Edit window, depending on where you click. When
you right-click in a file, the context menu allows you to perform the following actions
(depending on whether you are running in
•
Cut, copy, and paste text
•
Show white space
•
Go to the Disassembly window
•
Show the program counter
•
Insert, edit, enable, disable, or remove breakpoints
•
Reset the debugger
•
Stop debugging
•
Start or continue running the program (Go)
•
Run to the cursor
Debug mode):
UM013037-1212Edit Window
Zilog Developer Studio II – Z8 Encore!
User Manual
42
•
Pause the debugging (Break)
•
Step into, over, or out of program instructions
•
Set the next instruction at the current line
•
Insert or remove bookmarks (see the Using Bookmarks section on page 42)
When you right-click outside of all files, the context menu allows you to perform the following tasks:
•
Show or hide the output windows, Project Workspace window, status bar, File tool-
Workbook mode, each open file has an associated tab along the bottom of
Edit windows area.
Using Bookmarks
A bookmark is a marker that identifies a position within a file. Bookmarks appear as cyan
boxes in the gutter portion (left) of the file window. The cursor can be quickly positioned
on a lines containing bookmarks.
Figure 26. Bookmark Example
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
To insert a bookmark, position the cursor on the appropriate line of the active file and perform one of the following actions:
•
Right-click in the Edit window and select Insert Bookmark from the resulting context
menu.
•
Select Toggle Bookmark from the Edit menu.
•
Type Ctrl+F2.
43
Figure 27. Inserting a Bookmark
To remove a bookmark, position the cursor on the line of the active file containing the
bookmark to be removed and perform one of the following actions:
•
Right-click in the Edit window and select Remove Bookmark from the resulting context menu.
•
Select Toggle Bookmark from the Edit menu.
UM013037-1212Edit Window
Zilog Developer Studio II – Z8 Encore!
User Manual
44
•
Type Ctrl+F2.
To remove all bookmarks in the active file, right-click in the
Remove Bookmarks from the resulting context menu.
To remove all bookmarks in the current project, select
Edit menu.
T o position the cursor at the next bookmark in the active file, perform one of the following
actions:
•
Right-click in the Edit window and select Next Bookmark from the resulting context
menu.
•
Select Next Bookmark from the Edit menu.
•
Press the F2 key.
The cursor moves forward through the file, starting at its current position and begin-
ning again when the end of file is reached, until a bookmark is encountered. If no
bookmarks are set in the active file, this function has no effect.
To position the cursor at the previous bookmark in the active file, perform one of the following actions:
•
Right-click in the Edit window and select Previous Bookmark from the resulting
context menu.
•
Select Previous Bookmark from the Edit menu.
Edit window and select
Remove All Bookmarks from the
•
Press Shift+F2.
The cursor moves backwards through the file, starting at its current position and start-
ing again at the end of the file when the file beginning is reached, until a bookmark is
encountered. If no bookmarks are set in the active file, this function has no effect.
Output Windows
The Output windows display output, errors, and other feedback from various components
of the Integrated Development Environment.
Select one of the tabs at the bottom of the
Output windows:
•
Build Output Window – see page 45
•
Debug Output Window – see page 45
•
Find in Files Output Windows – see page 45
•
Message Output Window – see page 46
•
Command Output Window – see page 46
Using the Integrated Development EnvironmentUM013037-1212
Output window to select one of following the
Zilog Developer Studio II – Z8 Encore!
User Manual
To dock the Output window with another window, click and hold the window’s grip bar
and then move the window.
Double-click the window’s grip bar to cause it to become a floating window.
Double-click the floating window’s title bar to change it to a dockable window.
45
Use the context menu to copy text from or to delete all text in the
Output window.
Build Output Window
The Build Output window holds all text messages generated by the compiler, assembler,
librarian, and linker, including error and warning messages.
Figure 28. Build Output Window
Debug Output Window
The Debug Output window holds all text messages generated by the debugger while you
Debug mode. The Debug Output window also displays the chip revision identifier
are in
and the Smart Cable firmware version.
Figure 29. Debug Output Window
Find in Files Output Windows
The two Find in Files Output windows display the results of the Find in Files command
(available from the
when the
Find in Files
UM013037-1212Output Windows
Output to Pane 2 checkbox is selected in the Find in File dialog box (see the
section on page 60).
Edit menu and the Find toolbar). The File in Files 2 window is used
Zilog Developer Studio II – Z8 Encore!
User Manual
46
Figure 30. Find in Files Output Window
Figure 31. Find in Files 2 Output Window
Message Output Window
The Message Output window holds informational messages intended for the user. The
Message Output window is activated (given focus) when error messages are added to the
window’s display. Warning and informational messages do not automatically activate the
Message Output window .
Figure 32. Message Output Window
Command Output Window
The Command Output window holds the output from the execution of commands.
Using the Integrated Development EnvironmentUM013037-1212
Menu Bar
Zilog Developer Studio II – Z8 Encore!
User Manual
47
Figure 33. Command Output Window
The menu bar lists menu items that you use in the Z8 Encore! developer’s environment.
Each menu bar item, when selected, displays a list of selection items. If an option on a
menu item ends with an ellipsis (...), selecting the option displays a dialog box. The following items are listed on the menu bar:
•
File Menu – see page 47
•
Edit Menu – see page 57
•
Vi ew Menu – see page 65
•
Project Menu – see page 66
•
Build Menu – see page 117
•
Debug Menu – see page 121
•
Tools Menu – see page 125
•
Window Menu – see page 145
•
Help Menu – see page 145
File Menu
The File menu enables you to perform basic commands in the developer’s environment:
•
New File – see page 48
•
Open File – see page 48
•
Close File – see page 49
•
New Project – see page 49
•
Open Project – see page 53
•
Save Project – see page 54
•
Close Project – see page 55
UM013037-1212Menu Bar
Zilog Developer Studio II – Z8 Encore!
User Manual
48
•
Save – see page 55
•
Save As – see page 55
•
Save All – see page 56
•
Print – see page 56
•
Print Preview – see page 56
•
Print Setup – see page 57
•
Recent Files – see page 57
•
Recent Projects – see page 57
•
Exit – see page 57
New File
Select New File from the File menu to create a new file in the Edit window.
Open File
Select Open File from the File menu to display the Open dialog box, which allows you to
open the files for your project.
Figure 34. Open Dialog Box
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
To delete a file from your project, use the Open Project dialog box. Highlight the file and
press the Delete key. Answer the prompt accordingly.
Close File
Select Close File from the File menu to close the selected file.
New Project
To create a new project, perform the following tasks:
49
1.Select
2.From the
New Project from the File menu. The New Project dialog box is displayed.
Figure 35. New Project Dialog Box
New Project dialog box, click the Browse button () to navigate to the
directory in which you want to save your project. The
box is displayed.
Select Project Name dialog
UM013037-1212File Menu
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
50
Figure 36. Select Project Name Dialog Box
3.Use the Look In drop-down list box to navigate to the directory in which you want to
save your project.
4.In the
File Name field, enter the name of your project. You do not have to type the
extension
.zdsproj. The extension is added automatically.
The following characters cannot be used in a project name: ( ) $ , . - + [ ] ' &
5.Click
6.In the
Select to return to the New Project dialog box.
Project Type field, select Standard for a project that will include C language
source code. Select
Assembly Only for a project that will include only assembly
source code.
7.In the
8.In the
9.In the
CPU Family drop-down list box, select a product family.
CPU drop-down list box, select a CPU.
Build Type drop-down list box, select Executable to build an application or
select
Static Library to build a static library.
The default is
more information, see the Linker: Output Page
Executable, which creates an IEEE 695 executable format (.lod). For
section on page 107.
10. Click
Using the Integrated Development EnvironmentUM013037-1212
Continue to change the default project settings using the New Project Wizard.
To accept all default settings, click
Finish.
For static libraries, click Finish.
Note:
Zilog Developer Studio II – Z8 Encore!
User Manual
51
For a Standard project, the
New Project Wizard dialog box is displayed. For Assem-
bly-Only executable projects, continue to step 12.
Figure 37. New Project Dialog Box, Build Options
11. Select whether your project is linked to the standard C start-up module, C run-time
library, and floating-point library; select a small or large memory model (see the
Memory Models
section on page 199); select static or dynamic frames (see the Call
Frames section on page 200); and click Next.
For executable projects, the Target and Debug T ool Selection step of the
Wizard
UM013037-1212File Menu
dialog box is displayed.
New Project
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
52
Figure 38. New Project Wizard Dialog Box, Target and Debug Tool Selection
12. Select the Use Page Erase Before Flashing checkbox if you want the internal Flash
to be page-erased. Deselect this checkbox if you want the internal Flash to be masserased.
13. Select the appropriate target from the Target list box.
14. Click
Setup in the Target area. Refer to the Setup section on page 111 for details on
configuring a target.
Click Add to create a new target (see the Add section on page 112) or click Copy to copy
an existing target (see the Copy section on page 113).
15. Select the appropriate debug tool and (if you have not selected the Simulator) click
Setup in the Debug Tool area. Refer to the Debug Tool section on page 114 for
details about the available debug tools and how to configure them.
16. Click
Next. The Tar get Memory Configuration step of the New Project Wizard dialog
box is displayed.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
53
Figure 39. New Project Wizard Dialog Box, Target Memory Configuration
17. Enter the memory ranges appropriate for the target CPU.
18. Click
Finish.
Open Project
To open an existing project, use the following procedure:
1.Select
Open Project from the File menu. The Open Project dialog box is displayed.
UM013037-1212File Menu
Zilog Developer Studio II – Z8 Encore!
Notes:
Note:
User Manual
54
Figure 40. Open Project Dialog Box
2.Use the Look In drop-down list box to navigate to the appropriate directory in which
your project is located.
3.Select the project to be opened.
4.Click
Open to open to open your project.
T o quickly open a project you were working in recently , see the Recent Projects section on
page 57.
To delete a project file, use the
Open Project dialog box. Highlight the file and press the
Delete key. Answer the prompt accordingly.
Save Project
Select Save Project from the File menu to save the currently active project. By default,
project files and configuration information are saved in a file named <project name>
.zdsproj. An alternate file extension is used if provided when the project is cre-
ated.
The <project name>.zdsproj.file contains all project data. If deleted, the project is no
longer available.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
If the Save/Restore Project Workspace checkbox is selected (see the Options: General
Tab section on page 137), a file named <project name>.wsp is also created or updated
with workspace information such as window locations and bookmark details. The
.wsp
file supplements the project information. If it is deleted, the last known workspace data is
lost, but this does not affect or harm the project.
Close Project
Select Close Project from the File menu to close the currently active project.
Save
Select Save from the File menu to save the active file.
Save As
To save a selected file with a new name, perform the following steps:
55
1.Select
2.Use the
Save As from the File menu. The Save As dialog box is displayed.
Figure 41. Save As Dialog Box
Save In drop-down list box to navigate to the appropriate folder.
3.Enter the new file name in the
File Name field.
4.Use the
5.Click
UM013037-1212File Menu
Save as Type drop-down list box to select the file type.
Save. A copy of the file is saved with the name you entered.
Zilog Developer Studio II – Z8 Encore!
User Manual
56
Save All
Select Save All from the File menu to save all open files and the currently loaded project.
Print
Select Print from the File menu to print the active file.
Print Preview
Select Print Preview from the File menu to display the file you want to print in Preview
mode in a new window.
1.In the
2.From the
Edit window, highlight the file you want to show a Print Preview.
File menu, select Print Preview. The file is shown in Print Preview in a new
window. As shown in Figure 42,
main.c is in Print Preview mode.
Figure 42. Print Preview Window
Using the Integrated Development EnvironmentUM013037-1212
3.To print the file, click Print.
Zilog Developer Studio II – Z8 Encore!
User Manual
57
To cancel the print preview, click
window.
Print Setup
Select Print Setup from the File menu to display the Print Setup dialog box, which
allows you to determine the printer’s setup before you print the file.
Recent Files
Select Recent Files from the File menu and then select a file from the resulting submenu
to open a recently opened file.
Recent Projects
Select Recent Projects from the File menu and then select a project file from the resulting submenu to quickly open a recently opened project.
Exit
Select Exit from the File menu to exit the application.
Close. The file returns to its edit mode in the Edit
Edit Menu
The Edit menu provides access to basic editing, text search, and breakpoint and bookmark
manipulation features. The following options are available:
•
Undo – see page 58
•
Redo – see page 58
•
Cut – see page 58
•
Copy – see page 58
•
Paste – see page 58
•
Delete – see page 58
•
Select All – see page 58
•
Show Whitespaces – see page 58
•
Find – see page 59
•
Find Again – see page 59
•
Find in Files – see page 60
•
Replace – see page 61
UM013037-1212Edit Menu
Zilog Developer Studio II – Z8 Encore!
User Manual
58
•
Go to Line – see page 61
•
Manage Breakpoints – see page 62
•
Manage Abbreviations – see page 63
•
Toggle Bookmark – see page 65
•
Next Bookmark – see page 65
•
Previous Bookmark – see page 65
•
Remove All Bookmarks – see page 65
Undo
Select Undo from the Edit menu to undo the last edit made to the active file.
Redo
Select Redo from the Edit menu to redo the last edit made to the active file.
Cut
Select Cut from the Edit menu to delete selected text from the active file and put it on the
Windows clipboard.
Copy
Select Copy from the Edit menu to copy selected text from the active file and put it on the
Windows clipboard.
Paste
Select Paste from the Edit menu to paste the current contents of the clipboard into the
active file at the current cursor position.
Delete
Select Delete from the Edit menu to delete selected text from the active file.
Select All
Choose Select All from the Edit menu to highlight all text in the active file.
Show Whitespaces
Select Show Whitespaces from the Edit menu to display all white-space characters such
as spaces and tabs in the active file.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
Note:
Find
To find text in the active file, use the following procedure:
User Manual
59
1.Select
2.Enter the text to search for in the
Find from the Edit menu. The Find dialog box is displayed.
Figure 43. Find Dialog Box
Find What field or select a recent entry from the
Find What drop-down list box. (By default, the currently selected text in a source file
or the text in which your cursor is located in a source file is displayed in the
What
field.)
3.Select the
Match Whole Word Only checkbox if you want to ignore the search text
when it occurs as part of longer words.
4.Select the
Match Case checkbox if you want the search to be case-sensitive
Find
5.Select the
6.Select the direction of the search with the
7.Click
Regular Expression checkbox if you want to use regular expressions.
Up or Down button.
Find Next to jump to the next occurrence of the search text or click Mark All to
display a cyan box next to each line containing the search text.
After clicking Find Next, the dialog box closes. You can press the F3 key or use the Find
Again
command to find the next occurrence of the search term without displaying the Find
dialog box again.
Find Again
Select Find Again from the Edit menu to continue searching in the active file for text previously entered in the
UM013037-1212Edit Menu
Find dialog box.
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
60
Find in Files
This function searches the contents of the files on disk; therefore, unsaved data in open
files are not searched.
To find text in multiple files, use the following procedure:
1.Select
2.Enter the text to search for in the
Find in Files from the Edit menu. The Find in Files dialog box is displayed.
Figure 44. Find in Files Dialog Box
Find field or select a recent entry from the Find
drop-down list box. (If you select text in a source file before displaying the
log box, the text is displayed in the
3.Select or enter the file type(s) to search for in the
Find field.)
In File Types drop-down list box.
Separate multiple file types with semicolons.
4.Use the
Browse button () or the In Folder drop-down list box to select the loca-
tion of the files that you want to search.
Find dia-
5.Select the
Match Whole Word Only checkbox if you want to ignore the search text
when it occurs as part of longer words.
6.Select the
7.Select the
8.Select the
Find in Files 2 Output window. If this button is not selected, the search results are
displayed in the
9.Click
Using the Integrated Development EnvironmentUM013037-1212
Match Case checkbox if you want the search to be case-sensitive.
Look in Subfolders checkbox if you want to search within subfolders.
Output to Pane 2 checkbox if you want the search results displayed in the
Find in Files Output window.
Find to start the search.
Zilog Developer Studio II – Z8 Encore!
Replace
To find and replace text in an active file, use the following procedure:
User Manual
61
1.Select
2.Enter the text to search for in the
Replace from the Edit menu. The Replace dialog box is displayed.
Figure 45. Replace Dialog Box
Find What field or select a recent entry from the
Find What drop-down list box. (By default, the currently selected text in a source file
or the text in which your cursor is located in a source file is displayed in the
What
field.)
3.Enter the replacement text in the
Replace With drop-down list box.
4.Select the
Match Whole Word Only checkbox if you want to ignore the search text
Replace With field or select a recent entry from the
when it occurs as part of longer words.
Find
5.Select the
6.Select the
Match Case checkbox if you want the search to be case-sensitive.
Regular Expression checkbox if you want to use regular expressions.
7.Select whether you want the text to be replaced in text currently selected or in the
whole file.
8.Click
Find Next to jump to the next occurrence of the search text and then click
Replace to replace the highlighted text or click Replace All to automatically replace
all instances of the search text.
Go to Line
To position the cursor at a specific line in the active file, select Go to Line from the Edit
menu to display the
UM013037-1212Edit Menu
Go to Line Number dialog box.
Zilog Developer Studio II – Z8 Encore!
User Manual
62
Enter the appropriate line number in the edit field and click Go To.
Manage Breakpoints
To view, go to, or remove breakpoints, select Manage Breakpoints from the Edit menu.
You can access the dialog box during
Figure 46. Go to Line Number Dialog Box
Debug mode and Edit mode.
Figure 47. Breakpoints Dialog Box
Breakpoints dialog box, shown in Figure 47, lists all existing breakpoints for the cur -
The
rently loaded project. A check mark in the box to the left of the breakpoint description
indicates that the breakpoint is enabled. The remainder of this section describes the actionable features of the
Breakpoints dialog.
Go to Code
To move the cursor to a particular breakpoint you have set in a file, highlight the breakpoint in the
Breakpoints dialog box and click Go to Code.
Enable All
To make all listed breakpoints active, click
Enable All. Individual breakpoints can be
enabled by clicking in the box to the left of the breakpoint description. Enabled breakpoints are indicated by a check mark in the box to the left of the breakpoint description.
Using the Integrated Development EnvironmentUM013037-1212
Disable All
Note:
Zilog Developer Studio II – Z8 Encore!
User Manual
63
To make all listed breakpoints inactive, click
Disable All. Individual breakpoints can be
disabled by clicking in the box to the left of the breakpoint description. Disabled breakpoints are indicated by an empty box to the left of the breakpoint description.
Remove
To delete a particular breakpoint, highlight the breakpoint in the
and click
Remove.
Breakpoints dialog box
Remove All
To delete all of the listed breakpoints, click
Remove All.
For more information about breakpoints, see the Using Breakpoints section on page 404.
Manage Abbreviations
An abbreviation is a shortened word that can be assigned to an expansion. An expansion
can be a single line of code, a code block or a comment section, such as a function/file
header, and can even be a combination of code and comments. To learn more, see the
Abbreviations and Expansions
T o manage abbreviations, select
viations
dialog box is displayed as shown in Figure 48. The remainder of this section
briefly describes the actionable features of the
section on page 161.
Manage Abbreviations from the Edit menu. The Abbre-
Manage Abbreviations dialog.
UM013037-1212Edit Menu
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
64
f
Figure 48. Abbreviations Dialog Box
Abbreviation
Select an abbreviation from the
abbreviation and expansion pair in the
Abbreviation: drop-down menu to display a current
Expansion: panel.
Add
Enter a new abbreviation in the
segment that you wish to associate with this abbreviation into the
Add button to add the new abbreviation and expansion pair to the list of current abbre-
the
Abbreviation: drop-down menu, then enter the entire code
Expansion: panel. Click
viations.
Insert In File
Click the
Insert In File button to add an abbreviation and expansion pair to your codeset.
The expansion text will be inserted into the active open file at the current cursor position.
Remove
Click the
Remove button to delete an abbreviation and expansion pair from the list of cur-
rent abbreviations.
You cannot restore an abbreviation after it is deleted.
Using the Integrated Development EnvironmentUM013037-1212
Save
Note:
Note:
Zilog Developer Studio II – Z8 Encore!
User Manual
65
Click the
rent abbreviations.
Close
Click the
Save button to save the new abbreviation and expansion pair to the list of cur-
Close button to close the dialog.
Toggle Bookmark
Select Toggle Bookmark from the Edit menu to insert a bookmark in the active file for
the line in which your cursor is located or to remove the bookmark for the line in which
your cursor is located.
Next Bookmark
Select Next Bookmark from the Edit menu to position the cursor at the line in which the
next bookmark in the active file is located.
The search for the next bookmark does not stop at the end of the file; the next bookmark
might be the first bookmark in the file.
Previous Bookmark
Select Previous Bookmark from the Edit menu to position the cursor at the line in which
the previous bookmark in the active file is located.
The search for the previous bookmark does not stop at the beginning of the file; the previous bookmark might be the last bookmark in the file.
Remove All Bookmarks
Select Remove All Bookmarks from the Edit menu to delete all of the bookmarks in the
currently loaded project.
View Menu
The V iew menu allows you to select the windows yo u want on the Z8 Encore! develo per’s
environment.
The View menu contains these options:
•
Debug Windows – see page 66
UM013037-1212View Menu
Zilog Developer Studio II – Z8 Encore!
User Manual
66
•
Workspace – see page 66
•
Output – see page 66
•
Stat us Bar – see page 66
Debug Windows
When you are in Debug mode (running the debugger), you can select any of the ten de bug
windows. From the
window.
The Debug Windows submenu contains the following elements:
•
Registers Window – see page 388
•
Special Function Registers Window – see page 389
•
Clock Window – see page 390
View menu, select Debug Windows and then the appropriate debug
•
Memory Window – see page 391
•
Watch Window – see page 397
•
Locals Window – see page 399
•
Call Stack Window – see page 400
•
Symbols Window – see page 401
•
Disassembly Window – see page 402
•
Simulated UART Output Window – see page 403
Workspace
Select Workspace from the View menu to display or hide the Project Workspace window.
Output
Select Output from the View menu to display or hide the Output windows.
Status Bar
Select Status Bar from the View menu to display or hide the status bar, which resides
beneath the Output windows.
Project Menu
The Project menu allows you to add to your project, remove files from your project, set
configurations for your project, and export a make file.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
The Project menu contains the following options:
•
Add Files – see page 67
•
Remove Selected File(s) – see page 67
•
Settings – see page 68
•
Export Makefile – see page 116
Add Files
To add files to your project, use the following procedure:
User Manual
67
1.From the
played.
2.Use the
the files you want to add are saved.
Project menu, select Add Files. The Add Files to Project dialog box is dis-
Figure 49. Add Files to Project Dialog Box
Look In drop-down list box to navigate to the appropriate directory in which
3.Click the file you want to add or highlight multiple files by clicking on each file while
holding down the Shift or Ctrl key.
4.Click
Add to add these files to your project.
Remove Selected File(s)
Select Remove Selected File(s) from the Project menu to delete highlighted files in the
Project Workspace window.
UM013037-1212Project Menu
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
68
Settings
Select Settings from the Project menu to display the Project Settings dialog box, which
allows you to change your active configuration as well as set up your project.
Select the active configuration for the project in the
upper left corner of the
Release configurations are predefined. For more informa tion a bout proje ct co nfig uratio ns
such as adding your own configuration, see the
118.
The Project Settings dialog box features a number of different pages you must use to set
up the project:
•
General Page – see page 69
•
Assembler Page – see page 71
•
C: Code Generation Page – see page 74 (not available for Assembly Only projects)
•
C: Listing Files Page – see page 78 (not available for Assembly Only projects)
•
C: Preprocessor Page – see page 80 (not available for Assembly Only projects)
•
C: Advanced Page – see page 82 (not available for Assembly Only projects)
•
C: Deprecated Page – see page 86 (not available for Assembly Only projects)
•
Librarian Page – see page 91 (available for Static Library projects only)
•
ZSL Page – see page 92 (not available for Assembly Only projects)
•
Linker: Commands Page – see page 94 (available for Executable projects only)
•
Linker: Objects and Libraries Page
only)
Project Settings
dialog box. For your convenience, the Debug a nd
– see page 98 (available for Executable projects
Configuration
Set Active Configuration
drop-down list box in the
section on page
•
Linker: Address Spaces Page – see page 103 (available for Executable projects only)
•
Linker: Warnings Page – see page 106 (available for Executable projects only)
•
Linker: Output Page – see page 107 (available for Executable projects only)
•
Debugger Page – see page 110 (available for Executable projects only)
Project Settings dialog box provides various project configuration pages that can be
The
accessed by selecting the page name in the pane on the left side of the dialog box. There
are several pages grouped together for the C (Compiler) and Linker that allow you to set
up subsettings for those tools.
If you change project settings that affect the build, the following message is displayed
when you click
Using the Integrated Development EnvironmentUM013037-1212
OK to exit the Project Settings dialog box: “The project settings
Zilog Developer Studio II – Z8 Encore!
User Manual
have changed since the last build. Would you like to rebuild the
affected files?” Click Yes to save and then rebuild the project.
General Page
From the Project Settings dialog box, select the General page. The options on the Gen-
eral
page are described in this section.
69
Figure 50. General Page of the Project Settings Dialog Box
CPU Family
CPU Family drop-down list box allows you to select the appropriate Z8 Encore! fam-
The
ily. For a list of CPU families, see the Z8 Encore! Product Support
UM013037-1212Project Menu
section on page 3.
Zilog Developer Studio II – Z8 Encore!
Note:
Note:
User Manual
70
CPU
The
CPU drop-down list box defines which CPU you want to define for the target. For a
list of CPUs, see the Z8 Encore! Product Support
section on page 3.
T o change the CPU for your project, select the appropriate CPU in the
CPU drop-down list
box.
Selecting a CPU does not automatically select include files for your C or assembly source
code. Include files must be manually included in your code. Selecting a new CPU automatically updates the compiler preprocessor defines, assembler defines, and, where necessary,
the linker address space ranges and selected debugger target based on the selected CPU.
Show Warnings
The
Show Warnings checkbox controls the display of warning messages during all
phases of the build. If the checkbox is enabled, warning messages from the assembler,
compiler, librarian, and linker are displayed during the build. If the checkbox is disabled,
all of these warnings are suppressed.
Generate Debug Information
Generate Debug Information checkbox makes the build generate debug informatio n
The
that can be used by the debugger to allow symbolic debugging. Enable this option if you
are planning to debug your code using the debugger. The checkbox enables debug information in the assembler, compiler, and linker.
Enabling this option usually increases your overall code size by a moderate amount for
two reasons. First, if your code makes any calls to the C run-time libraries, the library version used is the one that was built using the Limit Optimizations for Easier Debugging setting (see the Limit Optimizations for Easier Debugging
section on page 77). Second, the
generated code sets up the stack frame for every function in your own program. Many
functions (those whose parameters and local variables are not too numerous and do not
have their addresses taken in your code) would not otherwise require a stack frame in the
Z8 Encore! architecture, so the code for these functions is slightly smaller if this checkbox
is disabled.
This checkbox interacts with the Limit Optimizations for Easier Debugging chec kbox on
Code Generation page (see the Limit Optimizations for Easier Debugging section on
the
page 77). When the
debug information is always generated so that debugging can be performed. The
Debug Information
Easier Debugging
ging
checkbox is later deselected (even in a later ZDS II session), the Generate Debug
Using the Integrated Development EnvironmentUM013037-1212
Limit Optimizations for Easier Debugging checkbox is selected,
Generate
checkbox is grayed out (disabled) when the Limit Optimizations for
checkbox is selected. If the Limit Optimizations for Easier Debug-
Zilog Developer Studio II – Z8 Encore!
User Manual
Information checkbox returns to the setting it had before the Limit Optimizations for Easier Debugging checkbox was selected.
Ignore Case of Symbols
71
When the
Ignore Case of Symbols checkbox is enabled, the assembler and linker ignore
the case of symbols when generating and linking code. This checkbox is occasionally
needed when a project contains source files with case-insensitive labels. This checkbox is
only available for Assembly Only projects with no C code.
Intermediate Files Directory
This directory specifies the location in which all intermediate files produced during the
build will be located. These files include make files, object files, and generated assembly
source files and listings that are generated from C source code. This field is provided primarily for the convenience of users who might want to delete these files after building a
project, while retaining the built executable and other, more permanent files. Those files
are placed into a separate directory specified in the
Output page (see the Linker: Output
Page section on page 107).
Assembler Page
In the Project Settings dialog box, select the Assembler page. The assembler uses the
contents of the
assembled.
The options on the
Assembler page to determine which options are to be applied to the files
Assembler page are described in this section.
UM013037-1212Project Menu
Zilog Developer Studio II – Z8 Encore!
User Manual
72
Figure 51. Assembler Page of the Project Settings Dialog Box
Includes
The
Includes field allows you to specify the series of paths for the assembler to use when
searching for include files. The assembler first checks the current directory, then the paths
in the
Includes field, and finally on the default ZDS II include directories.
The following is the ZDS II default include directory:
<ZDS Installation Directory>\include\std
In the above filepath, <ZDS Installation Directory> is the directory in which Zilog Developer Studio was installed. By default, this directory is:
C:\Program Files\Zilog\ZDSII_Z8Encore!_<version>
In the above filepath, <version> may be 4.11.0 or 5.0.0.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
Defines
The
Defines field is equivalent to placing <symbol> EQU <value> in your assembly source
code. It is useful for conditionally built code. Each defined symbol must have a corresponding value (<name>=<value>). Multiple symbols can be defined and must be separated by commas.
Generate Assembly Listing Files (.lst)
73
When selected, the
Generate Assembly Listing Files (.lst) checkbox tells the assembler
to create an assembly listing file for each assembly source code module. This file displays
the assembly code and directives, as well as the hexadecimal addresses and op codes of
the generated machine code. The assembly listing files are saved in the directory specified
by the Intermediate
Files Directory field in the General page (see the Intermediate Files
Directory section on page 71). By default, this checkbox is selected.
Expand Macros
When selected, the
Expand Macros checkbox tells the assembler to expand macros in the
assembly listing file.
Page Width
When the assembler generates the listing file, the
Page Width field sets the maximum
number of characters on a line. The default is 80; the maximum width is 132.
Page Length
When the assembler generates the listing file, the
Page Length field sets the maximum
number of lines between page breaks. The default is 56.
Jump Optimization
When selected, the
Jump Optimization checkbox allows the assembler to replace relative
jump instructions (JR and DJNZ) with absolute jump instructions when the target label is
either
•
outside of the +127 to –128 range
For example, when the target is out of range, the assembler changes
DJNZ r0, lab
to
DJNZ r0, lab1
JR lab2
lab1:JP lab
lab2:
•
external to the assembly file
UM013037-1212Project Menu
Zilog Developer Studio II – Z8 Encore!
Note:
User Manual
74
When the target label is external to the assembly file, the assembler always assumes
that the target address is out of range.
It is usually preferable to allow the assembler to make these replacements because if the
target of the jump is out of range, the assembler would otherwise not be able to generate
correct code for the jump. However, if you are very concerned about monitoring the code
size of your assembled application, you can deselect the
You will then get an error message (from the assembler if the target label is in the same
assembly file or from the linker if it is not) every time the assembler is unable to reach the
target label with a relative jump. This might give you an opportunity to try to tune your
code for greater efficiency.
The default is checked.
C: Code Generation Page
Jump Optimization checkbox.
For Assembly Only projects, the Code Generation page is not available.
The options in the
Code Generation page are described in this section.
Using the Integrated Development EnvironmentUM013037-1212
Zilog Developer Studio II – Z8 Encore!
User Manual
75
Figure 52. Code Generation Page of the Project Settings Dialog Box
When this page is selected, the fundamental options related to code generation are shown
at the bottom of the dialog box: Limit Optimizations for Easier Debugging, Memory
Model, and Frames. For convenience, three of the most commonly used combinations of
these options can be obtained by clicking one of the radio buttons: Safest, Small and
Debuggable, or Smallest Possible. When one of these radio button settings is selected, the
fundamental options in the bottom of the dialog box are updated to show their new values,
but they are not available for individual editing. To edit the fundamental options individually, select the
User Defined button. You can then update the fundamental settings to any
combination you prefer.
Safest
The Safest configuration sets the following values for the individual options: the
Optimizations for Easier Debugging
used, if available (see the Memory Model
UM013037-1212Project Menu
checkbox is selected; the large memory model is
section on page 77); the frames are dynamic.
Limit
Zilog Developer Studio II – Z8 Encore!
User Manual
76
This is the safest possible configuration in that using the l ar ge model avoid s possi ble problems with running out of data space in the small model, and using dynamic frames avoids
potential problems with static frames due to the use of recursion or function pointers.
Also, because the optimizations are limited, you can proceed to debug your application
with ease. However, this configuration definitely produces larger code than other combinations. Many users select this configuration initially when porting applications to Z8
Encore! so that they do not have to worry immediately about whether their projects can
meet the requirements for using the small model or static frames. Particularly large and
complex applications also often must use this configuration (perhaps deselecting the
Optimizations for Easier Debugging
Small and Debuggable
The Small and Debuggable configuration sets the following values for the individual
options:
Limit Optimizations for Easier Debugging checkbox is selected; the memory
model is small; the frames are static. This is the same as the Smallest Possible configuration, except that optimizations are reduced to allow easier debugging. The other caveats to
using the Smallest Possible configuration also apply to this configuration. If you can meet
the other restrictions required by the Smallest Possible configuration, you might find it
useful to work with this configuration when you are debugging the code and then switch to
the Smallest Possible configuration for a production build.
Limit
checkbox for production builds).
Smallest Possible
This configuration sets the following values for the individual options:
tions for Easier Debugging
checkbox is deselected; the memory model is small; the
Limit Optimiza-
frames are static. This configuration generates the smallest possible code size, but this
configuration does not work for every project. It is your responsibility to make sure these
settings will work for you.
There are three issues to be aware of. First, all optimizations are applied, which can make
debugging somewhat confusing; if this becomes troublesome, try changing to the Small
But Debuggable configuration. Second, the use of the small model restricts the amount of
data space that is available, which could cause problems; see the Memory Models
section
on page 199 for details. Third, static frames can only be used if your entire application
obeys certain restrictions, which are described in the Call Frames
section on page 200.
User Defined
When the User Defined configuration is selected, the individual settings for the Limit
Optimizations for Easier Debugging, Memory Model, and Frames options can be changed
individually. This gives you the maximum freedom to set up your project as you choose
and to experiment with all possible settings.
Using the Integrated Development EnvironmentUM013037-1212
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.