,ll 6.6
,cs 10
,pl 66
,lm 0.2,0.5
,pn 24
,ju
,hd
,ce
OmegaSoft 6809 Cross Pascal for OS-9/68000 (V1.02)
,,
,ft

,ce 1
2-##
,,
,ce
OmegaSoft 6809 Cross Pascal for OS-9/68000 (V1.02)

,ce
TARGET DEBUGGER OPERATION

TARGET DEBUGGER COMMAND LINE

db [-options] [command file]

If any options are specified there must be no characters between options (such as spaces or commas). The following options are valid :

,in 0.45
,si -0.3
n - set terminal number, default is auto-search if not specified, If this format is used it must be the first option.

,si -0.3
Tn - set terminal number, default is auto-search if not specified.

,si -0.3
Dnnn - data size in K bytes - overrides default which is 512 bytes. Maximum is 31K, if zero is entered then 256 bytes are used. This area holds the user's data section constants and variables.

,si -0.3
Ennn - externals table size in K bytes - overrides default which is percentage of total size. This area holds user's external/entry variables and procedures. This are also holds internal labels used to access string and set constants - but this space is recycled after each module is loaded.

,si -0.3
Mnnn - macro buffer area size in K bytes - overrides default which is 1000 bytes. Holds macro definitions.

,si -0.3
Znnn - total data area size in K bytes - overrides default in module header. The total size is divided into the debugger symbol table and Externals/ESD tables.

,si -0.3
I - toggle initialize option : if enabled will clear out the
target system memory after communications is established. This is needed when the target system uses parity.

,si -0.3
P[=]"port" - use other than default port - sets the port name to be used for the communication with the target.
,in 0

The defaults for various parameters are located near the beginning of the program's data section and can be patched if desired. The location given is the offset from the start of the data section, this address can be obtained from locations $48 through $4B of the current revision software. 

Location      Meaning                    Default

0008          Directory of TCON file     4,'/dd/'
002E          Exception trap enable      1 (on)
0030          Version number of ICODE    'BA'
0032          Default communication port 3,'/td'
0048          Link retry delay           2000 (decimal, 2 bytes)
004A          Default I option           0 (off)
,pg
,ce
OPERATION - TARGET DEBUGGER

The directory of the TCON file was described in the installation section of this manual.

If you are using a version of OS-9/68000 before 1.2, then it might not handle exceptions correctly should they occur. In this case, you may need to set the Exception trap enable false. Should a bus or addess error occur in the debugger (not likely) then it will abort the debugger instead of giving just a warning.

The Icode version number is used to verify that the level of the compiler is compatible with the level of the debugger.

The Default communication port is the path that will be used to communicate with the target if the target debugger command line P option is not used. 

The link retry delay is a timeout counter that is used when the host expects a response from the target before re-sending the last command. 

For the last entry, only 0 (off) and 1 (on) are valid. If you set the default I flag on and use the command line option, it will be turned off.

CONTROL E/C OPERATION

Use of control E (or control C) will first attempt to either:
,in 0.3
,si -.3
1) Set the "break" function true in the user's program if this feature has been enabled by the user program, or 
,si -.3
2) Stop the user's program at the start of the next statement, If this is successful, then the abort will be recoverable, you can proceed from that point.
,in 0

If the above were not successful, then enter control E again, this will attempt to stop the user's program immediately, if this is successful, then the abort will be non-recoverable, you will not be able to proceed, you would have to re-start the user program using the GO command. If this is not successful, then enter control E again, this will attempt to stop the host part of the debugger, if this is successful, then the abort will be non-recoverable, and you will need to reset the target system. If that is not successful, then the only course of action available is to reset both the host and target systems.,

,ce
FINAL INSTALLATION STEPS FOR TARGET DEBUGGER

These steps are to be done only after all steps in chapter 14 have been completed.

A DESCRIPTOR FOR THE TARGET/HOST LINK

The first step is to provide a device descriptor for the host system to use to communicate with the target. This can easily be made using the existing descriptor for that serial port. Lets assume that the serial port you want to you use on the host already has a device descriptor of "/t2", possibly the same one as you used to communicate with your EPROM programmer. What we want is the same descriptor, but with no line editing. Copy the t2 descriptor from your module directory using the save command or from your disk and call it something else, such as "td" for target debugger. 
,ce
OPERATION - TARGET DEBUGGER

To make this into a descriptor we can use, we make use of the patch utility.

$ patch td
OmegaSoft 68000 Patch utility version 1.20
Copyright 1987 by Certified Software Corporation
->m f                          {get module name offset}
0000000F 000F  70 /            {it is $70}
->m 70                         {use value from loc. $F}
00000070 0070  74 't           {change first letter to t}
00000071 0071  31 'd           {change second letter to d}
00000072 0072  00 /            {must terminate with zero}
->i 49 52 0                    {clear out line editing}
->i 54 5b 0                    {clear out more line editing}
->v                            {re-validate crc}
->q                            {quit}

You now have a device descriptor to talk to the host. Load the descriptor and initialize it (iniz).

ATTEMPTING HOST <-> TARGET COMMUNICATION

The next step is to connect the necessary cables between the serial port on the target and the serial port on the host. After this is done, type the following command line :

$ xtdb     or $ xtdb -p="/xx"  where xx is the descriptor name.

It should give you a sign-on and then report that it has made communication with the target through /td. It will also display the limits of target RAM, and where the vectors are located. Type Q and a carriage return to exit the target debugger.

If you did not call the descriptor "td" then the actual name of the target link descriptor should be patched into the target debugger data section so that you do not have to use the P command line option.

