MA019−041−00−00Doc. ver.: 10.164C166/ST10 v8.7CrossView Pro DebuggerUser’s Manual
Table of ContentsIX••••••••7.8.2 Patching Code into a Program 7−26. . . . . . . . . . . . . . . . . . 7.8.3 Replacing Code in a Program 7−26. . . . .
Using CrossView4−5Using CrossView Pro••••••••4.4 STARTUP OPTIONSCrossView Pro allows you to specify several options when you invoke theprogram. Type t
Chapter 44−6USINGWhen your execution environment itself has a human−oriented ASCIIinterface, you can use transparency mode with the −T option. Intrans
Using CrossView4−7Using CrossView Pro••••••••Startup Option Description−a number Sets the maximum number of assertions (thedefault is 100).−argcv &quo
Chapter 44−8USINGDescriptionStartup Optionboard_segBoard segment the interface card is usinghw_indexIndex of the hardaware (slot) (0,1,...)port_IO_add
Using CrossView4−9Using CrossView Pro••••••••DescriptionStartup Option−D tcp,host,port Select TCP/IP communication. On UNIX thestandard TCP/IP impleme
Chapter 44−10USINGDescriptionStartup Option−R file Starts recording screen output in file.−−radm=file Same as the radm field in the target configurati
Using CrossView4−11Using CrossView Pro••••••••4.4.1 WHAT YOU MAY HAVE DONE WRONGMost problems in starting up CrossView Pro for a debugging session ste
Chapter 44−12USING4.5 THE CROSSVIEW PRO DESKTOPThe CrossView Pro desktop is the screen background in which allwindows, icons and dialog boxes appear (
Using CrossView4−13Using CrossView Pro••••••••MenusEach CrossView Pro window may have a menu associated with it. UnderMicrosoft Windows, the active wi
Chapter 44−14USING4.5.1 MENUSEach window in CrossView Pro uses the menu as shown in figure 4−2.The method of selection of a menu item varies depending
Table of ContentsXCONTENTS9.1.5 Close File for Recording 9−6. . . . . . . . . . . . . . . . . . . . . . . 9.1.6 Command Recording Example 9−7. . . . .
Using CrossView4−15Using CrossView Pro••••••••4.5.1.1 LOCAL POPUP MENUSOn MS−Windows environments CrossView Pro supports local popupmenus. Local popup
Chapter 44−16USINGSelecting a WindowAt any one time, a particular window is active. Most operations act (bydefault) on the active window. The active w
Using CrossView4−17Using CrossView Pro••••••••4.5.3 DIALOG BOXESThe debugger uses dialog boxes to acquire information needed tocomplete a requested op
Chapter 44−18USING4.5.4 CUSTOMIZING CROSSVIEW PROYou can customize CrossView Pro’s visual appearance and operativeparameters to best suit your debuggi
Using CrossView4−19Using CrossView Pro••••••••In the File | Options... dialog you will find:• Desktop: Allows you to specify color settings for the ex
Chapter 44−20USING• Terminal Window Setup: Allows you to specify the input andoutput format of a Terminal Window. You can map linefeeds tocarriage−ret
Using CrossView4−21Using CrossView Pro••••••••4.6 CROSSVIEW PRO WINDOWSThe two prominent windows used in CrossView Pro are the CommandWindow and the S
Chapter 44−22USINGImproving CrossView Pro PerformanceCrossView Pro updates every window that is open (except for the DataAnalysis windows), even if it
Using CrossView4−23Using CrossView Pro••••••••Command Edit FieldCommand History ListOutput WindowCrossView ResponseCrossView CommandFigure 4−6: CrossV
Chapter 44−24USING4.6.2 SOURCE WINDOWThe Source Window offers most of the debugging functions you will needon a regular basis. It allows you to:• View
Table of ContentsXI••••••••11.4.2 Code Range Profiling 11−10. . . . . . . . . . . . . . . . . . . . . . . . . 11.5 Data Analysis 11−11. . . . . . . .
Using CrossView4−25Using CrossView Pro••••••••The default step modes are:Source lines Window: Source line stepDisassembly Window: Instruction stepSour
Chapter 44−26USINGShow selected source expressionWatch selected source expressionFind symbolSearch for a text stringRepeat search for text stringEdit
Using CrossView4−27Using CrossView Pro••••••••4.6.3 REGISTER WINDOWFigure 4−8 shows the Register Window. This window allows you to viewand edit regist
Chapter 44−28USING4.6.4 MEMORY WINDOWThe Memory Window is shown in figure 4−9. This window allows you toview and edit the target memory.Depending on t
Using CrossView4−29Using CrossView Pro••••••••You can specify the way data appears in the Memory Window by openingthe Memory Window Setup dialog. From
Chapter 44−30USINGDisplay data coverageHighlight changed valuesSet highlighted values as referenceRefresh memory windowYou can toggle the appearance o
Using CrossView4−31Using CrossView Pro••••••••Figure 4−10: CrossView Pro Data WindowTo set the default display format of the data shown, select the pr
Chapter 44−32USINGTo expand a pointer, structure or an array, double−click on the ’+’ in theData Window.The Data Window provides a local Toolbar conta
Using CrossView4−33Using CrossView Pro••••••••4.6.6 STACK WINDOWThe stack records the return addresses of all functions the application hascalled, and
Chapter 44−34USINGThe Stack Window provides a local Toolbar containing the followingbuttons:Set stack breakpoint after call to functionSet stack break
Table of ContentsXIICONTENTS13.3 Commands: Detailed Descriptions 13−16. . . . . . . . . . . . . . ERROR MESSAGES 14−114.1 What this Chapter Covers 14−
Using CrossView4−35Using CrossView Pro••••••••4.6.8 TERMINAL WINDOWThe Terminal Windows, shown in figure 4−13, let you observe and test theinput and o
Chapter 44−36USINGYou can specify the characteristics of the Terminal Window by opening theTerminal Window Setup dialog. From the Settings menu, selec
Using CrossView4−37Using CrossView Pro••••••••4.6.9 DATA ANALYSIS WINDOWCrossView Pro incorporates an advanced signal analysis interface designedto en
Chapter 44−38USINGUnzoom horizontally to normal (show all collected data)Zoom in verticallyZoom out verticallyUnzoom vertically to normal (show all co
Using CrossView4−39Using CrossView Pro••••••••4.7 CONTROL OPERATIONS FOR CROSSVIEW PROAll control operations can take place in any CrossView Pro Windo
Chapter 44−40USING4.8 USING THE ON−LINE HELPCrossView Pro has an extensive on−line help system to aid you. Helptopics cover all CrossView Pro Windows,
5CONTROLLINGPROGRAMEXECUTIONCHAPTER
Chapter 55−2PROGRAM EXECUTION5CHAPTER
Controlling Program Execution5−3••••••••5.1 SOURCE POSITIONINGWhen you have the Source Window open and it displays a source file,there are two points
Chapter 55−4PROGRAM EXECUTION5.1.1 CHANGING THE VIEWING POSITIONWhen a program is active the viewing position is always visible in theSource Window. Y
Table of ContentsXIII••••••••2.4 CrossView Pro DDE Specific Options and Commands A−28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1
Controlling Program Execution5−5••••••••To change the viewing position to a specified address, you can use the eicommand. This command is useful for v
Chapter 55−6PROGRAM EXECUTIONWhen you resume execution in this program, it is from line 62 instead ofline 54.FUNCTION: Change the execution position t
Controlling Program Execution5−7••••••••5.1.3 SYNCHRONIZING THE EXECUTION ANDVIEWING POSITIONSEach time you stop execution, the position of the progra
Chapter 55−8PROGRAM EXECUTION5.2 CONTROLLING PROGRAM EXECUTIONUsing the mouse in the Source Window, you can direct the execution ofyour source program
Controlling Program Execution5−9••••••••5.2.2 HALTING AND CONTINUING EXECUTIONTo stop or continue execution:Click on the Halt button in the Source Wi
Chapter 55−10PROGRAM EXECUTIONSingle−stepping is a valuable tool for debugging your programs. The effectis to watch your programs run in stop motion.
Controlling Program Execution5−11••••••••By performing one Step Into action, you can step into the source code forfactorial(). Your Execution and view
Chapter 55−12PROGRAM EXECUTIONIf you try to step over a function that contains a breakpoint or that callsanother function with a breakpoint, CrossView
Controlling Program Execution5−13••••••••To control this function from the Command Window, use the Si and sicommands. The Si and the si commands are a
Chapter 55−14PROGRAM EXECUTION5.3 NOTES ABOUT PROGRAM EXECUTIONIf you stop the program in a module without debug symbols, then an S ors command attemp
Table of ContentsXIVCONTENTSROM/RAM MONITOR Mon−11 Introduction Mon−3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Executable Na
Controlling Program Execution5−15••••••••5.4.2 SEARCHING FOR A STRINGCrossView Pro allows you to search for a particular string in the currentsource f
Chapter 55−16PROGRAM EXECUTION5.4.3 JUMPING TO A SOURCE LINEAs mentioned earlier in the Changing the Viewing Position section, youcan use the scroll b
6ACCESSING CODEAND DATACHAPTER
Chapter 66−2CODE AND DATA6CHAPTER
Accessing Code and Data6−3••••••••6.1 INTRODUCTIONThis chapter discusses topics related to viewing and editing the variablesin your source program and
Chapter 66−4CODE AND DATATo show the contents of a variable or to show the type information ofa function:Position the mouse cursor over a variable or
Accessing Code and Data6−5••••••••Any expression that can be typed into the Command Window can also betyped in the Expression field of the Expression
Chapter 66−6CODE AND DATADisplaying the Address of an ArrayIf you enter the name of an array in the Expression Evaluation dialog boxor in the Command
Accessing Code and Data6−7••••••••Sizing StructuresWith structured variables, it is especially useful to know the size of avariable.In the Command Win
Chapter 66−8CODE AND DATAAssigning StructuresCrossView Pro also allows you to assign whole structures to one another.You can use a simple equation to
Table of ContentsXV••••••••10.4.1 Boot Program Mon−57. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.2 Connection Mon−57. . . . .
Accessing Code and Data6−9••••••••When assigning to pointers, you do not have to bother with the memorystorage representation. You can specify the add
Chapter 66−10CODE AND DATA6.2.3 THE l COMMANDCrossView Pro’s windows contain a great deal of information about thecurrent debugging session. Occasiona
Accessing Code and Data6−11••••••••6.3 EXPRESSIONS6.3.1 EVALUATING EXPRESSIONSCrossView Pro expressions use standard C syntax, semantics, and allowsp
Chapter 66−12CODE AND DATAThe expression can contain names of variables, constants, function callswith parameters, and so forth; anything that you can
Accessing Code and Data6−13••••••••Alternatively, click on the New Expression button in the Data Window.The Data Window must be open to display the re
Chapter 66−14CODE AND DATATo remove initval from your Data Window #1, type the number of theexpression (first item of the Data Window has number 0) an
Accessing Code and Data6−15••••••••Don’t worry about trying to memorize the list, you probably won’t haveoccasion to use all these formats. Notice, ho
Chapter 66−16CODE AND DATACount is the number of times to apply the format style style. Size indicatesthe number of bytes to be formatted. Both count
Accessing Code and Data6−17••••••••Displaying memory in this way is particularly effective when you havetwo−dimensional arrays. In this case you can d
Chapter 66−18CODE AND DATA6.4 DISPLAYING DISASSEMBLED INSTRUCTIONSTo show disassembled instructions:From the View menu, select Source | Disassembly to
Table of ContentsXVICONTENTSINDEX
Accessing Code and Data6−19••••••••Turn the $symbols special variable "ON" by typing the followingcommand in the Command Window:opt symbols=
Chapter 66−20CODE AND DATA6.5 THE STACKDuring debugging, you frequently find yourself lost or unable to pinpointyour location through a series of func
Accessing Code and Data6−21••••••••The system stack is used for return addresses (CALL/RET instructions) andcan be accessed via PUSH/POP instructions
Chapter 66−22CODE AND DATAWhen you first see stack information, the lowest level appears against adarker background than the other lines in the window
Accessing Code and Data6−23••••••••FUNCTION: Trace stack and display local variables.COMMAND: T6.5.3 LISTING LOCALS AND PARAMETERS OF AFUNCTIONAs ment
Chapter 66−24CODE AND DATAdisplays the four one−byte values in hexadecimal to which the framepointer points. Notice that the stack frame is not really
Accessing Code and Data6−25••••••••6.6 TRACE WINDOWC level trace is not available for all execution environments. Please checkthe Addendum for details
Chapter 66−26CODE AND DATATo activate the source level trace window:From the View menu, select Trace | Source Level to view the TraceSource Window.You
Accessing Code and Data6−27••••••••6.7 REGISTER WINDOWThe Registers Window shows you the values of internal registers on yourtarget processor.You can
Chapter 66−28CODE AND DATAFigure 6−2: Register Window Setup DialogTo configure a Register Window follow these steps:• Select a Register Window.• From
Manual Purpose and StructureXVII••••••••MANUAL PURPOSE AND STRUCTUREPURPOSEThis manual is aimed at users of the CrossView Pro debugger for theC166/ST1
Accessing Code and Data6−29••••••••• You can create a new register set definition by entering an uniqueregister set definition name in the Name edit f
Chapter 66−30CODE AND DATAWhen in−situ editing is active, you can use the Tab key to move the editfield to the next register value or use the Shift+Ta
7BREAKPOINTS ANDASSERTIONSCHAPTER
Chapter 77−2BREAKPOINTS AND ASSERTIONS7CHAPTER
Breakpoints and Assertions7−3••••••••You can use breakpoints to stop program execution at specified locationsand return control to the user. An assert
Chapter 77−4BREAKPOINTS AND ASSERTIONSColor Marking of BreakpointsIn the Source Window, a green colored toggle shows that no breakpoint isset. A red c
Breakpoints and Assertions7−5••••••••How CrossView Pro Sets Code BreakpointsCrossView Pro depends on the symbol table for information about howmachine
Chapter 77−6BREAKPOINTS AND ASSERTIONSIf you try to set a code breakpoint at line 23, CrossView Pro sets thebreakpoint on the preceding statement. If
Breakpoints and Assertions7−7••••••••System Startup CodeIt is possible (for example, by using the si command) to debug systemlevel startup code that i
Chapter 77−8BREAKPOINTS AND ASSERTIONS7.1.3 LISTING AND JUMPING TO BREAKPOINTSTo see a listing of all of the currently defined breakpoints:From the Br
Manual Purpose and StructureXVIIIMANUAL STRUCTURE8. Defining and Using MacrosDescribes how to simplify a complicated procedure by creating a"shor
Breakpoints and Assertions7−9••••••••When you set a new breakpoint using the mouse, without using theBreakpoint dialog box, the type is always permane
Chapter 77−10BREAKPOINTS AND ASSERTIONSTo set data breakpoints use the menu as described above.Setting Breakpoints from the Stack WindowSee the sectio
Breakpoints and Assertions7−11••••••••To set a data breakpoint, you must specify the break data command,followed by an address, followed by any comman
Chapter 77−12BREAKPOINTS AND ASSERTIONS• Select one of the Type options: break on read, write, read or write.• Specify a length or an end address. The
Breakpoints and Assertions7−13••••••••• Enable the Remove when hit check box in the Behavior field.• Click on the Continue button in the Source Window
Chapter 77−14BREAKPOINTS AND ASSERTIONS• Alternatively, click on the Add > button and select a breakpointtype to create.• Enter the breakpoint info
Breakpoints and Assertions7−15••••••••For example, suppose you have a breakpoint set at address 0x59 of yoursource code. The first time the program ha
Chapter 77−16BREAKPOINTS AND ASSERTIONS• Click the Sequence... button to open the Edit Sequence Breakpointdialog box.• Select a breakpoint from the Av
Breakpoints and Assertions7−17••••••••• Select the Breakpoint from the list.• Click the Remove button.Use the break delete breakpoint_number | name co
Chapter 77−18BREAKPOINTS AND ASSERTIONSOn Windows:• In the list of breakpoints toggle the check box in front of thebreakpoint to enable or disable the
A publication ofAltium BVDocumentation DepartmentCopyright 2007 Altium BVAll rights reserved. Reproduction in whole or part is prohibitedwithout the
Manual Purpose and StructureXIX••••••••APPENDICESA. Interprocess CommunicationContains a description of the COM interface and the DDE interface.B. Cro
Breakpoints and Assertions7−19••••••••7.5 BREAKPOINT COMMANDSCrossView Pro allows you to attach commands to code and databreakpoints. When execution h
Chapter 77−20BREAKPOINTS AND ASSERTIONSFigure 7−3: Breakpoint CommandsType the commands, enclosed in brackets and delimited by semicolons,after comman
Breakpoints and Assertions7−21••••••••CrossView Pro does not check the syntax of attached commands until thebreakpoint is hit.Data breakpoints accept
Chapter 77−22BREAKPOINTS AND ASSERTIONSbreak code demo.c#51, commands={rg}break code demo.c#63, commands={rg}this is a very efficient way to insert th
Breakpoints and Assertions7−23••••••••7.7 UP−LEVEL BREAKPOINTSUp−level breakpoints are breakpoints set at the entrance and/or exit offunctions. Basica
Chapter 77−24BREAKPOINTS AND ASSERTIONSFor example, suppose you have accidentally single−stepped into afunction called factorial( ). If you do not wan
Breakpoints and Assertions7−25••••••••FUNCTION: Set a permanent breakpoint at function entry.COMMAND: [stack] bb [commands]7.8 PATCHESA patch is a m
Chapter 77−26BREAKPOINTS AND ASSERTIONSThis creates a breakpoint on line 78 that does nothing more than move theexecution position beyond the loop and
Breakpoints and Assertions7−27••••••••This command sets a breakpoint that halts execution (quietly) at line 78and inserts an if statement into the pro
Chapter 77−28BREAKPOINTS AND ASSERTIONS7.10 ASSERTIONSAn assertion is a collection of debugger commands executed by thedebugger after each program lin
Manual Purpose and StructureXXMANUAL STRUCTURERELATED PUBLICATIONS• The C Programming Language (second edition) by B. Kernighan andD. Ritchie (1988,
Breakpoints and Assertions7−29••••••••In the Command Window, enter the A command:• A a activates assertion mode• A s suspends assertion mode• A
Chapter 77−30BREAKPOINTS AND ASSERTIONSFigure 7−4: Defining AssertionsUse the a command followed by a list of commands.FUNCTION: Create an assertion.C
Breakpoints and Assertions7−31••••••••Be aware that, depending on the level of optimization, variables may notexist anymore in the compiled applicatio
Chapter 77−32BREAKPOINTS AND ASSERTIONSTo activate an assertion:• Enter assertion_number a a command. For example:2 a a activates assertion 2To suspe
Breakpoints and Assertions7−33••••••••FUNCTION: Delete an assertion.COMMAND: assertion_number a d7.10.6 USING ASSERTIONSYou can use assertions for al
Chapter 77−34BREAKPOINTS AND ASSERTIONS5. We want to establish a breakpoint at line 112, the first line of the functionf( ) and attach commands to the
Breakpoints and Assertions7−35••••••••In this manner you have created an assertion that is only active over alimited range of source lines.7.10.7 GATH
Chapter 77−36BREAKPOINTS AND ASSERTIONS
8DEFINING ANDUSING MACROSCHAPTER
Chapter 88−2MACROS8CHAPTER
Manual Purpose and StructureXXI••••••••CONVENTIONS USED IN THIS MANUALNotation for syntaxThe following notation is used to describe the syntax of comm
Defining and Using Macros8−3••••••••8.1 CROSSVIEW PRO MACROSA macro is a user−created shorthand for any sequence of CrossView Proor C commands and exp
Chapter 88−4MACROSIn the Command Window, use the set command followed by the macro’sinvocation name and the list of commands. Note that the list of co
Defining and Using Macros8−5••••••••8.2.1 LISTING MACROSFrom the Tools menu, select Macro Definitions... to open the MacroDefinitions dialog box. This
Chapter 88−6MACROSNow, the st macro changes the viewing position and restarts programexecution, placing a temporary breakpoint at line 56. Be sure you
Defining and Using Macros8−7••••••••8.2.4 LOADING MACRO DEFINITIONS FROM A FILEYou can load saved macros anytime you want to re−use a definition. Ther
Chapter 88−8MACROS8.2.5 DELETING MACROSTo delete a specific macro:Follow these steps:• From the Tools menu, select Macro Definitions... to open theMac
Defining and Using Macros8−9••••••••8.3 MACRO PARAMETERSMacros can accept arguments. Parameters are labelled sequentially in amacro definition: $1, $2
Chapter 88−10MACROS8.4 REDEFINING EXISTING CROSSVIEW PROCOMMANDSUsing macros, you can even redefine an existing CrossView Pro command.For instance, yo
Defining and Using Macros8−11••••••••8.5 USING THE TOOLBOXThe CrossView Pro toolbox, shown in figure 8−2, is controlled from theView menu. Using the T
Chapter 88−12MACROS• Click on the Assign button or press the Enter keyNote that double clicking on the macro name in the alphabetized listperforms the
Manual Purpose and StructureXXIIMANUAL STRUCTUREIllustrationsThe following illustrations are used in this manual:This is a note. It gives you extra in
9COMMANDRECORDING &PLAYBACKCHAPTER
Chapter 99−2RECORD & PLAYBACK9CHAPTER
Command Recording & Playback9−3••••••••9.1 RECORDING COMMANDSCrossView Pro lets you save a series of CrossView Pro commands to thefile of your cho
Chapter 99−4RECORD & PLAYBACKEnter the > command with the name of the file to start recording. Forexample, enter:>session.cmdAfter you invok
Command Recording & Playback9−5••••••••9.1.2 SUSPEND RECORDINGThis function acts like the pause button on a tape recorder: the recordingmechanism
Chapter 99−6RECORD & PLAYBACKFUNCTION: Resume recording emulator commands.COMMAND: >#t9.1.4 CHECK RECORDING STATUSIf at any point you do not re
Command Recording & Playback9−7••••••••Enter the >c or >#c command to close the file.FUNCTION: Close command recording file.COMMAND: >cFU
Chapter 99−8RECORD & PLAYBACK9.2 PLAYING BACK COMMAND FILESOnce you have recorded a set of CrossView Pro commands, you can playthem back to recrea
Command Recording & Playback9−9••••••••9.2.1 SETTING THE TYPE OF PLAYBACKEnable the Continuous playback check box in the CrossView Playbackdialog
Chapter 99−10RECORD & PLAYBACKWhen the debugger reaches a < or << command in a playback file,playback execution switches to the new file
1OVERVIEWCHAPTER
Command Recording & Playback9−11••••••••The following command file session.cmd loads the .abs file,downloads the code, runs the code and exits.N h
Chapter 99−12RECORD & PLAYBACKamount of time has elapsed, which is crucial in batch processing: if aprogram does not terminate, the timeout will t
Command Recording & Playback9−13••••••••The Emulator Output Window is primarily a diagnostic tool. It should beused wisely, since it generates sub
Chapter 99−14RECORD & PLAYBACKYou can force flushing by using the >&! filename command as in:>&!target.logYou can open up a log file
Command Recording & Playback9−15••••••••FUNCTION: Force flushing of GDI accesses logging.COMMAND: >*!filename9.4.2 RECORDING COMMANDS AND LOGGI
Chapter 99−16RECORD & PLAYBACKTo suspend logging:Click on the Suspend button.In the Command Window, use the >>f command for suspending thelo
Command Recording & Playback9−17••••••••FUNCTION: Suspend GDI acesses logging (logging is false).COMMAND: >*fFUNCTION: Resume GDI acesses logg
Chapter 99−18RECORD & PLAYBACK9.5 STARTUP OPTIONSWhen starting up CrossView Pro you may immediately start recording orplaying back files. For inst
Command Recording & Playback9−19••••••••9.6 CROSSVIEW PRO COMMAND HISTORYMECHANISMCrossView Pro stores the command history in the list box of the
Chapter 99−20RECORD & PLAYBACK
Chapter 11−2OVERVIEWCHAPTER
10I/O SIMULATIONCHAPTER
Chapter 1010−2I/O SIMULATION10CHAPTER
I/O Simulation10−3••••••••10.1 INTRODUCTIONThe CrossView Pro Terminal windows provide an interface to exchangedata with the application on the target.
Chapter 1010−4I/O SIMULATIONStreams can be mapped to a terminal window and/or a file that is NOT theterminal log file. If a stream is mapped to a term
I/O Simulation10−5••••••••• Choose the Direction: Input if the stream must provide input to theapplication, or Output if the stream must be an output
Chapter 1010−6I/O SIMULATION10.2.2 REDIRECTING I/O STREAMSIn the I/O Simulation Setup dialog you can connnect an I/O stream to aterminal window before
I/O Simulation10−7••••••••To disable/enable an I/O stream:From the menu system:• From the Settings menu, select I/O Simulation Setup... to openthe I/O
Chapter 1010−8I/O SIMULATIONFor example,FSS 2>&1FSS 1<&4FSS 4<"data.txt"FSS 3>"data.txt"The first example will
I/O Simulation10−9••••••••10.4 DEBUG INSTRUMENT I/OIf you have a debug instrument that supports it, the debug instrument canperform input and output u
Chapter 1010−10I/O SIMULATION10.5 THE TERMINAL WINDOWIf you direct I/O simulation to the screen, CrossView Pro displays theoutput in the terminal wind
Overview1−3••••••••1.1 INTRODUCTIONThis chapter highlights many of the features and capabilities of CrossViewPro, including an Introduction to Source
I/O Simulation10−11••••••••Display ControlThe VT100−like terminal mode of the terminal windows comprises thefollowing control codes and escape sequenc
Chapter 1010−12I/O SIMULATIONEscapeSequenceOperationESC [ J Clear screen from cursor till bottom−rightESC [ p1 J 0: Clear screen from cursor till bott
I/O Simulation10−13••••••••EscapeSequenceOperationESC [ m Turn off all attributesESC [ n1 m 0: turn off all attributes 1: bold 4: underline 5: blinki
Chapter 1010−14I/O SIMULATION
11SPECIAL FEATURESCHAPTER
Chapter 1111−2SPECIAL FEATURES11CHAPTER
Special Features11−3••••••••11.1 TRANSPARENCY MODETransparency mode allows you to communicate directly with theexecution environment. Most of the time
Chapter 1111−4SPECIAL FEATURES11.2 RTOS AWARE DEBUGGINGCrossView Pro supports RTOS (Real−Time Operating System) awaredebugging for various kernels. Si
Special Features11−5••••••••Or you can specify the RADM filename on the CrossView Pro commandline with the following option:−−radm=osek_radm.dllYou ca
Chapter 1111−6SPECIAL FEATURESSo, there are two situations:n.a. : Expression could be evaluated but could not be convertedcorrectly at current moment
Chapter 11−4OVERVIEWMulti−Window InterfaceThis interface uses your host’s native windowing system, so that youalready know how to open, close and resi
Special Features11−7••••••••ceFUNCTION: Enable coverage.COMMAND: ceFUNCTION: Disable coverage.COMMAND: cdTwo dialogs are present to give you coverage
Chapter 1111−8SPECIAL FEATURESFUNCTION: Move cursor to previous covered line.COMMAND: pCFUNCTION: Move cursor to previous uncovered line.COMMAND: pUYo
Special Features11−9••••••••11.4.1 FUNCTION PROFILINGFunction profiling, also called cumulative profiling, gives timinginformation about a particular
Chapter 1111−10SPECIAL FEATURESFUNCTION: List cumulative profining results to output window orfile, or add or remove functions from the list of profil
Special Features11−11••••••••Type the pe or pd command on the command line:peFUNCTION: Enable profiling.COMMAND: peFUNCTION: Disable profiling.COMMAND
Chapter 1111−12SPECIAL FEATURESFour processes are associated with the graph window:7. Get raw data8. Transform data9. Generate representation10. DrawT
Special Features11−13••••••••"demo" will be shown in the title bar of the window. It is also the nameused to refer to the window.2. Retrieve
Chapter 1111−14SPECIAL FEATURESX−T plottingAn x−t plot is the most straightforward way of displaying data. Data istaken from one buffer, each value is
Special Features11−15••••••••2. Setting the display mode:graphm "win_title", "show_x_y.cxl" [, low_x, high_x [, low_y, high_y ] ]d
Chapter 1111−16SPECIAL FEATURES1. Generating window data pairs:graph "win_title", "multi_fft.cxl", $buffer, filter_index, frequenc
Overview1−5••••••••Probe Point BreakpointsA breakpoint can be treated as a probe point. When a probe pointbreakpoint is hit, the associated commands a
Special Features11−17••••••••Multi FFT power spectrum in lines and gridDisplays the same multi FFT power spectrum as the multi lines spectrum..Now eac
Chapter 1111−18SPECIAL FEATURES/* DEFINE THE FREQUENCY DOMAIN WINDOW */graphp "Output freq domain",50,350,716,295 /* set window positio
Special Features11−19••••••••ref_level is the 0 dB reference level.2. Setting the display mode:For displaying the generated display list, the display
Chapter 1111−20SPECIAL FEATURESThere are two ways you can program a FLASH device. CrossView Pro canprogram the FLASH device through target memory read
Special Features11−21••••••••5. Click on the Base address edit field and enter the start address of thememory range that will be covered by the FLASH
Chapter 1111−22SPECIAL FEATURES2. Specify the name of the application you want to debug/download andflash into a FLASH device.3. Select Enable flash i
Special Features11−23••••••••11.7 BACKGROUND MODEBackground mode is a feature for running the application under debugand CrossView Pro at the same tim
Chapter 1111−24SPECIAL FEATURESThe following windows can be updated in background mode:d (Data), k (Stack), r (Register), s (Source), a (Assembly), me
Special Features11−25••••••••FUNCTION: Update the appropriate window when the target runs inthe background.COMMAND: ubgw [ s | a | k | r | d | mem |
Chapter 1111−26SPECIAL FEATURES11.7.4 LEAVING BACKGROUND MODEYou can leave Background Mode in three ways:1. Stop the target immediately:From the Run m
Chapter 11−6OVERVIEWCoverageWhen a command such as StepInto or Continue executes the application,CrossView Pro traces all memory access, i.e. memory r
Special Features11−27••••••••11.7.5 THE STACK IN BACKGROUND MODEWhile the execution environment runs in background, CrossView Pro doesnot allow the us
Chapter 1111−28SPECIAL FEATURESThe information that cannot be processed by CrossView Pro within thespecified update interval, is displayed as either ’
12DEBUGGING NOTESCHAPTER
Chapter 1212−2DEBUGGING NOTES12CHAPTER
Debugging Notes12−3••••••••Here are a few notes about debugging in special situations:12.1 DEBUGGING ASSEMBLY LANGUAGEJust as with C sources, you can
Chapter 1212−4DEBUGGING NOTES
13COMMANDREFERENCECHAPTER
Chapter 1313−2REFERENCE13CHAPTER
Command Reference13−3••••••••This chapter contains a summary of all CrossView Pro commands,followed by a complete description of each command.13.1 CON
Chapter 1313−4REFERENCE13.2 COMMANDS: SUMMARY13.2.1 VIEWING COMMANDS^[format] Display contents of preceding memory location.exp Print value of expres
The information in this document has been carefully reviewed and isbelieved to be accurate and reliable. However, Altium assumes no liabilitiesfor ina
Overview1−7••••••••MacrosMacros let you store and recall complex commands and expressions with aminimal number of keystrokes. You can store macros in
Command Reference13−5••••••••l {a|b|d|f|g|k|l|L|m|p|r|s|S} [string] List assertions, breakpoints, directories, files, globals, kernelstate data, label
Chapter 1313−6REFERENCEcovinfo [[all | module_or_function_name][,filename]]List coverage info.cproinfo [all[,filename] | {add | remove } function]Li
Command Reference13−7••••••••13.2.3 DATA ANALYSISbufa target_buffer_name,added_buffer_name[,size_limit]Add the contents of buffer added_buffer_name t
Chapter 1313−8REFERENCEupdate "window"Update the window specified.13.2.4 EXECUTION CONTROL COMMANDSA [a|s] Toggle state of assertion mechani
Command Reference13−9••••••••exp bd {r|w|b} [cmds] Set a data breakpoint, read (r), write (w) or both read andwrite (b) at address exp, and associate
Chapter 1313−10REFERENCE[exp] C [line] Continue execution from current value of program counter. Ifline is specified, execution continues up to that l
Command Reference13−11••••••••[exp] s Single step for exp lines, step into function calls.[exp] Si Single machine step for exp machine instructions,
Chapter 1313−12REFERENCE> Report status of command recording mechanism.>#file Record emulator commands in file.>#{t|f|c} Set emulator recor
Command Reference13−13••••••••unset macro!Delete definition of macro macro.macro! Prevent expansion of macro.13.2.7 INPUT/OUTPUT SIMULATIONios_open [&
Chapter 1313−14REFERENCE13.2.8 FILE SYSTEM SIMULATIONFSS { < | > }{&stream | "file"}Redirect to or from a stream or file.FSS_std
Chapter 11−8OVERVIEW1.3 SOURCE LEVEL DEBUGGINGCrossView Pro is a source level debugger. Source level means thatdebugging works on the actual C code or
Command Reference13−15••••••••fw [address]Specify workspace address of FLASH programming monitor.load [file] Load symbol table of file in CrossView P
Chapter 1313−16REFERENCE13.2.12 SEARCH COMMANDSZ Toggle case sensitivity in searches./[string] Search forwards in source file for string. If string
Command Reference13−17••••••••expressionFunctionPrint the value or address of an expression.From the Data menu, select Evaluate Expression... Enter a
Chapter 1313−18REFERENCEBe careful with one letter variable names, as they may be taken as anCrossView Pro command rather than as a variable. If an ex
Command Reference13−19••••••••lineFunctionDisplay the C source line numbered line in the current source file.From the Edit menu, select Find Line... E
Chapter 1313−20REFERENCEstringFunctionEcho a string to the terminal.Enter the string to the Command Window.DescriptionA string may contain standard C
Command Reference13−21••••••••!FunctionInstruct CrossView Pro to interpret a command literally, ignoring anymacro definitions of the same name. Also,
Chapter 1313−22REFERENCE/FunctionSearch down (forward) for a string.To search for a string in the Source Window, select Search String... fromthe Edit
Command Reference13−23••••••••?FunctionSearch up (backward) for a string.To search for a string in the Source Window, select select Search String...fr
Chapter 1313−24REFERENCE<FunctionContinuous command playback. Read commands continuously from a file.To setup command playback, select Playback | C
Overview1−9••••••••With CrossView Pro, you may also take advantage of any advancedcapabilities of your target hardware through emulator mode (transpar
Command Reference13−25••••••••<<FunctionSingle−step command playback.To setup command playback, select Playback | CrossView... from theTools men
Chapter 1313−26REFERENCE>FunctionRecord CrossView Pro commands to a file.To start recording or toggle the state of the command recordingmechanism,
Command Reference13−27••••••••To suspend recording commands, type:>fTo resume recording the commands to the recording file, type:>tTo stop recor
Chapter 1313−28REFERENCE>@FunctionRecord CrossView Pro and emulator commands to a file.To start recording or toggle the state of the command record
Command Reference13−29••••••••To suspend recording commands, type:>@fTo resume recording the commands to the recording file, type:>@tTo stop rec
Chapter 1313−30REFERENCE>#FunctionRecord emulator commands to a file.To start recording or toggle the state of the command recordingmechanism, sele
Command Reference13−31••••••••To suspend recording emulator commands, type:>#fTo resume recording the emulator commands to the recording file, type
Chapter 1313−32REFERENCE>>FunctionLog Command Window screen output. All Command Window input andoutput will be saved to a file.To create a log o
Command Reference13−33••••••••To resume recording the screen output in the recording file, type:>>tTo stop recording the screen output and close
Chapter 1313−34REFERENCE>&FunctionLog communications between debugger and emulator.To save debugger/emulator communications, select Log |CrossV
Chapter 11−10OVERVIEW2. CrossView Pro converts this action into a command. Depending onpreferences you have set, the variable is shown in the Data Win
Command Reference13−35••••••••To stop logging communications and close the file, type:>&c>, >>, q
Chapter 1313−36REFERENCE>*FunctionLog GDI accesses.To save GDI accesses, select Log | CrossView−GDI Accesses... from theTools menu. Type or select
Command Reference13−37••••••••^FunctionDisplay contents of preceding memory location based on the size of thelast data item displayed.The command line
Chapter 1313−38REFERENCEAFunctionToggle the state of the assertion mode.To activate or suspend assertion mode, select Assertions... from theBreakpoint
Command Reference13−39••••••••aFunctionDefine or modify an assertion.From the Breakpoints menu, select Assertions... to open the Assertionsdialog box.
Chapter 1313−40REFERENCETo set an assertion to stop the program when global variable myvarexceeds 3, type:a if (myvar > 3) {x}A, l, x
Command Reference13−41••••••••BFunctionList all of the currently defined breakpoints.From the Breakpoints menu, select Breakpoints... to open theBreak
Chapter 1313−42REFERENCEbFunctionSet a code breakpoint.From the Breakpoints menu, select Breakpoints... to open theBreakpoints dialog box. Click the A
Command Reference13−43••••••••bBFunctionSet a temporary breakpoint at the beginning of a function.In the Stack Window, click on the desired function a
Chapter 1313−44REFERENCEbbFunctionSet a permanent breakpoint at the beginning of a function.In the Stack Window, click on the desired function and se
Overview1−11••••••••1.5 C166/ST10 PROGRAM DEVELOPMENTThe CrossView Pro debugger package is part of a toolchain that providesan environment for modular
Command Reference13−45••••••••bcFunctionSet a breakpoint’s count and reset count.From the Breakpoints menu, select Breakpoints... , select thebreakpoi
Chapter 1313−46REFERENCEbCYCFunctionSet a temporary cycle count breakpoint.From the Breakpoints menu, select Breakpoints... to open theBreakpoints dia
Command Reference13−47••••••••bcycFunctionSet a permanent cycle count breakpoint.From the Breakpoints menu, select Breakpoints... to open theBreakpoin
Chapter 1313−48REFERENCEbDFunctionSet a read and/or write data breakpoint over a range of addresses.From the Breakpoints menu, select Breakpoints... t
Command Reference13−49••••••••This breakpoint will be hit only if any address in the range of addresses isread from.To set a data breakpoint for the a
Chapter 1313−50REFERENCEbdFunctionSet a read and/or write data breakpoint at an address.From the Breakpoints menu, select Breakpoints... to open theBr
Command Reference13−51••••••••Note that the breakpoint only acts on the lowest byte in memory of thisvariable.To set a breakpoint at address 10 hex th
Chapter 1313−52REFERENCEbdisFunctionDisable code breakpoint.From the Breakpoints menu, select Breakpoints... On Windows togglethe check box in front o
Command Reference13−53••••••••benaFunctionEnable code breakpoint.From the Breakpoints menu, select Breakpoints... On Windows togglethe check box in fr
Chapter 1313−54REFERENCEbIFunctionSet a temporary low−level breakpoint at a machine instruction.From the Breakpoints menu, select Breakpoints... to o
Chapter 11−12OVERVIEWassembly source file.asmmacro preprocessorm166assembly file.srcassemblera166relocatable objectlinkerlink stagel166linker l166loca
Command Reference13−55••••••••biFunctionSet a permanent low−level breakpoint at a machine instruction.From the Breakpoints menu, select Breakpoints...
Chapter 1313−56REFERENCEbINSTFunctionSet a temporary instruction count breakpoint.From the Breakpoints menu, select Breakpoints... to open theBreakpoi
Command Reference13−57••••••••binstFunctionSet a permanent instruction count breakpoint.From the Breakpoints menu, select Breakpoints... to open theBr
Chapter 1313−58REFERENCEbreakFunctionUniversal breakpoint command.From the Breakpoints menu, select Breakpoints... toadd/remove/enable/disable breakpo
Command Reference13−59••••••••Instruction count breakpointsSyntax:break instructions count [, option]...count can be any expression evaluating to the
Chapter 1313−60REFERENCEDelete breakpoint attributesSyntax:break delete bp_number | bp_name | all [, option]...bp_number is the breakpoint number. If
Command Reference13−61••••••••access_type=r | w | rwSet the access type of a data breakpoint: read (r), write (w) orread/write (rw).addr=exprSet the (
Chapter 1313−62REFERENCEbool1 | 0 | true | falseTrue/false, case insensitive.exprAppropriate CrossView expression.ExampleTo set a code breakpoint at a
Command Reference13−63••••••••btFunctionSet a task aware code breakpoint.From the Breakpoints menu, select Breakpoints... to open theBreakpoints dialo
Chapter 1313−64REFERENCEbtIFunctionSet a temporary low−level task aware breakpoint at a machine instruction.From the Breakpoints menu, select Breakpo
Overview1−13••••••••ieee166 A program which formats an absolute (located) TASKINGa.out file to the IEEE695 format which has full high levellanguage d
Command Reference13−65••••••••btiFunctionSet a permanent low−level task aware breakpoint at a machine instruction.From the Breakpoints menu, select Br
Chapter 1313−66REFERENCEbTIMFunctionSet a temporary time breakpoint.From the Breakpoints menu, select Breakpoints... to open theBreakpoints dialog box
Command Reference13−67••••••••btimFunctionSet a permanent time breakpoint.From the Breakpoints menu, select Breakpoints... to open theBreakpoints dial
Chapter 1313−68REFERENCEbUFunctionSet a temporary up−level breakpoint (to finish the function at a specificstack level).In the Stack Window, double−c
Command Reference13−69••••••••After stopping, this command will cause CrossView Pro to print out thefunction’s local variables and arguments.break, b,
Chapter 1313−70REFERENCEbuFunctionSet a permanent up−level breakpoint (to finish the function at a specificstack level).Click on the desired function
Command Reference13−71••••••••break, b, bb, bB, bd, bD, bi, bI, bt, bti, btI, bU, Q
Chapter 1313−72REFERENCEbufaFunctionAppend the contents of one buffer to another buffer.The command line syntax is:bufa target_buffer_name,added_buff
Command Reference13−73••••••••bufdFunctionFree a used buffer.The command line syntax is:bufd buffer_nameDescriptionDiscard the specified buffer (if t
Chapter 1313−74REFERENCECFunctionContinue using the current value of the program counter.In the Source Window, click on the Run/Continue button. You c
Chapter 11−14OVERVIEW1.6.2 SETTING UP THE EXECUTION ENVIRONMENTThe following only applies to ROM monitor and emulator versions ofCrossView Pro.In orde
Command Reference13−75••••••••CBFunctionContinue execution in background using the current value of the targetprogram counter.The command line syntax
Chapter 1313−76REFERENCEcdFunctionDisable, turn off, gathering of coverage information.From the Tools menu, select Coverage if this item was set.The c
Command Reference13−77••••••••ceFunctionEnable, turn on, gathering of coverage information.From the Tools menu, select Coverage if this item was not s
Chapter 1313−78REFERENCEclearFunctionClear the Command Output Window.The command line syntax is:clearDescriptionUse this command if you want to clear
Command Reference13−79••••••••covinfoFunctionList coverage information.From the Tools menu, select Code Coverage..., make your changes andselect the U
Chapter 1313−80REFERENCEcproinfoFunctionList cumulative profiling results or add or remove functions from the list ofprofiled functions.From the Tools
Command Reference13−81••••••••To remove function main from the list of profiled functions, type:cproinfo remove mainproinfo, pd, pe
Chapter 1313−82REFERENCEctFunctionDisplay a C−execution trace.From the View menu, select Trace | Source Level. The Trace Windowdisplays the most recen
Command Reference13−83••••••••ct iFunctionDisplay a disassembled trace.From the View menu, select Trace | Instruction Level. The TraceWindow displays
Chapter 1313−84REFERENCEct rFunctionDisplay a raw trace.From the View menu, select Trace | Raw. The Trace Window displays themost recently executed li
Overview1−15••••••••1.6.3 STARTING CROSSVIEW PROTo invoke CrossView Pro, select it from the Windows Start menu or clickon the Debug application button
Command Reference13−85••••••••cxlFunctionExecute a CXL script.The command line syntax is:cxl "script"DescriptionExecute CXL script script. T
Chapter 1313−86REFERENCEcxl_resetFunctionReset variable of one or all CXL scripts.The command line syntax is:cxl_reset ["script"]Description
Command Reference13−87••••••••DFunctionDelete all currently defined breakpoints.From the Breakpoints menu, select Breakpoints... to open theBreakpoint
Chapter 1313−88REFERENCEdFunctionDelete a specific breakpoint.To delete a code breakpoint directly from the C source, click on the redbreakpoint toggl
Command Reference13−89••••••••dcmpFunctionCompare a file with the downloaded application.From the File menu, select Compare Application... Specify ana
Chapter 1313−90REFERENCETo compare file test.abs, stop if the number of differences equals 5 anddisplay the contents of differing memory addresses, ty
Command Reference13−91••••••••di_stateFunctionOpen, save/restore, close a debug instrument state.From the Target menu, select Save/Restore Target Stat
Chapter 1313−92REFERENCEdisFunctionDisassemble a range of memory.From the View menu, select Source | Disassembly or Source | Sourceand Disassembly to
Command Reference13−93••••••••dnFunctionDownload a file.From the File menu, select Download Application... to download theimage part of the file to th
Chapter 1313−94REFERENCEdumpFunctionDump a range of memory.From the View menu, select Memory | New to open a Memory Window.The command line syntax is:
Chapter 11−16OVERVIEWCrossView Pro can be passed the name of an execution (*.abs) file.When you invoke CrossView Pro from EDE, EDE automatically passe
Command Reference13−95••••••••To dump the first 10 bytes of the function main as Motorola S records inthe file main.sre, type:dump main,main+10,M,main
Chapter 1313−96REFERENCEeFunctionEstablish viewing positionFrom the File menu, select Open Source... to view a file. In the SourceWindow, click on th
Command Reference13−97••••••••To view the line at stack level 3, type:3 e?, /, ei, L, p, P, t
Chapter 1313−98REFERENCEeCFunctionStart execution on current CPU and switch to another CPU.The command line syntax is:cpu_number eCDescriptionStart e
Command Reference13−99••••••••ecFunctionSelect a CPU or show current CPU number.The command line syntax is:[cpu_number] ecDescriptionThe ec command a
Chapter 1313−100REFERENCEechoFunctionDisplay the definition of a macro name without executing the macro.From the Tools menu, select Macro Definitions.
Command Reference13−101••••••••eiFunctionEstablish viewing position at a specified address.From the Edit menu, select Find Address...The command line
Chapter 1313−102REFERENCEetFunctionSelect the specified task’s context.In the Tasks Window click once on the task to be examined.The command line synt
Command Reference13−103••••••••fFunctionSet default address printing formatThe command line syntax is:f [ " printf−style−format " ]Descript
Chapter 1313−104REFERENCEfaFunctionAdd a FLASH device.From the Target menu, select FLASH Setup... Click Add... to specify a FLASH device.The command l
TABLE OFCONTENTSCONTENTS
Overview1−17••••••••You can set the following items in this dialog:• Select a target configuration containing some target specificconfiguration items.
Command Reference13−105••••••••fcFunctionCheck a FLASH device.From the Target menu, select FLASH Setup... Click Check ID.The command line syntax is:fc
Chapter 1313−106REFERENCEfdFunctionDelete a FLASH device.From the Target menu, select FLASH Setup... Select a device and click Remove.The command line
Command Reference13−107••••••••flFunctionList FLASH devices.From the Target menu, select FLASH Setup... The command line syntax is:flDescriptionList t
Chapter 1313−108REFERENCEfpFunctionGet protection status of a FLASH device.From the Target menu, select FLASH Setup... Select a device and click Prote
Command Reference13−109••••••••fpdFunctionUnprotect a FLASH device.From the Target menu, select FLASH Setup... Select a device and click Protect −>
Chapter 1313−110REFERENCEfpeFunctionEnable protection of a FLASH device.From the Target menu, select FLASH Setup... Select a device and click Protecti
Command Reference13−111••••••••FSSFunctionFile System Simulation redirection.The command line syntax is:FSS { < | > }{&stream | "file
Chapter 1313−112REFERENCEFSS_stdio_closeFunctionClose a stream previously opened by FSS_stdio_open.The command line syntax is:FSS_stdio_close stream
Command Reference13−113••••••••FSS_stdio_openFunctionRedirect the output of a stream to a file.The command line syntax is:FSS_stdio_open filename,rw
Chapter 1313−114REFERENCEfwFunctionSpecify workspace address of FLASH programming monitor.From the Target menu, select FLASH Setup... Specify the Flas
Chapter 11−18OVERVIEWThe fields listed in the configuration file are:Field Descriptiontitle The full name of the configuration. Thisname will be displ
Command Reference13−115••••••••gFunctionChange the program counter to a new execution position.Click on a source line and select Jump to Cursor from t
Chapter 1313−116REFERENCEgiFunctionChange the program counter to a new execution position.Click on a source line and select Jump to Cursor from the Ru
Command Reference13−117••••••••graphFunctionCreate Data Analysis window and execute CXL script.The command line syntax is:graph "window",&qu
Chapter 1313−118REFERENCEgraph_add_updateFunctionAdd a command to the sequence of update commands.For the supplied scripts only. From the Settings men
Command Reference13−119••••••••graph_clear_updatesFunctionClear the sequence of update commands.The command line syntax is:graph_clear_updates "w
Chapter 1313−120REFERENCEgraph_closeFunctionClose a Data Analysis window.The command line syntax is:graph_close "window"DescriptionWith the
Command Reference13−121••••••••graph_debugFunctionDebug Data Analysis graph window.The command line syntax is:graph_debug expressionDescriptionIf exp
Chapter 1313−122REFERENCEgraphmFunctionSet Data Analysis window display mode.The command line syntax is:graphm "window","script"[,
Command Reference13−123••••••••graphmnFunctionSet Data Analysis window display mode.The command line syntax is:graphmn "window","script
Chapter 1313−124REFERENCEgraphpFunctionPosition Data Analysis window on the screen.The command line syntax is:graphp "window",left_top_x,lef
Overview1−19••••••••For FLASH programming support the following items can be added to thislist:Field Descriptionflash_monitor The filename of the FLAS
Command Reference13−125••••••••gusFunctionSuppress or reactivate window updating.The command line syntax is:gus {on | off}DescriptionWith gus on the G
Chapter 1313−126REFERENCEIFunctionPrint out information about the state of CrossView Pro.The command line syntax is:IDescriptionPrint out information
Command Reference13−127••••••••ifFunctionConditional command execution.The command line syntax is:if ( expression ) { cmds } [ { cmds } ]DescriptionI
Chapter 1313−128REFERENCEios_closeFunctionClose a File I/O stream.From the Settings menu, select I/O Simulation Setup... Select a stream inthe Connect
Command Reference13−129••••••••ios_openFunctionOpen a File I/O stream.From the Settings menu, select I/O Simulation Setup... Open the FileI/O tab and
Chapter 1313−130REFERENCEAll modes can have a ’b’ appended, indicating binary access. The ’b’ canbe positioned before or after the ’+’. This mode affe
Command Reference13−131••••••••ios_readFunctionRead binary data from an I/O stream.The command line syntax is:ios_read {stream | "file"},add
Chapter 1313−132REFERENCEios_readfFunctionFormatted read from an I/O stream (scanf). Store the data at the locationdefined by the expression.The comma
Command Reference13−133••••••••ios_rewindFunctionMove File I/O file pointer to the beginning of the file.From the Settings menu, select I/O Simulation
Chapter 1313−134REFERENCEios_wopenFunctionOpen a File I/O stream and map the stream to a terminal window.From the Settings menu, select I/O Simulation
Chapter 11−20OVERVIEWDescriptionFieldmap_rom The range where the simulator shouldsimulate external ROM memory. Multipleranges can be separated by comm
Command Reference13−135••••••••ios_writeFunctionWrite binary data to an I/O stream.The command line syntax is:ios_write {stream | "file"},ad
Chapter 1313−136REFERENCEios_writefFunctionFormatted write to an I/O stream (printf).. The data is obtained from the Cexpression, for example a variab
Command Reference13−137••••••••LFunctionSynchronize the viewing and execution positions.To synchronize the positions manually, click on the Find PC bu
Chapter 1313−138REFERENCElFunctionList.In general, the dialog box in which you define a feature also contains alist.The command line syntax is:l { a|
Command Reference13−139••••••••For configurations that support real−time kernels, the l k command canhave one of the following arguments (l k is the s
Chapter 1313−140REFERENCEloadFunctionLoad a program’s symbol file and download the image part.From the File menu, select Load Symbolic Debug Info...
Command Reference13−141••••••••MFunctionList the data currently being monitored.Refer to the Data Window. Each time the program stops, the debuggereva
Chapter 1313−142REFERENCEmFunctionMonitor (watch) an expression. (Also delete a monitor.)From the Source Window, double−click on an expression. A new
Command Reference13−143••••••••To delete expression number 2 of the monitored data, type:2 m dM, b, a, s, R, C
Chapter 1313−144REFERENCEmcpFunctionMemory copy.From the Memory Window, click on the Copy Memory button to openthe Copy Memory dialog. Enter the start
Overview1−21••••••••DescriptionFieldsyscon The initialization value for the SYSCONregister. This entry is here for backwardscompatibility only. The SY
Command Reference13−145••••••••memgetFunctionRetrieve data from the target into a buffer.The command line syntax is:memget expr,count,buffer_nameDesc
Chapter 1313−146REFERENCEExample1. C structure access.struct{ double re, im; int f;} data[100];To store the data[x].re values into acq
Command Reference13−147••••••••mFFunctionMemory single fill.From the Memory Window, click on the Fill Single Memory Addressbutton to open the Single F
Chapter 1313−148REFERENCEmfFunctionMemory fill, repeating the specified pattern until the specified region isfilled.From the Memory Window, click on t
Command Reference13−149••••••••The result of this command is:address: 0x400 0x401 0x402 0x403 0x404value: 1 2 1 2 1mcp, mf
Chapter 1313−150REFERENCEmsFunctionMemory search.From the Memory Window, click on the Find Memory button to open theSearch Memory dialog. Enter the st
Command Reference13−151••••••••mcp, mF, mf
Chapter 1313−152REFERENCENFunctionLoad a program’s symbol file.From the File menu, select Load Symbolic Debug Info... This menuitem allows you to spe
Command Reference13−153••••••••nFunctionSet address biasFrom the File menu, select Load Symbolic Debug Info... In the LoadSymbolic Debug Info dialog y
Chapter 1313−154REFERENCEnCFunctionSet the viewing position to the next covered block of statements.Use the scroll bar and click on the desired line.T
Chapter 11−22OVERVIEWFor the JTAG/OCDS connection via parallel port, the following items canbe added to this list:Field Descriptionmonitor The filenam
Command Reference13−155••••••••nUFunctionSet the viewing position to the next not covered block of statements.Use the scroll bar and click on the desi
Chapter 1313−156REFERENCEoFunctionEnter emulator mode.From the View menu, select Command | Emulator. If you know theemulator−level command language, y
Command Reference13−157••••••••optFunctionSet or display specific options.Option values can be changed in various dialogs and menus.The command line s
Chapter 1313−158REFERENCEPFunctionPrint source lines, including machine addresses.In the Source Window, the machine address of the line at the current
Command Reference13−159••••••••pFunctionPrint source lines.C source is displayed in the Source Window.The command line syntax is:[ line ] p [ exp ]Des
Chapter 1313−160REFERENCEpCFunctionSet the viewing position to the previous covered block of statements.Use the scroll bar and click on the desired li
Command Reference13−161••••••••pdFunctionDisable, turn off, profiling.From the Tools menu, select Profiling if this item was set.The command line synt
Chapter 1313−162REFERENCEpeFunctionEnable, turn on, profiling.From the Tools menu, select Profiling if this item was not set.The command line syntax i
Command Reference13−163••••••••proinfoFunctionList profiling results.From the Tools menu, select Profiling Report... Make your changes and select the
Chapter 1313−164REFERENCEprstFunctionReset the application being debugged to initial conditions. That is, set theprogram counter to the start address
Overview1−23••••••••DescriptionFieldResetDelay A delay in miliseconds for CrossView Proafter a target reset. When you useOCDS, CrossView Pro resets th
Command Reference13−165••••••••pUFunctionSet the viewing position to the previous not covered block of statements.Use the scroll bar and click on the
Chapter 1313−166REFERENCEQFunctionQuiet breakpoint reporting.The command line syntax is:QDescriptionIf this appears as the first command in a breakpoi
Command Reference13−167••••••••qFunctionQuit a debugging session.From the File menu, select Exit.The command line syntax is:q [ s | y ]DescriptionCros
Chapter 1313−168REFERENCERFunctionReset program and begin execution from initial conditions.From the Run menu, select Reset Application and then Run.T
Command Reference13−169••••••••rawmemgetFunctionRetrieve data from the target into a buffer.The command line syntax is:rawmemget address,type,count,b
Chapter 1313−170REFERENCErstFunctionReset target system to initial conditions.From hte Run menu, select Reset Target System.The command line syntax is
Command Reference13−171••••••••SFunctionSingle step C statements, stepping over function calls.To step over a function, click on the Step Over button
Chapter 1313−172REFERENCEsFunctionSingle step C statements, stepping into function callsTo step into a function (single step), click on the Step Into
Command Reference13−173••••••••saveFunctionSave macros.From the Tools menu, select Macro Definitions... to open the MacroDefinitions dialog box. From
Chapter 1313−174REFERENCEsetFunctionDefinition and display of macros.To create a macro, select Macro Definitions... from the Tools menu.Click on the N
Chapter 11−24OVERVIEWDescriptionFieldResetDelay A delay in miliseconds for CrossView Proafter a target reset. When you useOCDS, CrossView Pro resets t
Command Reference13−175••••••••To invoke this macro, you might type, for example:macro(main)unset, echo, save, !
Chapter 1313−176REFERENCESiFunctionSingle step machine instructions, stepping over subroutine callsFrom the Run menu, select Step Mode | Instruction s
Command Reference13−177••••••••siFunctionSingle step machine instructions, stepping into subroutine callsFrom the Run menu, select Step Mode | Instruc
Chapter 1313−178REFERENCEstFunctionStop the execution of the target immediately.The command line syntax is:stDescriptionThis command stops the running
Command Reference13−179••••••••TFunctionStack trace with local variablesThe command line syntax is:[ exp ] TDescriptionProduce a trace of functions on
Chapter 1313−180REFERENCEtFunctionStack trace.From the View menu, select Stack. The Stack Window shows the currentsituation in the stack after the pro
Command Reference13−181••••••••tdFunctionDisable, turn off, trace.From the Tools menu, select Trace if this item was set.The command line syntax is:td
Chapter 1313−182REFERENCEteFunctionEnable, turn on, trace.From the Tools menu, select Trace if this item was not set.The command line syntax is:teDesc
Command Reference13−183••••••••uFunctionToggle the updating of the appropriate window when the target runs inthe background.The command line syntax is
Chapter 1313−184REFERENCEubgwFunctionUpdate the appropriate window when the target runs in the background.From the View menu, select Background Mode a
Overview1−25••••••••Figure 1−6: Setting up CrossView Pro Communications• Adjust the communication parameters (baud rate and I/O port) tomatch your ha
Command Reference13−185••••••••unsetFunctionDelete a macro definition.From the Tools menu, select Macro Definitions... to open the MacroDefinitions di
Chapter 1313−186REFERENCEupdateFunctionUpdate a Data Analysis window.Click on the Update Data Analysis Window button in a Data Analysiswindow.The comm
Command Reference13−187••••••••useFunctionChange source directories run−time.From the Target menu, select Settings... to open the Target Settingsdialo
Chapter 1313−188REFERENCEwtFunctionWait for the completion of the target.The command line syntax is:wtDescriptionThis command can only be used if the
Command Reference13−189••••••••xFunctionForce an exit from assertion mode.The command line syntax is:[ exp ] xDescriptionNormally this command stops e
Chapter 1313−190REFERENCEZFunctionToggle case sensitivity in searchesFrom the Edit menu, select Search String... to open the Search Stringdialog box.
14ERROR MESSAGESCHAPTER
Chapter 1414−2ERRORS14CHAPTER
Error Messages14−3••••••••14.1 WHAT THIS CHAPTER COVERSThe following is a list of common user error messages, and somesuggested ways to solve the prob
Chapter 1414−4ERRORSAddress not allowed for ’! or ~ or % operator’The "Not", "One’s complement", and "Modulus" operators
Chapter 11−26OVERVIEW• If your program accepts command line arguments you can enterthem as a comma separated list.• Set the Download image too check b
Error Messages14−5••••••••com return code=codeThe MS−DOS version of CrossView Pro received a status condition fromthe monitor communication channel wh
Chapter 1414−6ERRORSCan’t open logfile−name as log fileCrossView Pro could not open the specified host−to−target systemcommunications logfile. Check t
Error Messages14−7••••••••Can’t perform trace, out of memoryThere is not enough host memory to support tracing. Reduce memorydemands and retry again.
Chapter 1414−8ERRORSCommand ’command’ not allowed while emulator running inbackgroundThe target is running, this command is not allowed unless the tar
Error Messages14−9••••••••Exiting procedure call stateAn unknown system signal caused the end of a command line functioncall.Expecting stream numberTh
Chapter 1414−10ERRORSI can’t put something that big in the child processThe size of the expression exceeds the buffer size needed to spawn achild proc
Error Messages14−11••••••••Illegal data monitor commandYou have passed an illegal argument to the m data monitor command.Legal commands are: m exp to
Chapter 1414−12ERRORSInput from stdin longer than max−input−size characters: input−string Command truncatedThe input data is longer that the input buf
Error Messages14−13••••••••Macro Expansion error: missing ’(’See the command reference page or use the help command to reviewmacro command syntax.Macr
Chapter 1414−14ERRORSMust supply ’b’ or ’f’The color command requires a value of f for foreground or b forbackground to modify the screen color.Must s
Table of ContentsIVCONTENTSCONTENTS
Overview1−27••••••••CrossView Pro remembers all previously saved settings. In this case, theLoad Symbolic Debug Info dialog already contains the previ
Error Messages14−15••••••••No current line numberUndefined special variable, $line; probably due to debugging where nosymbols are present.No current p
Chapter 1414−16ERRORSNo more SIO windows, I/O to command window.Only four SIO streams can be displayed simultaneously in the SIOwindow. Subsequent SIO
Error Messages14−17••••••••No such PSW register stateCheck register name and selected target.No such registerThe target processor does not have a regi
Chapter 1414−18ERRORSNot enough memory to execute shell command.The attempt to create a child process for the shell command failed due tothe lack of h
Error Messages14−19••••••••Procedure "name" is not active on the stack.The procedure name was not found on the current stack. Execute the tc
Chapter 1414−20ERRORSResult type too large for command line call.A command line function call must pass the result back in a register. Thespecified fu
Error Messages14−21••••••••Symbol file is not formatted correctlyThe symbol file is not intended for the type of microprocessor you areusing.Symbol no
Chapter 1414−22ERRORSTimed read I/O request could not be queuedVMS reported a condition on a timed read i/o request that CrossView Procould not handle
Error Messages14−23••••••••Type ’r ’, to run program from power−on conditions or ’c ’ to continuewith current program pointerThis is to inform you tha
Chapter 1414−24ERRORSUnknown macro ’name’CrossView Pro does not recognize the macro name as given. Please checkthe spelling. You may list all current
Chapter 11−28OVERVIEW1.6.4 EXECUTING AN APPLICATIONTo view your source while debugging, the Source Window must be open.To open this window,• From the
Error Messages14−25••••••••VMS error code = number \ Attempt to get message text fail.CrossView Pro on VMS received an error while attempting to provi
Chapter 1414−26ERRORSWarning: CrossView comment terminated by end of command linesource−command−lineThe playback file has a comment that was not termi
Error Messages14−27••••••••XVW:main − Cannot continue, incomplete initialization.CrossView Pro’s initialization was interrupted and could not be compl
Chapter 1414−28ERRORS
15GLOSSARYCHAPTER
Chapter 1515−2GLOSSARY15CHAPTER
Glossary15−3••••••••15.1 WHAT THIS CHAPTER COVERSThis chapter defines terms common to CrossView Pro and source−levelembedded systems debugging. Italic
Chapter 1515−4GLOSSARYbias. A value added to program code addresses to tell CrossView Prowhere the application has actually been loaded into memory.
Glossary15−5••••••••coverage. With code coverage the source line is marked for each sourcecode line that is executed. Through code coverage you can f
Chapter 1515−6GLOSSARYEembedded system. Computer(s) executing an application program builtto run in (semi) real−time. An embedded system usually is p
Overview1−29••••••••Due to compiler optimizations it is possible that a C statement doesnot translate in any executable code. In this case you cannot
Glossary15−7••••••••host system. The computer system on which CrossView Pro is run. Thehost system is connected to the target system, usually with an
Chapter 1515−8GLOSSARYmemory map. The configuration of an emulator’s memory that specifieswhich addresses are read−only, and which addresses are read
Glossary15−9••••••••profiling. For each source code line that is executed, the timinginformation is given.Qquiet command. A Q instruction at the sta
Chapter 1515−10GLOSSARYsingle stepping. Executing a source statement or a machine instructionthen halting. Single stepping lets you observe a program
Glossary15−11••••••••symbolic debugger. A type of debugger generally limited to dealing withglobal, non−dynamic variables. Symbolic debuggers know no
Chapter 1515−12GLOSSARYUup−level breakpoint. A code breakpoint set at the return from afunction at a specified stack depth.Vviewing position. The li
AINTERPROCESSCOMMUNICATIONAPPENDIX
Appendix AA−2INTERPROCESS COMMUNICATIONAAPPENDIX
Interprocess CommunicationA−3••••••••1 COM INTERFACE1.1 INTRODUCTIONCrossView Pro provides a COM object interface on MS−Windowsplatforms. The purpose
Appendix AA−4INTERPROCESS COMMUNICATIONUse the following options instead of startup dialogs:−tcfg file Specifies a target configuration file which con
Chapter 11−30OVERVIEW1.6.5 DEBUGGING AN APPLICATIONWhen debugging your application you probably want to see the callingsequence of your program, and i
Interprocess CommunicationA−5••••••••1.3 COM INTERFACESThe following interfaces are provided with CrossView Pro:ICommandLineDefault interface; provide
Appendix AA−6INTERPROCESS COMMUNICATION1.3.2 METHODSThis section lists the methods that are supported by the CrossView ProCOM object’s default interfa
Interprocess CommunicationA−7••••••••Result The textual output of the command window, encapsulated inan annotated format. See CmdAnnotatedOutput in se
Appendix AA−8INTERPROCESS COMMUNICATIONTypically, the COM library is initialized on a thread only once. Subsequentcalls to CoInitialize or CoInitializ
Interprocess CommunicationA−9••••••••CommandInterpreterReadyThe entire command line or GUI operation has either been executedcompletely or aborted. Yo
Appendix AA−10INTERPROCESS COMMUNICATIONSTEP A single step of any kind was finished. Be aware that whenusing single−step, the debugger does not report
Interprocess CommunicationA−11••••••••DidAddSymbols "filename" An application’s symbols have been added to the ones alreadypresent.DidD
Appendix AA−12INTERPROCESS COMMUNICATIONExampleERRORSEQ: 9284OUTPUT:1Hello WorldERROR:1No such name: xyThe reason behind this event is the inevitable
Interprocess CommunicationA−13••••••••class Xfw<targ>: "Xfw<targ> via COM wrapper class" def __init__(self, cmdline_options
Appendix AA−14INTERPROCESS COMMUNICATIONEvents Callback## Example with Events callback#import win32com.client# Python 1.4 requires "import ni&quo
Overview1−31••••••••To inspect the value of global variables and data structures,• Double−click on the variable name in the Source Window.Depending on
Interprocess CommunicationA−15••••••••Python Makepy UtilityIn the examples above Python will load the type info dynamically from theCOM object. This i
Appendix AA−16INTERPROCESS COMMUNICATION1.5.2 VISUAL BASIC EXAMPLESReplace all occurences of Xfw<targ> in the example below by the nameof your C
Interprocess CommunicationA−17••••••••Option ExplicitPublic WithEvents Xvw As Xfw<targ>Private Sub Form_Load() Dim Result As String Set Xvw
Appendix AA−18INTERPROCESS COMMUNICATION’’ Class module clsXfw<targ>’’Option Explicit’ membersPublic WithEvents oXfw<targ> As Xfw<targ&
Interprocess CommunicationA−19••••••••1.5.4 EXCERPT OF THE MIDL DEFINITIONThe ’ICommandLine’ interface is dual, the ’ICommandLineEvents’connection poi
Appendix AA−20INTERPROCESS COMMUNICATION2 DDE SERVER INTERFACE2.1 INTRODUCTIONCrossView Pro offers an Interprocess Communications (IPC) option usingth
Interprocess CommunicationA−21••••••••cmdoutputTopicCommandItemcmdoutputOperationsRequest, AdviseDescriptionRetrieves all command window output of the
Appendix AA−22INTERPROCESS COMMUNICATIONcmdannotatedoutputTopicCommandItemcmdannotatedoutputOperationsRequest, AdviseDescriptionThe first line indicat
Interprocess CommunicationA−23••••••••execextTopicCommandItemexecext:options:stringOperationsExecuteDescriptionPasses the specified string without int
Appendix AA−24INTERPROCESS COMMUNICATIONexecTopicCommandItemexecOperationsExecuteDescriptionPasses the specified string without interpreting it to Cro
Chapter 11−32OVERVIEW1.6.6 CROSSVIEW PRO OUTPUTNearly every CrossView Pro command can be given using the graphicaluser interface. These commands and t
Interprocess CommunicationA−25••••••••haltTopicCommandItemhaltOperationsExecuteDescriptionForces CrossView Pro to stop target execution. You can issue
Appendix AA−26INTERPROCESS COMMUNICATIONeventTopicCommandItemeventOperationsAdviseDescriptionReports event occurrences to the client, asynchronously.
Interprocess CommunicationA−27••••••••resultTopicCommandItemresult:nameOperationsExecuteDescriptionThe name that you specify provides a serve as DDE r
Appendix AA−28INTERPROCESS COMMUNICATIONEVENT: 27SourceFileChanged "demo.c"EVENT: 23ViewedLineNrChanged 93EVENT: 27Stopped BREAKPOINT "
Interprocess CommunicationA−29••••••••Creates a menu entry with given label and id−string. The label alsospecifies the path from the main menu bar, fo
Appendix AA−30INTERPROCESS COMMUNICATION2.5.2 READING TARGET MEMORYYou can retrive target memory either via requesting a variable’s value, orwith the
Interprocess CommunicationA−31••••••••2.5.3 WRITING INTO TARGET MEMORYTo write to target memory, use one of the following three methods.1. Assign a va
Appendix AA−32INTERPROCESS COMMUNICATION2.5.4 REQUESTING CURRENT FILE AND LINE NUMBERTo determine the location of the source window cursor position, r
BCROSSVIEWEXTENSIONLANGUAGE (CXL)APPENDIX
Appendix BB−2CXL SYNTAXBAPPENDIX
Overview1−33••••••••1.6.7 EXITING CROSSVIEW PROTo quit a debugging session:• From the File menu, select Exit or close the Command Window.• In the Opti
CrossView Extension Language (CXL)B−3••••••••1 INTRODUCTIONThe CXL language is used for scripting, specifically for the data analysiswindow and simula
Appendix BB−4CXL SYNTAXExample:{ sub void p(function f) { outd(f()); outc(’\n’); } sub int
CrossView Extension Language (CXL)B−5••••••••Within scripts, blocks can be defined and nested, just like in C:{ ... { ... {
Appendix BB−6CXL SYNTAX2.1 VARIABLESVariable declarations must be done at the beginning of a block, beforestarting the actions. All variables are init
CrossView Extension Language (CXL)B−7••••••••2.3 COMPOUND TYPESCXL supports the following compound types:• array of char• array of int• array of long•
Appendix BB−8CXL SYNTAX2.5 CONSTANTS AND EXPRESSIONSThe syntax for expressions is the same as for C. The operators andoperator precedence are equal. T
CrossView Extension Language (CXL)B−9••••••••2.7 FUNCTIONSFunction definitions start with the keyword "sub". Besides that, the syntaxis equa
Appendix BB−10CXL SYNTAXThe included files can only contain functions definitions. It is not possiblejust include a script fragment.The include files
CrossView Extension Language (CXL)B−11••••••••3.2 ARRAY AND STRING FUNCTIONSUpperbound of an array:long upperbound(array a);The following string and a
Appendix BB−12CXL SYNTAX"w" Truncate file to zero length or create text file for writing."w+" Open file for reading and writing.&q
Chapter 11−34OVERVIEW1.6.8 WHAT YOU MAY HAVE DONE WRONGMost problems in starting up CrossView Pro for a debugging session stemfrom improperly setting
CrossView Extension Language (CXL)B−13••••••••double get( string name );Returns the value of a name known by CrossView Pro. This includesvariable name
Appendix BB−14CXL SYNTAXprintf is chosen to facilitate development and debugging graphmscripts using a host system C development environment. The C co
CrossView Extension Language (CXL)B−15••••••••filled_rectangle x1, y1, x2, y2Puts a rectangle, filled with the latest set brush_color, bounded by(x1,
Appendix BB−16CXL SYNTAXAnchors: 1−−−−−2−−−−−3 | | 4 5 6 | | 7−−−−−8−−−−−9Text may include any characters,
CrossView Extension Language (CXL)B−17••••••••Argument passing.The graph and graphm commands can be given a number of arguments.These arguments are ac
Appendix BB−18CXL SYNTAX
CSOUND SUPPORT(MS−Windows)APPENDIX
Appendix CC−2SOUNDCAPPENDIX
Sound Support (MS−Windows)C−3••••••••You can have sound effects being played when a predefined event inCrossView Pro occurs. You can configure the sou
Appendix CC−4SOUND4. For the sound effects to become operational, you also have to edit thexvw.ini file. You can do this using any editor, e.g. the Wi
Overview1−35••••••••1.6.9 BUILDING YOUR EXECUTABLEThe subdirectory xvw in the examples subdirectory contains a demoprogram for the C166/ST10 toolchain
ROM/RAM MONITORADDENDUM
Execution EnvironmentMon−2ROM/RAM MONITORADDENDUM
ROM/RAM MonitorMon−3••••••••1 INTRODUCTIONThis addendum contains information specific for the C166/ST10 familytarget boards with a ROM or RAM debug mo
Execution EnvironmentMon−4ROM/RAM MONITORCrossView Pro knows which resources to use for a target board by readinga target configuration file. You can
ROM/RAM MonitorMon−5••••••••5 THE RAM AND ROM DEBUG MONITORFor running and debugging an application on your target board withCrossView Pro, a debug mo
Execution EnvironmentMon−6ROM/RAM MONITOR1. Sending boot program.CrossView Pro sends a boot−program to the serial port (up to 960 bytes).The on−chip b
ROM/RAM MonitorMon−7••••••••5. Initializing registers.The values of the registers specified in the configuration file with theeinit field are passed b
Execution EnvironmentMon−8ROM/RAM MONITORDescriptionBoot Programbtargetnrbe.sre for target (and derivative) boards which have no RAMselected by CS0. T
ROM/RAM MonitorMon−9••••••••The following monitor programs are available:Monitor Program Descriptionmtargetn.sre for C16x/ST10, XC16x, Super10 boards
Execution EnvironmentMon−10ROM/RAM MONITORDescriptionMonitor Programmext2ib.sre same as mext2b.sre with the difference that in themonitor the EINIT in
Chapter 11−36OVERVIEWThe EDE screen provides you with a menu bar, a toolbar (commandbuttons) and one or more windows (for example, for source files),
ROM/RAM MonitorMon−11••••••••5.1.2 ROM DEBUG MONITOR USING DUAL VECTORTABLEWhen the monitor is burned into EPROM, the interrupt vector table shouldalr
Execution EnvironmentMon−12ROM/RAM MONITORThe ROM debug monitors with dual vector table are by default configuredas follows:Resource Start Endmonitor
ROM/RAM MonitorMon−13••••••••5.1.3 ROM DEBUG MONITOR USING MEMORY SWITCHIn this configuration the monitor and vector table are in EPROM starting atadd
Execution EnvironmentMon−14ROM/RAM MONITOR5.2 RESOURCES USED BY THE DEBUG MONITORSThe system stack size is set at startup of the monitor according to
ROM/RAM MonitorMon−15••••••••The NMI and the S0RINT interrupt cannot be used by your program. Bothvectors should be located in RAM because the monitor
Execution EnvironmentMon−16ROM/RAM MONITOR5.3 REBUILDING THE DEBUG MONITORSThe monitor and boot programs are also included as source, installed inthe
ROM/RAM MonitorMon−17••••••••flash_st10f16x.c additional flash routines for the ST10x168flash_st10f276.c additional flash routines for the ST10x276tra
Execution EnvironmentMon−18ROM/RAM MONITORThe S−Record files (.sre) of the boot programs and monitors are createdin the mon167, monext2 and monxc16x s
ROM/RAM MonitorMon−19••••••••Memory configurationThe memory configuration depends on the values of the SYSCON,CPUCON1, VECSEG, BUSCON and ADDRSEL regi
Execution EnvironmentMon−20ROM/RAM MONITORVECTAB_APP_STARTThe start address of the vector table of the user application for theROM dual vector table c
Table of ContentsV••••••••OVERVIEW 1−11.1 Introduction 1−3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 CrossView Pro’s Featur
Overview1−37••••••••2. Select the toolchain you want. You can do this by clicking on a toolchainin the Toolchains list box and click OK.If no toolchai
ROM/RAM MonitorMon−21••••••••5.4 DEBUG MONITOR INTERFACE DESCRIPTIONThis section describes the interface protocol which allows host computerdebuggers
Execution EnvironmentMon−22ROM/RAM MONITORADDR: 4−byte address, little endianWORD: 2−byte word, little endianBYTE: 1 byteSTRING: set of subsequent byt
ROM/RAM MonitorMon−23••••••••5.4.3 COMMAND SETNULLDescription:Dummy command, no action to be performed.Token:0 (BYTE)Parameters:noneReturns:When the m
Execution EnvironmentMon−24ROM/RAM MONITORPCTOMEMDescription:Send number of bytes from host to target. Start address and start address +count must be
ROM/RAM MonitorMon−25••••••••POKEDescription:Write a 16−bit word to target. The supplied address parameter must beeven.Token:3 (BYTE)Parameters:addres
Execution EnvironmentMon−26ROM/RAM MONITORREGLOADDescription:Receive all 16 user program General Purpose Register values from thetarget.Token:5 (BYTE)
ROM/RAM MonitorMon−27••••••••REGSAVEDescription:Send 16 new user program General Purpose Register values to target.Token:6 (BYTE)Parameters:reg R0 val
Execution EnvironmentMon−28ROM/RAM MONITORMOVMEMDescription:Copy range of target memory contents to another memory location. Sourcerange and destinati
ROM/RAM MonitorMon−29••••••••SETIPDescription:Set user program CSP:IP registers on target to given address value .Token:14 0x0E (BYTE)Parameters:new C
Execution EnvironmentMon−30ROM/RAM MONITORGODescription:Start user program on target.Token:16 0x10 (BYTE)Parameters:noneReturns:noneSHOWSTATDescriptio
Chapter 11−38OVERVIEW2. Choose the file(s) you want to open by clicking on it. You can selectmultiple files by pressing the <Ctrl> or <Shift&
ROM/RAM MonitorMon−31••••••••reg STKUN value (WORD)reg T01CON value (WORD)reg T2CON value (WORD)reg T3CON value (WORD)reg T4CON value (WORD)reg T5CON
Execution EnvironmentMon−32ROM/RAM MONITORMONADRDescription:Receive target memory locations where the user program resources aresaved when the target
ROM/RAM MonitorMon−33••••••••DEBUGDescription:Receive the debug instruction that will activate the monitor when abreakpoint is encountered.This instru
Execution EnvironmentMon−34ROM/RAM MONITOREINITDescription:Internal use to execute the einit instruction to initialize the target at startup.Token:32
ROM/RAM MonitorMon−35••••••••6 THE TARGET CONFIGURATION FILEThe target configuration files (*.cfg) describe the available target boards.These files ar
Execution EnvironmentMon−36ROM/RAM MONITORDescriptionFielddebug_instrument_module The name of the Debug Instrument(using GDI) used for debugging:’diev
ROM/RAM MonitorMon−37••••••••DescriptionFieldflash_direct_access When set to TRUE, CrossView Properforms flash operations using targetmemory read/writ
Execution EnvironmentMon−38ROM/RAM MONITORDescriptionFieldeinit Initialize the register specified in thesubfield with the value specified infield−valu
ROM/RAM MonitorMon−39••••••••The SYSCON register will always be initialized before the boot programand monitor execute the EINIT instruction.The confi
Execution EnvironmentMon−40ROM/RAM MONITORNote for the XC16x/Super10 architectures:For each execution of the user application (step and run commands)
Overview1−39••••••••3. Click OK.How to Build the Demo ApplicationThe next step is to compile the file(s) together with its dependent files soyou can d
ROM/RAM MonitorMon−41••••••••8 CONNECTING TO THE TARGET BOARD8.1 RS−232All configurations of the monitor have an automatic baud rate detection.We reco
Execution EnvironmentMon−42ROM/RAM MONITORWhen connecting to the target board CrossView Pro first detects if amonitor is already running. If it gets a
ROM/RAM MonitorMon−43••••••••8.2 CAN (WINDOWS ONLY)ROM/RAM monitors and configuration files are available for debuggingover the CAN interface.First a
Execution EnvironmentMon−44ROM/RAM MONITOR• Select the RAM/ROM Monitor Communication Setup entry andselect CAN. Select a CAN card manufacturer (for ex
ROM/RAM MonitorMon−45••••••••target_board: Name of the target configuration file (.cfg)For example:xfw166 −D can,500,30,0,0,0,0,pcnetcan −tcfg kc167c.
Execution EnvironmentMon−46ROM/RAM MONITORCAN−idname: can’t set acceptance−mask for CAN interfaceThe CAN interface could not set the Acceptance−Mask r
ROM/RAM MonitorMon−47••••••••CAN−idname: found error − QXMTFULLThe send queue is full.CAN−idname: found error − RCVEMPTYCrossView Pro did not receive
Execution EnvironmentMon−48ROM/RAM MONITORConnecting: sending bootstrapCrossView Pro received the bootstrap loader acknowledge byte from theboard and
ROM/RAM MonitorMon−49••••••••8.5 CONNECTION PROBLEMSWhen connection fails or errors occur, first check the following:• check if you selected the right
Execution EnvironmentMon−50ROM/RAM MONITOR− check whether the target execution board loops back controlflow signals decently. If not make it yourself
Chapter 11−40OVERVIEWHow to View the Results of a BuildOnce the files have been processed you can inspect the generatedmessages.You can see which comm
ROM/RAM MonitorMon−51••••••••cannot stop execution of user programThe serial receive interrupt used to break into monitor has by default avery low in
Execution EnvironmentMon−52ROM/RAM MONITOR10 TARGET BOARD APPLICATION NOTESWhen you invoke CrossView Pro, you have to specify which board is usedwith
ROM/RAM MonitorMon−53••••••••Configuration FileFlashMonitorMonitorBootstrapLoaderInfineonXC161CJ (DEMUX) bxc16xnrbe.sre mxc16xre.sre fxc16x.sre inf_xc
Execution EnvironmentMon−54ROM/RAM MONITORConfiguration FileFlashMonitorMonitorBootstrapLoaderPhytecKitCON−167 usingPEAK−CAN−Dongleb167nrb.sre m167crd
ROM/RAM MonitorMon−55••••••••Configuration FileFlashMonitorMonitorBootstrapLoaderTQ−ComponentsSTK16X with TQM167C b167nrb.sre m167r.sre f167.sre tqs_1
Execution EnvironmentMon−56ROM/RAM MONITOR10.2 RIGEL RMB−165, RMB−167, RMB−167SR ANDRMB−167CRIThe debugger has been tested with the the RMB−165, RMB−1
ROM/RAM MonitorMon−57••••••••10.4 PHYTEC MM−165, MM−167CR AND MM−167CWThe debugger has been tested with the PHYTEC miniModul−165, 167CRand 167CW plugg
Execution EnvironmentMon−58ROM/RAM MONITOR10.5 PHYTEC KC−161, KC−163, KC−164 AND KC−167The debugger has been tested with the PHYTEC KitCon−161, 163, 1
SIMULATORADDENDUM
Execution EnvironmentSim−2SIMULATORADDENDUM
Overview1−41••••••••4. Give your project a name and then click OK.The Project Properties dialog box then appears for you to identify the files tobe ad
SimulatorSim−3••••••••1 INTRODUCTIONThis addendum contains information specific to the simulator version ofCrossView Pro for the C166/ST10. The simula
Execution EnvironmentSim−4SIMULATORWhen you use EDE, the memory settings are automatically transferred tothe debugger. All memory mappings of your app
SimulatorSim−5••••••••Parallel PortsThe processor pins for parallel port Px are available in CrossView Pro as aspecial register PORT_Px. The bits in t
Execution EnvironmentSim−6SIMULATOR4.2 SCENARIO SCRIPTING USING CXLBefore reading this section it is recommended to read Appendix B,CrossView Extensio
SimulatorSim−7••••••••5. Click OK.6. Click OK.It is also possible to set the breakpoint via the command window:break CYCLES no−of−cycles, name=fancy−n
Execution EnvironmentSim−8SIMULATORThe number of cycles that you fill in with the probe point is depending onthe demand of your scenario. If you need
SimulatorSim−9••••••••5 TARGET CONFIGURATION FILEThe target configuration files (sim*.cfg) describe the available simulatorconfigurations. A configura
Execution EnvironmentSim−10SIMULATORDescriptionFieldregister_file The filename of the register file (*.def) tobe used for the CPU on the target. Whent
SimulatorSim−11••••••••With the example above, to select the SIM167 configuration the commandoption would be:−tcfg sim167.cfg6 RESTRICTIONS AND IMPLEM
Execution EnvironmentSim−12SIMULATOR• When the DIVL or DIVLU instructions results in an overflow, thecontents of the MDL and MDH registers on the simu
Chapter 11−42OVERVIEW1.6.9.2 USING THE CONTROL PROGRAMA detailed description of the process creating the sample programdemo.abs is described below. Th
ON−CHIP DEBUGSUPPORTADDENDUM
Execution EnvironmentOCDS−2OCDS/JTAGADDENDUM
On−chip Debug SupportOCDS−3••••••••1 INTRODUCTIONThis addendum gives supporting information for use of CrossView Prowith the on−chip debug support (OC
Execution EnvironmentOCDS−4OCDS/JTAGOCDS via the Device Access Server• OCDS supporting architecture• One unused USB port on your PC• Infineon Technolo
On−chip Debug SupportOCDS−5••••••••4.4 CONFIGURING CROSSVIEW PROIn CrossView Pro choose one of the OCDS target configurations, reachablefrom EDE. From
Execution EnvironmentOCDS−6OCDS/JTAG6 THE TARGET CONFIGURATION FILEThe target configuration files (*.cfg) describe the available target boards.These f
On−chip Debug SupportOCDS−7••••••••DescriptionFieldregister_file The filename of the register file (*.def) tobe used for the CPU on the target. Whenth
Execution EnvironmentOCDS−8OCDS/JTAGFields specific for the JTAG/OCDS connection via the parallel port:Field Descriptionmonitor The filename of the mo
On−chip Debug SupportOCDS−9••••••••Fields specific for OCDS via DAS:Field DescriptionDASserver The name of the used DAS server, whichmust be run and/o
Execution EnvironmentOCDS−10OCDS/JTAG828282828282821100.01µ10k 10ka11a223a34a4b1b2b3b45678Vcc10a61b62a51b52b71b823a94b10a7a8b9a105678GND0515110k 10k10
Overview1−43••••••••The −Ot option is needed only to demonstrate the deliberate bug indemo.c. Normally you can omit this option.The −ieee option speci
On−chip Debug SupportOCDS−11••••••••7.1 THE INFINEON JTAG CONNECTORSince there is no standard connector defined in the IEEE1149.1 JTAGstandard specifi
Execution EnvironmentOCDS−12OCDS/JTAGSignal Name Direction Pin Number CommentTDO O 3 IEEE 1149.1TDI I 7 IEEE 1149.1TMS I 1 IEEE 1149.1TCLK I 11 IEEE 1
On−chip Debug SupportOCDS−13••••••••7.1.2 IMPLEMENTATION CONSIDERATIONSPull Up’s & Down’sThe following signals should be connected to pull−up’s or
Execution EnvironmentOCDS−14OCDS/JTAG
INDEXINDEX
IndexIndex−2INDEXINDEX
IndexIndex−3••••••••Symbols. (period) operand, 3−18! command, 13−21? command, 5−15, 13−23& operator, 3−18@format code, 3−13−−ddeservername, A−28−−
IndexIndex−4INDEXtoggle mode, 13−38AssertionsChanged, A−11autosrc, 6−19BB command, 13−41b command, 13−42b164nrb.sre, Mon−8b167.sre, Mon−7b167a.sre, Mo
IndexIndex−5••••••••enable, 7−17, 13−53for loops, 7−6function, permanent, 13−44instruction count, 7−3, 13−56, 13−57list, 13−41listing, 7−8low−level, 1
IndexIndex−6INDEXset breakpoint, 13−42task aware, 13−63code coverage, 1−6color, windows, 2−5color offset, 11−17color settings, 2−5COM interfaces, A−5C
Chapter 11−44OVERVIEWThe demo.ilo file contains the following locator invocation controls:RESERVE MEMORY(00200h to 00FFFh ; Monitor code and data0FCC0
IndexIndex−7••••••••executable name, Mon−3, Sim−3features of the executionenvironment, Sim−3invoking, 4−4restrictions of executionenvironment, Mon−4,
IndexIndex−8INDEXposition window, 13−124rawmemget, 13−169supplied scripts, 11−13update, 13−186update window, 13−186Data Analysis Window, 4−37toolbar,
IndexIndex−9••••••••EasyCODE, 4−9eC command, 13−98ec command, 13−99echo command, 13−100echo string to terminal, 13−20EDE, 1−35build an application, 1−
IndexIndex−10INDEXmonitoring, 6−12removing monitored, 6−13show, 4−30special expressions, 3−18specifying variables in, 3−8strings, 3−6watch, 4−30extens
IndexIndex−11••••••••graph_clear_updates command,13−119graph_close command, 13−120graph_debug command, 13−121graphm command, 13−122graphmn command, 13
IndexIndex−12INDEXKkernel support, 1−7, 11−4keyboard mappings, 10−10keywords, conditional, 3−193−20KitCon, Mon−58LL command, 13−137l command, 13−138l
IndexIndex−13••••••••map_rom, 1−20, Sim−10map_sfr, 1−19, Sim−10MAU (minimum addressable unit),15−7mcp command, 13−144memget command, 13−145memorycopy,
IndexIndex−14INDEXmxc16xib.sre, Mon−10mxc16xn.sre, Mon−9mxc16xr.sre, Mon−9mxc16xre.sre, Mon−9NN command, 13−152n command, 13−153nC command, 13−154near
IndexIndex−15••••••••precision, evaluating expresions, 3−4print source lines, 13−158, 13−159probe point, 1−5, 7−4, 15−8problemscommon, 1−34communicati
IndexIndex−16INDEXspecial variable, 3−10reserve, 1−21, 1−23, 1−24, Mon−38,OCDS−7Reset, A−10reset program, 5−8, 13−164reset target system, 13−168, 13−1
Overview1−45••••••••1.6.9.3 USING THE MAKEFILEThe subdirectories in the examples directory each contain a makefilewhich can be processed by mk166.To b
IndexIndex−17••••••••source merge limit, 3−11source positioning, 5−3Source Window, 4−24change execution position, 5−5change viewing position, 5−4contr
IndexIndex−18INDEXtitle, 1−18, Mon−35, Sim−9, OCDS−6toolbar, 4−12data analysis window, 4−37data window, 4−32memory window, 4−29source window, 4−25stac
IndexIndex−19••••••••windows, 4−21active, 4−16, 15−3automatic switching between sourceand assembly, 3−10closing, 4−16command window, 4−22customizing,
IndexIndex−20INDEX
Chapter 11−46OVERVIEW
Table of ContentsVICONTENTS3.4 Variables 3−7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Formatting Expressions 3−13. .
2SOFTWAREINSTALLATIONCHAPTER
Chapter 22−2INSTALLATION2CHAPTER
Software Installation2−3••••••••2.1 INTRODUCTIONThis chapter describes additional notes for running the CrossView Prodebugger under the X Windows envi
Chapter 22−4INSTALLATIONReplace path_to_uid by the path to the directory in which the resourcefile is installed. The %U is required.For more details
Software Installation2−5••••••••Menu:MENUBAR − XmMenuShellPULLDOWN − XmCascadeButtonControls:CHECKBOX − XmToggleButtonRADIOBUTTON − XmToggleButtonTEXT
Chapter 22−6INSTALLATION*XmScrolledWindow*background: white*XmDrawingArea.background: white*XmBulletinBoard.background: DarkSeaGreen*XmToggl
3COMMANDLANGUAGECHAPTER
Chapter 33−2LANGUAGE3CHAPTER
Command Language3−3••••••••3.1 INTRODUCTIONThe syntax and semantics of CrossView Pro’s command language isdiscussed here. This language is mainly used
Chapter 33−4LANGUAGEExpressions can be any length in most windows and dialog boxes;CrossView Pro provides a horizontal scroll bar if an expression exc
Table of ContentsVII••••••••4.7.2 Mouse/Menu/Command Equivalents 4−39. . . . . . . . . . . . 4.8 Using the On−line Help 4−40. . . . . . . . . . . . .
Command Language3−5••••••••For the hexadecimal digits a through f you can use either upper or lowercase. The following are all correct hexadecimal rep
Chapter 33−6LANGUAGECharacterCharacter constants are single characters or special constants that followthe C syntax for special characters. Examples o
Command Language3−7••••••••Trigraph sequences are not supported.3.4 VARIABLESCrossView Pro lets you use variables in the C expressions you type. Youma
Chapter 33−8LANGUAGEGlobal VariablesGlobal variables are defined outside every function and are not local toany function. Global (non−static) variable
Command Language3−9••••••••Variables and Scoping RulesA variable is in scope at any point in the program if it is visible to the Csource code. For ins
Chapter 33−10LANGUAGEDescriptionReserved Variable$PROCEDURE Contains the name of the procedure at the currentviewing position.$ASMHEX Contains a strin
Command Language3−11••••••••DescriptionReserved Variable$SRCLINENRS Contains a string "ON" or "OFF". The value "ON"speci
Chapter 33−12LANGUAGE&$mulipLocation of $MULIP is $PSW.5Operand for ’&’ incorrect&$psw0xFF10In addition to the standard register special v
Command Language3−13••••••••3.5 FORMATTING EXPRESSIONSBy default, CrossView Pro displays the value of an expression using theappropriate format for th
Chapter 33−14LANGUAGEto display the variable in format format, or:variable@formatto display the variable’s address in format format.The structure of t
Table of ContentsVIIICONTENTS6.4 Displaying Disassembled Instructions 6−18. . . . . . . . . . . . 6.4.1 Intermixed Source and Disassembly 6−19. . . .
Command Language3−15••••••••DescriptionStyleg Print in g" floating point notation; the size specifier can be sizeof(float)or sizeof(double); def
Chapter 33−16LANGUAGEtext What is the address of this char arraytext = 0x8200text/aPrint it as a stringtext = "Sample^J"ptextWhat is the con
Command Language3−17••••••••3.6 OPERATORSStandard C OperatorsCrossView Pro supports the standard C operators in the ANSI definedorder of precedence. T
Chapter 33−18LANGUAGEUsing AddressesTo specify an address, you may use the & operator. To determine theaddress of initval, type:&initvalIf you
Command Language3−19••••••••The period operand assumes the same size and format implied by thespecifier used to view the previous item. Thus if you lo
Chapter 33−20LANGUAGE3.9 FUNCTIONSIn CrossView Pro expressions, you can include functions defined in theprogram’s code.Command line function calls are
4USINGCROSSVIEW PROCHAPTER
Chapter 44−2USING4CHAPTER
Using CrossView4−3Using CrossView Pro••••••••4.1 INTRODUCTIONThis chapter and the following 8 chapters give you a comprehensivepicture of CrossView Pr
Chapter 44−4USINGThis manual discusses both methods of performing CrossView Profunctions. For a quick−reference guide to all CrossView Pro commands,re
Kommentare zu diesen Handbüchern