New CDT Project Template - Creating project with linked resources [message #1701853] |
Thu, 16 July 2015 08:49 |
Artemis Papakonstantinou Messages: 8 Registered: November 2014 |
Junior Member |
|
|
Hello everybody!
I have created some project templates for Eclipse CDT. These projects reference folders, libraries etc from a custom Software Development Kit (SDK) that the user has installed at his PC. The user may change frequently the files of the SDK, so I can not provide them with my template project plugin.
I have already added relative include paths (containing .h files) pointing within the SDK to my linker and compiler. The problem is when source files (.c mainly) should be taken from within the SDK by the template project wizard. In other words, I need my template project wizard to add folders to the build path that are relative to to the user's Eclipse workspace.
Source at org.eclipse.cdt.core.AddFiles accepts only files from within the plugin. I have tried using relative paths to ${workspace_loc} or creating PATH Variables and referencing them in order to get a relative path, but the template wizard fails.
Ideally, I would like the generated .project to contain something like this:
<linkedResources>
<link>
<name>sdk/peripherals</name>
<type>2</type>
<locationURI>SDKROOT/sdk/bsp/peripherals</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
<name>SDKROOT</name>
<value>$%7BPARENT-4-PROJECT_LOC%7D</value>
</variable>
</variableList>
This code adds a PATH variable and a linked resource, as shown at the project properties:
Here, peripherals is the source folder I have added.
Alternatively, I would like my source folders to appear at Source Location under Paths and Symbols:
Has anyone managed to do something similar with a CDT template wizard?
Any help would be appreciated!
-
Attachment: Capture.jpg
(Size: 81.47KB, Downloaded 702 times) -
Attachment: Capture.png
(Size: 52.78KB, Downloaded 176 times) -
Attachment: Captur1.png
(Size: 46.33KB, Downloaded 656 times) -
Attachment: Capture3.png
(Size: 64.82KB, Downloaded 734 times)
[Updated on: Fri, 17 July 2015 08:02] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02632 seconds