Difference between revisions of "Remote projects on RT-Druid"
(→OIL support) |
(→OIL support) |
||
Line 48: | Line 48: | ||
# Select the ''Configure'' item | # Select the ''Configure'' item | ||
# Click the ''Add RT-Druid Builder'' sub-item <br> [[File:Rtdruid_remote_add_rtd_builder.png|thumb|center|Figure 9: Add RT-Druid builder.]]<br> | # Click the ''Add RT-Druid Builder'' sub-item <br> [[File:Rtdruid_remote_add_rtd_builder.png|thumb|center|Figure 9: Add RT-Druid builder.]]<br> | ||
+ | |||
+ | ----- | ||
Once this operation is finished, the project will be able of generating the configuration of ERIKA, but still needs to be configured.<br> | Once this operation is finished, the project will be able of generating the configuration of ERIKA, but still needs to be configured.<br> | ||
Line 56: | Line 58: | ||
This information can be provided through the following steps: | This information can be provided through the following steps: | ||
− | # Open the project properties (i.e., by clocking with the right button on the project, or selecting <code>Project</code> → <code>Properties</code> once the project has been selected).<br> | + | # Open the project properties (i.e., by clocking with the right button on the project, or selecting <code>Project</code> → <code>Properties</code> once the project has been selected).<br> [[File:rtdruid_remote_project_properties_menu.png|thumb|center|Figure 10: Project properties.]] |
− | [[File:rtdruid_remote_project_properties_menu.png|thumb|center|Figure 10: Project properties.]] | ||
# Select the ''Oil'' item and specify the oil file through the ''Browse'' button <br>[[File:rtdruid_remote_set_conf_oil.png|thumb|center|Figure 11: Selecting the OIL file.]] | # Select the ''Oil'' item and specify the oil file through the ''Browse'' button <br>[[File:rtdruid_remote_set_conf_oil.png|thumb|center|Figure 11: Selecting the OIL file.]] | ||
# Select the ''Erika Files Location'' item and: | # Select the ''Erika Files Location'' item and: | ||
#* In the ''Manual'' box, specify the path of ERIKA '''on the target''' | #* In the ''Manual'' box, specify the path of ERIKA '''on the target''' | ||
#* Specify the path on the local filesystem where the RT-Druid packet is located<br>[[File:rtdruid_remote_set_erika_path.png|thumb|center|Figure 12: Specifying ERIKA files path.]] | #* Specify the path on the local filesystem where the RT-Druid packet is located<br>[[File:rtdruid_remote_set_erika_path.png|thumb|center|Figure 12: Specifying ERIKA files path.]] | ||
+ | * Click ''Ok'' to complete the configuration | ||
+ | |||
+ | == Generation == | ||
+ | |||
+ | Currently, if the automatic build flag is checked (in the <code>Project</code> menu), RT-Druid tries to re-generate the ERIKA configuration files whenever the OIL file specified in the project properties is saved. | ||
+ | |||
+ | [[File:rtdruid_remote_build_automatically.png|thumb|center|Figure 13: Automatic build settings.]] | ||
+ | |||
+ | It is possible to delete the ERIKA folders by clicking with the right mouse button on the project and selecting the ''Clean Erika'' item. | ||
+ | |||
+ | [[File:rtdruid_remote_clean_erika.png|thumb|center|Figure 14: Clean ERIKA files.]] | ||
== Notes == | == Notes == |
Revision as of 13:20, 8 February 2018
Contents
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:
-
Menu
→Help
→Install new Software
- Select the update site of Eclipse (e.g., neon)
- Search General Purpose Tools
- 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
- Remote System Explorer User Actions
- Click in
Next
to finish the installation, and then restart Eclipse
Establishing a connection
Once Eclipse has been restarted, follow the next steps to establish an SSH connection with the target.
- Open the Remote System Explorer perspective (press the button on the right top)
- From the Remote System view, press the mouse right button on local and create a new connection
- Select SSH Only
- Specify the connection parameters
This way, a new connection will be created. - Clicking the Sftp branch, Eclipse will ask the credentials to access the file
- On the remote filesystem, select the directory that will host the project.
Then, click on the mouse right button and select Create Remote Project - Going back to the C/C++ perspective, it will be possible to see the remote project and, in case, generate the code for ERIKA.
OIL support
If the directory selected for the remote project does not yet contain an "RT-Druid" project, the generation of the configuration files for ERIKA won't be supported. Follow the next steps to enable such functionality:
- Click the mouse right button on the project in the Project Explorer window
- Select the Configure item
- Click the Add RT-Druid Builder sub-item
Once this operation is finished, the project will be able of generating the configuration of ERIKA, but still needs to be configured.
In particular, we need to provide the following information:
- which OIL file contains the system configuration;
- the path of ERIKA;
- the path of the generator files.
This information can be provided through the following steps:
- Open the project properties (i.e., by clocking with the right button on the project, or selecting
Project
→Properties
once the project has been selected).
- Select the Oil item and specify the oil file through the Browse button
- Select the Erika Files Location item and:
- In the Manual box, specify the path of ERIKA on the target
- Specify the path on the local filesystem where the RT-Druid packet is located
- Click Ok to complete the configuration
Generation
Currently, if the automatic build flag is checked (in the Project
menu), RT-Druid tries to re-generate the ERIKA configuration files whenever the OIL file specified in the project properties is saved.
It is possible to delete the ERIKA folders by clicking with the right mouse button on the project and selecting the Clean Erika item.
Notes
- Currently, Acceleo is not capable of generating files on top of the Eclipse virtualization. The generation is therefore done in two steps:
- Acceleo generates files in a directory within the local workspace:
.metadata/.plugins/com.eu.evidence.rtdruid3.oil.cdt.ui/oil_gen
- RT-Druid copies the files from the local to the remote directory (using the Eclipse virtualization)
- Acceleo generates files in a directory within the local workspace: