Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 16:31 Go to next message
Patrick Geremia is currently offline Patrick GeremiaFriend
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 12:46 Go to previous message
Patrick Geremia is currently offline Patrick GeremiaFriend
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: Thu Apr 18 22:52:36 GMT 2024

Powered by FUDForum. Page generated in 0.02057 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top