3.1.2.5.4.3 Building and Loading Project and Setting up Debug
Right click on the project name, and click Rebuild Project. The project builds successfully. Click Run → Debug, which launches a debugging session. In the case of dual CPU devices, a window may appear to select the CPU the debug must be performed. In this case, select CPU1. The project then loads on the device, and CCS debug view becomes active. The code halts at the start of the main routine.
To add the variables in the watch and expressions window, click View → Scripting Console to open the scripting console dialog box. On the upper-right corner of this console, click on Open to browse to the setupdebugenv_lab4.js script file located inside the project folder. This file populates the watch window with appropriate variables required to debug the system. Click on the Continuous Refresh button () on the watch window to enable continuous update of values from the controller. The watch window appears as shown in Figure 3-27.
Figure 3-27 Lab 4: Expressions View
Enable real-time mode by hovering the mouse on the buttons on the horizontal toolbar and clicking the button.
Run the project by clicking on
Now Halt the processor by using the Halt button on the toolbar ().