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

Leo,

Thanks for your help. Please see embedded answers below.


--
Derek


Treggiari, Leo wrote:
Hi Derek,

Does the com.crt.exe.type content-type include the .axf extension?
Yes it does.

Your multipleOfType for the input-type should be set to 'false'.
If I set it to false, then my new build step never happens. i.e. if I set it to true, you get the makefiles I sent. If you set it to false, any refeence to objcopy disappears...

Your targetTool should be set to
'com.crt.cdt.managedbuild.tool.gnu.cpp.objcopy.exe.debug'.  Note that
this will make the target name and ext entered by the user be applied
to the output of 'objcopy'.
I wanted this to be a secondaryOutput, which is why I did it my way. However, I get substantially the same results if I do this - objcopy only gets it's outputfile, no inputfiles.


If that is not what you want, i.e., if your users think of the "target"
as the output of the Link step, then you may want to look into using
a custom post-build step to call 'objcopy'.
I have added a "DCBS" postbuildStep to a Configuration, which does execute. However, I would like to provide a tool configuration dialog so that (for example) the user can select the type of output produced by objcopy (srec, ihex, tekhex etc).

Is there any better documentation other than that added to bug 88922?

I would like to be able to add a PRCBS to a built resource...


Leo

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Derek Morris
Sent: Monday, December 04, 2006 1:35 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Adding a new tool to MBS

Leo,

Attached is the Debug directory, including all the generated make info
for the tool definition snippet below. There were 2 .c files in the build.

Thanks for your help.

Tool definition
---
      <tool
       commandLinePattern='${COMMAND} ${FLAGS} ${INPUTS} ${OUTPUT}'
       id='com.crt.objcopy'
       isAbstract='true'
       name='%crt.objcopy.name'
       natureFilter='both'
     >
       <optionCategory
         id='com.crt.objcopy.optionCategory.options'
         name='%crt.objcopy.cat.options'
         owner='com.crt.objcopy'
       ></optionCategory>
         <option
                valueType="enumerated"
                category="com.crt.objcopy.optionCategory.options"
                browseType="none"
                name="%crt.objcopy.outputtype"
                id="com.crt.objcopy.outputtype">
             <enumeratedOptionValue
                   isDefault="true"
                   command="-O ihex"
                   name="%crt.objcopy.ihex"
                   id="com.crt.objcopy.outputtype.ihex"/>
             <enumeratedOptionValue
                   command="-O srec"
                   name="%crt.objcopy.srec"
                   id="com.crt.objcopy.outputtype.srec"/>
             <enumeratedOptionValue
                   command="-O symbolsrec"
                   name="%crt.objcopy.symbolsrec"
                   id="com.crt.objcopy.outputtype.symbolsrec"/>
             <enumeratedOptionValue
                   command="-O tekhex"
                   name="%crt.objcopy.tekhex"
                   id="com.crt.objcopy.outputtype.tekhex"/>
             <enumeratedOptionValue
                   command="-O binary"
                   name="%crt.objcopy.binary"
                   id="com.crt.objcopy.outputtype.binary"/>
          </option>
          <option
          	valueType="string"
                category="com.crt.objcopy.optionCategory.options"
                browseType="none"
                name="%crt.objcopy.other"
                id="com.crt.objcopy.other">
		</option>         	
         <inputType
             sourceContentType="com.crt.exe.type"
         	primaryInput='true'
         	multipleOfType='true'
             id="com.crt.objcopy.input">
          </inputType>
          <outputType

         	outputContentType='com.crt.xxx.type'
         	primaryInputType="com.crt.objcopy.input"
         	primaryOutput='true'
nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNa
meProvider"
             id="com.crt.objcopy.output">
          </outputType>

     </tool>
---

Tool instantiation
---
           <tool
           command="%crt.objcopy.command"
           name="%crt.objcopy.name"
id='com.crt.cdt.managedbuild.tool.gnu.cpp.objcopy.exe.debug'
             superClass='com.crt.objcopy'>
             </tool>
---
Targettool definition
--- targetTool='com.crt.cdt.managedbuild.tool.gnu.c.linker.exe.debug;com.crt
.cdt.managedbuild.tool.gnu.cpp.linker.exe.debug'
---


Back to the top