You are on page 1of 11

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

1 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

How to Convert a Project from IAR to CCS


From Texas Instruments Wiki

MAVRK is no longer an active TI evaluation platform. Please contact TI application support if you need further information on TI products or support.

Contents
1 Purpose
2 What You Will Need
3 Creating a New CCS Project
4 Adding Library Files
5 macros.ini File
6 Config.ini File
7 Include Files

Purpose
Depending on the creator of the project, some projects may be written in IAR and some in CCS. However, since CCS is the only software provided in the
MAVRK starter kit, you may sometimes need to convert a project from IAR to CCS. This page will guide you through the steps to successfully make that
conversion. We will use My First App as an example.

What You Will Need


MB-PRO-MVK - MAVRK Pro Motherboard
MCU-430F5438A-MVK- MSP430F5438A Processor Component
MAVRK Software installed on PC. Please see MAVRK Software Installation Guide (http://processors.wiki.ti.com/index.php
/MAVRK_Software_Installation_Guide).
An existing and working IAR project
Code Composer Studio v4 software installed on PC
MSP-FET430UIF - MSP430 USB Debug Interface
USB Cable (A to Micro AB) to power the MAVRK Pro motherboard
AFE_BREAKOUT_MVK Device

Creating a New CCS Project


Once you are in the CCS window, select File --> New --> CCS Project to Create a new project

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

2 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

In the settings, set the Project name to be the same as the IAR project name. Uncheck the "Use default location" box and browse to select and use the
folder that contains your IAR project files.

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

3 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

You can see your CCS files on the left side in the Project Explorer. Notice that by creating a new project, CCS has created a new main.c file. However,
we will be using the same main file as the one we used for IAR, so you can right mouse click on the new main.c file and delete it.

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

4 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

Adding Library Files


Now open up the same project on IAR. Notice that in the workspace on the left and under files there are a few folders (ie. Board Support, Common
Files). Click on the + box next to Board Support and you should see 2 .c files drop down. We will need to add these to the CCS project.

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

5 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

Now let's go back to the CCS window. Right now, we do not have the library folders. To add a folder under the project, right mouse click on the project
folder --> New --> Folder.

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

6 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

For now, let's do an example with Board Support, so name your new folder "Board Support". We want to add to the CCS Board Support folder all the
files that we see under the IAR Board Support folder. To do that, right mouse click on the Board Support folder in CCS --> New --> Files

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

7 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

When we add these library files, we want to link them instead of just adding them so that when other users open the same project on another computer,
the project will redirect itself to find the same folder on their computer. Check the "Link to file in the file system" box and click on "Variables".

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

8 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

Since we are adding library files, select LIBRARIES_DIR and then click on "Extend"

In the Variable Extension window you can expand all the folders to find the files that you want to link and add. For example purposes, click on the plus
sign next to Board Support and you should find the two files "F5438_ProMB_Com_Port_Functions.c" and
"F5438_ProMB_Modular_EVM_IO_Functions.c". Select a file and click on OK and then Finish. This will link and add the selected file to your CCS
project.
Now repeat this step for the files in all the folders you see in IAR except for "Config Files" and "Output". In other words, create folders for "Board
Support", "Common Files", "MSP Template Files", and "Peripheral Support" and then add all the files in those folders.

macros.ini File
In order for some of the configurations to work, we must include a configuration file that we will call "macros.ini". Create a new Notepad file and save it
in your project folder as "macros.ini". Copy exactly what is shown below into the file and save.

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

9 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

Config.ini File
We need to add another config file to ensure that our initial project settings are set. Open another Notepad file and as convention we will save it as
Projectname_CCS_Config.ini. For this example it would be "Basic_MAVRK_MSP430F5438_Template_CCS_Config.ini". You should also find in your
project folder a config file that is used for IAR project. It will end with "IAR.cfg". For this example, it will be the
"Basic_MAVRK_MSP430F5438_Template_Project_Settings_IAR.cfg" file. Open this file and scroll to the bottom. Copy all the -D commands you see in
the .cfg and paste them into your Config.ini file. If they are commented, keep them commented in the ini file, but keep in mind that the // convention will
not work for CCS. You must use the /* Comment */ syntax. After you have copied over all the -D commands, save and quit.
Back in the CCS window, let's link the config.ini file to our project. Right mouse click on the project and select properties.

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

