Creating portable CDT library in eclipse - eclipse

I have some specific libraries used for building embedded code. But every time I create a a cdt project in eclipse, I have to add this libraries to the project. I know one can create a library project and then create a dependency to this from the main application. But what I ant quite figure out here is the toolchain setting propagation.
When I create a project in eclipse, I am forced to define the toolchain to use for building. What I want is not to define a toolchain for the library project, but let eclipse use the defined toolchain for the main project referencing the library to build the library.
Sometimes, a library is built for AVR, sometimes for ARM, sometimes for PC. Each of this requires a different compiler. But once I specify a compiler for the library, this compiler is always being used to build even if that is not the required one at the time the library is been compiled.
I hope my question is clear? Thanks for your anticipated help.

Related

Error while trying to compile imported project from Mbed compiler

I have completely followed installing the GNU MCU Eclipse compiler along with the arm gnu toolchain and its complementary GCC toolchain provided in the
tutorial link.
When I want to build a project which I exported from the Mbed online compiler, I set the PATH variable in the project's properties to wherever the where gnu-arm-none-eabi-g++ command refers. But Regarding all the instructions I followed I am still getting this compile error:
**Error:Program "make" not found in PATH**
It seems that there is a way around in order to avoid the multi-step process for setting up the Eclipse IDE for Max devices.
The Maxim Integrated company has special eclipse neon dedicated for maxim arm processors which can be downloaded from this link.
Warning!!: when you install the arm toolchain and run the Eclipse IDE, be aware that you don't update the IDE tools and libraries via the IDE itself. However, if you want to update the libraries you can do this by the Arm cortex management app which is included in the toolchain setup.

How to tell which (java) build system eclipse uses?

When working with software projects that employ the Java programming language, there are 3 commonly employed build systems:
Apache ANT-IVY,
Apache Maven,
and Gradle.
Looking through the jungle of the Eclipse Interface each of those build buzzwords occur, yet this IDE gives me no clue what build system it actually uses?
How can I find out what Eclipse thinks should happen when I tell it to build the project?
If you don't set up any special then none of these system is used to build a Java project. The Eclipse Java compiler runs automatically as you type. Other builders written as Eclipse plugins run when resources change, you can see information about these in the 'Builders' page of the project Properties.
There are Eclipse plugins that add support for all the build systems you mention. They are used if you create a project specifying which system you want to use.

Chained dependency order in Eclipse CDT

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 shown below.
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?

Can't access class in Eclipse plugin from a Java Project

In abstract, my problem is the following: I want to access a class contained in an Eclipse plugin from a Java Project. Is it possible? I've included that class in the "Exported Packages" of the plugin, which supposedly are "all the packages that this plug-in exposes to clients." Can my Java project be a "client" or only other plugins can be clients?
More concretely, I've encountered this problems when using XText. I built an editor for a language, and programs written with this language are stored in a text based format that follows the grammar defined with XText.
I want my users to be able to write Java programs that load and manipulate those xtext-based files. For that, they need to access all the classes that XText generated in the plugin project. However, I haven't been able to use those classes: in an Eclipse instance that is running the plugin with my editor, those classes are not visible.
How can I access them? The only solution I've found is to export my plugin as a jar and then include it in the Build Path of the Java project, in the other Eclipse instance, but this doesn't sound elegant.
Another way of looking at this problem is the following: I want a certain class to be available to any Java project built in an Eclipse instance where a certain plugin is loaded. How can I do it?
Thanks for your help.
PS. I'm launching the second Eclipse instance (the one where the plugin is loaded) from within the first Eclipse instance.
Once you generate your XText support, you need to make sure every package is exported from the Runtime tab by editing your MANIFEST.MF.
Then once you deploy your plugins into an eclipse, that eclipse environment will be able to see those classes.
But that would only help other plugin developers. Java apps can see classes that exist on the classpath (if you add the plugin jars, for example) but as most eclipse plugins depend on the eclipse lifecycle to work, it's unlikely that their java programs would run. That's not always the case (you can use JFace without a running eclipse) but only for plugins specifically designed that way.
If your plugin is installed, you can create a java project and add the plugin jar as an external jar, using *ECLIPSE_HOME* variable. If your plugin is a project in the workspace, you can depend on it (from the java build path) just like another java project. But since it's a plugin, that probably won't help them run.

Xcode beginner (from Eclipse to Xcode)

I want to learn Xcode in order to use its Obj-C, C, Java etc. project development facilities. I'm trying to start from the tasks I've done easily in Eclipse. For instance:
In Eclipse I used to create a new project and add a .java file with a main() whenever I wanted to test a snippet or a short algorithm that writes on standart output or console. I tried to create a java project in Xcode, but the templates given are ready-to-code complete mac apps, hence they are an overkill for a simple test. Starting out from an empty project, I began to notice that I had to write some shell scripts and some ant lines, also those codes had to be associated with "targets" and many other things that are not natural in Eclipse... It was overwhelming... so:
Does Xcode provide a simple solution like a Eclipse java project to aid those problems?
Where can I find (besides apple.com) an easy introduction to Xcode?
texeditor, java y javac are better options, and then is better to remain in Eclipse?
Stick to Eclipse for Java applications, use XCode for Objective-C or otherwise native Mac OS X applications.
XCode is no match to Eclipse when it comes to Java support: there's no such thing as a Java project, ant isn't there, it knows nothing about JVMs (e.g. you cannot use JVM version X for project Y), there are virtually no plugins for XCode (things you take for granted in Eclipse such as the web services tools, tomcat integration, etc).
XCode is the ultimate tool for Mac OS X applications as it's very well integrated with Interface Builder, which you'd use to build and manage the graphical resources of your application. It does a great job at managing Objective-C and C code, recent version have built in static analysis and all versions are integrated with GDB (the C debugger).