This section describes the connection and set-up of the debugging console. You may need to know the operational requirements of both you local COM port (on the MUT) and dumb ASCII terminal. Fortunately the debug kernel does not impose any form of hand-shaking or a fixed COM speed setting. In many cases default settings apply. First we discuss the cable requirements.
A null modem cabel is required to connect the MUT to the debug console.
This is essentially a 3-wire circuit that connects the two COM connectors
together. Some PCs are equipped with a 25-pin sockets, other 9-pin. A null
modem cable is a symetric circuit so we do not distinguish which is the
MUT and which the console.
25-to-25 Pin Cable
MUT/CONSOLE CONSOLE/MUT DB25J DB25J ┌─┐ ┌─┐ │2├───────────┤3│ │3├───────────┤2│ │7├───────────┤7│ └─┘ └─┘
25-to-9 Pin Cable
MUT/CONSOLE CONSOLE/MUT DB25J DB9J ┌─┐ ┌─┐ │2├───────────┤2│ │3├───────────┤3│ │7├───────────┤5│ └─┘ └─┘
9-to-9 Pin Cable
MUT/CONSOLE CONSOLE/MUT DB9J DB9J ┌─┐ ┌─┐ │2├───────────┤3│ │3├───────────┤2│ │5├───────────┤5│ └─┘ └─┘
Note:
The three connections involved are:
The null modem cable essentially connects RX-TX and SG-SG. The pin conventions for RX and TX on a 25-pin connector reverse those of a 9-pin connect. Thus the 25-9 connection looks like a non-null circuit.
If you intend to debug on a number of different set-ups then it is worth equipping yourself with the following items, which are commercially available:
With these items you should be able to cater for most variations and remote connection as well.
The next thing to consider is the COM port settings. By default the debug kernel will first select COM2. It that is in use then COM1. If you require the debugger to use another COM port, or a non-standard I/O port address then you might need to set this explicitely by using the .B command, which should be entered in the KDB.INI initialisation file.
By default the kernel debugger initialises the selected COM port to run at 9600 bits per second. If your debugging console requires a different speed setting then you should convey this to the debug kernel using the .B command, again entered in the KDB.INI file.
The default communications protocol uses 8 data bits, 1 stop bit and no parity. If this needs to be different then it may be set using the O command also entered in the KDB.INI file.
Finally some COM ports require the DTR signal to be held high before allowing communication. If this is necessary then it can be set using the debug kernel to write to the I/O port that controls the COM port set-up register. This may be done using the the O command entered in the KDB.INI file.
Examples of using these commands in KDB.INI is given in the next section.
Having set up the COM port requirements on the MUT the debug console must be set up to match. Precisely how this is done will depend on whether a dumb terminal or teminal emulator software is used. If you use emulator software under OS/2 you may need to use the OS/2 MODE command to select compatible COM port settings for the debugging console's COM port.