Hi Terence,
we’ve indeed modified project interdependencies management in 2.1.1
What’s the old behavior (DS <= 2.1.0)?
When declaring a reference between an application project (let’s call it app) and a library project (let’s call it lib), DS was automatically handling the things below:
- assume that library header files are located in lib/itf directory, so add a forced reference to this lib/itf path in app project
- assume that build configurations have the same name in both projects, so:
- add a forced linker reference to the generated library, in the build configuration directory with the same name
- add a build trigger reference to this build configuration (in Project Properties > C/C++ General > Path and symbols > References)
It was not possible to modify the referenced build configuration.
- verify that both project depend on the same package versions (Open AT OS and Libraries packages)
What’s the new one (from 2.1.1)?
Eclipse CDT allows a library project to declare which settings it wants to export.
DS 2.1.1 is now using this mechanism to improve its compatibility with CDT projects handling.
The idea is that exported settings from lib project are automatically added to the app project as soon as the reference is declared.
The first step is to check what settings are exported in lib project. It can be verified in Project Properties > C/C++ General > Export settings
Exported settings can be:
- include paths; itf path (or any other path you want to point on in referencing projects) should be declared here. It’s true that former versions of DS didn’t add automatically the itf path, but projects created with DS 2.1.1 will have it declared.
- symbols; declare here any symbols you may want to be automatically defined in referencing project (DS doesn’t do any automated processing here)
- library paths; this is the output path of the lib project where is located the library file when it is built (for the current build configuration).
- library names; this is the name of the library file to be linked vs the app project source code.
Important note: by default, this name has to be the same that the project name itself, without extension. Indeed, CDT/DS are using the GCC convention, by naming its output artifact files libXXX.a (when the name of the project is XXX).
Once settings are exported, they are added to the referencing project.
References are managed at two levels:
Global reference can be added in the Project properties > Reference page. When a reference is added here, references are automatically added for each build configuration.
Configurations references can be added/modified in the Project properties > C/C++ General > Path and symbols > References page. Once such a reference is set:
- exported setting in the referenced configuration are automatically added to the referencing one.
- when build is handled, referenced configuration build is automatically triggered.
What do I need to do to build my projects again 2.1.1?
First of all, projects which don’t use references shouldn’t have issues when migrating to 2.1.1
When using references, there can be two cases:
Projects created with 2.1.0
Library projects created with 2.1.0 version have normally their exported settings defined correctly, except the itf include path export definition
To restore the build, you’ll need to export manually the itf path in all configuration (just click Add button, select the folder in the workspace, click “for all configuration”).
If it still doesn’t work, references may need to be refreshed: in the app project, just try to remove the global reference and to add it again.
Projects created with former versions (<2.1.0)
Projects created with these versions unfortunately don’t have any export settings automatically declared.
Here is a concrete example, for a project named “MyLib”, with two [Target]_ARM_EABI_GCC_Debug and [Target]_ARM_EABI_GCC_Release build configurations.
- Export the “MyLib/itf” include path for all build configs (see above).
- Export the “MyLib” name in the Libraries tab for all build configs (click the “Add” button, enter the “MyLib” name, click “for all configurations”).
- Export the library output path for all build configs:
- Click Add
- Browse for the library output path in the workspace (e.g. “MyLib/[Target]_ARM_EABI_GCC_Debug” for [Target]_ARM_EABI_GCC_Debug configuration)
-
Don’t click “for all configurations”
- Repeat the operation for each build config
If it still doesn’t work, references may need to be refreshed: in the app project, just try to remove the global reference and to add it again.
Obviously, you can also completely create again the projects with 2.1.1…
Sorry for the long post, but complicated subjects require long explanations
Please post if things are still unclear.