Creating launch configuration for remote target system

When debugging an application on a remote target system, a launch configuration is necessary. This launch configuration contains the debugging information that logi.CAD 3 needs.
images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/warning.svg The steps of this section are not required for the built-in PLC because the launch configuration needed by the built-in PLC is already provided in logi.CAD 3!

  1. If required, change to the perspective Application Creating.

  2. In the project explorer, expand the runtime system folder that you have copied into the project. Expand the sub-folder bin. Select the file RTSLoader in this sub-folder and open its properties (context menu, command Properties).

  3. In the dialog, select the project-relative path (incl. the runtime system folder) and copy this path into the clipboard.

    images/download/attachments/414778997/RemoteSystemExplorer_Linux12-version-1-modificationdate-1534420547953-api-v2.png
  4. Start the configuration creation for the remote target system: context menu of the project, select Debug As and Debug Configurations...

  5. In the dialog, double-click C/C++ Remote Application in order to create a new launch configuration.

    images/download/thumbnails/414779002/RemoteSystemExplorer_Linux13-version-1-modificationdate-1534420577213-api-v2.png
  6. In the tab Main, define the following settings:

    images/download/attachments/414779007/RemoteSystemExplorer_Linux14-version-1-modificationdate-1534420604094-api-v2.png


    Here the details:

    1. Under Name, enter a meaningful name. Ideally this name will not contain umlauts or blanks.

    2. Under C/C++ Application, insert the project-relative path to file RTSLoader that is still in your clipboard.

    3. If required under Build configuration, select the platform for the target system. Alternative: Keep the suggested setting Select Automatically.

    4. Under Connection, enter the connection for the remote target system as it has been created previously by using the perspective Remote System Explorer.

    5. Under Remote Absolute File Path for C/C++ Application, enter the absolute path for the file RTSLoader as it is true for the target system. You might have to enter a different path than displayed in the above screenshot.

    6. Under Commands to execute before application, enter the command according to this syntax: export LD_LIBRARY_PATH=/path/RTS-folder/lib
      As value for the exported variable LD_LIBRARY_PATH, you have to enter the absolute path for the runtime system subfolder lib as it is true for the target system. You might have to enter a different path than displayed in the above screenshot.

    7. Make sure that Skip download to target path is unchecked.

  7. In tab Arguments, enter the parameters for starting the runtime system and the absolute path for the runtime system subfolder PLC as it is true for the target system: -v -b/path/RTS-folder/PLC

    images/download/attachments/414779012/RemoteSystemExplorer_Linux15-version-1-modificationdate-1534420636818-api-v2.png
  8. In tab Debugger, define the debugger settings:
    images/download/attachments/414779017/RemoteSystemExplorer_Linux16-version-1-modificationdate-1534420663312-api-v2.png
    Here the details:

    • Make sure that Stop on startup at is unchecked.

    • Under GDB debugger, enter the path to the corresponding debugger in your logi.CAD 3 installation.

      Example:

      Target system

      Path to the GDB debugger within the folder to which logi.CAD 3 has been installed

      Raspberry Pi

      LC3\plugins\com.logicals.ptk.raspbian.win_x.y.zaaaaaa\bin\SysGCC\bin\arm-linux-gnueabihf-gdb.exe

      x.y.zaaaaaa is a placeholder for the respective version number

  9. In tab Source, add the project:

    images/download/attachments/414779022/RemoteSystemExplorer_Linux17-version-1-modificationdate-1534420686515-api-v2.png


    Here the details:

    1. In the tab, click Add...

    2. In the dialog, select Project - Path Relative to Source Folders and click OK.

  10. In tab Common, select Shared file. Subsequently, you will be able to start the later debugging sessions more quickly.

    images/download/attachments/414779027/RemoteSystemExplorer_Linux18-version-1-modificationdate-1534420716726-api-v2.png
  11. In dialog Debug Configurations, click Apply at first to have all settings saved in the .launch file. Then click Debug in order to start the debugging session for the application on the remote target system.
    images/download/attachments/414779032/RemoteSystemExplorer_Linux19-version-1-modificationdate-1534420743814-api-v2.png

    If the message Warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code is displayed when starting the debugging session, you have to replace a line in the .gdbinit file by the text set sysroot remote:/ (see under "Displaying relevant files within the project explorer").

  12. Terminate the debugging session as described under "Terminating the debugging" before you set the breakpoints as described in the next step.