10 of 11

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

Under CCS Build select MSP430 Compiler --> Command Files. Click on the add button and enter the address of your Config.ini file. In this example it
would be: "${PROJECT_DIR}\System_Demo_Projects\Basic_MAVRK_MSP430F5438_Template
\Basic_MAVRK_MSP430F5438_Template_CCS_Config.ini"

Include Files
Now the final step is to add the include files. This will make use of the macros.ini file, and in order to use the effects of the macros.ini file we must
re-open the project. So let's close the project and import it before we deal with the include files.
Next, we want to go into the project properties again, so right mouse click on the project and select properties. Then under CCS Build select MSP430
Compiler --> Include Options.
Under the "Add dir to #include search path" we will add all the include paths. The syntax for adding include file folders is with:
"${LIBRARIES_DIR}/Folder/Folder"
For example, to include the Board_Support folder we would add to the directory "${LIBRARIES_DIR}/Board_Support"
To include the MSP430F5438_Template folder under Components we would add to the directory "${LIBRARIES_DIR}/Components
/MSP430F5438_Template"
Think back at all the .c files that you added in the Adding Library Files section. Each folder that contains the .c file you added must be included in your
project. After you have added all the includes you are done and ready to run the project on CCS!
For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum
(http://e2e.ti.com/support/development_tools/mavrk/default.aspx). Please post only comments about
the article How to Convert a Project from IAR to CCS here.

Links
Amplifiers & Linear
(http://www.ti.com/lsds/ti
/analog
/amplifier_and_linear.page)
Audio (http://www.ti.com
/lsds/ti/analog/audio
/audio_overview.page)
Broadband RF/IF & Digital

DLP & MEMS


(http://www.ti.com
/lsds/ti/analog
/mems/mems.page)
High-Reliability
(http://www.ti.com
/lsds/ti/analog
/high_reliability.page)

Processors (http://www.ti.com
Switches & Multiplexers (http://www.ti.com
/lsds/ti/analog
/lsds/ti
/dsp/embedded_processor.page) /switches_and_multiplexers.page)
Temperature Sensors & Control ICs
ARM Processors
(http://www.ti.com/lsds/ti/analog
(http://www.ti.com/lsds/ti /temperature_sensor.page)
/dsp/arm.page)
Wireless Connectivity (http://focus.ti.com
Digital Signal Processors /wireless

8/18/2015 7:58 AM

How to Convert a Project from IAR to CCS - Texas Instruments Wiki

11 of 11

Radio (http://www.ti.com
/lsds/ti/analog/rfif.page)
Clocks & Timers
(http://www.ti.com/lsds/ti
/analog/clocksandtimers
/clocks_and_timers.page)
Data Converters
(http://www.ti.com/lsds/ti
/analog/dataconverters
/data_converter.page)

Interface
(http://www.ti.com
/lsds/ti/analog
/interface
/interface.page)
Logic
(http://www.ti.com
/lsds/ti/logic
/home_overview.page)
Power Management
(http://www.ti.com
/lsds/ti/analog
/powermanagement
/power_portal.page)

http://processors.wiki.ti.com/index.php/How_to_Convert_a_Project_fro...

(DSP) (http://www.ti.com /docs/wirelessoverview.tsp?familyId=2003&


/lsds/ti/dsp/home.page)
sectionId=646&tabId=2735)
Microcontrollers (MCU)
(http://www.ti.com/lsds/ti
/microcontroller
/home.page)
OMAP Applications
Processors
(http://www.ti.com/lsds/ti
/omap-applicationsprocessors/the-omapexperience.page)

Retrieved from "http://processors.wiki.ti.com/index.php?title=How_to_Convert_a_Project_from_IAR_to_CCS&oldid=110662"


Categories: MAVRK Software
This page was last modified on 2 July 2012, at 17:12.
This page has been accessed 34 times.
Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.

8/18/2015 7:58 AM

You might also like