Codewarrior compiler command line???

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
 Click to see the full signature
Reply to
Not Really Me
Loading thread data ...

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.
 Click to see the full signature
Reply to
Tim Wescott

t
s
a

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

Reply to
langwadt

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 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.

Reply to
David Brown

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.
 Click to see the full signature
Reply to
Tim Wescott

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
 Click to see the full signature
Reply to
Not Really Me

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
 Click to see the full signature
Reply to
Not Really Me

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.

formatting link

Reply to
Not Really Me

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.

formatting link

Reply to
Not Really Me

// 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.
 Click to see the full signature
Reply to
Tim Wescott

I agree, but I was also wrong again. It is not using the .exe, some other mechanism. I put a function like that in the way using the exe name and it doesn't get called. Seems to be taking a dll approach. Steenking Freescale.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 6715 (20111215) __________

The message was checked by ESET NOD32 Antivirus.

formatting link

Reply to
Not Really Me

The exe file may just call a dll. It wouldn't be a bad approach.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
 Click to see the full signature
Reply to
Tim Wescott

You did make sure to throughly subvert the whole process by putting your exe file in the directory in place of the one that was there?

It probably doesn't even occur to the software to run an exe file out of a local directory or anything.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
 Click to see the full signature
Reply to
Tim Wescott

Sysinternals procmon can tell you what is going on at the Windows system call level. It is similar to strace, if you are familiar with that, showing which processes are started, all file system and registry access &c.

formatting link

Reply to
Radey Shouman

Fortunately, proprietary IDE's are on the way out - steadily more are switching to Eclipse. I agree that Eclipse is not the best for all purposes, but it is (IMHO, since editors are a very personal choice) a good general purpose programmers' editor. It used to be very slow and bloated - but unlike almost all other software, it has actually got faster over time. Combined with faster JVM's and faster computers, it is fine for most uses. I still use other smaller editors for some uses (such as Crimson editor on Windows, and gedit on Linux) where I want small, fast, and easy use of multiple windows rather than advanced features such as syntax checking and project navigation.

The only supplier I know of who has bucked the trend is Atmel - they picked MS Visual Studio for AVR Studio 5. The only reason I can think of is that MS paid them to do so - it has awkward requirements (it's windows only, while the rest of the world is moving to cross-platform tools, and is even somewhat fussy about the windows version), and is very badly packaged. The editor is probably okay, though I haven't tried it much. But even if VS had all the features of Eclipse, it would still be a daft choice - because Eclipse is what embedded developers mostly use for an IDE these days. So any developer who is interested in spending time learning the advanced features of their IDE's would be better off doing so in Eclipse, and using that knowledge for all their other projects and targets.

Yes, that's what I do.

Reply to
David Brown

Microchip has switched to NetBeans, which is a dubious choice given Sun's situation, regardless of the tool's merits. NetBeans also has a much-less developed ecosystem than Eclipse, where you can find plug-ins for zillions of source control, project management, design, and other tools.

I haven't used NetBeans yet but may shortly depending on customer choice of processors; hopefully they choose one where the tools use Eclipse like the other projects here...

Reply to
Dave Nadler

I have procmon. I'll take a look and see if that helps.

Tim - yes I put it in the folder Freescale had the original in. I also tried renaming the folder and that didn't bother the compiler at all. Looks like the folder is only command line versions, but are not used directly by CW.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 6718 (20111216) __________

The message was checked by ESET NOD32 Antivirus.

formatting link

Reply to
Not Really Me

Microsoft paying Atmel to use the MS Visual Studio would only make sense if it would serve the interests of Microsoft somehow and in a significant way. Having dealt with Microsoft in the past, I seriously doubt they care one way or the other whether or not Atmel uses MS Visual Studio to base their development environment upon. Microsoft is only interested in supporting things if it promotes the sales of their high volume products, don't expect Microsoft to help you if it would mean that they can sell couple of thousand additional licenses; they are simply not interested. This is one reason why I would avoid Microsoft for embedded products; you are unlikely to be big enough for them to be bothered.

Another explanation is that the developers at Atmel were familiar with the Visual Studio environment (which is perfectly fine if you only do development projects for the Windows platform), and were not so familiar with Eclipse. If they also had little time and resources for development of develop AVR Studio 5, it might explain this unfortunate choice.

Reply to
Dombo

That's an even weirder choice - NetBeans has never been particularly popular for C or C++. It's well regarded as a java IDE, and I gather it's okay for C or C++, but it has a mere fraction of the market share there.

Reply to
David Brown

I wasn't really being serious there!

Realistically, I assume that someone at Atmel either thought that Visual Studio was technically a better choice, or that it would cost them less to develop than Eclipse plugins.

Avr Studio 4 (and earlier) were all using a home-made IDE. Atmel also had Avr Studio 32 for the avr32 architecture - it was Eclipse with plugins. Maybe they had had some bad experience with that - it is certainly the case that it used to be a lot harder to make good embedded IDE's from Eclipse. Many Eclipse-based embedded IDEs had a lot of modifications to Eclipse itself to make them work. But for current versions of Eclipse, the embedded IDE vendors can typically use pure stock Eclipse and CDT, and keep everything neatly in their own plugins.

Reply to
David Brown

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.