5

I have searched for a while on this and have not found a good answer for it. (I am currently talking with GHS Support about this but wanted to post here to see if anyone had any experience with this. I will post an update after talking more with GHS.)

I am developing an embedded application using the Green Hills Software MULTI IDE and compiler. This is a C++ project. I am trying to port an existing .gpj project for use in Eclipse so I can take advantage of the development tools in Eclipse CDT. Has anyone had any experience doing this and could provide tips on it?

I of course want to develop in Eclipse and still compile with the GHS compiler with all of the options in my current .gpj file. Currently I have just had both applications open and have been developing the source in a separate Eclipse project and then compiling in the MULTI project manager with my current .gpj project.

This is discussed briefly here but no solutions are provided: https://www.eclipse.org/forums/index.php/t/210115/

EDIT: I am open to any suggestions for using modern editors in the MULTI Project Manager (it doesn't have to be the Eclipse CDT). The main development tools needed are autocomplete of existing variables and going to the definition of classes and variables.

sepp2k
  • 363,768
  • 54
  • 674
  • 675
9Breaker
  • 724
  • 6
  • 16
  • I'm not familiar with GHS. Does it use "make" as the build system, or something else? – HighCommander4 Sep 12 '17 at 19:02
  • @HighCommander4 The reference manual says that GHS uses the gbuild utility. It does say that there is an option for the gbuild utility to make a "rudimentary" makefile from a .gpj file. I will see what the output of the makefile is and if I could use that in my Eclipse project. – 9Breaker Sep 12 '17 at 19:44
  • Basically, without an Eclipse plugin for GHS or something similar, the options are: (1) get Eclipse's Build Output Parser to parse the output of the build and configure the project automatically based on that output, or (2) configure the project manually by entering the relevant include paths and pre-defined symbols. For the first option, see [this answer](https://stackoverflow.com/a/45385770/141719) for some details. – HighCommander4 Sep 12 '17 at 19:47
  • @HighCommander4 They do have a plugin for Eclipse for their compiler. If I use the plugin with the makefile that gbuild can create does that sound like a good option? – 9Breaker Sep 12 '17 at 20:28
  • Sounds like something worth trying for sure. – HighCommander4 Sep 12 '17 at 20:41
  • I have a solution to this now, just need to type it up. Will do soon. – 9Breaker Sep 20 '17 at 14:15

1 Answers1

3

The solution that worked best for our group was to create Eclipse C++ projects that mimicked the settings in the .gpj project. To do this the source files were imported, the include paths set, the pre-processor directives were defined, and then the index was built. This way we could develop in Eclipse with all of the great tools it has. We also set up a Build Target to use the MULTI compiler and build the .gpj project through gbuild and have output in the Eclipse console. (see the figure below)

Figure 1

I talked with a support engineer at GHS and he did not recommend using the plug-in for Eclipse to integrate their compiler into Eclipse (our development has used many .gpj projects and we wanted to keep building our projects from the settings in the .gpj projects). He also did not recommend using gbuild to convert the .gpj into a makefile (he said the conversion is not always the best).

There are ways to change the default text editor in MULTI to something like Sublime Text, but creating an Eclipse project from the settings in our .gpj project has worked the best for us. We have done this process manually, and of course it could be automated with enough time.

9Breaker
  • 724
  • 6
  • 16