HC12: Variables values debugging Codewarrior

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

HC12: Variables values debugging Codewarrior

Jump to solution
2,290 Views
codewarrier
Contributor I
Hello
I am working with CW12 ver3.1 and P&E multilink USB cable.
I worte simple program and debug it.
I  found that running and stopping via P&E is easy ,but i couldn't find a way through the debugger to read values of variables.
I am sure it can be done via debbuger,something like watch.
So how can i do that ? Please give me detailed answer .

Message Edited by CrasyCat on 2007-04-13 02:32 PM

Labels (1)
Tags (1)
0 Kudos
1 Solution
591 Views
CrasyCat
Specialist III
Hello
 
There are several ways to get to that.
  1- Use Data window
      - In your debugger is you are using the default layout, you have a window called Data:1 showing "Global" on the right hand side of the information bar (on top of the window).
     - Click with the right mouse button in the Data:1 window
     - Select "Open Module" in the drop down menu. a Modules dialog is opened.
     - Select the source file where the variable is defined.
     - You will see the current value of the variable in the Data window.
  2- Use an expression in a Data Window
      - In your debugger is you are using the default layout, you have a window called Data:1 showing "Global" on the right hand side of the information bar (on top of the window).
      - Drag the variable name from the Source Window to the Data window.
      - You should be able to see the variable value in the Expression window.  
  3- Use visualization window
     - Select "Component" -> "Open". The "Open Window Component" dialog is opened.
     - Double click on "VisualizationTool" component. A new window is opened called "Visualizationtool"
     - Click with the right mouse button in the visualizationtool component and select "Add new Instruments" -> "Value as Text
     - Place the instrument somewhere in the window (just click inside of the window).
     - Click with the right mouse button on the instrument and select "Properties"
     - Set "Kind of Port" to Variable, specify the variable name in "Port to Display" and adjust text you want to see in front of the value  in "Field description".
 
If you are using V3.1 tools, option 2 and 3 will not allow you to browse (or navigate) within a structure or pointer.
 
If you upgrade to V4.5, you will be able to browse within data structure or a pointer in option 2 too.
Also upgrading to V4.5 will allow you to just drag and drop a variable from the data window to the visualizationtool window. Visualizationtool is not suited to browse or navigate within a data structure or a pointer.
 
I hope this helps.
 
CrasyCat

View solution in original post

0 Kudos
2 Replies
592 Views
CrasyCat
Specialist III
Hello
 
There are several ways to get to that.
  1- Use Data window
      - In your debugger is you are using the default layout, you have a window called Data:1 showing "Global" on the right hand side of the information bar (on top of the window).
     - Click with the right mouse button in the Data:1 window
     - Select "Open Module" in the drop down menu. a Modules dialog is opened.
     - Select the source file where the variable is defined.
     - You will see the current value of the variable in the Data window.
  2- Use an expression in a Data Window
      - In your debugger is you are using the default layout, you have a window called Data:1 showing "Global" on the right hand side of the information bar (on top of the window).
      - Drag the variable name from the Source Window to the Data window.
      - You should be able to see the variable value in the Expression window.  
  3- Use visualization window
     - Select "Component" -> "Open". The "Open Window Component" dialog is opened.
     - Double click on "VisualizationTool" component. A new window is opened called "Visualizationtool"
     - Click with the right mouse button in the visualizationtool component and select "Add new Instruments" -> "Value as Text
     - Place the instrument somewhere in the window (just click inside of the window).
     - Click with the right mouse button on the instrument and select "Properties"
     - Set "Kind of Port" to Variable, specify the variable name in "Port to Display" and adjust text you want to see in front of the value  in "Field description".
 
If you are using V3.1 tools, option 2 and 3 will not allow you to browse (or navigate) within a structure or pointer.
 
If you upgrade to V4.5, you will be able to browse within data structure or a pointer in option 2 too.
Also upgrading to V4.5 will allow you to just drag and drop a variable from the data window to the visualizationtool window. Visualizationtool is not suited to browse or navigate within a data structure or a pointer.
 
I hope this helps.
 
CrasyCat
0 Kudos
591 Views
codewarrier
Contributor I
Thanks you
CrasyCat
for the compleat answer !!
 
0 Kudos