This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
You can select a topic from this diagram:
This chapter explains how to set up host-target communications.
Regardless of whether you're connecting to a remote or a local target, you have to prepare your target machine so that the IDE can interact with the QNX Neutrino image running on the target.
The IDE supports host-target communications using either an IP or a serial connection. We recommend both. If you have only a serial link you'll be able to debug a program, but you'll need an IP link in order to use any of the advanced diagnostic tools in the IDE.
Target systems need to run the target agent (qconn). See Target agent in the IDE Concepts chapter for more information.
Before you can configure your target for IP communications, you must connect the target and host machines to the same network. You must already have TCP/IP networking functioning between the host and target systems.
To configure your target for IP communications, you must launch qconn on the target, either from a command-line shell or its boot script.
The version of QNX Momentics on your host must be the same or newer than the version of QNX Neutrino on your target, or unexpected behavior may occur. Newer features won't be supported by an older target. |
When you set up a launch configuration, select C/C++ QNX QConn (IP). (See the Launch Configurations Reference chapter in this guide for more information.)
pdebug must be present on the target system in /usr/bin for all debugging sessions. qconn will launch it as needed. devc-pty must also be running on the target to support the Debug perspective's Terminal view. |
Before you can configure your target for serial communications, you must establish a working serial connection between your host and target machines.
On Linux, disable and stop mgetty before configuring your target for serial communications. |
To configure your target for serial communications:
ls /dev/ser*
You'll see an entry such as /dev/ser1 or /dev/ser2.
devc-pty &
pdebug /dev/ser1 &
The target is now fully configured.
stty </dev/ser1
This command gives a lot of output. Look for the baud=baudrate entry; you'll need this information to properly configure the host side of the connection.
When you set up a launch configuration, select C/C++ QNX PDebug (Serial). (See the Launch Configurations Reference chapter in this guide for more information.)
This example shows you how to prepare your target and host for debugging using a PPP connection.
Before you begin, make sure the serial ports on both the host and target systems are configured properly and can talk to each other through a null-modem serial cable.
To configure your target for PPP:
debug 57600 /dev/ser1 10.0.0.1:10.0.0.0
You may need to try a different baud rate if you have any problems at 57600. |
io-net -ptcpip -ppppmgr
pppd
qconn
To configure your QNX Neutrino host for PPP:
debug 57600 /dev/ser1 10.0.0.1:10.0.0.0
You may need to try a different baud rate if you have any problems at 57600. |
io-net -ptcpip -ppppmgr
pppd passive
To configure your Windows XP host for serial communication using PPP:
The names of menu items and other details differ slightly on other supported versions of Windows. |
The IDE lets you connect to a Photon session on a target from a Windows host machine and interact with the remote Photon system as if you were sitting in front of the target machine.
To prepare your target for a Phindows connection:
phrelay stream tcp nowait root /usr/bin/phrelay phrelay -x
slay inetd
inetd
The inetd daemon starts and you can connect to your target using Phindows.
For details on using Phindows, see the Phindows Connectivity User's Guide in your QNX Momentics documentation set.