Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Tool calling and interaction in toolchain-plugin for Eclipse CDT(Toolchain-plugin official help example doesn't seem to be valid)
Tool calling and interaction in toolchain-plugin for Eclipse CDT [message #1708205] Mon, 14 September 2015 15:54 Go to next message
Pavel Sadovnikov is currently offline Pavel SadovnikovFriend
Messages: 8
Registered: July 2014
Junior Member
I need to write a plugin for Eclipse to tie it with my custom clang-based toolchain. I tried to follow this recipe (scroll to the middle of page). It seems to be sort of working: I can create a special type project and view described tools. However when I try to build it I receive "no rule to make target 'all'". Generated makefile contains this strings:
    # All Target
    all: TestProject
    
    # Tool invocations
    	@echo 'No tool found that can build the extension specified with the build artifact name $@'
    # Other Targets
    clean:
    	-$(RM) $(OBJS) TestProject
    	-@echo ' '

So no tool is actually called. I figured out that tool which is supposed to build final artifact is described by "targetTool" field of toolChain Extension Point. When I set ID of my compiler these strings change to

    # All Target
    all: TestProject
    
    # Tool invocations
    T9: $(C_SRCS)
    	@echo 'Building target: $@'
    	@echo 'Invoking: Compiler'
    	mycompilertool -c -Wall -o "TestProject"
    	@echo 'Finished building target: $@'
    	@echo ' '
    
    # Other Targets
    clean:
    	-$(RM) $(OBJS) TestProject
    	-@echo ' '


But nothing gets compiled anyway: "No input files for tool". I suppose DependencyCalculator doesn't recognize my main.c as source file. I don't think it's correct path anyway because theese strings practically duplicate string in subdir.mk. As I noticed there is a linker call in other toolchains in this place. I confused. Is it nececcary? What about one-tool-toolchains then?

So problems:

1) No tool is actually called with empty "targetTool". Is it correct behaviour?

2) org.eclipse.cdt.managedbuilder.makegen.internal.DefaultIndexerDependencyCalculator adviced in that tutorial doesn't seem to recognize .c files as sources.

3) Is DefaultIndexerDependencyCalculator able to map these files to output .o files to pass them further to linker anyway?


Could anybody give me a hint here or redirect to more verbose tutorial?


My plugin.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.4"?>
    <plugin>
       <extension
             id="ru.mipt.designcenter.tigersharc.toolchainplugin.buildDefinitions"
             name="TigerSHARC Toolchain Definitions"
             point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
          <projectType
                id="ru.mipt.designcenter.tigersharc.toolchainplugin.executable"
                isAbstract="false"
                isTest="false"
                name="TigetSHARC Executable">
             <configuration
                   cleanCommand="rm -rf"
                   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.VCErrorParser"
                   id="ru.mipt.designcenter.tigersharc.toolchainplugin.configuration"
                   name="Test TS Release">
                <toolChain
                      id="ru.mipt.designcenter.tigersharc.toolchainplugin.toolchain"
                      isAbstract="false"
                      name="TigerSHARC Toolchain"
                      osList="win32,win64,linux"
                      supportsManagedBuild="true"
                      targetTool="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler">
                   <builder
                         command="make"
                         id="ru.mipt.designcenter.tigersharc.toolchainplugin.builder"
                         isAbstract="false"
                         name="TigerSHARC Builder">
                   </builder>
                   <targetPlatform
                         binaryParser="org.eclipse.cdt.core.ELF"
                         id="ru.mipt.designcenter.tigersharc.toolchainplugin.targetPlatform"
                         isAbstract="false"
                         name="Test Target Platform"
                         osList="win32,win64,linux">
                   </targetPlatform>
                   <tool
                         command="clang"
                         commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT} ${INPUT}"
                         id="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler"
                         isAbstract="false"
                         name="TigerSHARC Compiler"
                         natureFilter="cnature"
                         outputFlag="-o">
                      <inputType
                            buildVariable="C_SRCS"
                            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultIndexerDependencyCalculator"
                            dependencyContentType="org.eclipse.cdt.core.cHeader"
                            dependencyExtensions="c, h"
                            id="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.inputtype"
                            name="Compiler Input"
                            primaryInput="true"
                            sourceContentType="org.eclipse.cdt.core.cSource"
                            sources="c, h">
                      </inputType>
                      <outputType
                            buildVariable="OBJS"
                            id="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.outputtype"
                            name="Compiler Output"
                            outputs="o"
                            primaryInputType="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.inputtype"
                            primaryOutput="true">
                      </outputType>
                      <optionCategory
                            id="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.generalcompilercategory"
                            name="General Compiler Settings"
                            owner="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler">
                      </optionCategory>
                      <option
                            browseType="directory"
                            category="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.generalcompilercategory"
                            command="-I"
                            id="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.includepaths"
                            isAbstract="false"
                            name="Include paths"
                            resourceFilter="all"
                            valueType="includePath">
                      </option>
                      <option
                            category="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.generalcompilercategory"
                            defaultValue="-c -Wall"
                            id="ru.mipt.designcenter.tigersharc.toolchainplugin.tools.compiler.otherflags"
                            isAbstract="false"
                            name="Other Flags"
                            valueType="string">
                      </option>
                   </tool>
                </toolChain>
             </configuration>
          </projectType>
       </extension>
    
    </plugin>
Re: Tool calling and interaction in toolchain-plugin for Eclipse CDT [message #1720886 is a reply to message #1708205] Thu, 21 January 2016 16:39 Go to previous message
David Rainey is currently offline David RaineyFriend
Messages: 1
Registered: January 2016
Junior Member
Did you ever get this working correctly? I stumbled across this post from a Google search about using the Tigersharc with Eclipse.

Regards,
Previous Topic:Property Tester for Editor
Next Topic:Why i cant access the classes of my own plugin during Runtime
Goto Forum:
  


Current Time: Thu Apr 25 01:18:57 GMT 2024

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

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

Back to the top