Search This Blog

Saturday, March 17, 2018

Introduction to Code Composer Studio - Creating your First Project

Obvious is not that obvious. One of my friends wanted to learn CCS and work on C2000. While teaching him the same it came to my realization that some of the most obvious things are not that obvious to the first timers. So here in this post i try to capture the question and process i followed to catch him up with the CCS and C2000.

Before we jump in making something with C2000 lets understand what is the IDE(Integrated Development Environment) that is the Code Composer Studio. Lets see how we can make first project in it and understand the workspace and paths that are assigned to it.


First Project

Step - 1 - Workspace Path

So when you open the Code Composer Studio for the first time ever you will be asked to provide with a workspace path. It is utmost importance that one understand that the workspace is a different from a project path. Under a single workspace you can have multiple projects. Each project inside a workplace will have a unique name. Workspace especially comes in handy when working with repositories as each branch or a different working copy of a project can be contained in a different workspace. Point to note is that projects are the ones that are revision controller and not the workspace. The only reason a workspace can be put under a revision control is when all the users of the repository will be using the same version or same set of tools.

So yes the first thing that Code Composer Studio will ask you is to provide with a workspace path. It looks something like shown below.

Step - 1 - Provide a Workspace Path

Step - 2 New CCS Project


  1. Now when the workspace is loaded. You will find it empty. 
  2. There will be no projects in the project explorer. You can check yourself by clicking on the project explorer as highlighted in the image below. So this means you need to create a first project. 
  3. So go to the project tab and select the new project. Project -> New CCS Project.
  4. A new project dialog will open as also depicted in the image below.

Step - 2 - Create A New CCS Project

Step - 3 - Finalize the Project Details

The final step in creating the new project is to 
  1. Define the target architecture
  2. Select the processor for that architecture
  3. Optionally you can select how you want to connect to your processor board.
  4. Provide a unique project name for the workspace
  5. Provide a location where the project will be stored. [For standalone you can use the default location that is the workspace. However as i work with repository i usually keep it outside some other place. All the path used in the workspace i define relative to the project location. This allows for easy transition from one developer to another.]
  6. Provide a compiler version you will be using with this project. One can say you will be compiling the project with. 
  7. Last item is to provide a template. A template consists of a set of path that is predefined for includes or compiler flags and other stuff which are out of the scope of this post.

Step - 3 - Finalize the project details

Notes: 

  1. Target is what is called architecture of the processor. Selecting a general processor will make your code work across multitude of architecture. To specifically use the features of any architecture better to use the target architecture you are going to work with. 
  2. Under each target architecture there exists multiple processors. So the second selection is what processor is being used. In our case it is 28377D so hence the selected processor.
  3. Connection is what is used to connect to your processor. The launchpad series comes with on board JTAG. Hence in most of common basic cases it will be USB Probe. 
  4. Location of the project. This is ones personal choice. As i work with repository i tend to keep project location separate from the workspace location. Allows to just push the project into repository and not the entire workspace. Also helps in mapping path based on project location variable.
  5. Compiler version. Nowadays the TI comes with LTS compilers that you can download from the AppCentre of the Code Composer Studio. In this case it will work with 18.x.x version.
  6. Template are a means for developer to ensure that basic things are met whenever a new project is created for your board. For example : Driver files are usually included in the template for your specific board as this will remain common for whatever project you are creating for your board. 

I will keep on updating the post as i find proper queries.

1 comment: