16. Remote Debugging

16.1. Debugging RT-Linux Guest with Visual Studio on Windows

You may use the third party VisualGDB solution for development and debugging of RT-Linux applications using Microsoft Visual Studio. An evaluation license can be obtained here: http://visualgdb.com/download

After installing VisualGDB restart Visual Studio to get the latest VisualGDB package updates.

For the Kernel 5.15 both 32 and 64-bit toolchain can be downloaded here: http://software.acontis.com/LxWin/mingw64.7z

Extract the zip file into C:\

Hint

If you want to extract into another directory, ensure there are no blanks! When creating a new Visual Studio project, ensure that there are no blanks in the project path as this will produce some errors.

16.1.1. Create a new project

  • Start the Hypervisor Host, configure to run the Linux RTOS and start RT-Linux (this is described in the Quick Start Tutorial).

  • Set up network bridging and assure you can reach the RT-Linux OS from your Windows development machine. See chapter Bridge virtual and physical network for details. Alternatively you can also use network forwarding, see Network Forwarding from external computer to the RTOS

  • Start Visual Studio

  • Create a new VisualGDB project by using the Linux Project Wizard

  • Set up the project as Application and use MSBuild

  • Set the Language standard to C++

    _images/RTL-RemDbg_NewProject.jpg
  • Select Build the project locally with a cross-compiler

    _images/RTL-RemDbg_BuildLocally.jpg
  • In the Cross-toolchain field select Locate a cross-toolchain by finding its gdb.exe and select C:\MinGw\bin\i686-pc-linux-gnu-gdb.exe

  • For the 64 bit (x64) toolchain select C:\MinGw64\bin\x86_64-pc-linux-gnu-gdb.exe

  • Edit the Toolchain dialog looks like:

    _images/RTL-RemDbg_EditToolchain.jpg
  • In the New Linux Project-View, click the drop-down-field Deployment computer to create a new SSH connection

  • Assure RT-Linux is started before you create the SSH connection! As host name use the IP address of the RT-Linux. User name and password are both root.

    _images/RTL-RemDbg_NewSSH.jpg
  • Assure, before finishing the New Linux Project dialog looks like this:

    _images/RTL-RemDbg_FinalOverview.jpg
  • Then press Finish. Accept the Mismatching environment detected message with the OK Button.

  • Now you can debug the project

16.2. Debugging RT-Linux Guest with Eclipse on Ubuntu

Setup Debug Environment

  • Start the Hypervisor Host, configure to run the Linux RTOS and start RT-Linux (this is described in the Quick Start Tutorial).

  • Set up network bridging and assure you can reach the RT-Linux OS from your Windows development machine. See chapter Bridge virtual and physical network for details. Alternatively you can also use network forwarding, see Network Forwarding from external computer to the RTOS

  • Ensure the connection is working by establishing an SSH connection from your Ubuntu development PC.

  • Install Eclipse (e.g. Eclipse Installer Package for Linux / select Eclipse IDE for C/C++ Developers)

Create a project and insert your Application Source (e.g. the RT-Linux SDK)

  • Menu File - New Project - C/C++ Project

  • Select Project Type (e.g. C++ Managed Build)

  • Name your project and press ‘Finish’

  • Extract the SDK (/hv/guests/files/LinuxTools/rt-linux.tar) from the Hypervisor Host into this project directory located in the eclipse workspace

  • Build your examples

  • Refresh the project in eclipse

Create a debug Configuration

  • Run - Debug Cofigurations…

  • Select C/C++ Remote Application and press the ‘New’ button

    _images/remote_debuging_eclipse_config.jpg

    Fig. 16.1 with ssh as remote connection

    _images/remote_debuging_eclipse_ssh.jpg
  • Now you are able to remote Debug your RT-Linux application

16.3. Debugging VxWorks Guest using Tornado or Workbench

  • Start the Hypervisor Host, configure to run the VxWorks RTOS and start VxWorks.

  • Set up network bridging and assure you can reach the VxWorks OS from your development machine. See chapter Bridge virtual and physical network for details. Alternatively you can also use network forwarding, see Network Forwarding from external computer to the RTOS

  • Ensure the connection is working by establishing an SSH connection from your development PC.

  • Install the VxWorks development environment.

16.3.1. VxWorks7 2403

Create a downloadable kernel module and insert your Application Source (e.g. the RT-Linux SDK)

Create a VxWorks connection:

_images/vxworksconnection.jpg

Run/Debug Kernel task:

_images/rundbgkerneltask.jpg

Now you are able to remote Debug your VxWorks application

16.4. On Time RTOS-32

There are separate tutorials which describe how to set up remote debugging for On Time RTOS-32.