There is no special document about setting up a release build. There is no reason for it as it is basically the same as a debug build. In general, different builds are simply different sets of compiler/linker options, and you may also define for each build configuration which files should be included in the build and which files should not be used. So the difference is what you make of it. A typical difference is to remove debug information in the output files. This does not really make sense as the hex-file in Motorola or Intel hex-format does not include any debug information anyway. And only this file is used to program the processor lateron. Debug information is only included in the object files and the output file in a special debug format (Elf/Dwarf, IEEE695, UBROF, ...). Some people also increase code optimisation in the release build. I think this is not advisable. Higher optimisation makes for little differences in the data processing (e.g. channged sequence for calculations for higher code efficiency, different intermediate results in calculations) or different code execution time. Both may cause problems as the application timing changes. It may also be that the modified code unveils a new bug in the compiler. It may also be that the code included some debug outputs (e.g. status messages output via printf) that can be removed by different symbol definitions. The possible problems are the same as with changed optimisation, different data handling and different timings in the software. It is no fun to debug a code for weeks, change options for the release and find that it does not work anymore. In your case, I suppose you have different definitions for include file directories in the compiler options of debug and release version. It could also be that you miss some symbol definitions, which may also be done in the compiler options.
↧