Wednesday 12 November 2008

Options to build a Windows CE hybrid image

First of all what is a hybrid image anyway? A hybrid image is a release image where certain components are compiled as debug. It can be very helpful while debugging. For instance you are developing a device driver right now so you only need the debug version of the device driver you are working on right now; the rest of the image can be release for better performance and a better simulation of how your device will behave in the real world.

But how do I get a hybrid image, you might ask?
  • Do I simply copy the debug version from the debug directory to the release directory and make a run-time image afterwards? Well that would be one method but not a very sophisticated one!

  • What about set WINCEDEBUG=debug in the command line window? Well that would build your component in the debug directory and hence you still would copy it over manually to your release directory.

  • What about setting DISABLE_OPTIMIZER=1 in the SOURCES file or from the command line window? This would only disable the optimizer but still not compile debug macros.

  • set COMPILE_DEBUG=1 from within the command line would do the trick. But unfortunately this command does not work from within the SOURCES file.

  • Now for the ultimate solution that you can specify in the SOURCES file: CDEFINES=$(CDEFINES) –DDEBUG /Od this disables the optimizer and compiles the debug macros.

To include the just build component in your image, a make run-time image is necessary after each of the just mentioned solution and if you build form within the command line, make sure you have set WINCEREL=1 to automatically execute the buildrel step after build.

Have fun

No comments: