Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Real-Time Software Components (RTSC) » how to coomunicate environment variables to cfg file
how to coomunicate environment variables to cfg file [message #1249791] Tue, 18 February 2014 11:31 Go to next message
Patrick Geremia is currently offline Patrick Geremia
Messages: 79
Registered: July 2009
Member
I have a cfg file (config.cfg) containing the following statement

---8<---
....
if (environment["PLATFORM"] == "C6638") {
cslSettings.deviceType = "k2h"
}
.....
---8<---

my package.bld refers to this configuration files as seen below

---8<---
.....
var exeAttrs = new executable.Attrs;
.....
exeAttrs.cfgScript="config.cfg";
....
---8<---


My issue is that I do not find a way to pass environment variable to the config.cfg script.
Setting a shell env variable does not help.
Please note that I do not use configuro to do the configuration step.

Any suggestion?
Re: how to coomunicate environment variables to cfg file [message #1250643 is a reply to message #1249791] Wed, 19 February 2014 07:46 Go to previous message
Patrick Geremia is currently offline Patrick Geremia
Messages: 79
Registered: July 2009
Member
I solved my problem my filling my environment variables as illustrated below:

environment["PLATFORM"] = java.lang.System.getenv("TI_PLATFORM");
environment["SECURE_NETFP"] = java.lang.System.getenv("TI_SECURE_NETFP");

The environment variable is now initialized by real env variables.

Patrick Geremia wrote:
> I have a cfg file (config.cfg) containing the following statement
>
> ---8<---
> ...
> if (environment["PLATFORM"] == "C6638") {
> cslSettings.deviceType = "k2h"
> }
> ....
> ---8<---
>
> my package.bld refers to this configuration files as seen below
>
> ---8<---
> ....
> var exeAttrs = new executable.Attrs;
> ....
> exeAttrs.cfgScript="config.cfg";
> ...
> ---8<---
>
>
> My issue is that I do not find a way to pass environment variable to the config.cfg script.
> Setting a shell env variable does not help.
> Please note that I do not use configuro to do the configuration step.
>
> Any suggestion?
>
Previous Topic:GUI designer tool for XGCONF?
Next Topic:XGCONF and .xml files documentation
Goto Forum:
  


Current Time: Fri Aug 29 14:16:53 EDT 2014

Powered by FUDForum. Page generated in 0.04067 seconds