EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Codewarrior compiler command line???

Started by Not Really Me December 14, 2011
We are using CodeWarrior IDE v5.9.0 for a PPC project.

We need to build some additional files externally, but CW is not forthcoming 
with the command line it is creating in the internal project file. (.mpc) 
It keeps all of that and the individual object files hidden.
Freescale provided an excel spreadsheet to help duplicate the command line 
for compile and link by telling it what IDE project options you are 
selecting.

Does anyone have a more reliable approach?

-- 
Scott
Validated Software
Carlsbad, CA 



__________ Information from ESET NOD32 Antivirus, version of virus signature database 6712 (20111214) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote:

> We are using CodeWarrior IDE v5.9.0 for a PPC project. > > We need to build some additional files externally, but CW is not > forthcoming with the command line it is creating in the internal project > file. (.mpc) It keeps all of that and the individual object files > hidden. Freescale provided an excel spreadsheet to help duplicate the > command line for compile and link by telling it what IDE project options > you are selecting. > > Does anyone have a more reliable approach?
I _hate_ IDEs, and that's one reason. In extremis, unless Windows 7 gets in your way, you can make a command line logger and put it in place of the compiler that Code Warrior calls. I've done this before. It's very much over the top, but it can also be a life-saver. Far better would be to build the whole project from a makefile, so you actually know what is going on. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On 15 Dec., 00:09, Tim Wescott <t...@seemywebsite.com> wrote:
> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: > > We are using CodeWarrior IDE v5.9.0 for a PPC project. > > > We need to build some additional files externally, but CW is not > > forthcoming with the command line it is creating in the internal projec=
t
> > file. (.mpc) It keeps all of that and the individual object files > > hidden. Freescale provided an excel spreadsheet to help duplicate the > > command line for compile and link by telling it what IDE project option=
s
> > you are selecting. > > > Does anyone have a more reliable approach? > > I _hate_ IDEs, and that's one reason. > > In extremis, unless Windows 7 gets in your way, you can make a command > line logger and put it in place of the compiler that Code Warrior calls. > I've done this before. =A0It's very much over the top, but it can also be=
a
> life-saver. > > Far better would be to build the whole project from a makefile, so you > actually know what is going on. >
I seem to remember from many years ago when I used cw that there was a way to make it export a gnu make file -Lasse
On 15/12/2011 00:09, Tim Wescott wrote:
> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: > >> We are using CodeWarrior IDE v5.9.0 for a PPC project. >> >> We need to build some additional files externally, but CW is not >> forthcoming with the command line it is creating in the internal project >> file. (.mpc) It keeps all of that and the individual object files >> hidden. Freescale provided an excel spreadsheet to help duplicate the >> command line for compile and link by telling it what IDE project options >> you are selecting. >> >> Does anyone have a more reliable approach? >
I don't know about the particular CW version you have here, but all the CW tools I have used have a "help/pdf" directory with the manuals - including one that contains all the details of the command line switches for the compiler. It shouldn't be too hard to figure out what you need.
> I _hate_ IDEs, and that's one reason. > > In extremis, unless Windows 7 gets in your way, you can make a command > line logger and put it in place of the compiler that Code Warrior calls. > I've done this before. It's very much over the top, but it can also be a > life-saver. > > Far better would be to build the whole project from a makefile, so you > actually know what is going on. >
I agree, for the most part. An IDE build can be faster to get up an running, especially if you are not familiar with the compiler and the switches you need. But in the long run, makefiles are far better - they are more flexible, and provide clear documentation of the build process that can be easily read, changed, stored in a vcs, moved between different machines, etc. The IDE (should!) handle multiple source directories, put the object files and binaries in directories other than the source, and handle all the dependencies automatically. Crafting a makefile that does that well is not easy - it takes a fair amount of trial and error, though generally it can be reused almost as-is for multiple tools and projects. An optimised makefile also generally runs faster than an IDE-based build. Personally, I normally use makefiles. I used to hate IDE editors - they were almost always pretty poor, so I only used the IDE for debugging and possibly for getting started with a tool. Some IDE's have additional features (chip wizards, etc.) which can be useful. However, now almost all development tools use Eclipse as their IDE (including modern versions of CodeWorrier). As long as it is a fairly current version of Eclipse, I am happy with that for editing too. Eclipse works well with external makefiles, parsing the compiler output to put warning and error markers in the source code. And if you do use an Eclipse IDE for handling the build, you can read the makefiles afterwards and use them for hints for your own makefile.
On Thu, 15 Dec 2011 09:24:24 +0100, David Brown wrote:

