Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Chained dependency order in Eclipse CDT
Chained dependency order in Eclipse CDT [message #1752620] Wed, 25 January 2017 15:42 Go to next message
Keith Elliott is currently offline Keith ElliottFriend
Messages: 2
Registered: January 2017
Junior Member
I'm attempting to utilize the "Project References" feature in Eclipse for an embedded firmware project. I'm using Code Composer Studio 7.0 which is essentially just a wrapper for Eclipse 4.6 with CDT 9.0 and JRE 8. However, from what I can tell the features I'm trying to use are specific to the CDT. The embedded firmware is broken up into several parts with a few libraries, an RTOS platform, and the "core" firmware.

The intention is that the dependencies of a project are automatically built and updated in the proper order whenever a build on the core firmware project is triggered. However, due to some libraries building upon others I'm seeing some weird behavior that i don't quite understand. The dependency graph is attached.

As you can see, there's a maximum of four levels of dependency. The issue that I'm seeing is that, while I've ordered the references in the order "Properties->C/C++ General->Paths and Symbols->References" as [Platform, PAL, HAL, Features] for the firmware project, the build order doesn't seem to follow that specification. The ordering seems to be semi-random. After a clean sometimes the PAL will build first, other times the Features will. The entire build ultimately fails when this happens due to dependencies not being accessible. Is there an additional step I'm missing to get dependencies to build in the correct order, or are nested dependencies not supported by Eclipse for some reason?
  • Attachment: 3cZEU.png
    (Size: 4.96KB, Downloaded 239 times)
Re: Chained dependency order in Eclipse CDT [message #1752849 is a reply to message #1752620] Sun, 29 January 2017 09:38 Go to previous messageGo to next message
Alex Freidin is currently offline Alex FreidinFriend
Messages: 32
Registered: July 2009
Member
Although this property page (Properties->C/C++ General->Paths and Symbols->References) has "Move Up" and "Move Down" buttons to modify the order of the projects in the list, CDT builder completely ignores it. I think it is misleading if it was designed for visual representation or simply a bug. I haven't debug the code to check, which of the two is the case. My suggestion is to open a bug report: either remove those buttons to avoid confusion or ensure that the order in the list applies the build order. Please post the bug number if you do.
My CDT 9.0.1 has the same problem with three small projects.

There is another similar properties page, "Properties -> Project References". Note that this page has no option to define items order. This page is from base Eclipse, not CDT.

To resolve your problem, try to define the inter-dependencies as in the graph, e.g. HAL->PAL, PAL->RTOS, Features->HAL.
Re: Chained dependency order in Eclipse CDT [message #1752853 is a reply to message #1752849] Sun, 29 January 2017 14:42 Go to previous messageGo to next message
Keith Elliott is currently offline Keith ElliottFriend
Messages: 2
Registered: January 2017
Junior Member
I'll attempt to prune the dependencies like you suggested, but the Eclipse documentation for the C/C++ References seems to indicate that the CDT builder should build in the order specified (http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_general_pns_ref.htm). Specifically the quote Quote:
Since CDT 7 this functionality has been improved:

Referenced projects are ordered
and this order can be changed using the buttons provided. Referenced projects are built in the order listed in the dialog, and the order is used in the build for setting up the Include paths and Library link lines.
Is this not actually the case?
Re: Chained dependency order in Eclipse CDT [message #1752893 is a reply to message #1752853] Mon, 30 January 2017 11:27 Go to previous messageGo to next message
Alex Freidin is currently offline Alex FreidinFriend
Messages: 32
Registered: July 2009
Member
I updated my CDT to 9.2.0, but the build order of the referenced projects is not effected by the order in References page. It keeps building referenced projects in a default order.
I don't have CDT 7, but CDT 8.0.2 in Eclipse Indigo shows the same issue. I will open a bug report.
Re: Chained dependency order in Eclipse CDT [message #1753425 is a reply to message #1752893] Mon, 06 February 2017 10:04 Go to previous message
Alex Freidin is currently offline Alex FreidinFriend
Messages: 32
Registered: July 2009
Member
Bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511737
Previous Topic:Gdb remote debugging error: Can't fine source file at ...
Next Topic:adapting a C++ project to Eclipse
Goto Forum:
  


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

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

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

Back to the top