Code Composer Studio Project Setup for beginners

Code Composer Studio Project Setup for beginners

hello everyone! welcome to this video
tutorial. In this video I am going to show you how
to create your first project in code composer studio. I think you guys already
installed code composer studio and control suite in your computer. If you have already not done that please do that first and then come back to this video tutorial again. Okay, to create a new project go to file>new>CCS project: You have to remember two important things here, okay. What is this target device? As I already have some projects in my project Explorer, this is by default,.. the device is already selected. So I selected this device
earlier but in your case, this might not be the case so it might be anything okay, so it scroll… scroll down this list and find TMS 320 f28 335 okay you have to do
this otherwise this will not work okay and the second one is this debug probe
okay you have to select Texas Instruments XD s100 version 2 is the
debug probe from this list if it is not selected by default place look into this
list and find this debug probe okay actually you can verify this if this
debug probe is compatible with your microcontroller or not okay to do that
connect your microcontroller to this computer turn on the microcontroller if you turn on the microcontroller the
green LED will be on on your docking station and control card now click this
verify button you will see something like this
if you see something like this then it is working okay
click this finish button now if you select a different debug probe or if you
turn off your microcontroller let’s select this one and if you click paper
button you will see something like this this error okay if you see some error
like this then you have to select different debug probe okay let’s go back
to that version 2 I have heard that some people find error using this version 2
so if you see any error using this version 2 select version 1 and version 3
and I verified that to know we whiskey but probe is working with a
microcontroller okay most probably this version 2 will work with your
microcontroller ok so I’m selecting this debug probe now you have to keep a
project name for now in this project I’m going to just blink an LED so I will
write the name as LED blink okay so you can give any appropriate name that you
think and click this finish button ok so now this project has been created if you
expand this folder you can see there are different subfolders and it also created
a main door sefa for now I’m going to delete this vendor
so far I’m deleting this file so that I can create different folder for source
file and my header files to create a folder under your project right-click on
the project and good a new folder I will create a source folder
okay and I will also create an include folder the same procedure right click on
the project name got a new select folder and read the name finish okay now we
have to add some more functions here from control suite we are doing the
doing we are copying some folder from control suite here to reduce some extra
pressure here okay if you don’t do that you have to create
a lot of extra functions like math functions and any other functions okay
so to make our job easier we are just going to copy those functions so how we
can do that to do that right click on your project file got a new same theme
folder but here go to Advanced tab and select this link to alternate location
okay so we are going to link those folders from control suite to our
project now browse the location if you follow the instructions when you
installed code composer studio and control suite you will find that folder
in local disk c TI control suite and device support F 2 8 3 3 X 2 8 3 3 X
this folder version 142 and this common ok click OK you will see this name here
finish this okay if you expand this folder you will
see five subfolders here we don’t need all of these folders okay actually we
have to exclude some folders from build process because some folders create some
redundancy that will create some error while compiling the program to do that
right click on the folder click salute from it in from this folder we will need
only source and include folder so we have to exclude command folder this
folder and this library folder to do that right-click on the folder that you
want to exclude from build and select here exclude from built so although this
folder is linked here right now but our program will not use this ok so do the
same thing for this folder right-click on it
it’s cute built do the same thing right-click exclude from build for this
folder so you can see now the name of this folder sir fate so these are
excluded from this program ok we have to link another folder the same procedure
right click on the project name good a new folder advanced link to alternate
location browse the same location control suite device support f28 3 3 X
place version 142 and headers ok ok and click this finish button okay if you expand this folder you will
see four subfolders here we have to do the same thing as we did here to make it
work we need this command folder this include for the resource folder but we
do have to exclude this folder from compiling okay
right-click on this folder and exclude this folder from built okay we have to
exclude some other files from our program so if you expand this command
folder you see two BIOS files here okay so this bias files are some kind of
redundant we have to exclude these BIOS file ok so right click on this file and
exclude from built okay so this exclude process and linking process is very
important so I recommend you guys to be patient and follow the instructions
properly so that you can make your first program work okay okay now we have to
exclude some other files so this process is kind of boring but we have to do that
ok if you go to this source folder under DSP 2 8 3 3 X underscore come on you
will see these different files and folders here we have to exclude these
two files ok I will provide a exclude file and folder list in the video
description so if you miss anything or if your program doesn’t work you can go
back to that list and make sure that you exclude it all the nice
all the extra redundant files and folders okay right click on this file
exclude from built do the same thing for this file excellent from built okay now
we kind of excluded all the redundant files and folders but we don’t have any
course or main source files so we have to create the main source file okay to
do that right-click on the source file on the source folder and get a new
select source file and given him main dot C this extension is important you
have to put the proper extension here okay so click finish now this will just
create this default template I’m going to delete this I will provide you the
source file and header files that we are going to use here so open up those files
and copy the text I will upload those files on canvas and I will also upload a
link up those files in the video description okay so open up those files select all and copy and paste here okay
so let me describe in brief all of this I am NOT going to explain in details but
I will only tell you where you can make a chance
don’t make any chance if you don’t know what you were doing okay so these things
are necessary these things these things is to declare a function that I wrote at
the end of this main dercci file the function is here this is just a delay
loop this function basically that’s nothing it only counts from zero
to 1 million okay and I use this function to create some dealer this is
not a good practice to create the dealer but as it is a simple program we had not
doing anything else so we can do this okay so these things I’m not going to
explain these things please don’t change anything here this is there we will
write another source file that we are calling that function here so whatever
we write there whether we initialize there that will be also initialized in
our program don’t change anything here so you can read out these comments to
learn a little bit more on these things okay so you can write your code here so
what I’m doing here this line of code is to toggle the state of GPIO third one
pin if the current state of GPIO 31 is 0 this line of code will make it 1 and it
will call the delay loop function this function will count from 0 to 1 million
to give us some delay and then this line of code will again toggle that beat so
make it will make that beat from 1 to 0 and these thing continues on for
infinite time ok there is a reason of selecting this particular GPIO 31 pin
this is because in the docking station in the control chart there is an red LED
that is connected to this GPL 31 pin so I am selecting this pin for this toggle
operation so that we can see the flashing
of that little LED on our control cart okay okay so let’s go back to this
source folder right click on it created new source file that is GPIO in it dot C as I already provided you the source
file copy that file copy the text everything and paste the text here okay
so this is the main code and these things you need to have these things in
your code if you want to configure any other GPIO pin you can make chains here
and explanation of these things how it works
is already provided in the lecture note that I uploaded on canvas I will also
post a link of the document in the description of this video
okay now we have to create some header files so right click on the include
folder create new header file right main that is as I said the extension is
important you have to write proper extension here finish you don’t have to
do anything you don’t have to write anything here let’s create another
header file that will be GPIO in it dot ace so the name is same except the
extension as the source files that we created you have to write a simple line
of code here and that is just that to declare the GPIO you need dot C function okay so basically we are done creating our
project let’s try to build our project if we do everything properly we will be
successful to build our project to build the project select the project folder
and click this little hammer icon okay it has some errors let me figure out
what is the error okay so I found out what the error is okay so basically we
have some header files but our compiler doesn’t know where to look
although we included these files and folders but we didn’t tell our compiler
that we have those header files somewhere here okay we have to do that
to do that right click on the project file go to properties include option
good include options here click on this Add icon select this world place tab go
to the project folder so this is my project current project that I own that
I am working on expand this so we have expand this DSP to 8 3 3 X common folder
and select this include folder so what we are doing we are telling our compiler
that we have some header files here ok click OK we have to do the same thing
again work workspace the project headers DSP 2 8 3 3 X headers include ok we have
to do this one more time put workspace project folder and these includes folder click apply and close now I hope we will
be successful to build our project click again this little hammer icon and built finished without any error or
do we have a warning it’s okay now let’s check if we can run this code into the
microcontroller to do that connect your microcontroller and turn on
your microcontroller and click this debug icon here okay when this button
becomes green click on this wisdom icon and you will see the little red LED
flashing on the control card this process might seem boring but to make
your project work you have to follow everything okay
don’t rush don’t skip anything at least for the first time follow everything
that I showed here okay if you follow everything I hope you will be able to
successfully run your code into your microcontroller if you see any problem
if you see anything any issue if you cannot run your code on your
microcontroller if you cannot build your code please let me know you can comment
in this video or you can send me an email I will get back to you as soon as
possible thank you everyone have a good day

Comments (5)

  1. Thank you…my first time using TI …setting up the compiler is painful everything seems like a battle …but thank you for you insight…it helped

  2. Hi Roy,
    Thanks for the video, quite informative. In the final step, to push the code into the microcontroller, you had connected the microcontroller to the PC. Is this connection using FET or without using an FET?


  3. Thank you very much Chondon for this video. I was struggling to work on CCS version 9 with CCS version 3 tutorials. Because of this video I successfully executed my code on DSP TMS320F28335. Subscribing your channel now.
    Can you please upload video for generating PWM signal for 3 phase 5 level inverter?

  4. thank you for the video , i m using CC1352R SimpleLink , and i relay don't know how to started , cant find the files that i should add to the project folder
    plz help i'm relay confused

  5. The TI IDE is hopelessly muddled and complex. The chance of a "beginner" sorting this all out is zero. PlatformIO IDE is a better example of what we want.

Comment here