Real-time debugger problem

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

Real-time debugger problem

1,467 Views
BCast
Contributor I
Hi all,
I am using CW4.6 and P&E DBM for a mc9s12e64 microcontroller.  I am having difficulties debugging my program because the real-time debugger will not show changes in my declared variables.  I am reading information from the ATD (10 byte resolution) and inserting it into a word.  I know the information is there because it will respond to the conditions, but in the data and memory screen it shows the values as 0.  For instance:
 
ATDInputs_GetValue16(&myValue[0]); // Value 1000 inserted into myValue[0]
if(myValue[0] == 1000){
  //"do stuff"
}
 
The program will run and "do stuff" but the debugger will still show myValue[0] as 0.  It makes it extremely diffucult to see where my calculations are going awry.  Why will my data not show up on the real-time debugger?  Any suggestions are appreciated!!  I'm completely lost.
 
Thanks in advance!
Labels (1)
0 Kudos
3 Replies

337 Views
Steve
NXP Employee
NXP Employee
Do you mean that you want to see the variable change in "real-time"?
By default the debugger will update the variable values when you stop the code. If you want to see the variable values while the code is running you need to change the mode of the debugger window. For example, in a Data window you right click and go to the Mode sub menu. By default it will be set to Automatic. Select "Periodical..." and choose how often you want to update the window.
Note that this update is done over the BDM and there is a risk that you could cause the BDM to steal a cycle from the CPU: this is an very unlikely scenario and probably not relevant but you should be aware of it.
0 Kudos

337 Views
BCast
Contributor I
No, I dont need to see the variables change while the program is running.  I stop the program at certain segrements of the code to check my the calculations and it does not update (everything remains at 0 even though there is a value assigned to the variable).  I'm not sure if its because of the version im using (CW v4.6), but when I run the code in v3.1 the variables update when I stop the code.  I dont know a great deal about the debug settings for CW, but I just dont know why it would work for one version and not the other.  My project is being completed in v4.6 so fixing this problem would save me a ton of time instead of having to go back to 3.1 and create a new project everytime I ran into a bug.
0 Kudos

337 Views
Steve
NXP Employee
NXP Employee
Did you try changing the debugger window settings to see if that changes the behaviour? If the debugger windows are set to "Automatic" they should refresh when you stop.
You might want to try posting this in the CodeWarrior forum as well to see if someone there has some idea.

Message Edited by Steve on 2007-03-1210:29 AM

0 Kudos