Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] PTP/ETFw

Greetings,

The ETFw supports environment variable setting using syntax like:

<togoption label="foo" optname="FOO" envvar="true" required="true">
     <optvalue type="text" fieldrequired="true"/>
</togoption>

This will create a UI element that will set the environment variable FOO to the content of the text box.  The 'fieldrequired' attribute means that this option will not be set if the text box is left blank.  The 'required' attribute means that there is no checkbox created so this option will always be used if it has valid input.  The 'envvar' attribute is specifies that this should be used as an environment variable rather than a program argument.

Alternatively the syntax:

<envvar flag="FOO" value="1"/>

as a sub-tag of a utility command will set a static environment variable for the launch which the user can not control.


Currently there is no system in place for just adding arguments to the default compiler call.  However, for the time being it might work for you to specify your compile step tag like:

<compile replace="true">

And then just specify your default compiler commands for each compiler:

<CC command="gcc" group="gcc">
<CXX command="g++" group="gcc">
....

Please let me know how this works for you, and if you have any additional questions or if there is anything else you would like to see in the ETFw.

Regards,
Wyatt Spear


On Mon, Jul 6, 2009 at 6:13 AM, Xavier Pegenaute <xavier.pegenaute@xxxxxx> wrote:
Hi,

I am trying to create a very simple .xml file to compile with our libraries but
I have a little problem. May be some one cal help me.

Here it is the xml file:
--------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<toolset.01>

<tool name="tracepkg">
 <compile>
   <allcompilers command="" group="tracepkg">
     <argument value="-L/usr/local/tracepkg/lib -ltrace"/>
   </allcompilers>
 </compile>
 <execute>
   <utility command="" group="tracepkg">
     <optionpane title="Tace PKG" displayoptions="true">
       <togoption label="XML Trace file" name="TRACE_CONFIG_FILE"
envvar="true" tooltip="Location of the xml config file" defstate="true">
         <optvalue type="file"></optvalue>
       </togoption>
     </optionpane>
   </utility>
 </execute>
</tool>
</toolset.01>
--------------------------------------------------------------------
The build phase executes this:


--------------------------------------------------------------------
Building file: ../src/test_simple_c.c
Invoking: GCC C Compiler
/usr/local/tracepkg/bin/  -L/usr/local/tracepkg/lib -ltrace    gcc -O0 -g3 -
Wall -c -fmessage-length=0 -MMD -MP -MF"src/test_simple_c.d" -
MT"src/test_simple_c.d" -o"src/test_simple_c.o" "../src/test_simple_c.c"
/bin/sh: /usr/local/tracepkg/bin/: Permission denied
--------------------------------------------------------------------

But I would like something like:
"gcc  -L/usr/local/tracepkg/lib -ltrace -O0 -g3 -Wall -c -fmessage-length=0 -
MMD -MP -MF"src/test_simple_c.d" -MT"src/test_simple_c.d" -
o"src/test_simple_c.o" "../src/test_simple_c.c"

Is it possible to do it? and also for every compiler C/C++/Fortran.

Later to execute the application I would like to be called as usual, but
inserting the TRACE_CONFIG_FILE environment variable before the call. Is it
well defined in the toolset XML file?

Thanks and Regards.
Xavi.
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user



Back to the top