- Set up the motor driver hardware board and the C2000 Launchpad or controlCARD as described in Section 3.2, except the motor should NOT be connected to the motor driver board in this build level. Note: it is especially important to ensure that the the S2 switches on the LaunchPad are configured correctly, since this is necessary to connect the enable pin of the driver to GPIO 29 of the Launchpad.
- Connect a USB cable from the computer to the on-board USB connector on the C2000 Launchpad or controlCARD to enable isolation JTAG emulation to the C2000 device.
- Power on the motor driver board by applying the appropriate voltage to the bus voltage input terminal as described in Section 3.2.
- Import the universal motor control lab project into CCS and select the right build configuration as described in Section 3.3.1. Open the sys_settings.h file and set DMC_BUILDLEVEL to DMC_LEVEL_1. This will ensure 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. It is recommended 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 will appear next to the file name in the project explorer window. Setting the file as default will 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 on the project name and click on Rebuild Project. Watch the Console window. Any errors in the project will be displayed in the Console window.
- On successful completion of the build, click on the Debug button or click Run → Debug. The IDE will now automatically connect to the target, load the output file into the device and change to the Debug perspective. The CCS Debug icon will appear in the upper right-hand corner, indicating that the user is now in the Debug Perspective view. The program should be halted at the start of main().
CAUTION: Do not click Cancel, turn off the power of the board, or disconnect the emulator when loading the code to flash.