Build dependencies in Codewarrior

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Build dependencies in Codewarrior

4,505件の閲覧回数
ZiglioNZ
Contributor I
CodeWarrior: 7.1
CPU: MCF54452

Hi, I've got a project in Codewarrior that is becoming quite large.
Suddenly Codewarrior seems to get the dependecies wrong and each time I hit 'debug' it rebuilds a number of
 files even if nothing has changed.
That slows down the process considerably.
Is there a way to check the internal dependency tree of a project in Codewarrior to see why it thinks it needs to rebuild some files all the time?

Thanks,
Emanuel
ラベル(1)
タグ(1)
0 件の賞賛
返信
7 返答(返信)

2,059件の閲覧回数
J2MEJediMaster
Specialist I
It's possible that some of the bookkeeping information that the IDE uses has become corrupt. Try the following commands to force the IDE to review and update this information:

Project > Remove all Object Code
Project > Re-search for Files
Project > Reset Project Entry Paths
Project > Synchronize Modification dates

And see if that helps.

If it doesn't, try the following:

Repeat the above steps.
Quite the IDE.
Go into the YourProjectName folder and delete the folder YourProjectName_Data.
Relaunch the IDE and rebuild your project.

Warning: This second technique is like hitting the IDE in the head with a hammer, and it might eliminate certain tool settings. If you're doing anything exotic with say, compiler settings, make sure you write those down before doing this so that you can restore them. HTH.

---Tom
0 件の賞賛
返信

2,059件の閲覧回数
ZiglioNZ
Contributor I
Thanks Tom, I've tried the first one and it didn't work.
Maybe I should just recreate a project and copy the the target settings by hand, that's easy enough in CW.
But the fact itself that all those commands under the Project menu exist is a bit of a worry, isn't it?
Bring on Eclipse!
0 件の賞賛
返信

2,059件の閲覧回数
ZiglioNZ
Contributor I
Hi Tom,

Here's an update. I've solved most of my dependency problems by splitting a large project in smaller library projects. That's quite easy to do and CodeWarrior can handle well having more projects open at once.
I think some problems were due to the fact that Processor Expert regenerated the code quite often (for example when the target is switched). That way, all the code that had a dependency on some .h file that was automatically generated had to be rebuilt.
Now, with subprojects, it's also much easier to separate the namespaces, and avoid conflicts.
0 件の賞賛
返信

2,059件の閲覧回数
J2MEJediMaster
Specialist I
Thanks for the feedback. Right, subprojects can help organize and manage huge builds. We had a telephone switch company that was making builds that used about 15,000 files. They had a lot of subprojects to keep a handle on things. Again, thanks for telling what the solution was, and sorry I wasn't able to help you better.

---Tom
0 件の賞賛
返信

2,059件の閲覧回数
ZiglioNZ
Contributor I
That's alright Tom, surely your suggestions might work for similar situations. And thanks for all your answers anyway.
What I find confusing in CW is that you can call any f(parlist) even if the prototype of f hasn't been included.
Maybe you get a warning for doing that but somehow the compiler seems to think it's safe to infer the prototype of a function from a call (I think it might default the type of the return value to integer).
Once I found myself in a really weird situation: I had disabled a CPU method in Processor Expert and then built the project. The linker failed because of course the function wasn't there.
But then I enabled the function in the CPU bean and rebuilt.
All seemed good but when I ran the code, it didn't work and I think that was due to some files being built without the prototype of that function.
Now, do you know there's any option to disable the default behaviour for the compiler so that the build fails if all the prototypes haven't been declared?
0 件の賞賛
返信

2,059件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
The C language does simply support implicit parameter declarations, so that's not something CodeWarrior came up with, that's the language.
However probably any compiler does support to require function prototypes, or to fail otherwise.
For ColdFire, the C/C++ Language preference panel has a "Require Function Prototype" checkbox. Check it.
This does not only check that functions are declared when you call them, it also requires functions to be declared when they are defined as externally visible (non static), say when the implementation file did not include its own header file.

Daniel
0 件の賞賛
返信

2,059件の閲覧回数
ZiglioNZ
Contributor I
Thanks Daniel for the detailed explanation. That option is what we needed, I'll have a try asap.

Regards,
Emanuel
0 件の賞賛
返信