Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 COMPort Command Running a Program on the Target Compiling and Linking with On Time RTOS-32 |
COMPort CommandThe COMPort command can be used to supply configuration information for the port to be used for cross debugging by the Debug Monitor on the target or as an output device to display fatal errors if no display is available. The following forms of the COMPort command are supported: COMPort = None COMPort = COMx [Baudrate [IRQ [IOBase]]] [NoFIFO] [Halt] COMPort = LPTx [0 [IRQ [IOBase]]] COMPort = Ethernet[2-9] IP-Address | DHCP [Halt] The first parameter specifies which interface to use. If None is specified, no cross debugging is possible. For serial and parallel ports, values COM1, COM2, COM3, COM4, LPT1, LPT2, and LPT3 are available. They are used to initialize the default values for parameters Baudrate, IRQ, and IOBase. Parameter Baudrate specifies the speed of host <-> target communication (default: 115200 for serial ports, must be 0 for parallel ports). Parameters IRQ and IOBase specify the Interrupt Request and port I/O address used by the port hardware. These parameters need only be specified if non-standard values are used. For cross debugging over Ethernet, values Ethernet, Ethernet2, etc are supported. They specify the first, second, etc PCI Ethernet controller on the target. For Monitor Monvmf and Monrth (for use with RTVmf-32 and RTRth-32), Ethernet specifies the virtual network interface of the virtual machine while Ethernet2, etc first, second, etc physical Ethernet interface assigned to the virtual machine (i.e., not to Windows). Parameter IP-Address is the target's IP address in dotted decimal notation (e.g., 192.168.1.10). Please note that this IP address is not required to be the same as the IP address of the application to run under On Time RTOS-32. Alternatively, the string DHCP can be used to instruct the Monitor to request an IP address from a DHCP server. If IP address 0 (0.0.0.0) is specified, an IP address can be assigned to the Debug Monitor using PING or the first packet of a cross debug session. To do this, manually enter the target's MAC address in the host's ARP cache using the Windows command line program arp.exe (the Monitor displays the MAC address when it starts up). Then, either ping the target or start a debug sessions. Starting a debug session will only work if the target's IP address has been specified in file Rttarget.ini. In the current release, cross debugging over Ethernet is supported for these Ethernet controllers on the target:
The following options may be appended to the COMPort command: NoFIFOThe Debug Monitor should not use the FIFO of 16550 compatible UARTs. Use this option if the target's UART contains too many bugs for the Monitor to handle. HaltThe Monitor will execute CPU instruction HLT (specifically function RTHaltCPL3) during I/O waiting time (e.g., waiting for commands to be sent by the host debugger). Executing HLT can reduce power consumption and heat generation on the target. If the Monitor is running on a virtual target, it will require significantly less CPU time of the host OS. Specifying Halt is not supported when debugging over parallel ports. It has no performance impact on communication over serial ports or Ethernet and may increase performance for communication over virtual serial ports implemented as a pipe. The default COMPort command is: COMPort = COM1 For serial ports, RTTarget-32 assumes that the UART uses a clock input of 1.8432MHz (the value normally used on PCs). If a different input clock frequency is used by the target hardware, the baud rate specified in the COMPort command must be adjusted according to the following formula: B = (1,843,200 / Clock Frequency) * Baudrate where B is the value to be supplied in the COMPort command and Baudrate is the effective baud rate to be used. Example:The target computer has a 386EX CPU running at 25Mhz, and you want to use COM2 (the second internal serial port of the 386EX) at 57600 baud. The input frequency for the serial ports is CLK2 (50Mhz in this example) divided by 4, giving 12.5 MHz. The value required in the COMPort command is: (1.8432 / 12.5) * 57600 = 8493 Setting the desired communication port for the host is done in file Rttarget.ini.
|