Codewarrior 6.4 has wrong register map for local variables

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

Codewarrior 6.4 has wrong register map for local variables

2,265 Views
GamblingUhu
Contributor I
Hi,
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
 
GamblingUhu 
 
    
Labels (1)
0 Kudos
2 Replies

360 Views
Technoman64
Contributor III
Is the compiler optimizing the code? Sometimes you have to disable some of the optimizing features for the debugger to work ocrrectly. Then you can turn them back on for final version.
 
Just a thought...
0 Kudos

360 Views
kj
Contributor I
Can you please suggest a link to download CW 6.4. I searched all freescale website but could not find it.
I have CW 7.0 but due to some technical reasons I want to use CW 6.4 
0 Kudos