TI currently releases MSP430 Energy Library v2 which can be downloaded at the following link. The enery library software is available for both MSP430 IAR and CCS (Code Composer Studio) compiler, though at the moment the User's Guide doesn't explicitly describe the availability of the CCS version.
This post describes step by step guide to import and compile the MSP430 Enery Library examples with CCS 5.5.00077.
Extracting Software Package
Download the MSP430 Energy Library software package in form of a ZIP file (Salc488.zip), and extract it e.g. at C:\ folder.
The CCS project files can be found under "Code Library\emeter\ccs_workspace" folder.
Importing The Energy Library Projects into CCS
Start CCS IDE, and please refer to the following guide for importing CCS projects. Import all projects uder "Code Library\emeter\ccs_workspace" folder. One thing to be noticed is to leave the "Copy projects into workspace" option.
Compiling Emeter CCS Projects
There are three types of projects in the enery library software package: toolkit library (emeter-toolkit-xxx projects - xxx is the device type), metrology library (emeter-metrology-xxx), and example application (emeter-app-xxx). For each device type, the order of project compilation shall be:
1. toolkit library
2. metrology library
3. example application
Before being able to compile the libraries and the example application, it is necessary to set the EMETER_SOURCES linked source path variable. To do this, right click the active project, and go to "Properties", then under "Resource" -> "Linked Resources" -> "Path Variables", add the new EMETER_SOURCES path variable which point to the "Code Library\emeter" folder as shown follow:
After this compile the libraries and example project with the order as described above. The following example shows the compilation steps for the MSP430FE427A projects (emeter-toolkit-427a, emeter-metrology-427a, emeter-app-427a).
(1) first step is to compile the toolkit library emeter-toolkit-427a - compilation of emeter-toolkit-427a.lib shall succeed
(2) second step is the metrology library emeter-metrology-427a - compilation of emeter-metrology-427a.lib shall succeed
(3) third and findal step is the application example emeter-app-427a - compilation of emeter-app-427a.out shall succeed