Michael Herrmann

Codewarrior 6.4 has wrong register map for local variables

Discussion created by Michael Herrmann on Nov 28, 2007
Latest reply on Apr 2, 2008 by Santosh Dwivedi
i want to evaluate CodeWarrior 6.4 together with the Eval Board FREESCALE Semic/M5373EVB
and loaded the free Souce for dbug. Compiling and linking works fine (all needed information
are available in the source-tree of dbug) but when i debug the code using the P&E USB Coldfire
Multilink (USB-ML_CFE) Debugger (executable m5373evb_sdram was previously send
to SDRAM via debugger) i encounter the following:
The local variables, which are mapped to internal registers, can not be evaluated correctly
because Codewarrior uses the wrong Register Mapping for them.
Example :
When i debug the function clock_pll() the local variable fref is set to a constant value -> fref = FREF;
In mixed mode the assembler shows move.l #16000,d7.
When i now want to watch the variable fref i get the following watch value :
   Variable: fref Value: -2147481600 Location: $D0
There is a second local variable fout which changes to the value of fref when i debug the above command. When i watch this variable i get:
  Variable: fout Value: 16000 Location: $D7
As you see the debugger assumes that fref is in register d0 and in code it is in d7.
As i have said i changed nothing in the code or in the Codewarrior ini files.
Can someone please help me ?
Thanks and kind Regards