Set up the motor driver hardware board
and the TI LaunchPad or controlCARD as described in Section 4.3, except the motor does NOT need to be connected to the motor driver board in
this build level.
Connect a USB cable from the computer to
the onboard USB connector on the TI LaunchPad or controlCARD to enable isolation JTAG
emulation to the MCU.
Power on the motor driver board by
applying the appropriate voltage to the bus voltage input terminal as described in Section 4.3.
Import the universal motor control
project into CCS and select the correct build configuration as described in Section 4.2.1. Open the sys_settings.h file and set DMC_BUILDLEVEL to DMC_LEVEL_1. This can
make sure the project is configured to run the first incremental build.
In the Project Explorer window, make sure
the correct target configuration file is set as Active by right-clicking on the desired
target configuration file name and selecting Set as Active Target Configuration.
The recommendation is to also set the desired target configuration file as default by
right-clicking on the file name and selecting Set as Default Target Configuration.
One reason for doing this is because there is no visible indicator to show which file is
active, but if the file is set to default then the [default] indicator appears next to the
file name in the project explorer window. Setting the file as default can also cause the
file to be used by default unless a different configuration file is specifically set to
Active. You can also link a target configuration to a project in the workspace by going to
View > Target Configurations and right-clicking on the target configuration
name in the Target Configurations view and selecting Link to Project.
Right-click the project name and click
Rebuild Project. Watch the Console window. Any errors in the project are
displayed in the Console window.
On successful completion of the build,
click the Debug button or click Run → Debug. The IDE now automatically
connects to the target, load the output file into the device, and change to the Debug
perspective. The CCS Debug icon appears in the upper right corner, indicating that the
user is now in the Debug Perspective view. The program needs to be halted at the start of
main().