> On 15/12/2011 00:09, Tim Wescott wrote: >> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: >> >>> We are using CodeWarrior IDE v5.9.0 for a PPC project. >>> >>> We need to build some additional files externally, but CW is not >>> forthcoming with the command line it is creating in the internal >>> project file. (.mpc) It keeps all of that and the individual object >>> files hidden. Freescale provided an excel spreadsheet to help >>> duplicate the command line for compile and link by telling it what IDE >>> project options you are selecting. >>> >>> Does anyone have a more reliable approach? >> >> > I don't know about the particular CW version you have here, but all the > CW tools I have used have a "help/pdf" directory with the manuals - > including one that contains all the details of the command line switches > for the compiler. It shouldn't be too hard to figure out what you need. > >> I _hate_ IDEs, and that's one reason. >> >> In extremis, unless Windows 7 gets in your way, you can make a command >> line logger and put it in place of the compiler that Code Warrior >> calls. I've done this before. It's very much over the top, but it can >> also be a life-saver. >> >> Far better would be to build the whole project from a makefile, so you >> actually know what is going on. >> >> > I agree, for the most part. An IDE build can be faster to get up an > running, especially if you are not familiar with the compiler and the > switches you need. But in the long run, makefiles are far better - they > are more flexible, and provide clear documentation of the build process > that can be easily read, changed, stored in a vcs, moved between > different machines, etc. > > The IDE (should!) handle multiple source directories, put the object > files and binaries in directories other than the source, and handle all > the dependencies automatically. Crafting a makefile that does that well > is not easy - it takes a fair amount of trial and error, though > generally it can be reused almost as-is for multiple tools and projects. > An optimised makefile also generally runs faster than an IDE-based > build. > > Personally, I normally use makefiles. I used to hate IDE editors - they > were almost always pretty poor, so I only used the IDE for debugging and > possibly for getting started with a tool. Some IDE's have additional > features (chip wizards, etc.) which can be useful. However, now almost > all development tools use Eclipse as their IDE (including modern > versions of CodeWorrier). As long as it is a fairly current version of > Eclipse, I am happy with that for editing too. Eclipse works well with > external makefiles, parsing the compiler output to put warning and error > markers in the source code. > > And if you do use an Eclipse IDE for handling the build, you can read > the makefiles afterwards and use them for hints for your own makefile.
I wasn't counting Eclipse in my rant. I should have said "proprietary IDEs". Eclipse isn't the best editor in the world (CodeWright was, IME better, although I haven't used it for years). But it's good enough, it's miles better than some of the editors in proprietary IDEs that I've been forced to use, and it is _the same every time_. And you can easily set up your project for "external build" and use your own damn makefile, which is a copy of your last damn makefile, which you used because it worked. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Tim Wescott wrote:
> On Thu, 15 Dec 2011 09:24:24 +0100, David Brown wrote: > >> On 15/12/2011 00:09, Tim Wescott wrote: >>> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: >>> >>>> We are using CodeWarrior IDE v5.9.0 for a PPC project. >>>> >>>> We need to build some additional files externally, but CW is not >>>> forthcoming with the command line it is creating in the internal >>>> project file. (.mpc) It keeps all of that and the individual object >>>> files hidden. Freescale provided an excel spreadsheet to help >>>> duplicate the command line for compile and link by telling it what >>>> IDE project options you are selecting. >>>> >>>> Does anyone have a more reliable approach? >>> >>> >> I don't know about the particular CW version you have here, but all >> the CW tools I have used have a "help/pdf" directory with the >> manuals - including one that contains all the details of the command >> line switches for the compiler. It shouldn't be too hard to figure >> out what you need. >> >>> I _hate_ IDEs, and that's one reason. >>> >>> In extremis, unless Windows 7 gets in your way, you can make a >>> command line logger and put it in place of the compiler that Code >>> Warrior calls. I've done this before. It's very much over the top, >>> but it can also be a life-saver. >>> >>> Far better would be to build the whole project from a makefile, so >>> you actually know what is going on. >>> >>> >> I agree, for the most part. An IDE build can be faster to get up an >> running, especially if you are not familiar with the compiler and the >> switches you need. But in the long run, makefiles are far better - >> they are more flexible, and provide clear documentation of the build >> process that can be easily read, changed, stored in a vcs, moved >> between different machines, etc. >> >> The IDE (should!) handle multiple source directories, put the object >> files and binaries in directories other than the source, and handle >> all the dependencies automatically. Crafting a makefile that does >> that well is not easy - it takes a fair amount of trial and error, >> though generally it can be reused almost as-is for multiple tools >> and projects. An optimised makefile also generally runs faster >> than an IDE-based build. >> >> Personally, I normally use makefiles. I used to hate IDE editors - >> they were almost always pretty poor, so I only used the IDE for >> debugging and possibly for getting started with a tool. Some IDE's >> have additional features (chip wizards, etc.) which can be useful. >> However, now almost all development tools use Eclipse as their IDE >> (including modern versions of CodeWorrier). As long as it is a >> fairly current version of Eclipse, I am happy with that for editing >> too. Eclipse works well with external makefiles, parsing the >> compiler output to put warning and error markers in the source code. >> >> And if you do use an Eclipse IDE for handling the build, you can read >> the makefiles afterwards and use them for hints for your own >> makefile. > > I wasn't counting Eclipse in my rant. I should have said "proprietary > IDEs". Eclipse isn't the best editor in the world (CodeWright was, > IME better, although I haven't used it for years). But it's good > enough, it's miles better than some of the editors in proprietary > IDEs that I've been forced to use, and it is _the same every time_. > > And you can easily set up your project for "external build" and use > your own damn makefile, which is a copy of your last damn makefile, > which you used because it worked.
At least in Eclipse it shows you the command line in the command window as it compiles. You're wrong though, Multi Edit was/is the best editor :-) I use it daily instead of the IDE editors. -- Scott Validated Software Carlsbad, CA __________ Information from ESET NOD32 Antivirus, version of virus signature database 6715 (20111215) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
langwadt@fonz.dk wrote:
> On 15 Dec., 00:09, Tim Wescott <t...@seemywebsite.com> wrote: >> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: >>> We are using CodeWarrior IDE v5.9.0 for a PPC project. >> >>> We need to build some additional files externally, but CW is not >>> forthcoming with the command line it is creating in the internal >>> project file. (.mpc) It keeps all of that and the individual object >>> files hidden. Freescale provided an excel spreadsheet to help >>> duplicate the command line for compile and link by telling it what >>> IDE project options you are selecting. >> >>> Does anyone have a more reliable approach? >> >> I _hate_ IDEs, and that's one reason. >> >> In extremis, unless Windows 7 gets in your way, you can make a >> command line logger and put it in place of the compiler that Code >> Warrior calls. I've done this before. It's very much over the top, >> but it can also be a life-saver. >> >> Far better would be to build the whole project from a makefile, so >> you actually know what is going on. >> > > I seem to remember from many years ago when I used cw that there was a > way to make it export a gnu make file > > -Lasse >
Alas, years ago... When it was the front end for ARM it also had a .prj to make file converter as a separate utiltiy. Not compatible with the current .mcp though. -- Scott Validated Software Carlsbad, CA __________ Information from ESET NOD32 Antivirus, version of virus signature database 6715 (20111215) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
Tim Wescott wrote:
> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: > >> We are using CodeWarrior IDE v5.9.0 for a PPC project. >> >> We need to build some additional files externally, but CW is not >> forthcoming with the command line it is creating in the internal >> project file. (.mpc) It keeps all of that and the individual object >> files hidden. Freescale provided an excel spreadsheet to help >> duplicate the command line for compile and link by telling it what >> IDE project options you are selecting. >> >> Does anyone have a more reliable approach? > > I _hate_ IDEs, and that's one reason. > > In extremis, unless Windows 7 gets in your way, you can make a command > line logger and put it in place of the compiler that Code Warrior > calls. I've done this before. It's very much over the top, but it > can also be a life-saver. > > Far better would be to build the whole project from a makefile, so you > actually know what is going on.
Hmm. Interesting idea. Windows 7 won't get in the way, I don't use it. Still XP. Also, it appears the compiler is a .dll, not an .exe. I think that would prevent this from working. Scott __________ Information from ESET NOD32 Antivirus, version of virus signature database 6715 (20111215) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
Tim Wescott wrote:
> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: > >> We are using CodeWarrior IDE v5.9.0 for a PPC project. >> >> We need to build some additional files externally, but CW is not >> forthcoming with the command line it is creating in the internal >> project file. (.mpc) It keeps all of that and the individual object >> files hidden. Freescale provided an excel spreadsheet to help >> duplicate the command line for compile and link by telling it what >> IDE project options you are selecting. >> >> Does anyone have a more reliable approach? > > I _hate_ IDEs, and that's one reason. > > In extremis, unless Windows 7 gets in your way, you can make a command > line logger and put it in place of the compiler that Code Warrior > calls. I've done this before. It's very much over the top, but it > can also be a life-saver. > > Far better would be to build the whole project from a makefile, so you > actually know what is going on.
I was wrong it is a .exe file. Now to find a command line logger. Google here I come. __________ Information from ESET NOD32 Antivirus, version of virus signature database 6715 (20111215) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
On Thu, 15 Dec 2011 08:34:02 -0800, Not Really Me wrote:

> Tim Wescott wrote: >> On Wed, 14 Dec 2011 14:34:37 -0800, Not Really Me wrote: >> >>> We are using CodeWarrior IDE v5.9.0 for a PPC project. >>> >>> We need to build some additional files externally, but CW is not >>> forthcoming with the command line it is creating in the internal >>> project file. (.mpc) It keeps all of that and the individual object >>> files hidden. Freescale provided an excel spreadsheet to help >>> duplicate the command line for compile and link by telling it what IDE >>> project options you are selecting. >>> >>> Does anyone have a more reliable approach? >> >> I _hate_ IDEs, and that's one reason. >> >> In extremis, unless Windows 7 gets in your way, you can make a command >> line logger and put it in place of the compiler that Code Warrior >> calls. I've done this before. It's very much over the top, but it can >> also be a life-saver. >> >> Far better would be to build the whole project from a makefile, so you >> actually know what is going on. > > I was wrong it is a .exe file. Now to find a command line logger. > Google here I come. > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 6715 (20111215) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com
// we don't need no steenking comments! int main(int argn, char * argv[]) { int n; for (n = 0; n < argn; argn++) { puts(argv[n]); putchar('\n'); } return 0; } -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com

The 2024 Embedded Online Conference