setting watchpoints in Codewarrior for MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

setting watchpoints in Codewarrior for MCUs

996 Views
NNeff
Contributor III

I have figured out how to set a watch point so it appears in the list on the Breakpoints tab, and how to enter a variable in the Expressions tab to get the current value in the Value column.  What I can't seem to do is get the IDE to actually stop when the expression listed on the Breakpoints tab is true.  I know it's true sometimes because if I stop the debugger at certain times, I can see the global variable now has that value, but I'm trying to find out when/where it first acquires that value.  I've read the complete (miniscule) section on breakpoints and watchpoints in the documentation, and have searched the Eclipse forums for a clue, without success.  The watchpoint is the only breakpoint of any type I have set (all the other checkboxes in the list are blank), so I know it's not my previous problem of exceeding the (again miniscule) number of breakpoints this processor supports.

 

Sorry if this is a simple-minded question, but I can't figure it out and I'd be grateful for any help.  I'm running Codewarrior for MCUs version 10.6, and debugging a FRDM board KE06Z with a Kinetis MKE06Z128VLK4.  The expression I've set as a watchpoint is "SavedError == SOLENOID_2_ERROR".

 

Thank you for any help you can offer!

Labels (1)
0 Kudos
3 Replies

517 Views
trytohelp
NXP Employee
NXP Employee

Hello,

For me the watchpoint and breakpoint should work.

Please have a look to the links:

    C/C++ Watchpoints with Eclipse Kepler | MCU on Eclipse

    Watchpoints: Data Breakpoints | MCU on Eclipse

    Breakpoints with Special Effects | MCU on Eclipse

Under the manual CodeWarrior Common Features Guide.pdf you will find more information regarding the watchpoint.

Perform a find for watchpoint.

PROBLEM known:

Have a look to arm-none-eabi-gcc.exe has stopped working

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

517 Views
NNeff
Contributor III

I found out some more:  if the watchpoint is set using just the variable name without qualification, then the module has to be the active one in the code window, but if the variable is qualified by its module name ("Solenoids.c"::SavedError), it works regardless of whether the file is open or not.  It makes sense, but it does mean that watchpoints created using some options will appear not to work for static "globals",  but will work if created using other options in the IDE.

0 Kudos

517 Views
NNeff
Contributor III

Thanks for the links, Pascal.  Actually I think I figured out what the issue was, but just by trial and error.  The variable I am breaking on is a global only in lifetime.  It's local to a module (but external to the functions in that module) in scope and visibility--i.e., it's a static variable within a module.  The data breakpoint, or watchpoint, only works if I have that module the active module in the editor window when I'm running the program.  Otherwise the IDE apparently doesn't "see" changes to the variable.  Interesting, huh?  But the watchpoint is working now.  Thanks again.

0 Kudos