Remote projects on RT-Druid

From ERIKA WIKI
Revision as of 14:55, 7 February 2018 by Claudio (talk | contribs)
Jump to: navigation, search

Introduction

There are some scenarios in which the board has the processing capabilities for running a full compiler for native building.
This is the case, for example, of powerful multi-core ARM SoCs running a Linux distribution, where we may use a hypervisor like Jailhouse for running ERIKA alongside Linux.
In such circumstances, having a native compilation of ERIKA on the target could be easier than cross-compiling using a host machine.
Unfortunately, the Eclipse IDE requires an x86 platform with a fair amount of resources (in terms of both processing and memory).

This guide, therefore, explains how to set-up Eclipse on a host x86 machine, leaving the compilation process on the target.
Handling a remote project can be done manually, of course, by transferring the built files through ftp/scp/rsync or by mounting locally the target filesystem using nfs/sshfs.
However, this guide explains how to use the remote project feature of Eclipse, which internally relies on the sftp protocol.

Important: the code of ERIKA must be available on the target because it is needed by the build process. Similarly, all the tools and the environment variables needed by the building process must be available/set on the target.

Plugins installation

To add the support for remote projects, it is necessary to install two plugins:

  • Remote System Explorer User Actions
  • TM Terminal

These plugins can be easily installed through the typical steps for installing a plugin:

  1. MenuHelpInstall new Software
  2. Select the update site of Eclipse (e.g., neon)
  3. Search General Purpose Tools
  4. Select the following plugins:
    • Remote System Explorer User Actions
      which adds support for remote projects
    • TM Terminal
      which allows opening an SSH shell within Eclipse
  5. Click in Next to finish the installation, and then restart Eclipse

Establishing a connection

Once Eclipse has been restarted, it is necessary to establish an SSH connection with the target.

Notes

  • Currently, Acceleo is not capable of generating files on top of the Eclipse virtualization. The generation is therefore done in two steps:
    1. Acceleo generates files in a directory within the local workspace: .metadata/.plugins/com.eu.evidence.rtdruid3.oil.cdt.ui/oil_gen
    2. RT-Druid copies the files from the local to the remote directory (using the Eclipse virtualization)