Lab 7d – Creating a CDC Push Button App
f) Save the Descriptor Tool settings.
While not required, this is handy if you want to open the tool and view the settings at
some later point in time. Notice that ‘Save’ puts the resulting .dat file into the same folder
as our descriptor files.
Save to your emptyProject USB_config folder. This is a pretty good place for it, since this
is where all of the descriptor files it generates are placed. For example:
C:\msp430_workshop\
<target>\workspace\emptyUsbProject\USB_config\
g) You can close the Descriptor Tool.
4. Rename the project to lab_07d_usb.
As you can see, the reason they didn’t want us to rename the project before now was that the
descriptor tool generates files to the empty project.
5. Build, just to make sure we’re starting off with a ‘clean’ project.
Add ‘Custom’ Code to Project
6. Copy myTimer.c and myTimer.h (and the readme file) to the project folder.
We’ve already written the timer routine for you. (Look back to our Timer chapter if you want to
know the details of how this code was developed.)
Right-click the project → Add Files…
Choose the three files from the location:
C:\msp430_workshop\
<target>\lab_07d_usb\
7. Open main.c and add a #include for the myTimer.h.
We suggest doing this somewhere below #include “driverlib.h”.
7 - 44 MSP430 Workshop - USB Devices