AnsweredAssumed Answered

Debugger - variables not properly traced

Question asked by Guest on Jan 13, 2009
Latest reply on Jan 16, 2009 by Daniel Lundin
Hi everybody,
 
Im fresh with freescale and codewarrior so I hope there is a quick method to fix my problem.
During debugging C code (tested with different examples) some variables in Data:2 window are heaving wrong content. Especially those which are passed as input parameters in fuctions usually have strange values. For example if I pass two parameters in a function :
 InitTMR(word k=5, word l=1) then during debugging this function inside the k and l variables ussually having values like 0xE206, 0xE103 ... or so (looking more as a memory address and not a value anymore).
What I expect this effect is caused by the fact that some variables are passed to the fuctions by using index register H:X and then these variables are not tracable enymore by Data window. I can imagine that they can be as well somehow optimized by compiler and that could appear as well as a strange behaviour of the debugger. Anyway I tried to turn off all optimization options in the compiler but that did not help at all. Do you have any solution for that problem or is there any other way to trace the value of variables ? (I tried as well Inspect component but effect was the same)
 
(by the way Im using version 6.1 build 7285 of CW with freescale HCS08)
 
BR/Pawel

Outcomes