ICDPPCZ User Guide
ICDPPCZ User Guide
1 Introduction
PEmicro's ICDPPCZ for Windows is a powerful tool for debugging code on an NXP MPC5xx/8xx
processor. The debugger uses the processor's JTAG debug mode, via a hardware interface, to
give the user access to all on-chip resources.
Figure 1-1: ICDPPCZ Debugger
Syntax:
ICDPPCZ_PRO [option] ... [option]
lpt1…lpt3 Chooses lpt1, lpt2, or lpt3. The software will remember the last setting used.
pci1…pci6 Chooses which PCI card to communicate with. The software will remember
the last setting used.
pci_delay n Sets speed of PCI card shift clock, where n = 0…255. The equation for the
PCI card shift clock frequency is 33 * 10^6 / (5 + 2n).
running Starts ICD with CPU running (see RUNNING help)
io_delay_cnt n Causes the background debug mode clock to be extended by 'n' Cycles
where 1 =n =64k. Used when using a very fast PC or a slow CPU clock
(default = 1);
quiet Starts the ICD without filling the memory windows and the disassembly
window. Can be used for speed reasons or to avoid DSACK errors on startup
until windows are positioned or chip selects enabled.
-or-
path A DOS path to the directory containing the source code for source level debug
or a DOS path to a source file to be loaded at startup (path part is also saved).
Note: If more then one option is given, they must be separated by spaces.
Examples:
ICDPPCZ_PRO lpt2 io_delay_cnt 2 Chooses lpt2, Causes the background debug mode
clock to be extended by 2 Cycles.
Additionally, if a file named STARTUP.ICD exists in the current directory, it will be run as a macro at
3 Nomenclature
Note the following:
n any number from 0 to 0FFFFFFFF (hex). The default base is hex. To enter numbers in
another base use the suffixes 'T' for base ten, 'O' for base eight or 'Q' for base two. You
may also use the prefixes '!' for base ten, '@' for base 8 and '%' for base two. Numbers
must start with either one of these prefixes or a numeric character. Example: 0FF = 255T =
377O = 11111111Q = !255 = @377 = 11111111
[] optional parameter.
; Everything on a command line after and including the “;” character is considered a
comment. This helps in documenting macro (script) files.
4 User Interface
• CPU Window
• Status Window
• Memory Window
• Variables Window
• Code Window
• Colors Window
The CPU Window has three tabs for three different sets of registers: General, Floating-Point 1, and
Floating-Point 2. The General Register screen shows all general-purpose registers along with the
PC, CR, MSR, XER, LR, and CTR registers. The Floating-Point 1 Register screen shows floating
point registers FR0-FR15 and the FPSCR register. The Floating-Point 2 Register screen shows
floating point registers FR16-FR31. Double-clicking on any of these registers displays a popup
window where the user can modify the register value. Commands are also associated with each of
these registers that can be entered in the Status Window. Special Purpose registers can be
changed through the SPR command.
KEYSTROKES
The following keystrokes are valid while the CPU window is the active window:
POPUP MENU
By pressing the RIGHT MOUSE BUTTON while the cursor is over the status window, the user is
given a popup menu which has the following options:
Help...
KEYSTROKES
The following keystrokes are valid while the status window is the active window:
To view previous commands and command responses, use the scroll bar on the right side of the
window.
POPUP MENU
By pressing the RIGHT MOUSE BUTTON while the cursor is over the memory window, the user is
KEYSTROKES
The following keystrokes are valid while the memory window is the active window:
Variables that are pointers are displayed in red. Normal variables are displayed in black. Real-time
variables are displayed in blue. A real-time variable is a variable that is updated even while the
processor is running.
Listing valid variables
Use the Variable / Address input field to enter the label or memory location for the data you wish to
be displayed.
Below, select from the Type and Base buttons to specify in which format and base you would like
the data to be displayed.
List Globals
Global symbols appear. Double-click an entry to add to the Variables window.
List Locals
Local symbols that are currently in scope appear. Double-click an entry to add to the Variables
In the variable field, the user should input the address or name of the variable that they would like
displayed in the variables window. The type of the variable should most often be set to “Default,”
which means that the variable will be shown as it is defined in the compiled/loaded application.
When adding a variable the user may also specify the numeric base in which the variable should
be displayed.
POPUP MENU
By pressing the RIGHT MOUSE BUTTON while the cursor is over the code window, the user is
The following keystrokes are valid while the code window is the active window:
The user may set a breakpoint at an instruction by double-clicking the tiny red dot,. When the user
issues the HGO command or clicks the high-level language GO button on the debugger button
bar, execution will begin in real-time. If the debugger encounters a breakpoint, execution will stop
on this source line. If a breakpoint is not encountered, execution will continue until the user
presses a key or uses the stop button on the debugger button bar. To remove a breakpoint,
double-click the large red stop sign.
By double-clicking the tiny blue arrow, the user will be issuing a GOTIL command to the address of
this source line. A GOTIL command will set a single breakpoint at the desired address, and the
processor will begin executing code in real-time from the point of the current program counter
(PC). When the debugger encounters the GOTIL address, execution will stop. If this location is not
encountered, execution will continue until the user presses a key or uses the stop button on the
debugger button bar. Note that all set breakpoints are ignored when the GOTIL command is used.
The disassembly window also supports double-clicking of the red and blue symbols, and there is
an additional symbol that may appear: a small blue S enclosed in a box. This indicates that a
source level instruction starts on this disassembly instruction. An image of this is shown here:
Figure 4-2: Source Level Instruction
The three configurable locations are the code window title bar, the status window caption bar, or a
popup that is displayed until the mouse is moved. The hint can be displayed in any combination of
the three locations. Locations where the popup hints are displayed are set in the configuration
menu of the debugger.
The information displayed in the hint box is similar to the information displayed in the variables
window. A close-up image of this hint box is shown here:
Figure 4-2: Hint Box
The information shown is the variable name (date_var), value (Thursday), and type (generalized C
language enumeration).
5 Command Recall
You can use the PgUp and PgDn keys to scroll through the past 30 commands issued in the
debug window. Saved commands are those typed in by the user, or those entered through macro
(script) files. You may use the ESC key to delete a currently entered line including one selected by
scrolling through old commands.
Note that only "command lines" entered by the user are saved. Responses to other ICD prompts
are not. For example, when a memory modify command is given with just an address, the ICD
prompts you for data to be written in memory. These user responses are not saved for scrolling;
however, the original memory modify command is saved.
This will change the value of the low 32 bits of the R1 register to hex value $7654321.
>R1H 23456789
This will change the value of the high 32 bits of the R1 register to hex value $23456789
>PC 100
The value of Program Counter register (PC) will be changed to hex value $100
>MSR 2000
REGISTERS
R0 ... R31
Note: The SPR Command may be used to change the value of any special purpose register.
7 Connection To Target
When you first run the software, you will see the Connection Assistant dialog box:
Figure 7-1: Connection Assistant Dialog
You may use this dialog box to connect to your target using one of PEmicro’s debugging interface
products. The dialog allows you to specify the type of PEmicro debugging interface hardware. You
may also select the CPU type, communications speed, and reset delay. If you wish, you may
disable the dialog box so that it will appear only on error.
Use the Connect button to reset the target. Use the Hotsync button to connect to the target without
resetting it.
8 Running
Sometimes it is desirable to leave the CPU running and exit the ICD debug software. To do this,
use the GOEXIT command. To re-enter the ICD debug software, use the option RUNNING as a
parameter on the start up command line (see STARTUP). This option causes the debugger to not
do a RESET at startup and to ignore any STARTUP.ICD macro file. In order to use this option, the
CPU must have previously been left executing by the debugger.
Another way to re-enter the ICD without resetting the target is to use the Hotsync button on the
Connection Assistant.
It is possible to remove the ICD cable from your target system and then reconnect it provided that
the following sequence is observed:
9 Commands
Syntax:
ASM [<address>]
Where:
<address> Address where machine code is to be generated. If you do not specify an
<address> value, the system checks the address used by the previous ASM
command, then uses the next address for this ASM command.
Examples:
With an address argument:
>ASM 100
The user can type a new instruction in the edit box next to the 'New Instruction' text. In this
example, the instruction 'LWZU R5,20(R8)' is typed and then the ENTER button is pressed. As
This window shows that address is incremented by 4 and the instruction at address is ADDI
R6,R4,0234. You can either enter another instruction or click EXIT to get out of this window.
Syntax:
BF[.B | .W | .L] <startrange> <endrange> <n>
FILL[.B | .W | .L] <startrange> <endrange> <n>
Where:
<startrange> Beginning address of the memory block (range).
<endrange> Ending address of the memory block (range).
<n> Byte or word value to be stored in the specified block.
Examples:
>BF C0 CF FF Store hex value FF in bytes at addresses C0-CF.
>FILL C0 CF FF Store hex value FF in bytes at addresses C0-CF
>BF.B CO CF AA Store hex value AA in bytes at addresses C0-CF.
>FILL.B CO CF AA Store hex value AA in bytes at addresses C0-CF.
>BF.W 400 41F 4143 Store word hex value 4143 at addresses 400-41F.
>FILL.W 400 41F 4143 Store word hex value 4143 at addresses 400-41F.
>BF.L 1000 2000 8F86D143 Store long hex value 8F86D143 at address 1000-2000
>FILL.L 1000 2000 8F86D143 Store long hex value 8F86D143 at address 1000-2000
Syntax:
BR [add] [n]
Where:
add Address at which a break point will be set.
n If [n] is specified, the break will not occur unless that location has been executed n
times. After the break occurs, n will be reset to its initial value. The default for n is 1.
Examples:
>BR ; Shows all the breakpoints that are set and the current values for n.
>BR 100 ; Set break point at hex address 100.
>BR 200 5 ; Break will not occur unless hex location 200 has been executed 5 times.
Syntax:
CLEARMAP
Example:
>CLEARMAP Clears symbol and source information.
Note: Current user defined symbols can be listed with the SYMBOL command.
Syntax:
CLEARSYMBOL
Example:
>CLEARSYMBOL Clears user defined symbols.
Syntax:
CR <n>
Where:
<n> The new hexadecimal value for the CR.
Example:
>CR $C4 Assign the value C4 to the CR.
Note: The counter register is used by the CPU for looping purposes. This register is also a special
purpose register.
Syntax:
CTR <n>
Where:
<n> The new hexadecimal value for the CTR.
Example:
>CTR $100 Assign the value $100 to the CTR.
Syntax:
DUMP [.B | .W | .L] <startrange> <endrange> [<n>]
Where:
<startrange> Beginning address of the data memory block.
<endrange> Ending address of the data memory block (range).
<n> Optional number of bytes, words, or longs to be written on one line.
Examples:
Syntax:
Dump_Trace
Example:
>Dump_Trace
Syntax:
EVAL <n> [<op> <n>]
Where:
<n> Alone, the numerical term to be evaluated. Otherwise either numerical term of a simple
expression.
<op> The arithmetic operator (+, -, *, /, &, or ^) of a simple expression to be evaluated.
Examples:
>EVAL 45 + 32
004DH 077T 000115O 0000000001001101Q "w"
>EVAL 100T
0064H 100T 000144O 0000000001100100Q "d"
Syntax:
Example:
>EXIT Finish working with the program.
Syntax:
FPSCR <n>
Where:
<n> The new hexadecimal value for the CR.
Example:
> FPSCR $C4 Assign the value C4 to the CR.
Syntax:
FR(x) [n]
Where:
(x) Value from 0 to 31, corresponding to which register the user intends to write.
[n] Value to be written to register.
Example:
FR3 20.345234 Writes value of 20.345234 to Floating Point Register FR3.
Syntax:
GO [<startaddr> [<endaddr>]]
Where:
<startaddr> Optional execution starting address. If the command does not have a <startaddr>
value, execution begins at the current PC value.
Examples:
>GO Begin code execution at the current PC value.
>GO 346 Begin code execution at hex address 346.
>G 400 471 Begin code execution at hex address 400. End code execution just before the
instruction at hex address 471.
>RUN 400 Begin code execution at hex address 400.
9.15 GOEXIT Command - Begin Program Execution W/O Breakpoints & Terminate Debugger
Similar to GO command except that the target is left running without any breakpoints and the
debugger software is terminated.
Syntax:
GOEXIT [add]
Where:
add Starting address of your code.
Example:
>GOEXIT 100 This will set the program counter to hex location 100, run the program and exit
from the background debugging mode.
Syntax:
GOTIL <endaddr>
Where:
<endaddr> The address at which execution stops.
Example:
>GOTIL 3F0 Executes the program in the Debugger up to hex address 3F0.
Syntax:
HGO
Syntax:
HLOAD [<filename>]
Where:
<filename> The name of the object or debug file to be loaded.
Examples:
> HLOAD MAIN.ELF Load the object and debug information in the ELF/DWARF file MAIN.ELF.
Syntax:
HLOADMAP [<filename>]
Where:
<filename> The name of a map file to be loaded. The .MAP extension can be omitted. The
filename value can be a pathname that includes an asterisk ( ) wildcard
character If so, the command displays a lists of all files in the specified directory
that have the .MAP extension.
Examples:
>HLOADMAP PROG.MAP Load map file PROG.MAP into the host computer.
Syntax:
HSTEP
Examples:
> HSTEP Step one source instruction.
Example:
>HSTEPFOR Step through instructions continuously
Syntax:
LOADV_BIN [filename] [add]
Where:
filename Name of the binary file
add Starting address
Example:
>LOADV_BIN myfile.bin 100 Loads a binary myfile of bytes starting at hex address 100 and then
does a verify using the same file.
LOAD_BIN Load a binary file of byte. The default filename extension is .BIN.
Syntax:
LF [<filename> [<R | A>]]
Where:
<filename> The filename of the log file (or logging device to which the log is written).
Examples:
>LF TEST.LOG R Start logging. Overwrite file TEST.LOG (in the current directory) with all lines
that appear in the status window.
>LF TEMP.LOG A Start logging. Append to file TEMP.LOG (in the current directory) all lines that
appear in the status window.
>LOGFILE (If logging is enabled): Disable logging and close the log file.
Syntax:
LR <n>
Where:
<n> The new hexadecimal value for the LR.
Example:
>LR $C4 Assign the value C4 to the LR.
Note: A macro file can contain the MACRO command; in this way, macro files can be nested as many as
16 levels deep. Also note that the most common use of the REM and WAIT commands is within
macro files. The REM command displays comments while the macro file executes.
If a startup macro file is found in the directory, startup routines run the macro file each time the
application is started. See STARTUP for more information.
Syntax:
MACRO <filename>
Examples:
>MACRO INIT.MAC Execute commands in file INIT.MAC.
>SCRIPT Display names of all .MAC files (then execute the selected file).
>MACRO A: Display names of all .MAC files in drive A (then execute the selected file).
>MACRO Display names of all .MAC files in the current directory, then execute the
selected file.
Syntax:
MACROEND
Example:
>MACROEND Stop saving debug commands to the macro file, then close the file.
Syntax:
MACROSTART [<filename>]
Where:
<filename> The name of the macro file to save commands. The .MAC extension can be
omitted. The filename can be a pathname followed by the asterisk ( ) wildcard
character; if so, the command displays a list of all files in the specified directory
that have the .MAC extension.
Example:
>MACROSTART TEST.MAC Save debug commands in macro file TEST.MAC
Syntax:
MACS
Example:
>MACS Brings up a list of MACROS
Syntax:
MD <address>
Where:
<address> The starting memory address for display in the upper left corner of the memory
window.
Examples:
>MD 200 Display the contents of memory beginning at hex address 200.
>MD1 100 Display the contents of memory beginning at hex address 100.
Syntax:
MD2 <address>
Where:
<address> The starting memory address for display in the memory window.
Example:
>MD2 1000 Display the contents of 32 bytes of memory in the second memory window,
beginning at address 1000.
Syntax:
MM [.B|.W|.L] <address>[<n> ...]
Where:
<address> The address of the first memory location to be modified.
<n> The value(s) to be stored (optional).
Examples:
With only an address:
>MM 400 00 Do not show window, just assign value 00 to hex address 400.
>MM.L 200 123456 Place long hex value 123456 at hex address 200.
Syntax:
MSR <n>
Example:
> MSR $C4 Assign the value C4 to the MSR.
Syntax:
NOBR
Example:
>NOBR Clears all break points.
Syntax:
PC <address>
Where:
<address> The new PC value.
Example:
>PC 0500 Sets the PC value to 0500.
Syntax:
QUIET
Example:
>QUIET Turns off (or on) refresh of memory based windows
Example:
>QUIT Exit the application
Figure 9-4: Confirm Exit Button
The user can view any of the registers, modify their values, and store the results back into
Debugger memory. This is a good tool for gaining quick information on a register.
Figure 9-6: Modify Specific Register
An alternate way to bring up the register files window is to press the Register button.
Syntax:
R
Syntax:
R(x)[H | L] [n]
Where:
(x) Value from 0 to 31, corresponding to which register the user intends to write.
[H | L] Indicates register with most significant bits H or least significant bits L. Default is L.
[n] Value to be written to register.
Example:
Syntax:
REG
Example:
>REG Displays the contents of the CPU registers.
Syntax:
REM <text>
Where:
<text> A comment to be displayed when a macro file is executing.
Example:
>REM Program executing Display message "Program executing" during macro file execution.
Example:
>RESET Reset the MCU into background mode.
Syntax:
RESET
Syntax:
SERIAL (1 or 2) (baud) (parity) (data bits) (stop bits)
Where:
1 or 2 COM1 or COM2
baud Baud rate ranging from 110 to 9600
parity No, Even or Odd parity
data bits 7 or 8 data bits
stop bits 1 or 2 stop bits
Example:
>SERIAL 2 9600 E 8 2 Sets serial port to Com2 port with 9600 baud rate, even parity, 8 data
bits and 2 stop bits
Syntax:
SERIALOFF
Example:
>SERIALOFF Turns off serial port use during GO command
Syntax:
SERIALON
Syntax:
SHOWCODE <address>
Where:
<address> The address or label where code is to be shown.
Example:
>SHOWCODE 200 Show code starting at hex location 200.
Syntax:
SHOWPC
Example:
>SHOWPC Show code from the PC address value.
Example:
>LOGFILE SNAPSHOT This command will open a file by the name SNAPSHOT.LOG and store
all the commands at the status window.
>SNAPSHOT This command will take a snapshot of all the open windows of ICD and
store it in SNAPSHOT.LOG file.
>LF This command will close SNAPSHOT.LOG file
You can open the SNAPSHOT.LOG file with any text editor, such as EDIT.
Syntax:
SOURCEPATH filename
Where:
filename Name of the source file
Example:
>SOURCEPATH d:\mysource\myfile.asm
Syntax:
SPR (x) [n]
Where:
(x) Value from 0 to 1023 corresponding to which register the user intends to write.
Note: The default debugger base is hexadecimal, so to force the register number to be base 10, add the
character T as a suffix.
Example:
SPR 638T Displays the IMMR special purpose register.
Syntax:
SS
Example:
>SS Does one step of source level code.
Syntax:
STEP <n>
or
ST <n>
or
T <n>
Where:
<n>The hexadecimal number of instructions to be executed by each command.
Example:
>STEP Execute the assembly instruction at the PC address value.
>ST 2 Execute two assembly instructions, starting at the PC address value.
Syntax:
STATUS
Example:
>STATUS Displays the contents of the CPU registers.
Syntax:
STEPFOR
Example:
>STEPFOR Step through instructions continuously.
Where:
<address> Execution stop address. This must be an instruction address.
Example:
>STEPTIL 0400 Execute instructions continuously until PC hex value is 0400.
The command has the same effect as an EQU statement in the assembler.
Syntax:
SYMBOL [<label> <value>]
Where:
<label> The ASCII-character string label of the new symbol.
<value> The value of the new symbol (label).
Examples:
>SYMBOL Show the current user defined symbols.
>SYMBOL timer_control $08 Define new symbol 'timer_control', with hex value 08.
Subsequently, to modify hex location 08, enter the command 'MM
timer_control'.
9.63 TIME Command - Displays Real Time Elapsed During Code Execution
Will give you an estimate of real time to execute the command from one address to another.
Set breakpoint at second address. Go from first address. If only one address given, it is the start
address. If no stop address is given, the ICD will run forever or until a breakpoint is encountered or
a key on the keyboard is hit. If no address is given the command is a "Time forever" command.
When the command ends (either a break or a key) the debug window will show the amount of real-
time that passed since the command was initiated.
Syntax:
TIME <[add1] [add2]>
Example:
>TIME 800 805 Will give you an estimate of real time to execute the command from hex
location 800 to hex location 805.
Syntax:
TRACE <[add1] [add2]>
Where:
add1 Starting address
add2 Ending address
Example:
>TRACE 800 805 Will give you an estimate of real time to execute the command from hex
location 800 to hex location 805.
Syntax:
UPLOAD_SREC <startrange> <endrange>
Where:
<startrange> Beginning address of the memory block.
<endrange> Ending address of the memory block (range)
Example:
>UPLOAD_SREC 300 7FFUpload the 300 7FF memory block in .S19 format.
To change the format from the default of hexadecimal, use the Add Variable box.
The optional <n> parameter specifies the number of string characters to be displayed; the default
value is one. The <n> parameter has no effect for byte, word, or long values.
Syntax:
VAR [.B|.W|.L|.S] <address> [<n>]
Where:
<address> The address of the memory variable.
<n> Optional number of characters for a string variable; default value is 1, does not
apply to byte or word variables.
Examples:
>VAR C0 Show byte value of address C0 (hex and binary)
>VAR.B D4 Show byte value of address D4 (hex and binary)
>VAR.W E0 Show word value of address E0 (hex & decimal)
>VAR.S C0 5 Show the five-character ASCII string at hex address C0.
Syntax:
VERIFY
Example:
>LOADALL test.s19
>VERIFY As soon as you press <ENTER> key it will give you a message "Verifying...verified"
Syntax:
VERSION
Examples:
>VERSION Display debugger version.
>VER Display debugger version.
Syntax:
WATCHDOG
Example:
>WATCHDOG
Syntax:
WHEREIS <symbol> | <address>
Where:
<symbol> A symbol listed in the symbol table.
<address> Address for which a symbol is defined.
Examples:
>WHEREIS START Display the symbol START and its value.
>WHEREIS 0300 Display the hex value 0300 and its symbol name if any.
Syntax:
XER <n>
Where:
<n> The new hexadecimal value for the XER.
10 Errors
Various errors may appear in the Status Window during your debugging. Most are self-
explanatory. The following four errors are due to the debugger's interface with the background
mode of the processor:
Warning Not ready response from chip.
Warning BERR Terminated bus cycle. Debugger Supplied DSACK
Warning Illegal command error from chip. Debugger Supplied DSACK
All four errors are probably due to some type of problem accessing memory. The Debugger will fill
most bad memory accesses with XX.
Note: The debugger rewrites the windows showing on the screen often. If a window is showing memory
that does not exist, one of these errors will occur every time the debugger tries to update that
window. This concerns the two memory windows and the code window. Additionally, reading or
writing non-existing memory areas mapped internally may cause one of these errors.
In most cases the debugger will try to recover. If the system starts acting erratic after this
message, it may be due to a fatal memory error and you may have to reset the system.
11 Register Display
Are you tired of looking through manual pages for register descriptions? PEmicro has the ultimate
solution for this problem.
The R command lets you look at and modify the registers and the register fields in both a symbolic
and numeric format. When you type the R command, it searches the directory which contains the
ICD program for any files with the .REG extension (REGister files). Each of these files describes a
block of registers. The block name (1st line of .reg) file is displayed in a pick window. If you select
a register block, each of the registers in that block has its address, name, and description listed in
a pick window. If you select a register, its current value is read from the device and displayed both
symbolically and numerically. You may then edit the register contents.
If you modified the displayed register contents and exit the register display, you are asked if you
want to write the new value back to the device register. You should be careful of any "WRITE
ONLY" registers, since they can not be read but will be written.
The .REG files for most NXP modules are available at nominal cost from PEmicro. These files are
in ASCII and it is possible to create your own files for devices not supported by PEmicro.
12 ELF/DWARF SUPPORT
The In-Circuit Debugger supports loading files of type ELF/DWARF, which provides C source-level
debugging. The ICD will process files that adhere to the following specifications:
Note that the debugger will load DWARF version 2.0 information only. No other DWARF version is
& dereference
* reference
. access to union or structure member
-> pointer access to union or structure member
[ ] array subscript
For example:
int TintGlobal;
int *ptrTint;
int TmultiArray[3][3][3];
struct Tstruct {
int ii;
int jj;
short ll;
} TstructInstance;
union Tunion {
unsigned long TuLongUnion;
struct Tstruct TstructUnion
} TunionInstance;
var TintGlobal
The value of TintGlobal
var &TintGlobal
The address of TintGlobal
var TmultiArray[0][1][2]
The value of this element of the array
var TstructInstance.ii
The value of this member of the structure
var TunionPointer->TuLongUnion
The value of this union member, the union pointed to by TunionPointer
By default, when an Elf/Dwarf object is loaded, the program counter (PC) is set to point to the start
of the demonstration application code.
This is because, before running the user’s main() function, the compiler must first execute some
initialization code which does not have corresponding debug information. To run past the compiler
initialization code, issue the “gotil main” command in the status window. Note that the labels are
case sensitive and that the main label should be all lowercase. This will set a breakpoint at the
beginning of the main() routine in main.c and start the processor running. Execution should stop
almost immediately and the PC should be pointing to valid source code. This source code will
appear in the source code window, similar to the following:
Figure 12-5: Code Window: Source (main.c)
Also, instead of using the GOTIL command, the user could have stepped through the initialization
code (using the STEP or HSTEP commands) and would have eventually reached the main()
function.