CW6.1 - remove symbolics or not for release build (target)?

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

CW6.1 - remove symbolics or not for release build (target)?

2,589 Views
dukdevguy
Contributor I
My question is with CW6.1 for HS08 (MC1321x samples) & any need for Debug & Release targets.
The web based training for using the debugger (24612_CW_DEBUGGER_WBT.pdf) has the following note: "Note: Build without symbolics for final release". 
 
I've seen several comments in the forums that say there is no debug information in the s19 output...and if I try to remove all debug 'dots' from the File View or Link Order for my project and build, it  get a compile error "Link Error : L1700 : File crt0.c.0 should contain DWARF information".  Placing the debug symbolic (dot) on crt0.c and compiling again completes fine. 
 
a) Is there something else I should be doing after removing the symbolic - to fix the compile error?  Is there something spec I should look for in the crt0.c file that 'requires' the debug selection?
 
b) Should I worry about having a specific Release target (w/ any particular settings?) for production code -
or is there any performance issues if I skip it? 
 
Thanks!
Labels (1)
0 Kudos
Reply
3 Replies

703 Views
CompilerGuru
NXP Employee
NXP Employee
just checked the tutorial you refer to.
It does target EPPC debugger, not the CW for MCU's debugger. Also the project setup used in EPPC differs significantly so I don't think this tutorial applies at all for CW for MCU's.

Daniel

0 Kudos
Reply

703 Views
dukdevguy
Contributor I
Thanks Daniel!
0 Kudos
Reply

703 Views
CompilerGuru
NXP Employee
NXP Employee
a)
The startup data does need debug information as the linker is using it to produce just what the compiled code expects. So the debug information for _startupData is needed, but if you really need it (I doubt) you can just place that constant in its own file.

b)
There is no performance gained by not generating the debug information. The compiler does generate different the same code regardless of that switch.
So the question is why you do not want to have debug information in release?

To my understanding, usually the debug and release targets differ in the optimization settings and eventually in conditionally compiled code to test more at runtime. They do not differ in the "generate debug info" setting in most cases.
The only exception I see is if you distribute object files to be linked against without the source code, and without that the user should see how your stuff works.
0 Kudos
Reply