RT-Druid configuration
Contents
Ways to configure RT-Druid
It is possible to configure some aspects of RT-Druid using three different approaches
- environment variables: usually used for both command line and graphical execution of RT-Druid
- configuration file: usually used only during batch (command line) execution of RT-Druid.
- It is a plain text file that uses the java properties format:
- each line is composed by a pair keyword = value;
- lines starting with # are considered comments.
- The default name of configuration file is common_oil.pref and it is placed in rtdruid_base_path/configuration/common_oil.pref (see also Common_oil.pref_example)
- eclipse preferences: usually used only during graphical execution of RT-Druid
Erika Enterprise Files path
The path of Erika Enterprise files inside your system should be wrote using the native format of your system. This means that under windows, it is a windows path even if everything is compiled using cygwin.
- User value: Using the graphical interface, it is possible to override this default value, both for the whole workspace and for each single project.
- environment : ERIKA_FILES is the environment variable where RT-Druid looks for Erika Enterprise path. Note that the old variable EE_BASE is deprecated, is not considered by RT-Druid and should be used only inside makefiles.
- configuration files: the keyword erika_enterprise_location is used in the RT-Druid configuration file to set the path to Erika Enterprise files. Note that this path can be written using eclipse variables. The most useful is ${eclipse_home} because it allow to write a path relative to the eclipse installation directory.
Please note that, under windows, you can use both / and \ to separate paths but if you choose to use \ you have to protect them with another \. Here is an example: erika_enterprise_location = C:\\Evidence\\ErikaEnterpriseFiles
- plugins: By default, RT-Druid is configured to use Erika Enterprise files in com.eu.evidence.ee plugin (a component of RT-Druid distribution).
Priority and validity
Here is a table that compare priority and application of each method used to set Erika Enterprise files path. Elements with higher priority override those elements with lower priority.
What | Priority | GUI support |
Batch support |
Where | When | Description |
---|---|---|---|---|---|---|
User Value | Highest | X | Project/workspace property | hardcoded in the project, so it's always valid, even if the project is shared among different instances of RT-Druid |
Value set by the user in the project/workspace properties. | |
ERIKA_FILES | High | X | X | Environment | is valid only in the current instance of RT-Druid | Environment variable set before run RT-Druid. |
erika_enterprise_location | Middle | X | X | defined in the configuration file es. configuration/common_oil.pref (see also Common_oil.pref_example) |
this value is a property of the installation and then is available for all instances of this installation |
Configuration of a particular installation of RT-Druid. |
plugins | Low | X | X | set inside RT-Druid/Erika plugins | RT-Druid distributions | it is a feature of a specific RT-Druid distribution version |
Examples
Environment
Windows (set environment variable) set ERIKA_FILES=C:\Evidence\ErikaEnterpriseFiles
Linux (set environment variable) ERIKA_FILES=/opt/Evidence/ErikaEnterpriseFiles export ERIKA_FILES
Configuration file
Configuation file with eclipse variables (by default rtdruid_base_path/configuration/common_oil.pref) # pointing to ErikaEnterpriseFiles directory relative to RT-Druid base directory # this works with both windows and linux erika_enterprise_location = ${eclipse_home}/../ErikaEnterpriseFiles
Configuation file with windows path (by default rtdruid_base_path/configuration/common_oil.pref) # pointing to ErikaEnterpriseFiles directory using an absolute path (example 1) erika_enterprise_location = C:/Evidence/ErikaEnterpriseFiles
Configuation file with windows path (by default rtdruid_base_path/configuration/common_oil.pref) # pointing to ErikaEnterpriseFiles directory using an absolute path (example 2) erika_enterprise_location = C:\\Evidence\\ErikaEnterpriseFiles
Configuation file with linux path (by default rtdruid_base_path/configuration/common_oil.pref) # pointing to ErikaEnterpriseFiles directory using an absolute path erika_enterprise_location = /opt/Evidence/ErikaEnterpriseFiles
Erika Enterprise Templates path
In additions to Erika Enterprise Templates, it is possible to specify additional directories. Where not specified, paths are expressed using the native formalism of your system. If you want to define more than one path, you can write each path separated by the default character for your system. Examples:
Windows example 1: C:/Evidence/template_1;C:/Evidence/template_2 Windows example 2: C:\\Evidence\\template_1;C:\\Evidence\\template_2 Linux example: /opt/Evidence/template_1:/opt/Evidence/template_2
Please note that currently is only possible to add templates those provided by RT-Druid plugins, i.e. it is not possible to disable one or more template. It is possible to add templates providing path through:
- environment : RTDRUID_TEMPLATES_PATH is the environment variable where RT-Druid looks for paths of additional Erika Enterprise Templates.
- configuration files: the keyword templates_path is used in the RT-Druid configuration file to set the path of additional Erika Enterprise templates.
Please note that, under windows, you can use both / and \ to separate paths but if you choose to use \ you have to protect them with another \. Here is an example: templates_path = C:\\Evidence\\ErikaEnterpriseFiles
If more than one template uses the same ID, the first one is used. To reduce indeterminism RT-Druid will search inside paths provided by environment variable, then the ones provided in configuration files and, as last resource, the ones provided by RT-Druid plugins.
Examples
Environment
Windows (set environment variable) set RTDRUID_TEMPLATES_PATH=C:\Evidence\ErikaEnterpriseTemplates
Windows (set environment variable) set RTDRUID_TEMPLATES_PATH=C:\Evidence\ErikaEnterpriseTemplates\path1;C:\Evidence\ErikaEnterpriseTemplates\path2
Linux (set environment variable) RTDRUID_TEMPLATES_PATH=/opt/Evidence/ErikaEnterpriseTemplates export RTDRUID_TEMPLATES_PATH
Linux (set environment variable) RTDRUID_TEMPLATES_PATH=/opt/Evidence/ErikaEnterpriseTemplates/path1:/opt/Evidence/ErikaEnterpriseTemplates/path2 export RTDRUID_TEMPLATES_PATH
Configuration file
Configuation file with windows path (by default rtdruid_base_path/configuration/common_oil.pref) # Single path (example 1) templates_path = C:/Evidence/ErikaEnterpriseTemplates
Configuation file with windows path (by default rtdruid_base_path/configuration/common_oil.pref) # Multiple path (example 2) templates_path = C:/Evidence/ErikaEnterpriseTemplates/path1;C:/Evidence/ErikaEnterpriseTemplates/path2
Configuation file with windows path (by default rtdruid_base_path/configuration/common_oil.pref) # Multiple path (example 3) templates_path = C:\\Evidence\\ErikaEnterpriseTemplates\\path1;C:\\Evidence\\ErikaEnterpriseTemplates\\path2
Configuation file with linux path (by default rtdruid_base_path/configuration/common_oil.pref) # Single path (example 1) templates_path = /opt/Evidence/ErikaEnterpriseTemplates
Configuation file with linux path (by default rtdruid_base_path/configuration/common_oil.pref) # Multiple path (example 2) templates_path = /opt/Evidence/ErikaEnterpriseTemplates/path1:/opt/Evidence/ErikaEnterpriseTemplates/path2
Compiler paths
Each architecture requires a different compiler. Usually it is possible to set it through GUI (workspace preferences) and in few cases it is set using environment variables. Slowly we are increasing the number of compiler that can be set using RT-Druid configuration file. Here are listed some keywords:
- preference_avr8__path_for_gcc_compiler set the compiler path for avr8
- preference_avr8__path_for_arduino_sdk set the arduino SDK path (used by avr8)
Common_oil.pref
Here is an example of RT-Druid configuration file.