Page 1 of 1

CrossStudio Include Debug Info Problem

PostPosted: Mon Mar 03, 2008 3:55 am
by samuel
I'm having problems with Salvo/CrossStudio. If you go in the project properties, under the Build tab there is a setting Include Debug Information, which I've read about in the CrossWorks MSP430 Compiler Reference Manual, and it states "The -g option instructs the compiler to generate debugging information (line numbers
and data type information) for the debugger to use", p.190. I assume that it means it leaves debugging info on the processor because when I turned the setting on I have approximately 500 bytes more of code. However, Salvo doesn't seem to work correctly with this turned off. I can see that each task runs once (doing pin flips and I tested with up to 2 tasks), but neither of them go again. It's hard to debug obviously because I can't use the debugger. Do you have any ideas why?? I turned ALL optimizations off and it still doesn't work. As well, even with ALL optimizations ON everything works, until I turn this setting off.

Re: CrossStudio Include Debug Info Problem

PostPosted: Mon Mar 03, 2008 4:01 am
by aek
-g just adds info to object files that allows a debugger to trace into the original source code when you're stepping. This is why the 'i'-option Salvo libraries (in Salvo Pro only) are so much bigger than the '-'-option ones (in Salvo Lite and LE).

Why this would have any effect on the final, linked executable I have no idea. It shouldn't.

------------------


Re: CrossStudio Include Debug Info Problem

PostPosted: Mon Mar 03, 2008 4:26 am
by aek
Interesting ... running CS430 on Linux (I have it handy here), I see that the simple sample program I built with -g is 2 bytes bigger in Flash than the same program built without -g. I have no idea why ...

------------------


Re: CrossStudio Include Debug Info Problem

PostPosted: Mon Mar 03, 2008 4:27 am
by aek
I'll do a quick test tomorrow with tut5 to see if I can shed any insight ...

------------------


Re: CrossStudio Include Debug Info Problem

PostPosted: Tue Mar 04, 2008 3:15 am
by aek
OK, I did a quick test of building the Linear EPS code with and without debug info. This is a Salvo application that uses a pro lib (that has debug info in it -- so it's only the source code in the project that is being affected by the change in project properties):
code:

w/debug info w/out debug info
13416 13284 CODE
2456 2456 CONST
2 2 IDATA0
30 30 INTVEC
1504 1504 UDATA0

I do not see any runtime difference between the two ...

So I do not know why the code size changes as a function of whether including debug info is selected or not ...

------------------