5.2.2.2.2 Building and Loading the Project and Setting up Debug Environment
Right-click on the project name and click Rebuild Project.
The project will build successfully.
In the Project Explorer, make sure the correct target configuration file is set as Active under targetConfigs (see Figure 5-5).
Then, click Run → Debug to launch a debugging session. In case of
dual-CPU devices, a window might appear for the user to select the CPU on which
the debug is to be performed. In this case, select CPU1.
The project will then load on the device and the CCS debug view will become active. The code will halt at the start of the main routine.
To add the variables in the watch/expressions window, click View →
Scripting Console to open the scripting console dialog box. On the upper
right corner of this console, click on open and then browse to the
setupdebugenv_lab2and7.js script file located inside the project
folder. This will populate the watch window with the appropriate variables
needed to debug the system.
Click 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 5-9.