Attaching to a Remote Running eRTOS Process
You can attach the Visual Studio debugger to an eRTOS process running on an eRTOS remote system outside of the Visual Studio IDE. This requires communication between the host system, which runs the Visual Studio IDE, and the target system where the process resides.
This topic provides instructions for configuring the Host-Target connection.
Note: You cannot use Kill to terminate a eRTOS process that is being debugged.
Note: You should avoid stopping the eRTOS target system while eRTOS processes are being debugged.
Sections in this topic:
- Setting up the Target System
- Attaching to a Process Running on the Target System
- Firewall Configuration
- Troubleshooting
Setting up the Target System
On the target system, configure the TCP/IP stack host system so it can connect over the network using Visual Studio. You must also make sure the eRTOS kernel is running.
Configure the remote debugging setup by configuring and controlling the Network TCP/IP Interface.
Step 2: Start the eRTOS Visual Studio Remote Debugger
Start the eRTOS Visual Studio Remote Debugger by calling Run RtVSMon.ertos.
Step 3: Configure Visual Studio connection on the host machine
Configure Visual Studio to connect to the eRTOS Visual Studio Remote Debugger on the host machine.
Step 4: Launch an eRTOS process
If you want to launch an eRTOS process, right-click the project in Solution Explorer and open its properties. Under the Debugger menu, change the Debugger to launch value to MaxRT eRTOS Debugger.
Step 5: Set the debugging property
Set the Command and Remote Server Name the eRTOS target computer should use.
Attaching to a Process Running on the Target System
On the Host System:
Launch the version of Visual Studio that is compatible with the Visual Studio Remote Debugger on the target system.
- Under Debug, select Attach to eRTOS Process.
The Attach to eRTOS Process dialog appears. This dialog displays the name and process ID for each running eRTOS process. You can hover the mouse over the process name to display its path in a ToolTip. All processes to which you are currently attached, or that are currently being debugged, are grayed out.
- For Connection Target, specify the remote computer using one of the following methods:
- Enter the IP address of the remote computer in the text box and press Enter.
- Enter the IP address and port number that RtVSMon.ertos is listening on the remote computer in the text box and press Enter. For example: 192.168.1.245:9999. The default port is 9999 if not specified.
- In the Attach to eRTOS Process dialog under Available Processes, select the process you want to attach to, and then click Attach.
Note: Debugging multiple processes in one instance of Visual Studio is not recommended.
Note: You cannot attach to a process that is either frozen by Watchdog timeout or already under debugger control. A process that is both frozen and under debugger control will appear as debugged. Processes in either scenario will appear grayed-out in the Attach to eRTOS Process dialog. You can hover over a grayed-out process to view a tooltip with information on why the process cannot be attached.
Troubleshooting
If you encounter issues connecting the host and target systems, try the following:
- Verify that the eRTOS kernel is running on the target system.
- Verify RtVSMon.ertos is listening on the correct IP address on the target system.
- Verify that the application you selected from Attach to eRTOS Process dialog on the host system is running on the target system.
Related topics: