How to build software using command line?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to build software using command line?

6,133 Views
forums_frank
Contributor I
Hi, I'm new to CodeWarrior. We are using CodeWarrior for ColdFire to development our project. We have IDE based projects and can build from there. What we want to do now is to build from command line. I'm reading the
"Build Tools Reference.pdf (v7.x)" but it looks only tells you how to configure the compiler, linker and other stuff but does not really teach you how to build the software.

Any help regarding how to build from command line would be very helpful.

We are using CodeWarrior (For coldfilre v7.1), our processor is MCF54452.

Regards,
Labels (1)
0 Kudos
8 Replies

879 Views
CrasyCat
Specialist III
Hello
 
There is an example of batch file rebuilding a whole application in {Install}\\(CodeWarrior_Examples)\CmdlineTools. Look at commandline.bat there.
 
If you want to rebuild only files changed since last build you will have to use a make utility and create a make file for your application. CodeWarrior does not come with a make utility so you have to use an external software to achieve that.
 
CrasyCat
0 Kudos

879 Views
forums_frank
Contributor I
Hi CrasyCat,

Thanks for your help. We want to use command line to build the software (the source code will be in the source control system). How can we modify the "commandline.bat" to do that?

I've just found that CodeWarrior can export project as GNU makefile. Can i use the exported make file to build the sofware out of source contol system?

Anyway, my question is how to build software when the files are in the source control system?

Regards,
0 Kudos

879 Views
CrasyCat
Specialist III
Hello
 
Usually version control software are coming with a make utility.
 
So you need to write/create a make file, which can be processed by the VCS software make utility.
You need to check the make utility documentation for information on how that is working.
 
I would not recommend exporting the .mcp file to a GNU make file as this feature is not working reliably for all targets.
 
I do not have a sample project building from a make file available for Coldfire target. So I cannot help you much more.
 
CrasyCat
0 Kudos

879 Views
forums_frank
Contributor I
Hello,

Thanks again. Actually we have not decided which version control system will be used. But my understanding is no matter what version control system, make utility involved, the CodeWarrior command line tools “mwasmmcf “, “mwccmcf”, “mwldmcf” will be used finally. Is my understanding right?

Many thanks,

0 Kudos

879 Views
J2MEJediMaster
Specialist I
Yes. Those executable files will be used for command-line builds.

---Tom
0 Kudos

879 Views
SamWeber
Contributor I

So when using the 54452, specify MCF5475 or MCF5485?  The batch file translates that to MCF547x and that processor specification will work for the 5445x family?

0 Kudos

879 Views
J2MEJediMaster
Specialist I

No. The tool will not do that. Checking over the product page, I see that CW for ColdFire 7.2 does support the MCF5445x family. I would download that and give it a try, as your license should stil be valid for it. Use the processor pragma to specify the part. (The description of this pragma is in the ColdFire Build Tools Reference manual, chapter 32, "Pragmas for ColdFire").

 

---Tom

0 Kudos

879 Views
CrasyCat
Specialist III
Hello
 
Yes that is right
 
CrasyCat
0 Kudos