Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Custom toolchain problem: Info: Nothing to build for (Custom toolchain problem)
Custom toolchain problem: Info: Nothing to build for [message #997455] Mon, 07 January 2013 15:39 Go to next message
Tamas Csabina is currently offline Tamas Csabina
Messages: 25
Registered: November 2012
Junior Member
Dear Community,

I am trying to create a custom toolchain for our simple C projects. This toolchain should contain a compiler and a linker.

I`ve read Chapter 6. Tutorial: An Example Tool Integration in the CDT Plug-in Developer Guide (http://help.eclipse.org/juno/index.jsp), but no matter what I do, I keep getting Info: Nothing to build for <project> messages whenever I try to test the new toolchain.

I think to problem is related to how the linker tool is implemented. If I inherit for example cdt.managedbuild.tool.gnu.c.linker as my superClass for my linker, compiling and linking works fine in a sample project. But I want to avoid this as the gnu.c.linker contains a lot of options/settings that I don`t want/need in my projects. So I rather create my own linker with only those options/settings that my linker (a 3rd party tool) understands. But it seems that there are some other important options that are necessary for a linker-tool to operate properly. But I haven`t able to figure out what are these options.


Is anyone out there successfully implemented/created a custom toolchain with a linker?

plugin.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         id="org.eclipse.cdt.w65c816.toolchain"
         name="W65C816 Tool Chain"
         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
      <projectType
            id="w65c816.toolchain.executable"
            isAbstract="false"
            isTest="false"
            name="W65C816 Executable">
         <configuration
               cleanCommand="rm -f"
               errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;"
               id="w65c816.toolchain.configuration.release"
               name="Release">
            <toolChain
                  id="w65c816.toolchain.toolchain"
                  isAbstract="false"
                  name="W65C816 Tool-chain"
                  osList="win32">
               <targetPlatform
                     binaryParser="org.eclipse.cdt.core.PE"
                     id="W65C816.toolchain.targetplatform"
                     isAbstract="false"
                     name="W65C816 Target Platform"
                     osList="win32">
               </targetPlatform>
               <tool
                     command="Wdc816c"
                     id="w65c816.toolchain.compiler"
                     isAbstract="false"
                     name="W65C816 Compiler"
                     natureFilter="cnature"
                     outputFlag="-o">
                  <inputType
                        dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultIndexerDependencyCalculator"
                        dependencyContentType="org.eclipse.cdt.core.cHeader"
                        id="w65C816.toolchain.compiler.input"
                        name="Compiler Input"
                        primaryInput="true"
                        sourceContentType="org.eclipse.cdt.core.cSource">
                  </inputType>
                  <outputType
                        buildVariable="OBJS"
                        id="w65C816.toolchain.compiler.output"
                        name="Compiler Output"
                        outputs="o"
                        primaryOutput="true">
                  </outputType>
                  <optionCategory
                        id="w65c816.compiler.optionCategory.general"
                        name="General"
                        owner="w65c816.toolchain.compiler">
                  </optionCategory>
                  <option
                        browseType="directory"
                        category="w65c816.compiler.optionCategory.general"
                        command="-I"
                        id="w65c816.toolchain.compiler.general.incpath"
                        isAbstract="false"
                        name="Include Paths"
                        resourceFilter="all"
                        valueType="includePath">
                  </option>
                  <option
                        category="w65c816.compiler.optionCategory.general"
                        defaultValue="-O0 -g3 -r -lt -lw -bs -mk -ml -mt -mu -mv -sf -si -ss -wa -wp -wr -wu -we -qq"
                        id="w65c816.toolchain.compiler.general.otherflags"
                        isAbstract="false"
                        name="Other flags"
                        resourceFilter="all"
                        valueType="string">
                  </option>
                  <option
                        category="w65c816.compiler.optionCategory.general"
                        command="-Wall"
                        id="w65c816.toolchain.compiler.general.errmsgs"
                        isAbstract="false"
                        name="Error messages"
                        resourceFilter="all"
                        valueType="boolean">
                  </option>
               </tool>
               <builder
                     id="w65c816.toolchain.builder"
                     name="W65C816 Builder"
                     superClass="org.eclipse.cdt.build.core.internal.builder">
               </builder>
               <tool
                     command="Wdclnk"
                     id="w65c816.toolchain.linker"
                     isAbstract="false"
                     name="W65C816 Linker"
                     outputFlag="-o">
                  <inputType
                        buildVariable="OBJS"
                        id="w65c816.toolchain.linker.input"
                        multipleOfType="true"
                        name="Linker Input"
                        sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile"
                        sources="o">
                     <additionalInput
                           kind="additionalinputdependency"
                           paths="$(USER_OBJS)">
                     </additionalInput>
                     <additionalInput
                           kind="additionalinput"
                           paths="$(LIBS)">
                     </additionalInput>
                  </inputType>
                  <outputType
                        id="w65c816.toolchain.linker.output"
                        name="Linker Output"
                        nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider">
                  </outputType>
                  <optionCategory
                        id="w65c816.linker.optionCategory.general"
                        name="General"
                        owner="w65c816.toolchain.linker">
                  </optionCategory>
                  <option
                        category="w65c816.linker.optionCategory.general"
                        defaultValue="-B -Hs -SZ -T -W -D070000,220000 -K224000 -C230000 -Zcode"
                        id="w65c816.toolchain.linker.general.otherflags"
                        isAbstract="false"
                        name="Other flags"
                        resourceFilter="all"
                        valueType="string">
                  </option>
                  <supportedProperties>
                     <property
                           id="org.eclipse.cdt.build.core.buildArtefactType">
                        <value
                              id="org.eclipse.cdt.build.core.buildArtefactType.exe">
                        </value>
                     </property>
                  </supportedProperties>
                  <enablement
                        type="ALL">
                     <checkBuildProperty
                           property="org.eclipse.cdt.build.core.buildArtefactType"
                           value="org.eclipse.cdt.build.core.buildArtefactType.exe">
                     </checkBuildProperty>
                  </enablement>
                  <envVarBuildPath
                        pathType="buildpathLibrary"
                        variableList="LIBRARY_PATH">
                  </envVarBuildPath>
                  <optionCategory
                        id="w65c816.linker.optionCategory.libs"
                        name="Libs">
                  </optionCategory>
                  <option
                        browseType="none"
                        category="w65c816.linker.optionCategory.libs"
                        command="-L"
                        id="w65c816.toolchain.linker.libs.libs"
                        name="Libs"
                        valueType="libs">
                  </option>
               </tool>
            </toolChain>
         </configuration>
      </projectType>
   </extension>

</plugin>
Re: Custom toolchain problem: Info: Nothing to build for [message #1008218 is a reply to message #997455] Mon, 11 February 2013 14:33 Go to previous message
Tamas Csabina is currently offline Tamas Csabina
Messages: 25
Registered: November 2012
Junior Member
I figured out the Nothing to build problem.
This how-to guided me in the good direction:
http://www.drdobbs.com/cpp/extending-the-eclipse-cdt-managed-build/197002115?pgno=6

Step 7. was missing from my setup (which was based on the MBS document`s tutorial (Section 6)).

So after editing the targetTool property of my toolChain (by pointing it to my linker`s id), everything started to work.

I hope this helps someone.
Previous Topic:Problem with calling an external class from AbstractHandler
Next Topic:Cannot see my category in update site
Goto Forum:
  


Current Time: Thu Oct 23 10:29:39 GMT 2014

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

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