Zilog ZUSBOPTS User Manual

Browse online or download User Manual for Sensors Zilog ZUSBOPTS. Zilog ZUSBOPTS User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 520
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
Copyright ©2011 Zilog
®
, Inc. All rights reserved.
www.zilog.com
Zilog Developer Studio II – ZNEO™
UM017105-0511
User Manual
Page view 0
1 2 3 4 5 6 ... 519 520

Summary of Contents

Page 1 - User Manual

Copyright ©2011 Zilog®, Inc. All rights reserved.www.zilog.comZilog Developer Studio II – ZNEO™UM017105-0511User Manual

Page 2 - UM017105-0511

Table of Contents UM017105-0511xZilog Developer Studio II – ZNEO™User ManualProject Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 3 - Revision History

Menu Bar UM017105-051172Zilog Developer Studio II – ZNEO™User Manualbecause a completely valid executable cannot be built when the program contains

Page 4

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual73Output File Name. You can change the name (including the full path name) of your

Page 5 - ZDS II System Requirements

Menu Bar UM017105-051174Zilog Developer Studio II – ZNEO™User ManualSort Symbols By. You can choose whether to have symbols in the link map file sor

Page 6

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual75The source-level debugger is a program that allows you to find problems in your

Page 7 - Zilog Technical Support

Menu Bar UM017105-051176Zilog Developer Studio II – ZNEO™User ManualTarget. Select the appropriate target from the Target list box.Setup. Click Setu

Page 8

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual77c. To use ISA-compatible mode, select the ISA Mode Enabled checkbox.d. To use Ac

Page 9 - Table of Contents

Menu Bar UM017105-051178Zilog Developer Studio II – ZNEO™User Manuala. Select the Internal Flash checkbox if you want to use internal Flash. The int

Page 10

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual79Type a unique target name in the field, select the Place Target File in Project

Page 11

Menu Bar UM017105-051180Zilog Developer Studio II – ZNEO™User Manual1. Select the Use Selected Target button if you want to use the target listed to

Page 12

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual81If a Windows Security Alert is displayed with the following message: “Do you wan

Page 13

UM017105-0511 Table of ContentsZilog Developer Studio II – ZNEO™User ManualxiInterrupt Support . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 14

Menu Bar UM017105-051182Zilog Developer Studio II – ZNEO™User Manual•If you select USBSmartCable and click Setup in the Debug Tool area, the Setup U

Page 15

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual832. Use the Save In drop-down menu to navigate to the directory in which you want

Page 16

Menu Bar UM017105-051184Zilog Developer Studio II – ZNEO™User Manual2. Highlight the configuration that you want to use and click OK.There are two

Page 17

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual852. Click the Add button. The Add Project Configuration dialog box appears, as sh

Page 18

Menu Bar UM017105-051186Zilog Developer Studio II – ZNEO™User ManualDebug MenuUse the Debug menu to access a number of functions in the ZDS II debug

Page 19

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual87Step Into. Select Step Into from the Debug menu to execute one statement or inst

Page 20

Menu Bar UM017105-051188Zilog Developer Studio II – ZNEO™User Manuala. If external memory is used on the target, ensure that the appropriate externa

