To watch local and global variables while debugging code is a standard debug practice. There are various methods for doing this in CCS, such as memory views and watch views. Additionally, CCS has the ability to make time (and frequency) domain plots. This ability allows the user to view waveforms using the graph tool. The primary debugger tool in CCS is the Expressions window.
- Click View → Expressions on the menu bar to open an Expressions
watch window.
- A group of variables can be imported into
the Expressions window by right clicking within the Expressions window and
clicking Import, and browse to the directory of the project at
<install_location>\solutions\tida_010265_wminv\src_control\common\debug.
There are 5 different .txt files available. Select the one corresponding to your selected
build level and click the OK button to import the variables into the expressions
window.
Note: Some of the
variables have not been initialized at this point in the main code and can contain some
useless values.
- Alternatively, variables can also be
manually added to and removed from the expressions window.
- The structure variable
motorVars_M1 has references to most variables that are related to controlling the
motor. By expanding this variable, you can see and edit all of these variables as
needed.
- Click on the Continuous Refresh
button in
the expressions window. This enables the window to run with real-time mode. By clicking
the down arrow in this Expressions window, you can select Customize Continuous
Refresh Interval and edit the refresh rate of the expressions window. Choosing too
fast an interval can affect performance.