RT-Druid configuration

From ErikaWiki

Revision as of 14:17, 11 July 2017 by Nicola (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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, while 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,
than 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.
  • ant task: if you are using ant scripts, rtdruid.templates.path.add path is a RT-Druid task that allows to add one or more paths where RT-Druid will look for Erika Enterprise Templates. All paths
Please note that effects of this task are valid within a running instance of ant.
This means that an added path is available until the instance of ant is running.
  • 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 by ant_task, then ones 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

Ant task

Using a Windows absolute path

<?xml version="1.0" encoding="UTF-8"?>
<project name="rtdruid" default="an_examples" basedir=".">
	
	<!-- Instantiates a single template -->
	<target name="an_example">
		<rtdruid.add.template.path path="c:/Evidence/Erika/ee/examples"/>

		<!-- default values -->
		<property name="example_output_dir" value="output"/>
		
		<!-- exec -->
		<rtdruid.Oil.Example ExampleID="${example_id}" OutputDirectory="${examples_output_dir}" />
	</target>
</project>

Using a linux absolute path

<?xml version="1.0" encoding="UTF-8"?>
<project name="rtdruid" default="an_examples" basedir=".">
	
	<!-- Instantiates a single template -->
	<target name="an_example">
		<rtdruid.add.template.path path="/opt/Evidence/Erika/ee/examples"/>

		<!-- default values -->
		<property name="example_output_dir" value="output"/>
		
		<!-- exec -->
		<rtdruid.Oil.Example ExampleID="${example_id}" OutputDirectory="${examples_output_dir}" />
	</target>
</project>

Using an ant variable

<?xml version="1.0" encoding="UTF-8"?>
<project name="rtdruid" default="an_examples" basedir=".">
	
	<!-- Instantiates a single template -->
	<target name="an_example">
		<rtdruid.add.template.path path="${erika_templates_path}"/>

		<!-- default values -->
		<property name="example_output_dir" value="output"/>
		
		<!-- exec -->
		<rtdruid.Oil.Example ExampleID="${example_id}" OutputDirectory="${examples_output_dir}" />
	</target>
</project>

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 is a list of available keywords:

  • preference_arm7__path_for_cc_compiler set the compiler path for arm7
  • 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)
  • preference_pic30__path_for_gcc_compiler and preference_pic30__path_for_asm_compiler set c and asm compiler paths for dspic
  • preference_pic32__path_for_gcc_compiler and preference_pic32__path_for_asm_compiler set c and asm compiler paths for pic32
  • preference_cortex_mx__path_for_iar_compiler set the IAR compiler path for cortex mX
  • preference_cortex_mx__path_for_ccs_compiler set the Texas Instruments TMS470 compiler path for cortex mX
  • preference_cortex_mx__path_for_keil_compiler set the Keil uVision compiler path for cortex mX
  • preference_renesas_rl78__path_for_ca78k0r_compiler set the Renesas compiler path for Renesas Rl78 CA78K0R
  • preference_renesas_rl78__path_for_ccrl_compiler set the Renesas compiler path for Renesas Rl78 ccrl
  • preference_renesas_rl78__path_for_csplus set the CS+ path for Renesas Rl78
  • preference_renesas_rl78__path_for_e2studio set the E2Studio path for Renesas Rl78
  • preference_renesas_rx200__path_for_ccrx_compiler set the Renesas compiler path for Renesas Rx200
  • preference_S12__path_for_codewarrior_compiler and preference_S12__path_for_cosmic_compiler set the codewarrior and cosmic compiler paths for s12
  • preference_ppc_e200zx__path_for_codewarrior_compiler set codewarrior compiler paths for powerpc
  • preference_ppc_e200zx__path_for_diab_compiler set diab compiler paths for powerpc
  • preference_tricore__path_for_diab_compiler set Wind River Diab compiler path for Tricore AURIX
  • preference_tricore__path_for_gnu_compiler set HIGHTEC gcc compiler path for Tricore AURIX
  • preference_tricore__path_for_tasking_compiler set Altium TASKING compiler path for Tricore AURIX

Common_oil.pref

Here is an example of RT-Druid configuration file.

Personal tools