Page 21 - List of Figures

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual89eral page of the Project Settings dialog box (see the Project Settings—General P

Page 22

Menu Bar UM017105-051190Zilog Developer Studio II – ZNEO™User Manual12. Enter the appropriate offset values in the File Offset field to offset the b

Page 23

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual91d. Click Read Serial to check the serial number for the current device.17. Progr

Page 24

Table of Contents UM017105-0511xiiZilog Developer Studio II – ZNEO™User ManualUsing the Macro Assembler . . . . . . . . . . . . . . . . . . . . . .

Page 25

Menu Bar UM017105-051192Zilog Developer Studio II – ZNEO™User Manual2. Enter the start address in the Start Address field. The start address must be

Page 26

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual933. Click Close.CustomizeThe Customize dialog box contains two tabs; a descriptio

Page 27 - List of Tables

Menu Bar UM017105-051194Zilog Developer Studio II – ZNEO™User ManualTo create a new toolbar, observe the following procedure:1. Select Customize fro

Page 28

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual955. Click OK. The new toolbar is displayed as a gray box. You can change the name

Page 29 - Chapter 1. Getting Started

Menu Bar UM017105-051196Zilog Developer Studio II – ZNEO™User ManualOptionsThe Options dialog box contains the following tabs:•Options—General Tab –

Page 30

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual97ration is activated by being selected (using the Select Configuration dialog box

Page 31

Menu Bar UM017105-051198Zilog Developer Studio II – ZNEO™User Manual1. From the Tools menu, select Options. The Options dialog box is displayed; see

Page 32

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual995. The syntax style of each file type can have its own configuration for backgro

Page 33

Menu Bar UM017105-0511100Zilog Developer Studio II – ZNEO™User Manual10. Click OK to close the Font dialog box.11. Click OK to close the Options dia

Page 34 - Add a File to the Project

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual101Display Line Number MarginThe Display Line Number Margin option allows you to s

Page 35

UM017105-0511 Table of ContentsZilog Developer Studio II – ZNEO™User ManualxiiiVECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 36 - Set Up the Project

Menu Bar UM017105-0511102Zilog Developer Studio II – ZNEO™User ManualDisplay Indentation GuideThe Display Indentation Guide option allows you to ena

Page 37

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual103reset results in the PC pointing to the first line of the program (the first li

Page 38 - 5. Click the

Menu Bar UM017105-0511104Zilog Developer Studio II – ZNEO™User ManualWindow MenuThe Window menu allows you to select the way you want to arrange you

Page 39 - 7. Click the

UM017105-0511 Shortcut KeysZilog Developer Studio II – ZNEO™User Manual105TileSelect Tile to tile the files in the Edit window so that you can see a

Page 40 - 9. Click the

Shortcut Keys UM017105-0511106Zilog Developer Studio II – ZNEO™User ManualEdit Menu ShortcutsSixteen Edit menu options and their shortcuts are descr

Page 41

UM017105-0511 Shortcut KeysZilog Developer Studio II – ZNEO™User Manual107Build Menu ShortcutsThe Build menu options and their shortcuts are describ

Page 42

Shortcut Keys UM017105-0511108Zilog Developer Studio II – ZNEO™User Manual

Page 43 - Development Environment

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual109Chapter 3. Using the EditorZDS II provides an intelligent editor that c

Page 44 - Toolbars

Using the Editor UM017105-0511110Zilog Developer Studio II – ZNEO™User Manual•Opening an Include File – see page 148Identify and Correct Mistakes•Mi

Page 45 - File Toolbar

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual111Auto CompletionYou can accelerate your keyboarding with an autocompleti

Page 46 - Build Toolbar

Table of Contents UM017105-0511xivZilog Developer Studio II – ZNEO™User ManualSEARCHPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 47 - Command Processor Toolbar

Using the Editor UM017105-0511112Zilog Developer Studio II – ZNEO™User ManualTyping one or two characters is typically enough for the editor to show

Page 48 - Debug Toolbar

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual113Include file list boxThe editor opens a list box of all possible header

Page 49

Using the Editor UM017105-0511114Zilog Developer Studio II – ZNEO™User ManualWhen you type an angle bracket following an #include directive, the edi

Page 50 - Debug Windows Toolbar

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual115When autocompletion is disabled, you can still bring up the autocomplet

Page 51 - Project Workspace Window

Using the Editor UM017105-0511116Zilog Developer Studio II – ZNEO™User ManualCall Tips becomes available for virtually all of the functions declared

Page 52 - Edit Window

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual117When call tips are disabled, you can still bring up the Call Tips windo

Page 53 - Using the Context Menus

Using the Editor UM017105-0511118Zilog Developer Studio II – ZNEO™User ManualIn C program code, auto indentation is supported with brace characters

Page 54 - Using Bookmarks

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual119To enable or disable auto indentation, perform the following steps:1. F

Page 55

Using the Editor UM017105-0511120Zilog Developer Studio II – ZNEO™User Manualsystem clipboard. It works alongside the regular Windows Clipboard and

Page 56

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual121Line and Block CommentsIn a C file, line comments are framed using two

Page 57 - Output Windows

UM017105-0511 Table of ContentsZilog Developer Studio II – ZNEO™User ManualxvUnconventional Memory Layouts . . . . . . . . . . . . . . . . . . . . .

Page 58

Using the Editor UM017105-0511122Zilog Developer Studio II – ZNEO™User ManualZDS II allows you to define an Abbreviation and Expansion pair (See the

Page 59 - Menu Bar

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual123Abbreviation and Expansion pairs are saved between instances of the IDE

Page 60 - File Menu

Using the Editor UM017105-0511124Zilog Developer Studio II – ZNEO™User ManualIn the Abbreviations dialog box, you can perform the following operatio

Page 61

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual125– To indent a block of code, precede the code block with the two-charac

Page 62

Using the Editor UM017105-0511126Zilog Developer Studio II – ZNEO™User Manual1. Select Manage Abbreviations from the Edit menu to display the Abbrev

Page 63

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual127Because the Abbreviations dialog is non-modal, you can use Insert in Fi

Page 64

Using the Editor UM017105-0511128Zilog Developer Studio II – ZNEO™User ManualPress Delete or Backspace to delete an autoinserted character.Closing c

Page 65

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual129Long Line IndicatorA Long Line indicator is a vertical line that appear

Page 66

Using the Editor UM017105-0511130Zilog Developer Studio II – ZNEO™User ManualThe Long Line indicator works well only for monospaced fonts (for examp

Page 67

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual1315. To move the indicator to a particular column, enter the number of ch

Page 68 - Edit Menu

Table of Contents UM017105-0511xviZilog Developer Studio II – ZNEO™User Manualbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 69

Using the Editor UM017105-0511132Zilog Developer Studio II – ZNEO™User ManualAuto Syntax StylerThe Auto Syntax Styler displays the language construc

Page 70

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual133The colors used by the editor’s Auto Syntax Styler are completely confi

Page 71 - Manage Breakpoints

Using the Editor UM017105-0511134Zilog Developer Studio II – ZNEO™User Manual3. Select an appropriate color from the Color Style list box, and make

Page 72 - View Menu

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual135If you want to use the default foreground or background color for the s

Page 73 - Project Menu

Using the Editor UM017105-0511136Zilog Developer Studio II – ZNEO™User ManualThe folding points of a document are based on the hierarchical structur

Page 74 - Settings

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual1372. Click the Editor tab. 3. Click the Advanced Editor Options button. T

Page 75

Using the Editor UM017105-0511138Zilog Developer Studio II – ZNEO™User ManualYou can select a line of text by clicking the associated line number on

Page 76

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual139Type Info TipsThe Type Info Tips window is a hovering and short-lived s

Page 77

Using the Editor UM017105-0511140Zilog Developer Studio II – ZNEO™User ManualHighlighting and Finding Matched BracesMove your text caret just inside

Page 78

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual141When braces or parentheses are nested, the innermost pair containing th

Page 79

UM017105-0511 Table of ContentsZilog Developer Studio II – ZNEO™User Manualxvitarget get . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 80 - Menu Bar UM017105-0511

Using the Editor UM017105-0511142Zilog Developer Studio II – ZNEO™User Manual•Press Ctrl+Shift+K to select the entire text within the matching prepr

Page 81

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual143If you enable the Wrap Long Lines feature, the Code Folding Margin will

Page 82

Using the Editor UM017105-0511144Zilog Developer Studio II – ZNEO™User ManualTo enable or disable indentation guides, perform the following steps:1.

Page 83

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual145Zoom In/OutThe ZDS II Editor allows you to increase or decrease the mag

Page 84

Using the Editor UM017105-0511146Zilog Developer Studio II – ZNEO™User ManualTo insert a bookmark, position the cursor on the appropriate line of th

Page 85

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual147To remove a bookmark, position the cursor on the line of the active fil

Page 86

Using the Editor UM017105-0511148Zilog Developer Studio II – ZNEO™User ManualNext, press Ctrl+Shift+F2. To jump to the next bookmark in the active f

Page 87

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual149The opening include file work well only with a project opened in the ZD

Page 88

Using the Editor UM017105-0511150Zilog Developer Studio II – ZNEO™User ManualTo highlight the PC line, perform the following steps:1. From the Tools

Page 89

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual151Mismatched Brace HighlightingMove your text caret just behind the brace

Page 90

Table of Contents UM017105-0511xviZilog Developer Studio II – ZNEO™User Manualcosh, coshf . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 91

Using the Editor UM017105-0511152Zilog Developer Studio II – ZNEO™User ManualFigure 123. Mismatched Brace HighlightingFigure 124. Mismatched Parenth

Page 92

UM017105-0511 Using the EditorZilog Developer Studio II – ZNEO™User Manual153Auto Conversion of “.” to “→”The ZDS II editor, upon discovering that y

Page 93

Using the Editor UM017105-0511154Zilog Developer Studio II – ZNEO™User Manual

Page 94

UM017105-0511 Using the ANSI C-CompilerZilog Developer Studio II – ZNEO™User Manual155Chapter 4. Using the ANSI C-CompilerThe ZNEO C-Compiler is a c

Page 95

Language Extensions UM017105-0511156Zilog Developer Studio II – ZNEO™User ManualLanguage ExtensionsTo give you additional control over the way the Z

Page 96

UM017105-0511 Language ExtensionsZilog Developer Studio II – ZNEO™User Manual157The enumeration data type is defined as int as per ANSI C. The C-Com

Page 97

Language Extensions UM017105-0511158Zilog Developer Studio II – ZNEO™User Manual_NearThe variable with the _Near storage specifier is allocated in t

Page 98

UM017105-0511 Language ExtensionsZilog Developer Studio II – ZNEO™User Manual159For example:_Rom int ri; /* ri is placed in ROM address space */_Er

Page 99

Language Extensions UM017105-0511160Zilog Developer Studio II – ZNEO™User ManualDefault Storage SpecifiersDefault storage specifiers are applied if

Page 100

UM017105-0511 Language ExtensionsZilog Developer Studio II – ZNEO™User Manual161Pointer ConversionsA pointer to a qualified space type can be conver

Page 101

UM017105-0511 Table of ContentsZilog Developer Studio II – ZNEO™User Manualxixscanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 102

Language Extensions UM017105-0511162Zilog Developer Studio II – ZNEO™User Manualtively. The local variables (nonstatic) and parameters are always al

Page 103 - UM017105-0511 Menu Bar

UM017105-0511 Language ExtensionsZilog Developer Studio II – ZNEO™User Manual163these functions and restores the machine state at the end of these f

Page 104

Language Extensions UM017105-0511164Zilog Developer Studio II – ZNEO™User ManualThe following values for vectnum are supported:Placement DirectivesT

Page 105

UM017105-0511 Language ExtensionsZilog Developer Studio II – ZNEO™User Manual165Placement of Consecutive VariablesThe compiler also provides syntax

Page 106

Language Extensions UM017105-0511166Zilog Developer Studio II – ZNEO™User ManualE"mystring". This constant defines an EROM string. The str

Page 107

UM017105-0511 Language ExtensionsZilog Developer Studio II – ZNEO™User Manual167Inline Assembly Using the Pragma DirectiveThe first method uses the

Page 108

Language Extensions UM017105-0511168Zilog Developer Studio II – ZNEO™User Manual FIXED, VERIFIED, CLOSED} short status;void main(void){

Page 109

UM017105-0511 Type SizesZilog Developer Studio II – ZNEO™User Manual169Supported New Features from the 1999 StandardThe ZNEO compiler implements fou

Page 110

Predefined Macros UM017105-0511170Zilog Developer Studio II – ZNEO™User ManualAll data are aligned on a byte boundary. Alignment of 16- or 32-bit ob

Page 111 - Build Menu

UM017105-0511 Predefined MacrosZilog Developer Studio II – ZNEO™User Manual171All predefined macro names begin with two underscores and end with two

Page 112 - Manage Configurations

UM017105-0511iiZilog Developer Studio II – ZNEO™User ManualThis publication is subject to replacement by a later edition. To determine whether a late

Page 113

Table of Contents UM017105-0511xxZilog Developer Studio II – ZNEO™User Manual

Page 114 - Debug Menu

Calling Conventions UM017105-0511172Zilog Developer Studio II – ZNEO™User ManualCalling ConventionsThe C-Compiler imposes a strict set of rules regar

Page 115 - Tools Menu

UM017105-0511 Calling ConventionsZilog Developer Studio II – ZNEO™User Manual1734. Restore any of the registers R8–R14 that were saved in step 2. 5.

Page 116

Calling Assembly Functions from C UM017105-0511174Zilog Developer Studio II – ZNEO™User ManualSpecial CasesSome function calls do not follow the mec

Page 117

UM017105-0511 Calling Assembly Functions from CZilog Developer Studio II – ZNEO™User Manual175Argument LocationsThe assembly function assigns the lo

Page 118 - Start Address

Calling C Functions from Assembly UM017105-0511176Zilog Developer Studio II – ZNEO™User ManualPreserving RegistersThe ZNEO C-Compiler implements a sc

Page 119 - Show CRC

UM017105-0511 Command Line OptionsZilog Developer Studio II – ZNEO™User Manual177 popm <R1>; restore the registers, if any were savedretRefere

Page 120 - Calculate File Checksum

Run-Time Library UM017105-0511178Zilog Developer Studio II – ZNEO™User ManualThe Zilog-specific header files are located in the following directory:

Page 121 - Customize

UM017105-0511 Run-Time LibraryZilog Developer Studio II – ZNEO™User Manual179<zneo.h> has the macro definitions for all ZNEO microcontroller p

Page 122

Run-Time Library UM017105-0511180Zilog Developer Studio II – ZNEO™User ManualFunctionsZilog FunctionsThe following functions are Zilog-specific; eac

Page 123

UM017105-0511 Run-Time LibraryZilog Developer Studio II – ZNEO™User Manual181Example#include <zneo.h>void main(void){DI();/* Disable interrupt

Page 124 - Options—General Tab

UM017105-0511 List of FiguresZilog Developer Studio II – ZNEO™User ManualxxiList of FiguresFigure 1. Select Project Name Dialog Box . . . . . . . .

Page 125 - Options—Editor Tab

Run-Time Library UM017105-0511182Zilog Developer Studio II – ZNEO™User ManualBefore using the getch function, the init_uart() function must be calle

Page 126

UM017105-0511 Run-Time LibraryZilog Developer Studio II – ZNEO™User Manual183Before using the kbhit function, the init_uart() function must be calle

Page 127

Run-Time Library UM017105-0511184Zilog Developer Studio II – ZNEO™User Manualvoid main(void){ unsigned short istat; istat = TDI();

Page 128

UM017105-0511 Run-Time LibraryZilog Developer Studio II – ZNEO™User Manual185Synopsis#include <zneo.h>intrinsic void SET_VECTOR(int vectnum,vo

Page 129 - Support UNICODE

Stack Pointer Overflow UM017105-0511186Zilog Developer Studio II – ZNEO™User ManualThe interrupt status, which is returned from TDI(), consists of t

Page 130 - Options—Debugger Tab

UM017105-0511 Startup FilesZilog Developer Studio II – ZNEO™User Manual187Startup FilesThe start-up or C run-time initialization file is an assembly

Page 131

Segment Naming UM017105-0511188Zilog Developer Studio II – ZNEO™User ManualSegment NamingThe compiler places code and data into separate segments in

Page 132 - Window Menu

UM017105-0511 Linker Command Files for C ProgramsZilog Developer Studio II – ZNEO™User Manual189The linker depicts the memory of the ZNEO CPU using

Page 133 - Shortcut Keys

Linker Command Files for C Programs UM017105-0511190Zilog Developer Studio II – ZNEO™User ManualLinker Referenced FilesThe default linker command fi

Page 134 - Project Menu Shortcuts

UM017105-0511 Linker Command Files for C ProgramsZilog Developer Studio II – ZNEO™User Manual191Linker SymbolsThe default linker command file define

Page 135 - Debug Menu Shortcuts

List of Figures UM017105-0511xxiZilog Developer Studio II – ZNEO™User ManualFigure 29. Find in Files 2 Output Window . . . . . . . . . . . . . . .

Page 136 - Shortcut Keys UM017105-0511

Linker Command Files for C Programs UM017105-0511192Zilog Developer Studio II – ZNEO™User ManualSample Linker Command FileThe sample default linker

Page 137 - Chapter 3. Using the Editor

UM017105-0511 Linker Command Files for C ProgramsZilog Developer Studio II – ZNEO™User Manual193RANGE ERAM $800000 : $81ffffThe ranges for the four

Page 138 - Identify and Correct Mistakes

ANSI Standard Compliance UM017105-0511194Zilog Developer Studio II – ZNEO™User ManualThe list above comprises the linker symbol definitions describe

Page 139 - Auto Completion

UM017105-0511 ANSI Standard ComplianceZilog Developer Studio II – ZNEO™User Manual195mentation means that the compiler must contain, at least, a spe

Page 140

ANSI Standard Compliance UM017105-0511196Zilog Developer Studio II – ZNEO™User ManualBy contrast, in the hosted environment, the closest allowed for

Page 141 - Include file list box

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual197Warning and Error MessagesThis section covers the following t

Page 142

Warning and Error Messages UM017105-0511198Zilog Developer Studio II – ZNEO™User Manual009 Bad preprocessor file. Aborted. An unrecognizable source

Page 143 - Call Tips

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual199025 Illegal "#line" directive syntax. In #line <

Page 144

Warning and Error Messages UM017105-0511200Zilog Developer Studio II – ZNEO™User Manual102 Constant integer expression expected. A non-integral expr

Page 145 - Auto Indentation

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual201117 Unterminated quoted string. Within a quoted string, an en

Page 146 - , ifma, macro

UM017105-0511 List of FiguresZilog Developer Studio II – ZNEO™User ManualxxiFigure 59. Output Page of the Project Settings Dialog Box . . . . . . .

Page 147 - Multiple Clipboards

Warning and Error Messages UM017105-0511202Zilog Developer Studio II – ZNEO™User Manual132 "continue" statement not within loop body. A co

Page 148

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual203147 A pointer and a non-integral may not be subtracted. It is

Page 149 - Abbreviations and Expansions

Warning and Error Messages UM017105-0511204Zilog Developer Studio II – ZNEO™User Manual162 Conditional expression operands are not compatible. One o

Page 150

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual205176 Only one storage class may be given in a declaration. An

Page 151

Warning and Error Messages UM017105-0511206Zilog Developer Studio II – ZNEO™User Manual191 Cannot perform pointer arithmetic on pointer to void. An

Page 152 - Adding an Abbreviation

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual207208 Operands are not cast compatible. An attempt was made to

Page 153 - Removing an Abbreviation

Warning and Error Messages UM017105-0511208Zilog Developer Studio II – ZNEO™User Manual•Recode to pass a string literal. For example, the code in th

Page 154 - Expanding an Abbreviation

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual209ble to have two cases with the same value not caught by the f

Page 155

Warning and Error Messages UM017105-0511210Zilog Developer Studio II – ZNEO™User Manual

Page 156

UM017105-0511 Using the Macro AssemblerZilog Developer Studio II – ZNEO™User Manual211Chapter 5. Using the Macro AssemblerYou use the Macro Assemble

Page 157 - Long Line Indicator

List of Figures UM017105-0511xxiZilog Developer Studio II – ZNEO™User ManualFigure 89. Call Tips Window . . . . . . . . . . . . . . . . . . . . . .

Page 158

Address Spaces and Segments UM017105-0511212Zilog Developer Studio II – ZNEO™User ManualAddress Spaces and SegmentsThe ZNEO architecture divides all

Page 159 - UNICODE Support

UM017105-0511 Address Spaces and SegmentsZilog Developer Studio II – ZNEO™User Manual213SegmentsSegments are used to represent regions of memory. On

Page 160 - Auto Syntax Styler

Output Files UM017105-0511214Zilog Developer Studio II – ZNEO™User ManualMENT directive attaches code and data to a segment. The SEGMENT directive m

Page 161

UM017105-0511 Output FilesZilog Developer Studio II – ZNEO™User Manual215•<source>.obj is an object file in relocatable OMF695 format. The ass

Page 162

Source Language Structure UM017105-0511216Zilog Developer Studio II – ZNEO™User ManualError and warning messages follow the source line containing t

Page 163 - Code Folding Margin

UM017105-0511 Source Language StructureZilog Developer Studio II – ZNEO™User Manual217Comment LineA semicolon (;) terminates the scanning action of

Page 164

Source Language Structure UM017105-0511218Zilog Developer Studio II – ZNEO™User ManualCase SensitivityIn the default mode, the assembler treats all

Page 165 - Line Number Margin

UM017105-0511 Source Language StructureZilog Developer Studio II – ZNEO™User Manual219ELIF ELSE ELSEIF ENDENDC ENDIF ENDM ENDMACENDMODULE ENDS EQ EQ

Page 166

Expressions UM017105-0511220Zilog Developer Studio II – ZNEO™User ManualDo not use the instruction mnemonics or assembler directives as symbol or var

Page 167 - Type Info Tips

UM017105-0511 ExpressionsZilog Developer Studio II – ZNEO™User Manual221You must put spaces before and after the modulus operator to separate it fro

Page 168 - Figure 111. Type Info Tips

UM017105-0511 List of FiguresZilog Developer Studio II – ZNEO™User ManualxxFigure 119. Inserting a Bookmark . . . . . . . . . . . . . . . . . . . .

Page 169

Expressions UM017105-0511222Zilog Developer Studio II – ZNEO™User Manual# LOW (X) ; 8 bits of X starting at bit 0 = 56H# LOW16 (X) ; 16 bits of X st

Page 170 - Wrap Long Lines

UM017105-0511 ExpressionsZilog Developer Studio II – ZNEO™User Manual223indicated by the absence of a sign. Negative numbers are indicated by a minu

Page 171 - Indentation Guides

Expressions UM017105-0511224Zilog Developer Studio II – ZNEO™User ManualAddress Spaces and Instruction EncodingThe ZNEO instruction set provides diff

Page 172

UM017105-0511 ExpressionsZilog Developer Studio II – ZNEO™User Manual225XREF erw1:EROM ; erw1 declared to be in EROMRegister Lists for PUSHM and POP

Page 173 - Bookmarks

Directives UM017105-0511226Zilog Developer Studio II – ZNEO™User ManualDirectivesDirectives control the assembly process by providing the assembler w

Page 174

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual227ALIGNForces the object following to be aligned on a byte boundary that is a m

Page 175

Directives UM017105-0511228Zilog Developer Studio II – ZNEO™User ManualThe CPU directive is used to determine the physical location of the interrupt

Page 176 - Opening an Include File

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual229ExamplesBLKL 16 ; Allocate 16 uninitialized longs. BLKL 16, -1 ; Allocate 16

Page 177

Directives UM017105-0511230Zilog Developer Studio II – ZNEO™User ManualExamplesDL 1,2 ; Reserve 2 long words. Initialize the ; first with a 1

Page 178

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual231DEFINEDefines a segment with its associated address space, alignment, and ori

Page 179 - Mismatched Brace Highlighting

List of Figures UM017105-0511xxZilog Developer Studio II – ZNEO™User ManualFigure 149. Locals Window . . . . . . . . . . . . . . . . . . . . . . .

Page 180

Directives UM017105-0511232Zilog Developer Studio II – ZNEO™User ManualSynonymORIGINExampleDEFINE near_code,ORG = %FFF8; Uses current space, byte ali

Page 181 - Auto Conversion of “.” to “→”

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual233Synonym.endSyntax<end_directive> => END[<expression>]ExampleEN

Page 182

Directives UM017105-0511234Zilog Developer Studio II – ZNEO™User ManualSynonyms.include, .copy, COPYSyntax<include_directive> => INCLUDE[<

Page 183

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual235ORGThe ORG assembler directive sets the assembler location counter to a speci

Page 184 - Language Extensions

Directives UM017105-0511236Zilog Developer Studio II – ZNEO™User ManualExampleSEGMENT code ; predefined segmentDEFINE data ; user-defined.SHORT_STAC

Page 185

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual237VARThe VAR directive works similarly to an EQU directive except you are allow

Page 186

Directives UM017105-0511238Zilog Developer Studio II – ZNEO™User Manual<vector name> specifies which vector is being selected. For ZNEO, <ve

Page 187

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual239Synonyms.extern, EXTERN, EXTERNAL, .refSyntax<xref_directive> => XRE

Page 188 - Default Storage Specifiers

Directives UM017105-0511240Zilog Developer Studio II – ZNEO™User Manual.STRUCT and .ENDSTRUCT DirectivesA structure is a collection of various elemen

Page 189 - Memory Models

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual241YEAR DS 2DSIZE.ENDSTRUCT DATEDirectives allowed between .STRUCT and .ENDSTRUC

Page 190 - Interrupt Support

UM017105-0511 List of TablesZilog Developer Studio II – ZNEO™User ManualxxList of TablesTable 1. Edit Shortcuts . . . . . . . . . . . . . . . . . .

Page 191 - Interrupt Vector Setup

Directives UM017105-0511242Zilog Developer Studio II – ZNEO™User ManualOnce applied to label tname, the individual structure elements are applied to

Page 192 - Placement Directives

UM017105-0511 DirectivesZilog Developer Studio II – ZNEO™User Manual243The .UNION directive has the following form:[stag] .UNION[name_1] DS count1 [

Page 193 - String Placement

Conditional Assembly UM017105-0511244Zilog Developer Studio II – ZNEO™User ManualIf name is specified with the .ENDWITH directive, the name must mat

Page 194 - Inline Assembly

UM017105-0511 Conditional AssemblyZilog Developer Studio II – ZNEO™User Manual245If a condition is true, the code body is processed. Otherwise, the

Page 195 - Char and Short Enumerations

Conditional Assembly UM017105-0511246Zilog Developer Studio II – ZNEO™User Manual . .ELSE ; otherwise code body 3 . . .<Code Body 3> .

Page 196

UM017105-0511 MacrosZilog Developer Studio II – ZNEO™User Manual247 <code_body>]ENDIFIFMAUsed only within a macro, this directive checks to

Page 197 - Type Sizes

Macros UM017105-0511248Zilog Developer Studio II – ZNEO™User ManualSyntax<macroname>[:]MACRO[<arg>(,<arg>)...] <macro_body>

Page 198 - Predefined Macros

UM017105-0511 MacrosZilog Developer Studio II – ZNEO™User Manual249 A+ 10 macendMacro Invocation A macro is invo

Page 199 - Examples

Labels UM017105-0511250Zilog Developer Studio II – ZNEO™User Manual LD ARG0,ARG1 ELSE LD ARG0,ARG2

Page 200 - Calling Conventions

UM017105-0511 LabelsZilog Developer Studio II – ZNEO™User Manual251Anonymous LabelsThe ZDS II assembler supports anonymous labels. Table 22 lists th

Page 201 - Run Time Stack

List of Tables UM017105-0511xxZilog Developer Studio II – ZNEO™User ManualTable 34. Standard Headers . . . . . . . . . . . . . . . . . . . . . . . .

Page 202 - Function Naming Convention

Source Language Syntax UM017105-0511252Zilog Developer Studio II – ZNEO™User Manual•The space of the segment in which the label is defined.•The spac

Page 203 - Return Values

UM017105-0511 Source Language SyntaxZilog Developer Studio II – ZNEO™User Manual253<directive> →→→→→→→→→→→→→→→→→→→→→→→→→→→→→ALIGN<int_const

Page 204 - Assembly File

Source Language Syntax UM017105-0511254Zilog Developer Studio II – ZNEO™User Manual<expression> →→→→→→→→'('<expression>')

Page 205 - Run-Time Library

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual255Warning and Error MessagesThis section covers warning and err

Page 206 - Zilog Header Files

Warning and Error Messages UM017105-0511256Zilog Developer Studio II – ZNEO™User Manual416 Unsupported/illegal directives. General-purpose error whe

Page 207

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual257434 Symbol name too long. The maximum symbol length (33 chara

Page 208 - Zilog Functions

Warning and Error Messages UM017105-0511258Zilog Developer Studio II – ZNEO™User Manual481 Relist file not found error. The map file cannot be found

Page 209

UM017105-0511 Using the Linker/LocatorZilog Developer Studio II – ZNEO™User Manual259Chapter 6. Using the Linker/LocatorThe ZNEO developer’s environ

Page 210

Invoking the Linker UM017105-0511260Zilog Developer Studio II – ZNEO™User ManualSegments. Each address space consists of various segments. Segments

Page 211

UM017105-0511 Linker CommandsZilog Developer Studio II – ZNEO™User Manual261•CHANGE – see page 262•COPY – see page 263•DEBUG – see page 265•DEFINE –

Page 212 - SET_VECTOR

UM017105-0511 Getting StartedZilog Developer Studio II – ZNEO™User Manual1Chapter 1. Getting StartedThis section provides a tutorial of the develope

Page 213

Linker Commands UM017105-0511262Zilog Developer Studio II – ZNEO™User Manual<outputfile>=<module list>This command defines the executabl

Page 214 - Stack Pointer Overflow

UM017105-0511 Linker CommandsZilog Developer Studio II – ZNEO™User Manual263command to the linker, the segment is deleted from the linking process.

Page 215 - Startup Files

Linker Commands UM017105-0511264Zilog Developer Studio II – ZNEO™User ManualYou must copy the codeseg contents from ROM to RAM at run time as part o

Page 216 - Segment Naming

UM017105-0511 Linker CommandsZilog Developer Studio II – ZNEO™User Manual265DEBUG The DEBUG command causes the linker to generate debug information

Page 217

Linker Commands UM017105-0511266Zilog Developer Studio II – ZNEO™User ManualExampleFORMAT = OMF695, INTEL32GROUPThe GROUP command provides a method

Page 218 - Linker Referenced Files

UM017105-0511 Linker CommandsZilog Developer Studio II – ZNEO™User Manual267ExampleLOCATE ROM AT $1000Refer to the Linker Expressions section on pag

Page 219 - Linker Symbols

Linker Commands UM017105-0511268Zilog Developer Studio II – ZNEO™User ManualMAXLENGTHThe MAXLENGTH command causes a warning message to be issued if

Page 220 - Sample Linker Command File

UM017105-0511 Linker CommandsZilog Developer Studio II – ZNEO™User Manual269Syntax[-]NOWARNORDERThe ORDER command establishes a linking sequence and

Page 221

Linker Commands UM017105-0511270Zilog Developer Studio II – ZNEO™User ManualIf a RANGE is specified for a segment, this range must be within any RAN

Page 222 - ANSI Standard Compliance

UM017105-0511 Linker CommandsZilog Developer Studio II – ZNEO™User Manual271SORTThe SORT command sorts the external symbol listing in the map file b

Page 223 - Deviations from ANSI C

UM017105-0511 Revision HistoryZilog Developer Studio II – ZNEO™User ManualiiiRevision HistoryEach instance in the Revision History table below refle

Page 224 - Double Treated as Float

Developer’s Environment Tutorial UM017105-05112Zilog Developer Studio II – ZNEO™User ManualBe sure to read Menu Bar on page 31 to learn more about a

Page 225 - Warning and Error Messages

Linker Commands UM017105-0511272Zilog Developer Studio II – ZNEO™User ManualSyntaxSPLITTABLE segment_listExampleSPLITTABLE CODE, ROM_TEXTUNRESOLVED

Page 226

UM017105-0511 Linker ExpressionsZilog Developer Studio II – ZNEO™User Manual273Syntax[-]< WARNING | WARN> < IS | = > <FATAL>Exam

Page 227

Linker Expressions UM017105-0511274Zilog Developer Studio II – ZNEO™User Manual•| (Or) – see page 279•<< (Shift Left) – see page 279•>>

Page 228

UM017105-0511 Linker ExpressionsZilog Developer Studio II – ZNEO™User Manual275Syntax<expression> & <expression>BASE OFThe BASE OF o

Page 229

Linker Expressions UM017105-0511276Zilog Developer Studio II – ZNEO™User ManualLOCATE s_uninit_data at BASE OF RAMthe lowest used address is $9000 (

Page 230

UM017105-0511 Linker ExpressionsZilog Developer Studio II – ZNEO™User Manual277HIGHADDRThe HIGHADDR operator provides the highest possible address o

Page 231

Linker Expressions UM017105-0511278Zilog Developer Studio II – ZNEO™User Manual/* RAM allocation */LOCATE s_uninit_data at $8000LOCATE s_nvrblock

Page 232

UM017105-0511 Linker ExpressionsZilog Developer Studio II – ZNEO™User Manual279Syntax$<hexdigits>| (Or)The | (Or) operator is used to perform

Page 233

Sample Linker Map File UM017105-0511280Zilog Developer Studio II – ZNEO™User ManualTOP OFThe TOP OF operator provides the highest allocated address

Page 234

UM017105-0511 Sample Linker Map FileZilog Developer Studio II – ZNEO™User Manual281PROCESSOR: assemblerFILES: C:\PROGRA~1\Zilog\ZDSII_~1.0\lib\z

Page 235

UM017105-0511 Developer’s Environment TutorialZilog Developer Studio II – ZNEO™User Manual33. Use the Look In drop-down menu to navigate to the dire

Page 236

Sample Linker Map File UM017105-0511282Zilog Developer Studio II – ZNEO™User ManualRANGE ERAM $800000 : $81FFFFCHANGE NEAR_TEXT=NEAR_DATACHANGE FAR_

Page 237

UM017105-0511 Sample Linker Map FileZilog Developer Studio II – ZNEO™User Manual283.\Z16F2800100ZCOG.obj, C:\PROGRA~1\Zilog\ZDSII_~1.0\lib\std\chelp

Page 238

Sample Linker Map File UM017105-0511284Zilog Developer Studio II – ZNEO™User Manual__VECTORS_08 absolute data T:0008 T:000B

Page 239

UM017105-0511 Sample Linker Map FileZilog Developer Studio II – ZNEO™User Manual285 Segment: NEAR_BSS R:FFB004 R:FFB0

Page 240 - Address Spaces and Segments

Sample Linker Map File UM017105-0511286Zilog Developer Studio II – ZNEO™User Manual Name Base Top

Page 241 - Segments

UM017105-0511 Sample Linker Map FileZilog Developer Studio II – ZNEO™User Manual287 Name Base Top

Page 242 - Output Files

Sample Linker Map File UM017105-0511288Zilog Developer Studio II – ZNEO™User Manual Name Base Top

Page 243 - Source Listing (.lst) Format

UM017105-0511 Sample Linker Map FileZilog Developer Studio II – ZNEO™User Manual289 Name Base Top

Page 244 - Source Language Structure

Sample Linker Map File UM017105-0511290Zilog Developer Studio II – ZNEO™User Manual Name Base Top

Page 245 - Directive

UM017105-0511 Sample Linker Map FileZilog Developer Studio II – ZNEO™User Manual291 Name Base Top

Page 246 - Assembler Rules

Developer’s Environment Tutorial UM017105-05114Zilog Developer Studio II – ZNEO™User Manual11. Accept the defaults by clicking Next. The Target and

Page 247

Sample Linker Map File UM017105-0511292Zilog Developer Studio II – ZNEO™User Manual___print_out R:FFB034 PRINT_GLOBALS NEAR

Page 248 - Expressions

UM017105-0511 Sample Linker Map FileZilog Developer Studio II – ZNEO™User Manual293__VECTOR_50 T:0000 vect50 __VE

Page 249 - LOW and LOW16 Operators

Sample Linker Map File UM017105-0511294Zilog Developer Studio II – ZNEO™User Manual_len_farbss 00000000 (User Defined)_len_f

Page 250 - Octal Numbers

UM017105-0511 Troubleshooting the LinkerZilog Developer Studio II – ZNEO™User Manual295Troubleshooting the LinkerReview the following questions to l

Page 251 - Operator Precedence

Troubleshooting the Linker UM017105-0511296Zilog Developer Studio II – ZNEO™User ManualHow do I determine the size of my actual hex code?Refer to th

Page 252

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual297Warning and Error MessagesIf you see an internal error messag

Page 253 - Instruction Alignment

Warning and Error Messages UM017105-0511298Zilog Developer Studio II – ZNEO™User Manual719 "<segment>" is an absolute or located seg

Page 254 - Directives

UM017105-0511 Warning and Error MessagesZilog Developer Studio II – ZNEO™User Manual299745 Configuration bits mismatch in file <file>. The mod

Page 255 - .COMMENT

Warning and Error Messages UM017105-0511300Zilog Developer Studio II – ZNEO™User Manual

Page 256 - Data Directives

UM017105-0511 Configuring Memory for Your ProgramZilog Developer Studio II – ZNEO™User Manual301Chapter 7. Configuring Memory for Your ProgramThe ZN

Page 257 - DL Declaration Type

UM017105-0511 Developer’s Environment TutorialZilog Developer Studio II – ZNEO™User Manual512. Click Next to accept the defaults. The Target Memory

Page 258 - DW24 Declaration Type

ZNEO Memory Layout UM017105-0511302Zilog Developer Studio II – ZNEO™User Manualcan also be used in these ranges. The range 00_8000H–FF_7FFFH require

Page 259 - ORG Clause

UM017105-0511 Programmer’s Model of ZNEO MemoryZilog Developer Studio II – ZNEO™User Manual303ZNEO CPU-based devices have internal nonvolatile memor

Page 260 - SPACE Clause

Programmer’s Model of ZNEO Memory UM017105-0511304Zilog Developer Studio II – ZNEO™User Manual•Data in 16-bit addressable memory can be addressed wi

Page 261

UM017105-0511 Programmer’s Model of ZNEO MemoryZilog Developer Studio II – ZNEO™User Manual305The EROM range extends to the highest nonvolatile memo

Page 262

Programmer’s Model of ZNEO Memory UM017105-0511306Zilog Developer Studio II – ZNEO™User Manual Figure 131. Typical ZNEO Programmer’s Model—GeneralPh

Page 263

UM017105-0511 Programmer’s Model of ZNEO MemoryZilog Developer Studio II – ZNEO™User Manual307The following default segments are provided by the ass

Page 264 - .SHORT_STACK_FRAME

Program Configurations UM017105-0511308Zilog Developer Studio II – ZNEO™User Manual•The ZDS II GUI assumes external I/O is located in the range FF_C

Page 265

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual309 The start-up code (which is provided in the form of both source

Page 266

Program Configurations UM017105-0511310Zilog Developer Studio II – ZNEO™User ManualFigure 132 and the other program configuration figures omit physi

Page 267

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual311segment NEAR_BSS val: dl %12345678 ; incorrect usage for product

Page 268

Developer’s Environment Tutorial UM017105-05116Zilog Developer Studio II – ZNEO™User Manual13. Click Finish. ZDS II creates a new project named sam

Page 269 - .TAG Directive

Program Configurations UM017105-0511312Zilog Developer Studio II – ZNEO™User ManualDEFINE __EXTCS0_INIT_PARAM = $8012DEFINE __EXTCS1_INIT_PARAM = $8

Page 270 - .UNION Directive

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual313figuration; the only difference is that aside from the start-up c

Page 271 - .WITH and .ENDWITH Directives

Program Configurations UM017105-0511314Zilog Developer Studio II – ZNEO™User ManualC Program SetupThe C program setup for the Download to ERAM Progr

Page 272 - Conditional Assembly

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual315command in the Additional Linker Directives dialog box (see Addit

Page 273

Program Configurations UM017105-0511316Zilog Developer Studio II – ZNEO™User ManualBecause RAM cannot retain values across power cycles, this config

Page 274

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual317ZNEO devices, so the Download to RAM Program Configuration could

Page 275 - Macro Definition

Program Configurations UM017105-0511318Zilog Developer Studio II – ZNEO™User ManualWrite all of the executable program code (non-start-up code) unde

Page 276 - Concatenation

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual319program is too large to fit into internal Flash), but you do not

Page 277 - Optional Macro Arguments

Program Configurations UM017105-0511320Zilog Developer Studio II – ZNEO™User Manual1. To set up this configuration, you must place the CODE segment

Page 278 - Exiting a Macro

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual321This directs the C-Compiler to generate different code segment na

Page 279 - Label Spaces

UM017105-0511 Developer’s Environment TutorialZilog Developer Studio II – ZNEO™User Manual72. In the Add Files to Project dialog box, return to the

Page 280 - Source Language Syntax

Program Configurations UM017105-0511322Zilog Developer Studio II – ZNEO™User ManualWrite all of the executable program code (non-start-up code) unde

Page 281

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual323 In this respect, this configuration obviously is very similar to

Page 282

Program Configurations UM017105-0511324Zilog Developer Studio II – ZNEO™User ManualC Program SetupThe C program setup for Copy to RAM Program Config

Page 283

UM017105-0511 Program ConfigurationsZilog Developer Studio II – ZNEO™User Manual325Special Case: Partial Copy to RAMA special case of this configura

Page 284

Program Configurations UM017105-0511326Zilog Developer Studio II – ZNEO™User Manual4. Finally, add your modified start-up module to your project by

Page 285

UM017105-0511 Using the DebuggerZilog Developer Studio II – ZNEO™User Manual327Chapter 8. Using the DebuggerThe source-level debugger is a program t

Page 286

Status Bar UM017105-0511328Zilog Developer Studio II – ZNEO™User ManualThe Debug toolbar is described in the Debug Toolbar section on page 20, and t

Page 287 - Linker Functions

UM017105-0511 Debug WindowsZilog Developer Studio II – ZNEO™User Manual329Debug WindowsThe Debug Windows toolbar (described in the Debug Windows Too

Page 288 - Linker Commands

Debug Windows UM017105-0511330Zilog Developer Studio II – ZNEO™User ManualSpecial Function Registers WindowClick the Special Function Registers Wind

Page 289

UM017105-0511 Debug WindowsZilog Developer Studio II – ZNEO™User Manual3311. In the Special Function Registers window, highlight the value you want

Page 290

Developer’s Environment Tutorial UM017105-05118Zilog Developer Studio II – ZNEO™User ManualTo view a file in the Edit window during the tutorial, do

Page 291

Debug Windows UM017105-0511332Zilog Developer Studio II – ZNEO™User ManualEach Memory window displays data located in the target’s memory. The ASCII

Page 292

UM017105-0511 Debug WindowsZilog Developer Studio II – ZNEO™User Manual3331. In the window, highlight the value you want to change. The values begin

Page 293

Debug Windows UM017105-0511334Zilog Developer Studio II – ZNEO™User ManualFill MemoryUse this procedure to write a common value in all of the memory

Page 294

UM017105-0511 Debug WindowsZilog Developer Studio II – ZNEO™User Manual3356. Click OK to fill the selected memory.Save Memory to a FilePerform the f

Page 295 - MAXHEXLEN

Debug Windows UM017105-0511336Zilog Developer Studio II – ZNEO™User Manual4. In the File Name field, enter the path and name of the file to load or

Page 296 - MAXLENGTH

UM017105-0511 Debug WindowsZilog Developer Studio II – ZNEO™User Manual3375. Enter the end address in the End Address field. If the end address is n

Page 297

Debug Windows UM017105-0511338Zilog Developer Studio II – ZNEO™User Manual•View an ASCII Value – see page 339•View a NULL-Terminated ASCII (ASCIZ) S

Page 298 - SEQUENCE

UM017105-0511 Debug WindowsZilog Developer Studio II – ZNEO™User Manual339View a Decimal ValueTo view the decimal values of an expression, perform t

Page 299 - SPLITTABLE

Debug Windows UM017105-0511340Zilog Developer Studio II – ZNEO™User ManualCall Stack WindowClick the Call Stack Window button to show or hide the Ca

Page 300 - WARNING IS FATAL

UM017105-0511 Debug WindowsZilog Developer Studio II – ZNEO™User Manual341Close the Symbols window before running a command script.The Symbols windo

Page 301 - Linker Expressions

UM017105-0511 Developer’s Environment TutorialZilog Developer Studio II – ZNEO™User Manual92. In the Configuration drop-down menu in the upper left

Page 302 - & (And)

Debug Windows UM017105-0511342Zilog Developer Studio II – ZNEO™User ManualThe Disassembly window displays the assembly code associated with the code

Page 303 - BASE OF Versus LOWADDR OF

UM017105-0511 Using BreakpointsZilog Developer Studio II – ZNEO™User Manual343The Simulated UART Output window displays the simulated output of the

Page 304 - / (Divide)

Using Breakpoints UM017105-0511344Zilog Developer Studio II – ZNEO™User ManualInserting BreakpointsThere are three ways to place a breakpoint in you

Page 305 - HIGHADDR

UM017105-0511 Using BreakpointsZilog Developer Studio II – ZNEO™User Manual345You can use the Breakpoints dialog box to view, go to, enable, disable

Page 306 - Hexadecimal Numeric Values

Using Breakpoints UM017105-0511346Zilog Developer Studio II – ZNEO™User Manual•Place your cursor in the line in the file where you want to activate

Page 307 - - (Subtract)

UM017105-0511 Using BreakpointsZilog Developer Studio II – ZNEO™User Manual347•Place your cursor in the line in the file where there is a breakpoint

Page 308 - Sample Linker Map File

Using Breakpoints UM017105-0511348Zilog Developer Studio II – ZNEO™User Manual

Page 309

UM017105-0511 Building a Project from the Command LineZilog Developer Studio II – ZNEO™User Manual349Appendix A. Running ZDS II from the Command Lin

Page 310

Running the Compiler from the Command Line UM017105-0511350Zilog Developer Studio II – ZNEO™User Manualmake rebuildall -f sampleproject_Debug.makRun

Page 311

UM017105-0511 Running the Assembler from the Command LineZilog Developer Studio II – ZNEO™User Manual351Running the Assembler from the Command LineT

Page 312

Developer’s Environment Tutorial UM017105-051110Zilog Developer Studio II – ZNEO™User Manual4. Make sure that the Generate Assembly Listing Files (.

Page 313

Assembler Command Line Options UM017105-0511352Zilog Developer Studio II – ZNEO™User ManualTable 23. Assembler Command Line Options Option Name Desc

Page 314

UM017105-0511 Assembler Command Line OptionsZilog Developer Studio II – ZNEO™User Manual353-nodebug Does not create a debug information file for the

Page 315

Compiler Command Line Options UM017105-0511354Zilog Developer Studio II – ZNEO™User ManualCompiler Command Line OptionsTable 24 describes the compil

Page 316

UM017105-0511 Compiler Command Line OptionsZilog Developer Studio II – ZNEO™User Manual355-listinc Displays included files in the compiler listing f

Page 317

Librarian Command Line Options UM017105-0511356Zilog Developer Studio II – ZNEO™User ManualLibrarian Command Line OptionsTable 25 describes the libr

Page 318

UM017105-0511 Linker Command Line OptionsZilog Developer Studio II – ZNEO™User Manual357Linker Command Line OptionsTable 26 describes the linker com

Page 319

Linker Command Line Options UM017105-0511358Zilog Developer Studio II – ZNEO™User Manual-igcase Suppresses case sensitivity of user-defined symbols.

Page 320

UM017105-0511 Zilog Developer Studio II – ZNEO™User Manual359Appendix B. Using the Command ProcessorThe Command Processor allows you to use commands

Page 321

UM017105-0511360Zilog Developer Studio II – ZNEO™User ManualThe following examples show illegal usage:cd "..\path/to\change/to" cd ".

Page 322

UM017105-0511 Zilog Developer Studio II – ZNEO™User Manual361Project (cont’d)Settings (Listing Files page)Generate C Listing Files (.lis)With Include

Page 323 - Troubleshooting the Linker

UM017105-0511 Developer’s Environment TutorialZilog Developer Studio II – ZNEO™User Manual116. Select the Limit Optimizations for Easier Debugging c

Page 324

UM017105-0511362Zilog Developer Studio II – ZNEO™User ManualProject (cont’d)Settings (Output page) Output File NameGenerate Map FileSort Symbols BySh

Page 325

UM017105-0511 Sample Command Script FileZilog Developer Studio II – ZNEO™User Manual363Sample Command Script FileA script file is a text-based file

Page 326

Supported Script File Commands UM017105-0511364Zilog Developer Studio II – ZNEO™User ManualThis script consecutively opens two projects, sets a brea

Page 327

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual365batchThe batch command runs a script file through the Com

Page 328

Supported Script File Commands UM017105-0511366Zilog Developer Studio II – ZNEO™User ManualBP WHEN READ &my_var break when read variable my_

Page 329 - ZNEO Memory Layout

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual367cdThe cd command changes the working directory to dir. Th

Page 330

Supported Script File Commands UM017105-0511368Zilog Developer Studio II – ZNEO™User Manual•debugtool copy NAME="<new debug tool name>&qu

Page 331

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual369•debugtool list COMMTYPE="<type>" display

Page 332

Supported Script File Commands UM017105-0511370Zilog Developer Studio II – ZNEO™User ManualdefinesThe defines command provides a mechanism to add to

Page 333

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual371? [<data_type>] [<radix>] <expr> [:<

Page 334

Revision History UM017105-0511ivZilog Developer Studio II – ZNEO™User ManualJun 200602 Updated ZDS II System Requirements section. vChanged FAQ.txt

Page 335 - Unconventional Memory Layouts

Developer’s Environment Tutorial UM017105-051112Zilog Developer Studio II – ZNEO™User Manual8. Make certain the Generate Printfs Inline checkbox is

Page 336 - Program Configurations

Supported Script File Commands UM017105-0511372Zilog Developer Studio II – ZNEO™User ManualWhen displaying a structure's value, the examine com

Page 337

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual373The following list presents examples:gogo myfunclist bpTh

Page 338 - Assembly Program Setup

Supported Script File Commands UM017105-0511374Zilog Developer Studio II – ZNEO™User ManualFor example:log "buildall.log"log onlog offmakf

Page 339

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual375•NOREPLACE is an optional parameter to use to prevent the

Page 340

Supported Script File Commands UM017105-0511376Zilog Developer Studio II – ZNEO™User ManualTable 28 lists some command line examples and the corresp

Page 341

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual377Compiler Optionsquiet Toggles quiet assemble. TRUE, FALSE

Page 342

Supported Script File Commands UM017105-0511378Zilog Developer Studio II – ZNEO™User ManualDebugger OptionsFor debugger options, use the target help

Page 343

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual379Linker OptionsTable 33. Linker Options Option NameDescrip

Page 344

Supported Script File Commands UM017105-0511380Zilog Developer Studio II – ZNEO™User ManualprintThe print command writes formatted data to the Comma

Page 345

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual381quitThe quit command ends the current debug session. The

Page 346

UM017105-0511 Developer’s Environment TutorialZilog Developer Studio II – ZNEO™User Manual1310. Make sure that the IEEE 695 and Intel Hex32 - Record

Page 347

Supported Script File Commands UM017105-0511382Zilog Developer Studio II – ZNEO™User Manualsavemem SPACE="ROM" FORMAT=TEXT "c:\temp\f

Page 348

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual383stepoutThe stepout command steps out of the function. Thi

Page 349

Supported Script File Commands UM017105-0511384Zilog Developer Studio II – ZNEO™User ManualUse the target setup command to view available data items

Page 350

UM017105-0511 Supported Script File CommandsZilog Developer Studio II – ZNEO™User Manual385To set a target value, use one of the following syntaxes:

Page 351

Supported Script File Commands UM017105-0511386Zilog Developer Studio II – ZNEO™User ManualwaitThe wait command instructs the Command Processor to w

Page 352

UM017105-0511 Running the Flash Loader from the Command Zilog Developer Studio II – ZNEO™User Manual387Running the Flash Loader from the Command Pro

Page 353

Running the Flash Loader from the Command Processor UM017105-0511388Zilog Developer Studio II – ZNEO™User ManualExecuting Flash CommandsThe Flash Loa

Page 354

UM017105-0511 Running the Flash Loader from the Command Zilog Developer Studio II – ZNEO™User Manual389FLASH Options "c:\testing\test.hex"

Page 355 - Chapter 8. Using the Debugger

Running the Flash Loader from the Command Processor UM017105-0511390Zilog Developer Studio II – ZNEO™User Manual

Page 356 - Code Line Indicators

UM017105-0511 Zilog Developer Studio II – ZNEO™User Manual391Appendix C. C Standard LibraryAs described in the Run-Time Library section on page 177,

Page 357 - Debug Windows

Developer’s Environment Tutorial UM017105-051114Zilog Developer Studio II – ZNEO™User Manual13. Observe the compilation process in the Build Output

Page 358

Standard Header Files UM017105-0511392Zilog Developer Studio II – ZNEO™User ManualThe standard include header files are located in the following dir

Page 359 - Memory Window

UM017105-0511 Standard Header FilesZilog Developer Studio II – ZNEO™User Manual393Errors <errno.h>The <errno.h> header defines macros re

Page 360 - Change Values

Standard Header Files UM017105-0511394Zilog Developer Studio II – ZNEO™User ManualDiagnostics <assert.h>The <assert.h> header declares t

Page 361 - View or Search for an Address

UM017105-0511 Standard Header FilesZilog Developer Studio II – ZNEO™User Manual395Character TestingCharacter Case MappingLimits <limits.h>The

Page 362 - Fill Memory

Standard Header Files UM017105-0511396Zilog Developer Studio II – ZNEO™User ManualIf the value of an object of type char sign-extends when used in a

Page 363 - Load a File into Memory

UM017105-0511 Standard Header FilesZilog Developer Studio II – ZNEO™User Manual397The limits for the double and long double data types are the same

Page 364

Standard Header Files UM017105-0511398Zilog Developer Studio II – ZNEO™User ManualMathematics <math.h>The <math.h> header declares sever

Page 365 - Watch Window

UM017105-0511 Standard Header FilesZilog Developer Studio II – ZNEO™User Manual399The following additional trigonometric functions are provided:Hype

Page 366 - View a Hexadecimal Value

Standard Header Files UM017105-0511400Zilog Developer Studio II – ZNEO™User ManualThe following additional exponential functions are provided:Logari

Page 367 - Locals Window

UM017105-0511 Standard Header FilesZilog Developer Studio II – ZNEO™User Manual401The following additional nearest integer functions are provided:No

Page 368 - Symbols Window

UM017105-0511 Using the Integrated Development EnvironmentZilog Developer Studio II – ZNEO™User Manual15Chapter 2. Using the Integrated Development

Page 369 - Disassembly Window

Standard Header Files UM017105-0511402Zilog Developer Studio II – ZNEO™User ManualVariable Argument List Access Macros and FunctionThe va_start and

Page 370 - Simulated UART Output Window

UM017105-0511 Standard Header FilesZilog Developer Studio II – ZNEO™User Manual403General Utilities <stdlib.h>The <stdlib.h> header decl

Page 371 - Using Breakpoints

Standard Header Files UM017105-0511404Zilog Developer Studio II – ZNEO™User ManualThe following additional string conversion functions are provided:

Page 372 - Viewing Breakpoints

UM017105-0511 Standard Header FilesZilog Developer Studio II – ZNEO™User Manual405Integer ArithmeticString Handling <string.h>The <string.h

Page 373 - Enabling Breakpoints

Standard Header Files UM017105-0511406Zilog Developer Studio II – ZNEO™User ManualConcatenationComparisonThe sign of the value returned by the compa

Page 374 - Removing Breakpoints

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual407MiscellaneousStandard FunctionsThe following functions are standard f

Page 375 - from the context menu

Standard Functions UM017105-0511408Zilog Developer Studio II – ZNEO™User ManualReturnsThe absolute value.Exampleint I=-5632;int j;j=abs(I);acos, a

Page 376

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual409Exampledouble y=.1234;double x;x = asin(y);assertPuts diagnostics i

Page 377 - Command Line

Standard Functions UM017105-0511410Zilog Developer Studio II – ZNEO™User ManualExampledouble y=.1234;double x;x=atan(y);atan2, atan2fComputes the

Page 378

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual411Examplechar str []="1.234";double x;x= atof(str);atoiConv

Page 379

Toolbars UM017105-051116Zilog Developer Studio II – ZNEO™User ManualFor a table of all of the shortcuts used in the ZNEO developer’s environment, see

Page 380

Standard Functions UM017105-0511412Zilog Developer Studio II – ZNEO™User ManualbsearchSearches an array of nmemb objects, the initial member of whic

Page 381

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual413callocAllocates space for an array of nmemb objects, each of whose si

Page 382 - Compiler Command Line Options

Standard Functions UM017105-0511414Zilog Developer Studio II – ZNEO™User Manualcos, cosfComputes the cosine of x (measured in radians). A large magn

Page 383

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual415matical quotient, and the magnitude of the quotient is the largest in

Page 384

Standard Functions UM017105-0511416Zilog Developer Studio II – ZNEO™User Manualfabs, fabsfComputes the absolute value of a floating-point number x.S

Page 385 - Linker Command Line Options

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual417Synopsis#include <math.h>double fmod(double x, double y);floa

Page 386

Standard Functions UM017105-0511418Zilog Developer Studio II – ZNEO™User ManualSynopsis#include <math.h>double frexp(double value, int *exp);

Page 387 - Processor

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual419getsReads characters from the input stream into the array pointed to

Page 388

Standard Functions UM017105-0511420Zilog Developer Studio II – ZNEO™User ManualisalphaTests for any character for which isupper or islower is true.S

Page 389

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual421isgraphTests for any printing character except space (' ').

Page 390

UM017105-0511 ToolbarsZilog Developer Studio II – ZNEO™User Manual17•Find Toolbar – see page 19•Command Processor Toolbar – see page 19•Debug Toolba

Page 391 - Sample Command Script File

Standard Functions UM017105-0511422Zilog Developer Studio II – ZNEO™User ManualispunctTests for any printing character except space (' ')

Page 392

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual423isxdigitTests for any hexadecimal digit '0' to '9&apos

Page 393

Standard Functions UM017105-0511424Zilog Developer Studio II – ZNEO™User ManualExampledouble x=1.235int exp=2;double y;y=ldexp(x,exp);ldivCompute

Page 394

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual425Exampledouble x=2.56;double y;y=log(x);log10, log10fComputes the ba

Page 395

Standard Functions UM017105-0511426Zilog Developer Studio II – ZNEO™User ManualSynopsis#include <setjmp.h>void longjmp(jmp_buf env, int val);

Page 396

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual427memchrLocates the first occurrence of c (converted to an unsigned cha

Page 397

Standard Functions UM017105-0511428Zilog Developer Studio II – ZNEO™User ManualmemcpyCopies n characters from the object pointed to by s2 into the o

Page 398

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual429Synopsis#include <string.h>void *memset(void *s, int c, size_t

Page 399

Standard Functions UM017105-0511430Zilog Developer Studio II – ZNEO™User ManualReturnsThe value of x raised to the power y.Exampledouble x=2.0;doub

Page 400

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual431G conversion character applies to a long_double argument. If an h, l,

Page 401

Toolbars UM017105-051118Zilog Developer Studio II – ZNEO™User ManualBuild ToolbarThe Build toolbar, shown in Figure 16, allows you to build your proj

Page 402

Standard Functions UM017105-0511432Zilog Developer Studio II – ZNEO™User Manualprintf Conversion Charactersspace If the first character of a signed

Page 403

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual433In no case does a nonexistent or small field width cause truncation o

Page 404 - Assembler Options

Standard Functions UM017105-0511434Zilog Developer Studio II – ZNEO™User ManualputsWrites the string pointed to by s to the serial port and appends

Page 405 - Compiler Options

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual435Exampleint lst[]={5,8,2,9};int compare (const void * x, const void *

Page 406 - Librarian Options

Standard Functions UM017105-0511436Zilog Developer Studio II – ZNEO™User Manualzero, the realloc function returns a null pointer and, if ptr is not

Page 407 - Linker Options

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual437a pointer to long_int. Similarly, the conversion character u can be p

Page 408

Standard Functions UM017105-0511438Zilog Developer Studio II – ZNEO™User ManualSee the next section, scanf Conversion Characters, for valid input in

Page 409

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual439If a conversion specification is invalid, the behavior is undefined.T

Page 410

Standard Functions UM017105-0511440Zilog Developer Studio II – ZNEO™User ManualsetjmpSaves its calling environment in its jmp_buf argument, for late

Page 411

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual441sinh, sinhfComputes the hyperbolic sine of x. A range error occurs if

Page 412

UM017105-0511 ToolbarsZilog Developer Studio II – ZNEO™User Manual19Insert/Remove Breakpoint Button. The Insert/Remove Breakpoint button sets a new

Page 413

Standard Functions UM017105-0511442Zilog Developer Studio II – ZNEO™User ManualSynopsis#include <math.h>double sqrt(double x);float sqrtf(fl

Page 414

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual443ReturnsThe value of the macro EOF if an input failure occurs before a

Page 415

Standard Functions UM017105-0511444Zilog Developer Studio II – ZNEO™User ManualReturnsA pointer to the located character or a null pointer if the ch

Page 416 - Executing Flash Commands

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual445Examplechar s1[80], *s2;s2=strcpy(s1,"Production");strcspn

Page 417

Standard Functions UM017105-0511446Zilog Developer Studio II – ZNEO™User ManualstrncatAppends no more than n characters of the string pointed to by

Page 418

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual447strncpyCopies not more than n characters from the string pointed to b

Page 419

Standard Functions UM017105-0511448Zilog Developer Studio II – ZNEO™User ManualstrrchrLocates the last occurrence of c (converted to a char) in the

Page 420 - Standard Header Files

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual449Synopsis#include <string.h>char *strstr(const char *s1, const

Page 421 - Errors <errno.h>

Standard Functions UM017105-0511450Zilog Developer Studio II – ZNEO™User Manualvalue causes underflow, zero is returned and the macro errno acquires

Page 422 - Diagnostics <assert.h>

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual451t = strtok(str,"?"); /* t points to the token "a"

Page 423 - Limits <limits.h>

Toolbars UM017105-051120Zilog Developer Studio II – ZNEO™User ManualRun Command Button. Executes the command in the Command field. Output from the ex

Page 424

Standard Functions UM017105-0511452Zilog Developer Studio II – ZNEO™User Manualtan, tanfThe tangent of x (measured in radians). A large magnitude ar

Page 425

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual453Synopsis#include <ctype.h>int tolower(int c);ReturnsIf the arg

Page 426 - Mathematics <math.h>

Standard Functions UM017105-0511454Zilog Developer Studio II – ZNEO™User ManualSynopsis#include <stdarg.h>type va_arg(va_list ap, type);Retur

Page 427 - Exponential

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual455Synopsis#include <stdarg.h>void va_end(va_list ap);ExampleThe

Page 428

Standard Functions UM017105-0511456Zilog Developer Studio II – ZNEO™User ManualExampleThe function f1 gathers into an array a list of arguments that

Page 429 - Functions

UM017105-0511 Standard FunctionsZilog Developer Studio II – ZNEO™User Manual457vsprintfEquivalent to sprintf, with the variable argument list replac

Page 430 - Input/Output <stdio.h>

Standard Functions UM017105-0511458Zilog Developer Studio II – ZNEO™User Manual

Page 431

UM017105-0511 GlossaryZilog Developer Studio II – ZNEO™User Manual459GlossaryAABS. Absolute Value.A/D. Analog-to-Digital—the conversion of an analog

Page 432

Glossary UM017105-0511460Zilog Developer Studio II – ZNEO™User ManualBbaud. A unit of measure of transmission capacity. The speed at which a modem ca

Page 433

UM017105-0511 GlossaryZilog Developer Studio II – ZNEO™User Manual461CPU. Abbreviation for Central Processing Unit. 1. The portion of a computer tha

Page 434

UM017105-0511 ToolbarsZilog Developer Studio II – ZNEO™User Manual21Stop Debugging Button. Ends the current debug session. To stop program execution

Page 435 - Standard Functions

Glossary UM017105-0511462Zilog Developer Studio II – ZNEO™User ManualGgraphical user interface (GUI). 1. A graphics-based user interface that enables

Page 436

UM017105-0511 GlossaryZilog Developer Studio II – ZNEO™User Manual463IPR. Interrupt Priority Register.JJP. Jump.KK. Thousands. May indicate 1000 or

Page 437

Glossary UM017105-0511464Zilog Developer Studio II – ZNEO™User ManualNEG. Negate.NMI. Nonmaskable interrupt.NOP. An acronym for No Operation, an inst

Page 438 - Synopsis

UM017105-0511 GlossaryZilog Developer Studio II – ZNEO™User Manual465SSCF. Set C Flag.SL. Shift Left.SLL. Shift Left Logical.SP. Stack Pointer.SR. S

Page 439

Glossary UM017105-0511466Zilog Developer Studio II – ZNEO™User Manual

Page 440

Zilog Developer Studio II – ZNEO™User Manual467UM017105-0511 IndexIndexSymbols^ (bitwise exclusive or) 280_ (underscore)for assembly routine names 174

Page 441

468Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511<string.h> header 405<zneo.h> header 178>> (shift right) 279| (or)

Page 442

Zilog Developer Studio II – ZNEO™User Manual469UM017105-0511 Indexbinary numbers 222Boolean operators 221case sensitivity 49character constants 223cha

Page 443

470Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511adding 27deleting 28example 27finding 28, 29inserting 27jumping to 28, 29moving to 2

Page 444

Zilog Developer Studio II – ZNEO™User Manual471UM017105-0511 Indexcd, script file command 367ceil function 400, 413ceilf function 401, 413CHANGE comma

Page 445

UM017105-0511 PrefaceZilog Developer Studio II – ZNEO™User ManualvPrefaceThe following sections provide an introduction to Zilog Developer Studio II

Page 446

Toolbars UM017105-051122Zilog Developer Studio II – ZNEO™User ManualDebug Windows ToolbarThe Debug Windows toolbar, shown in Figure 20, allows you to

Page 447

472Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511in Project Workspace window 24Locals window 339Simulated UART Output window 343Watch

Page 448

Zilog Developer Studio II – ZNEO™User Manual473UM017105-0511 IndexDebugger page 74Debugger script filecommands 364example 363writing 363Debugger tab 1

Page 449

474Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511div_t 403DL directive 229Down button 41, 42Download Code button 18, 20DS directive 2

Page 450

Zilog Developer Studio II – ZNEO™User Manual475UM017105-0511 IndexExternal Flash Base field 78External Flash check box 78, 89External references, reso

Page 451

476Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511FLT_MANT_DIG 396FLT_MAX 396FLT_MAX_10_EXP 397FLT_MAX_EXP 397FLT_MIN 397FLT_MIN_10_EX

Page 452

Zilog Developer Studio II – ZNEO™User Manual477UM017105-0511 Indexldexp 423ldexpf 423ldiv 424library 392linker 259log 424log10 425log10f 425logarithmi

Page 453

478Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511General tab 96Generate Assembly Listing Files (.lst) check box 51, 55Generate Assemb

Page 454

Zilog Developer Studio II – ZNEO™User Manual479UM017105-0511 IndexInput/output macro 402Insert Breakpoint command 344Insert Spaces button 98Insert/Rem

Page 455

480Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511creating 267, 268Linkercase sensitivity 49command line options 357commands 260creati

Page 456

Zilog Developer Studio II – ZNEO™User Manual481UM017105-0511 IndexLinker map file, sample 280Linker/locator error messages 297Linker/locator warning m

Page 457

UM017105-0511 WindowsZilog Developer Studio II – ZNEO™User Manual23WindowsFour ZDS II windows allow you to see various aspects of the tools while wo

Page 458

482Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511error reporting 393exiting 250expanding 51floating point 396general utility 403input

Page 459

Zilog Developer Studio II – ZNEO™User Manual483UM017105-0511 Indexdefining 262definition 259Moving characters 428NName button 74Name for New Target fi

Page 460

484Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511Debugger tab 102, 104Editor tab 97, 98, 100General tab 96, 97Opto-isolated USB Smart

Page 461

Zilog Developer Studio II – ZNEO™User Manual485UM017105-0511 Indexrand function 404, 435RAND_MAX macro 403RANGE command 269Range error, generating 70R

Page 462

486Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511creating 213defining 231definition 212linking sequence 269locating 231, 266moving 26

Page 463

Zilog Developer Studio II – ZNEO™User Manual487UM017105-0511 IndexStarting a project 2Startup files 187STARTUP segment 188Status bar 328<stdarg.h&g

Page 464

488Zilog Developer Studio II – ZNEO™User ManualIndex UM017105-0511Find 19Toolbars tab 93Tools menu 87Calculate File Checksum 92Customize 93Firmware Up

Page 465

Zilog Developer Studio II – ZNEO™User Manual489UM017105-0511 Indexviewing decimal values 339viewing hexadecimal values 338viewing NULL-terminated ASCI

Page 466

Index UM017105-0511Zilog Developer Studio II – ZNEO™User ManualZilog Developer Studio II – ZNEO™User Manual490

Page 467

UM017105-0511 Customer SupportZilog Developer Studio II – ZNEO™User Manual491Customer SupportTo share comments, get your technical questions answere

Page 468

Windows UM017105-051124Zilog Developer Studio II – ZNEO™User ManualThe Project Workspace window provides access to related functions using context me

Page 469

Customer Support UM017105-0511492Zilog Developer Studio II – ZNEO™User Manual

Page 470

UM017105-0511 WindowsZilog Developer Studio II – ZNEO™User Manual25The Edit window supports the shortcuts listed in Table 1.Using the Context MenusT

Page 471

Windows UM017105-051126Zilog Developer Studio II – ZNEO™User Manual•Cut, copy, and paste text•Go to the Disassembly window•Show the program counter•I

Page 472

UM017105-0511 WindowsZilog Developer Studio II – ZNEO™User Manual27To insert a bookmark, position the cursor on the desired line of the active file

Page 473

Windows UM017105-051128Zilog Developer Studio II – ZNEO™User ManualTo remove a bookmark, position the cursor on the line of the active file containin

Page 474

UM017105-0511 WindowsZilog Developer Studio II – ZNEO™User Manual29encountered. If no bookmarks are set in the active file, this function has no eff

Page 475

Windows UM017105-051130Zilog Developer Studio II – ZNEO™User ManualDebug Output Window. Holds all text messages generated by the debugger while you a

Page 476

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual31Messages Output Window. Holds informational messages intended for the user. The

Page 477

ZDS II System Requirements UM017105-0511viZilog Developer Studio II – ZNEO™User ManualRecommended Host System Configuration•Windows XP Professiona

Page 478

Menu Bar UM017105-051132Zilog Developer Studio II – ZNEO™User Manual•Edit Menu – see page 40•View Menu – see page 44•Project Menu – see page 45•Buil

Page 479

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual331. Select New Project from the File menu. The New Project dialog box is displaye

Page 480

Menu Bar UM017105-051134Zilog Developer Studio II – ZNEO™User ManualThe following characters cannot be used in a project name: ( ) $ , . - + [ ] &ap

Page 481

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual3510. Select whether your project is linked to the standard C start-up module, C r

Page 482

Menu Bar UM017105-051136Zilog Developer Studio II – ZNEO™User Manual17. Enter the memory ranges appropriate for the target CPU.18. Click Finish.Open

Page 483

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual372. Use the Look In drop-down menu to navigate to the directory in which your pro

Page 484

Menu Bar UM017105-051138Zilog Developer Studio II – ZNEO™User ManualClose Project. Select Close Project from the File menu to close the currently ac

Page 485

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual392. From the File menu, select Print Preview. The file is displayed in a new wind

Page 486

Menu Bar UM017105-051140Zilog Developer Studio II – ZNEO™User ManualEdit MenuThe Edit menu provides access to basic editing, text search, and breakp

Page 487 - Glossary

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual414. Select the Match Case checkbox if you want the search to be case-sensitive.5.

Page 488

UM017105-0511 Zilog Technical SupportZilog Developer Studio II – ZNEO™User ManualviiWhen Using the USB Smart Cable•High-speed USB (fully compatible

Page 489

Menu Bar UM017105-051142Zilog Developer Studio II – ZNEO™User Manual4. Use the Browse button ( ) or the In Folder drop-down menu to select the locat

Page 490

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual438. Click Find Next to jump to the next occurrence of the search text, click Repl

Page 491

Menu Bar UM017105-051144Zilog Developer Studio II – ZNEO™User Manualbreakpoints are indicated by a check mark in the box to the left of the breakpoi

Page 492

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual45Debug Windows. When you are in Debug mode (running the debugger), you can select

Page 493

Menu Bar UM017105-051146Zilog Developer Studio II – ZNEO™User ManualAdd FilesTo add files to your project, observe the following procedure:1. From t

Page 494 - Glossary UM017105-0511

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual47tions, such as adding your own configuration, see the Set Active Configuration s

Page 495 - UM017105-0511 Index

Menu Bar UM017105-051148Zilog Developer Studio II – ZNEO™User ManualCPU Family. Allows you to select the appropriate ZNEO family.CPU. Defines which

Page 496 - Numerics

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual49compiler, librarian, and linker are displayed during the build. If the checkbox

Page 497

Menu Bar UM017105-051150Zilog Developer Studio II – ZNEO™User Manualwhich options are to be applied to the files assembled. The options on the Assem

Page 498 - Index UM017105-0511

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual51corresponding value (<name>=<value>). Multiple symbols can be define

Page 499

Zilog Technical Support UM017105-0511viiiZilog Developer Studio II – ZNEO™User ManualBefore Contacting Technical SupportBefore you contact Zilog Tec

Page 500

Menu Bar UM017105-051152Zilog Developer Studio II – ZNEO™User ManualLimit Optimizations for Easier Debugging. Selecting this checkbox causes the com

Page 501

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual53instead be stored in memory (and on the stack if dynamic frames are in use), the

Page 502

Menu Bar UM017105-051154Zilog Developer Studio II – ZNEO™User ManualGenerate C Listing Files (.lis). When selected, the Generate C Listing Files (.l

Page 503 - File toolbar 17

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual55Files Directory checkbox in the General page. See the Intermediate Files Directo

Page 504

Menu Bar UM017105-051156Zilog Developer Studio II – ZNEO™User ManualPreprocessor Definitions. The Preprocessor Definitions field is equivalent to pl

Page 505

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual57Use Register Variables. Selecting this checkbox allows the compiler to allocate

Page 506

Menu Bar UM017105-051158Zilog Developer Studio II – ZNEO™User Manualsmall fraction of applications benefit from deselecting the Use Register Variabl

Page 507

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual59•All calls to printf() and sprintf() must use string literals, rather than char*

Page 508

Menu Bar UM017105-051160Zilog Developer Studio II – ZNEO™User Manualfor a discussion of the ZNEO address spaces) except for a particular module that

Page 509

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual61Always Generate from Settings. When this button is selected, the linker command

Page 510

UM017105-0511 Table of ContentsZilog Developer Studio II – ZNEO™User ManualixTable of ContentsRevision History . . . . . . . . . . . . . . . . . . .

Page 511 - OMF695 format 215, 216

Menu Bar UM017105-051162Zilog Developer Studio II – ZNEO™User ManualAdditional Directives. To specify additional linker directives that are to be ad

Page 512

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual63visual indication to remind you that some of your project settings might not be

Page 513

Menu Bar UM017105-051164Zilog Developer Studio II – ZNEO™User Manual4. Click Select.The Use Existing button is the alternative to the Always Generat

Page 514

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual65Additional Object/Library Modules. Use the Additional Object/Library Modules fie

Page 515

Menu Bar UM017105-051166Zilog Developer Studio II – ZNEO™User Manualnative to including the source code for the revised function explicitly in your

Page 516

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual67the standard start-up module. There are also a few linker commands (such as CHAN

Page 517

Menu Bar UM017105-051168Zilog Developer Studio II – ZNEO™User Manualvalues. For most users, this problem has now been resolved by the Generate Print

Page 518 - Index UM017105-0511

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual69The memory range fields in the Address Spaces page allow you to inform ZDS II ab

Page 519 - Customer Support

Menu Bar UM017105-051170Zilog Developer Studio II – ZNEO™User ManualProgram space (EROM). This range is typically 002000-007FFF for devices with 32

Page 520

UM017105-0511 Menu BarZilog Developer Studio II – ZNEO™User Manual71Treat All Warnings as Fatal. When selected, this checkbox causes the linker to t

Related models: Z16FMC2 | Z16FMC3 | Z16FMC6 |

Comments to this Manuals

No comments