Replies: 3 comments
-
Hi M-Marvin, Perhaps you could give a try to the new Makefile project type, based on the "Core Build System". File > New > C/C++ Project > Makefile Project. It may still have the label 'Experimental' in your Eclipse. This type of project is intended for projects where the user creates the Makefile by hand. This in contrast to the classic "C Managed Build" projects. Makefile generation is not present. You are the master of the Makefile and you can do in it whatever you want. The philosophy of Core Build projects (Makefile and CMake) is "build for launch". The project is tied to a launch configuration which you can't rename or duplicate. You set the build make target in the launch configuration, not in the project properties. The projects require you to use the CDT/LaunchBar for building and launching. At the moment the launch configuration for Core Build projects is limited and has no option to set for instance arguments or environment variables. This will be improved in the near future. For the time being you can create a regular C/C++ launch configuration for the project. For instance by right clicking on the project and then Run As > Local C/C++ application. It will create a new launch configuration as known from the Managed Build Makefile projects. Core Build projects have no import function like the classic Managed Build projects (File > Import). To start a project with existing code you create a new Makefile project and set the location to the existing code. There should not be old Managed Build hidden Eclipse files in the project directory (.project, .cproject, .settings/). You can't run two Eclipses in the same workspace, but you can open the same project in two Eclipses that run in a different workspace. Projects don't need to be located in the workspace. Project settings and launch configurations are stored in the workspace, so you could run the same project with different configurations from two Eclipses. Erwin Waterlander |
Beta Was this translation helpful? Give feedback.
-
I already use the "experimental" makefile project. To the things with the run configurations, i currently don't actually need them, im building libraries, which then get debugged in side the projects/IDEs that use them. The thing with multiple Eclipse instances at one project but with different workspace folders is interessentin, i will try that out. The only thing that remains, is "2.", which actually is the most anoying one. |
Beta Was this translation helpful? Give feedback.
-
As far as I see "Project -> Build Targets -> Create .../Build ..." only works for Managed Build projects, not for the Core Build Makefile project. Projects don't get copied to the workspace folder. In the Eclipse Project Explorer they appear as if they are in the workspace. The project properties and launch configurations are kept in the workspace in the hidden folder ".metadata". About 2. "Project -> Properties -> C/C++ General -> Paths and Symbols" only exists in Managed Build projects. So I think you are not using the new (experimental) Core Build Makefile project. |
Beta Was this translation helpful? Give feedback.
-
Hi, im using eclipse now for a very longe time for my Java, C and C++ projects, and never had big problems.
But recently i noticed a ... well ... inconvenience.
I needed to create an makefile project the first time (writing the makefile my self instead of letting the IDE/Eclipse generate one) and i noticed a few problems and was curious if there are ways to solve them:
I have one target in my makefile which has to be build using different compiler to produce binaries for different platforms.
Currently, in Eclipse, i can only hit "Build Project" which calls "make all" which build all of them at once, which works, but sometimes is just unnecessary, is there a way to make "configurations" to modify the make command executed, to build individual targets ?
Depending on which compiler is used, the available libs change and therefore different .c files for the same .h headers are required.
This is mainly what my custom make file does, but it also involves adding some platform specific #define lines.
One compiler for example targets the STM32 MCU, and needs to define an variable that specifies the exact MCU model to the libraries.
The problem is, that while the makefile works fine, the IDE does not recognize this, since the variables are set on compiletime only.
Currently i solve that by manually defining all variables (and also -I -L and -l flags) inside the IDE (Project -> Properties -> C/C++ General -> Paths and Symbols) a second time (additionally to the makefile).
Is there some better way to do this ?
I often end up with weird errors in the IDE which then are gone when compiling, just because of a missing flag or Symbol.
This might not actually be directly relevant to Eclipse, but, i use the STM Cube IDE for compiling the final executable and debugging it on the MCU.
The makefile project only produces a library for that project (multiple ones, to be specific).
For AVR MCUs i could just use the Visual Studio based IDE from Microchip within the same directory as the Eclipse IDE (the same workspace) to have all projects in the same directory.
This however does not work with the STM Cube IDE, since it basically is an modified Eclipse version.
Is there a way to allow two Eclipse Instances (STM Cube IDE and Eclipse CDT) to run in the same workspace at the same time as long as they don't use the same projects from within this workspace ?
Or alternatively, since STM Cube IDE ist basically an modified Eclipse version, is there a way to combine both IDEs, like it is possible with the Java and CDT IDE by just installing the CDT plugin in the Java IDE ?
Beta Was this translation helpful? Give feedback.
All reactions