NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
CCSv7 Grace Migration
Contents
Overview[edit]
These steps take an existing Code Composer Studio Grace project and create a new non-Grace project that preserves the Grace generated peripheral initialization code.
In the existing Grace project, all MSP430 peripheral initialization source code generated by Grace is in `<CCS workspace dir>/<Grace project dir>/src/grace`. It contains a simple makefile that builds a library, `grace.lib`, which contains the compiled form of the Grace generated sources. These steps create a new CCSv7 GraceLib project, that builds grace.lib using a modified version of the makefile.
A new MSP430 executable project is also created, which contains the existing Grace project's source code (main.c), and links with the newly created grace.lib.
Create the Grace.lib project[edit]
- In the menu File -> New -> Project..., select C/C++ -> Makefile Project with Existing Code and click Next
- In Project Name, enter GraceLib
- In Existing Code Location, Browse to `<CCS workspace dir>/<Grace project dir>/src/grace` and click OK
- In Toolchain for Indexer Settings, select TI Build Tools
- Click Finish
Make required modifications to the Grace.lib project[edit]
- Copy the file `<CCS Install Dir>/<Grace Install Dir>/packages/ti/mcu/msp430/Grace.h` into `<GraceLib project dir>/src/grace`
- Delete the file `<GraceLib project dir>/src/grace/CSL_init.c`
- Edit the file `makefile` in GraceLib project
- Remove all references to `objs/CSL_init.obj`
- In the CPPFLAGS definition, remove the include path: `-I "<CCS install dir>/<Grace install dir>/packages"`
- Build the project
Create MSP430 executable project[edit]
- Select the menu File -> New -> CCS Project
- In the Target box, select the same MSP430 peripheral as the Grace project that is being migrated
- In Project Name, enter the same as the Grace project that is being migrated
- In Project template and examples, select Empty Project and click Finish
- Copy the file `<CCS workspace dir>/<Grace project dir>/main.c` into this project
- Edit the `main.c`
- Change `#include <ti/mcu/msp430/Grace.h>` to `<Grace.h>`
- Right-click on the project in Project Explorer and select Properties
- Select Build -> MSP430 Compiler -> Include Options
- In the Add dir to #include search path box, click Add... and Browse... to `<GraceLib project dir>/src/grace` and select OK
- Select Build -> MSP430 Linker -> File search path
- In the Include library file or command file as input box, click Add... and enter `grace.lib`
- In the Add <dir> to library search path box, click Add... and Browse... to `<GraceLib project dir>/src/grace` and select OK
- Select Build -> MSP430 Compiler -> Include Options
- Build the project
- Done
Code Composer Studio 6 dependencies[edit]
The newly created GraceLib makefile project is still dependent on Code Composer Studio 6 CodeGen tools and MSP430 driverlib.
The following steps can be taken to remove these dependencies
- Change CCSv6 include paths
- Edit the file `makefile` in GraceLib project
- In the CCOPTS definition, change all include paths that reference `<CCSv6 install dir>/ccsv6` to `<CCSv7 install dir>/ccsv7`
- Edit the file `makefile` in GraceLib project
- Use CCSv7 CodeGen tools
- Edit the file `makefile` in GraceLib project
- Change all occurrences of `<CCSv6 install dir>/ccsv6/tools/compiler/ti-cgt-msp430_4.4.3` to `<CCSv7 install dir>/ccsv7/tools/compiler/ti-cgt-msp430_16.9.0.LTS` (version numbers may be different)
- Edit the file `makefile` in GraceLib project
- Use the latest MSP430 driverlib
- Install MSP430Ware with Resource Explorer
- Edit the file `makefile` in GraceLib project
- Change all occurrences of `<CCSv6 install dir>/msp430/driverlib_2_30_00_49` to `C:/ti/tirex-content/msp/MSP430Ware_3_60_00_10/driverlib` (version numbers may be different)