On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTTarget-32 Programming Manual
Introduction
Running Win32 Programs without Win32
The i386 Microprocessor
RTLoc: Locating a Program
Running a Program on the Target
Cross Debugging
Connecting Host and Target
File Rttarget.ini
The Debug Monitor
Prerequisites for Cross Debugging
Program DbgShell
Program RTD32
Using an IDE
The RTTarget-32 API
Demo Programs
Advanced Topics
Compiling and Linking with On Time RTOS-32
Redistributable Components of RTTarget-32
RTLoc Error Messages
RTTarget-32 Reference Manual
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
|
File Rttarget.ini
The cross debugger and download utility RTRun must know how to communicate with the target computer. This information is read from file Rttarget.ini located in the default directory or RTTarget-32's Bin directory. In addition, options for the debugger can be specified in file Rttarget.ini.
Rttarget.ini is an ASCII text file divided into sections. Each section starts with a section name in square brackets, followed by keywords and their respective values.
Section [COM] supports the following keywords:
Keyword |
Values |
Description |
Port |
COMx or
LPTx or
\\.\pipe\name or
IP [Address] |
Serial port, parallel port, pipe name (e.g., \\.\pipe\vcom), or IP address used by the host to communicate with the target. Any COM port as well as LPT1, LPT2, and LPT3 are supported. LPT ports are not supported under 64-bit versions of Windows. If an LPT port is selected, you must look up the port's I/O address in the Windows Device Manager and supply this value in IOBase (see below). The Port default value is COM1. A pipe name may be used if the target is a virtual target of a PC software emulator which supports emulated serial I/O over a pipe (e.g. Microsoft Virtual PC or VMware). For cross debugging over Ethernet, value IP optionally followed by the IP address or DNS host name of the target should be entered. If no IP address is given, the host debugger will search the local LAN segment for targets and prompt for each found if the debugger should connect to it. |
IOBase |
0..65535 |
Decimal port I/O address of the parallel port specified in the Port setting. This value is ignored for serial ports and Ethernet. For parallel ports, it is only required if your port uses a non-standard port address. The default port address used is 0x378 for LPT1, 0x278 for LPT2, and 0x3BC for LPT3. |
Baudrate |
any
numeric
value |
Speed of host <-> target communication if serial ports are used. The value specified must match the value given in Monitor's configuration file. If both host and target have buffered UARTs, it should not be necessary to use a baud rate lower than 115200. If the host <-> target communication is unreliable, try using a lower value. The default value is 115200. |
MaxPacketSize |
512..2048 |
Maximum number of bytes the host may send to the target before waiting for an acknowledge packet. The maximum supported value of 2048 for serial and parallel ports and 1460 for Ethernet should generally be used. Merely for pipes, a smaller value may be tried if communication is unreliable. |
Timeout |
100..5000 |
Timeout value to apply for host - target communication in milliseconds. A default timeout is calculated depending on the port type, baudrate, etc. In some cases, the default timeout could be unsuitable (e.g, cross debugging over the Internet with long round-trip times, etc). |
StartTimeout |
1000 .. |
Timeout value to apply for program initialization in milliseconds. After downloading, RTRun or the debugger have to wait until the program has initialized. Especially with compressed entities, the required time may vary significantly depending on program size, target processing speed, etc. If you get a timeout error after program download, increase this value. The default is 10000 (10 seconds). |
OverlappedIO |
0 or 1 |
Specifies whether the host <-> target communication link can be used for simultaneous send and receive. If this option is set to 0, targets with low processing power may be able to run at higher baud rates. Download performance is reduced slightly. This option defaults to 1 (enabled) for serial ports and Ethernet and is ignored for parallel ports. |
UnloadDriver |
0 or 1 |
Specifies whether the parallel port host <-> target communication driver should be unloaded when the debugger or RTRun terminates. If it is not unloaded, subsequent invocations of the debugger/RTRun will start up faster as the driver does not need to be loaded again. This options defaults to 0 and only applies to parallel ports. Note that only members of the Administrator and PowerUser user groups have the privilege to load and unload device drivers. If you want to use a parallel port connections as a less privileged group member, set UnloadDriver=0 in Rttarget.ini. Then, log on once as an Administrator or PowerUser and perform one debug session or program download. Subsequently, all users of all user groups of the respective computer will be able to use the parallel port communication driver. |
LPTIdleData |
0 |
If a parallel port is selected, LPTIdleData specifies the value to put on the parallel port data lines by the host when no data is being transferred. For parallel ports on a target's ISA bus, 0 should be used. If the target uses a parallel port on a PCI bus, and downloading fails with Monitor message: "User Break, waiting for debugger...", 8 should be specified. |
Section [Options] supports the following keywords:
Keyword |
Values |
Description |
SwapVectors |
0 or 1 |
Controls whether the Debug Monitor should always install its own interrupt vectors when it gains control and restore the application's vectors when it resumes. The default value 1 (enable) ensures that no part (not even hardware interrupts) of the target program runs when the debugger has suspended it. Setting this value to 0 will allow application hardware interrupts to continue even when the program has encountered a breakpoint. |
SendBreak |
0 or 1 |
If set to 0 (default is 1), the debugger will never send a BREAK signal to the target. This may be required on some target computers with UARTs not 100% 16450 compatible. By default, the debugger sends a BREAK before each program download and when the running target needs to be interrupted. |
IgnoreCache-
Reads |
Numeric Value |
This value determines whether the remote debugger should ignore large data blocks requested by the host debugger. Such blocks are probably only read to build a cache on the host. However, reading such blocks over a serial link can slow down the debugger significantly. A cache block is recognized by the remote debugger if the block's size and address are a multiple of IgnoreCacheReads. Only values which are a power of two may be used. By default, this value is 4096 for Visual Studio.NET, 1024 for Delphi, and zero (disabled) otherwise. |
ReadPEHeader-
FromFile |
Numeric Value |
This value determines whether the remote debugger should detect the host debugger's attempt to read a PE file header from the target and supply that data from the PE file rather than from the target. If the application was not built with Locate NTSection [DLLName.]PEHeader ... commands, then the file header will not be available from the target. If ReadPEHeaderFromFile is greater zero, the first ReadPEHeaderFromFile bytes are read from all .EXE and .DLL files when they are loaded and are made available to the host debugger locally. By default, this value is 4096. |
TargetLog |
Filename |
If the target computer has no screen (or VideoRAM = None has been specified for some other reason), all program output is sent to the host and is displayed on the host's screen. In addition, it is written to the file given in this option. If the name is blank, no target log is maintained. The default value is RTTarget.log. |
KillVirtualConsole |
0 or 1 |
If set to 1 (default is 0), the debugger will close the Virtual Target Screen on the host immediately when the target program terminates. By default, the Virtual Target Screen remains on the desktop until a new debug session is started or the debugger is closed. |
Rows |
0..127 |
Defines the number of screen window rows to be used by RTD32. The default value is 0, which instructs RTD32 to select a suitable default. |
Columns |
0..127 |
Defines the number of screen window columns to be used by RTD32. The default value is 0, which instructs RTD32 to select a suitable default. |
RestoreScreen |
-1, 0, 1, 2 |
Defines how RTD32 should restore the window when it terminates. Value 0 causes the screen window not to be restored. 1 will restore the window, and value 2 instructs RTD32 to run in a separate console to be closed when the program terminates. -1 (the default) instructs RTD32 to pick a suitable default depending on the host operating system (1 for XP/Vista/Win 7/Win 8, 2 for Win9x). |
DLLPath1
DLLPath2
DLLPath3
DLLPath4
DLLPath5 |
Directory Name |
Defines up to 5 directories that should be searched by the host debugger for DLLs loaded on the target. By default, the debugger will attempt to load the DLL on the host from the same directory as on the target. If that fails, up 5 to pathes given with these directives are searched. If this also fails, the DLL is searched for in the application's .exe directory and then in the Debug subdirectory. |
NoAPICToPIC |
0 or 1 |
If set to one, this option instructs the Debug Monitor not to switch to PIC mode after a program running in APIC mode has terminated. The option is 0 by default and should only be applied for targets which do not support switching from APIC to PIC mode. |
KeepAlive |
>= 0 |
This value defines the interval in seconds of Keep Alive packets sent from the host debugger to the Debug Monitor when debugging over Ethernet. The default value is 30. Value 0 disables sending Keep Alive packets. Keep Alive packets are required to keep the connection between the host and Monitor active through a firewall. Most firewalls will block such connections if no traffic occurs for more than 60 seconds. Keep Alive packets are not required if the firewall is configured to pass through all incoming UDP packets with a source port number 57693. |
Example Rttarget.ini file:
[COM]
Port=COM3
Baudrate=57600
OverlappedIO=1
StartTimeout=5000
[Options]
SwapVectors=0
Cross Debugging
Connecting Host and Target
The Debug Monitor
|