Reputation: 43
I am new person in this area. I am working on a project with other person but I got a problem what I don't know how to do.
I and the other person have different compiler, I got a greenhills for freescale MPC and the other got a freescale MPC compatible gcc. And I need to integrate all software with greenhills compiler. It is one of our goal that all final software must be compiled by greenhills.
For do that, is that easy to integrate gcc code to greenhills? Is there anyone who did like this work? Even my boss don't know whether possible or not.
Actually I even don't know what should I do first yet since I have no experience with gcc and greenhills also. If there are reference manual or something like that, please tell me. :-(
Upvotes: 0
Views: 3551
Reputation:
we're currently working with GHS in a project, ergo I can feel your pain. Did you complete this task in the meantime (4 years ago)?
Your question "integrate gcc code to greenhills" is not specific enough, sorry. Does that mean you have parts inside your sources that particularly make use of say, GCC type assembly or features? How many lines of code are we talking about, what architecture is it?
The other story with PowerPC is the VLE instruction set. Which PowerPC GCC are you currently using, because there are not so many available (NXP, Mentor,...)? We currently faced similar issue, porting between GHS and GCC, but just analysed the surface and never done it due to compliance reasons.
I also suggest getting in touch with GHS support, they are the professionals and will surely be helping if they see you moving from GCC.
Upvotes: 0
Reputation: 27370
The Green Hills compiler does have a very extensive set of manuals. These come in hard copy (or at least used to), or you can access the digital versions (in a format similar to Microsoft CHM) through MULTI; just click "Help" in the menu bar.
You should certainly start by turning on the -gnu
, -gcc
, or --g++
option. This tells the compiler front-end to accept a bunch of GNUisms. That will probably be enough for your purposes.
Some GNU features, such as nested functions, aren't supported by Green Hills at all, so if parts of your code use them you'll have to rewrite those parts. I'd also steer clear of statement-expressions and taking the addresses of labels, which are liable to do the wrong thing even on GCC!
But basically, the answer to your question is "read the manual and do what it tells you." I believe there's even an appendix entirely devoted to porting GNU code to Green Hills.
Upvotes: 2