Speeding up the Debug Launch in CodeWarrior

Whenever I do a debug launch in the Eclipse based CodeWarrior, it takes some time until actually I’m ready to step through my code on the target. Yes, a good part of that is by Eclipse. But another part is that Eclipse helps me to do stupid things (which is a good thing). But say if I know what I’m doing, I could remove some of that safety belts and still doing fine. But only if I know what I’m doing.

A good indicator where Eclipse is spending time is to have a look in the Progress View:

Progress information during launch

Progress information during launch

It shows an interesting information: ‘Build before Launch’….

What it means is that it performs a ‘build’ (checking if anything has been changed, and compiles and links if necessary) of my project before it launches and debugs my project. This is actually a very good thing: that way I’m not debugging something which is not compiled and downloaded to my target.

It happened to me in the past that I had forgotten to compile my sources, and I was debugging for extended time really weird things. Only to find out that my application on the target was outdated, and the fix in my sources has not been compiled 😦

While that ‘build before launch’ is usually a good thing, it has a disadvantage: the larger my project is, the longer it will take. Even if I have not changed anything in my sources, running the make files needs time. And for my Processor Expert projects, it will invoke as well the Processor Expert code generator which will take some time too. Imagine a project with hundreds of files, and you get the idea.

Build Before Launching

Luckily, there is a setting to control this, and to speed up the launch process. Under the menu Window > Preferences > Run/Debug > Launching there is an option which controls the build-before-launching:

Build (if required) before launching

Build (if required) before launching

Disabling that option of course means that I take care if my sources are compiled.

Generating Processor Expert Code

If my project is using Processor Expert, there is another setting to speed up the debugger launch (if I still want to build-before-launch): If I have changed Processor Expert settings, it will first generate code, and then build it. If I take care myself of the code generation, then I can disable the setting below too. I find that setting in the project properties (selecting the project and use the Properties context menu):

Generate code before build automatically

Generate code before build automatically

Summary

The ‘build-before-launching’ option is in general a good thing. But if I know that I have compiled my files, disabling that option greatly reduced my debugging time. And if I take care of the Processor Expert code generation, I can disable it for my projects.

I have a ‘mid-size’ Project with around 150 source files, and disabling the build and code generation reduced my debugger launch time by 20 seconds. Not bad :-). But I need to care myself that what I’m debugging is up-to-date.

Happy Launching 🙂

4 thoughts on “Speeding up the Debug Launch in CodeWarrior

  1. Pingback: Top 10 Customization of Eclipse Settings | MCU on Eclipse

  2. Pingback: How to Avoid Slow Processor Expert Projects | MCU on Eclipse

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.