Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Adding a new tool to MBS

> Is it just a case of adding each to the TargetTool attribute?

Unfortunately, no.  The list is for the case where there are multiple
instances of the target tool in the ToolChain that are filtered by the
"nature" - e.g., different linkers for C vs. C++.

I don't remember a way to do what you want.  Maybe someone else does.

Leo

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Derek Morris
Sent: Friday, December 01, 2006 11:25 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] Adding a new tool to MBS

That was it!

But now another question. I want to run several 'post-build' steps.
These each 
take the .exe as input and create different outputs (srec, and various
'listing' 
files). Is it just a case of adding each to the TargetTool attribute?

Thanks,

-- 
Derek


Treggiari, Leo wrote:
> The ToolChain element has a TargetTool attribute.  You need to set
that
> to the tool that generates your final "target".  Otherwise, the
> generated makefile has nothing that lets make know that it needs to
> execute your tool.
> 
> Leo
> 
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Derek Morris
> Sent: Friday, December 01, 2006 10:20 AM
> To: CDT General developers list.
> Subject: [cdt-dev] Adding a new tool to MBS
> 
> Hi,
> 
> I am trying to add the objcopy utility to MBS so that it will
> 'automatically' 
> create an srec file at the end of the build. I have added the
following
> snippet 
> to my plugin.xml
> 
>      <tool
>        commandLinePattern='${COMMAND} ${FLAGS} ${INPUTS} ${OUTPUT}'
>        id='com.crt.objcopy'
>        isAbstract='true'
>        name='Objcopy'
>        natureFilter='both'
>      >
>           <inputType
>              sources="exe"
>          	multipleOfType="false"
>              id="com.crt.objcopy.input">
>           </inputType>
>           <outputType
>          	outputs="srec"
>          	primaryInputType="com.crt.objcopy.input"
>              id="com.crt.objcopy.output">
>           </outputType>
> 
>        <optionCategory
>          id='com.crt.objcopy.optionCategory.options'
>          name='Options'
>          owner='com.crt.objcopy'
>        ></optionCategory>
>          <option
>                 valueType="enumerated"
>                 category="com.crt.objcopy.optionCategory.options"
>                 browseType="none"
>                 name="%crt.arm7.objcopy.outputtype"
>                 id="com.crt.objcopy.outputtype">
>              <enumeratedOptionValue
>                    command="-I ihex"
>                    name="%crt.arm7.objcopy.ihex"
>                    id="com.crt.objcopy.outputtype.ihex"/>
>              <enumeratedOptionValue
>                    isDefault="true"
>                    command="-I srec"
>                    name="%crt.arm7.objcopy.srec"
>                    id="com.crt.objcopy.outputtype.srec"/>
>           </option>
>      </tool>
> 
> I have also instantiated it with:
> 	<tool
>            command="%crt.arm7.objcopy.command"
>            name="Objcopy"
>  
> id='com.crt.arm7.cdt.managedbuild.tool.gnu.cpp.objcopy.exe.debug'
>            superClass='com.crt.objcopy'>
>          </tool>
> 
> The tool succesfully appears in the C/C++ Build properties.
> However, when building the project, objcopy is never being called. I'm
> sure I 
> have got something wrong with my inputType and outputType fields, but
I
> don't 
> know what.
> 
> Can somebody give me a pointer?
> 
> Thanks,
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top