The following applies to the MSP-EXP430G2 ONLY. The MSP-EXP430G2 comes per-programmed with a ‘Blink’-LED program. To verify that your board is working correctly, connect it via the Mini-USB cable into a USB port. The two on-board LEDs should alternate blinking red and green.
- Download the most recent version of Code Composer Studio here. (Note: Registration at ti.com will be required for you to download the file.
- Run the installation file. Make sure you right-click and select “run as administrator”.
- On the “Setup Type” select “Custom” and press “Next”
- In the “Processor Support”-tab make sure to select the “MSP430 Ultra Low Power MCUs” and any other processors from TI that you might want to program. Additional processor support requires more disk space and longer download times.
- Under “Select Components” tab, check all as follows:
- Under “Select Emulators” select “JTAG Emulator Support” and continue clicking next until installation is complete (May take a while).
Code Composer Launch
- Run Code Composer
- If you are launching it for the first time, you will be asked to Select a workspace. Pick a folder and select Use this as my default and do not ask again to not see this dialogue again. Then select OK.
- Under Licensing Options I selected CODE SIZE LIMITED (MSP430) to select a free license that limits the maximum size of files to 16KB
- Close the Welcome screen by selecting the X near the ”’TI Resource Explorer”-tab and you will then see a blank slate as follows:
Creating a Flash LED program
- To get started, select File->New..->CCS Project
- You will get the following dialogue window:
Give your desired project name (in this case “flashLED”). To select the device information, you will have to look at your MSP430 development board and read the information off the chip:
You will have to first select the proper family (MSP430), then the Variant (in my case MSP430Gxxx Family) and then the actual chip designation (in my case MSP430G2553).
- Press Finish and a default blank code will be created.
- Type your code into main.c as follows:
- After you are done typing press the debug button to check your code.
- If the ULP Advisor comes up, just click Proceed.
- You will then see the following window:
Here you see the Variable Browser, the Debug Controls, your code (main.c) and the Console Window. You will now get the option of going through your code step by step.
- The following buttons in the Debug portion give you control over your code execution. From left to right they are:
- Resume (F8) run code in real time
- Suspend (Alt+F8) Pause code that is running in real time
- Terminate (Ctrl + F2) stop code execution
- Step Into (F5) step into the function to see code
- Step Over (F6) run line of code and move to the next
- If you press Resume, your code will run in real time.
There you have it. A blinking LED light using a MSP-430G2 and Code Composer Studio. I would like give a shoutout to Embedded Labs for an MSP tutorial for an older version of CCS.