A Beginner's guide to Code Composer Studio



hello everyone I'm at the corral today near my friend Krishna Chaitanya I'm going to talk about how we could run the code composer IDE and also we put you up to speed about how we going to install it and run an MSD 430 program on it so today we can all have a basic brief introduction of the CCS and also we're going to talk about the basic installation of the CCS and you'd also have information about what the msp430 exactly does and at the end of today's session you could also bring your very own LED using the code provided to you by us now I'm going to talk about the view of be brief introduction about CCS CCS is an IDE that supports the Texas Instruments microcontroller embedded processors portfolio the comprises of tools used to develop and debug embedded applications it also includes the C C++ compiler a source code editor project development environment or profiler a debugger other features it provides a single user interface now the good thing about CCS is that it merges the advantages from Eclipse and visual studio and along with that it also has an embedded debugging capabilities now I'm going to talk about installation installation of the CCSS now the only way we could install CCS is from the official of Texas Instrument website so what we need dye Mellie is a Texas Instrument login ID and password if you don't have one you have to make one so as you get to this page or your fluids click on now you have to choose whether you have a lineage or depending on whether you have a Linux or Windows connection small glitch I've tied again so yeah you can choose accordingly yeah so based on your operating system you could choose either the nuts or windows and then you get to this page wherein you fill in your email address and password and if you're a new user you could log in through the right side of the page now the thing about this particular IDE is that it needs to be exported from the from the United States and it requires an approval so a lot of details you need to fill in here and once you do you can get the you can download the installation file we've already got the installation file Bengali now my friend Krishna Chaitanya would explain to you how we can go about to the installation process so as my friend was talking about the installation procedure the setup file has now been put on to the desktop so this is a setup file are you should be looking for Samanta setup file we used to open it it requires special password permissions so enter your password yeah so this is the License Agreement it's very similar to most license agreements that you see em when you in so many other softwares so so you click on the accept terms and license checkbox after reading the under conditions that have been proud okay so now this is basically the folder where you want to install the code composer studio at this folder is Jenny it's at virus we'll pay to install it in C but in case you have you don't have a new space in C before always click on the Browse button and install it into the the director you want to install it and do then once you've selected the directory where you want to install it just click on the next button okay so we click on the next button and these are different options which you can use when you install code composer studio version 5 and these are all the different devices these are all the different processors which are supported by this version of code composer studio v5 setup so basically you can select all these if you want all these but generally what happened in our case we're just using msp430 lower params use so we are now going to select anything else but this is this once you select the processors that you need you just click on the next button and then these are different compiler tools which would be installed on your computer as a part of this package and this also simulator so you keep on next this is the total amount of size is the total amount of insulation size that is required on your drives for the program becoming installed now after you verify the design of space you have to click next if your field is no no space we have to go back and then change your directory so this is this installs the DC tools and the runtime libraries we just click Next now this is basically a summary of all the programs that are going to be installed on your Congress system as a part of the set up so once you click on next it's going to start installing the all the packages of you selected so far but then we already have such an installation done before so which is going to take you directly to the installation this is relation may typically take around 15 to 20 minutes depending upon how fast or slow your computer is I'm going to show you directly on which its installed on this computer so I've been started on D Drive since is ample space available and P Drive its installed in the folder TI so now this is the folder which contains all the packages that we have selected for installation so CCS v5 is code composer studio 5vs5 and this is the option to uninstall it to the case mode uninstall it and keep away eclipse and then opening this executable application will direct you to the IDE which allows you to write programs that can be run on all the processes that have been installed onto this particular computer so now I let my friends go and tell you about before I talk to you about what the project exactly does I'll tell you what exactly msp430 is so msp430 is a mixed signal microcontroller family and it's developed by Texas Instruments and it's built around a 16-bit CPU and the msp430 is rifle or for a low cost and specifically low power consumption embedded system applications now I go ahead and show you what exactly a CCSD does okay so when you first open the CCS tool you get this window you could go about reading what exactly does about its highlights in the analyzers in the resource Explorer okay so once you do open the CCS tool or there's gonna be a prompt which asks you what what kind of license you exactly have so what we have here is the free 90-day trial but in case you've bought it you could in you could input your username in your password so now I'll show you what exactly is going on in here so you've got a console this area is called the console this is wearing the exact printf statements and what exactly the exact output of your program comes in and also if there are any errors in warnings you can be displayed here now I'll show you how exactly we could make our project so we could go and click on new project so what exactly we gonna do because he's not on our code composer studio next so we're gonna blink an LED so that is call it blink so what exactly is the output time it's an executable type and the up primary focus is the msp430 yes we've told you the picnic so they're different variables variants available for the msp430 we could select the energy for 38 af 253 if this is the location in which we could save our project work spacing so you could either use the default location or if you want which we've selected during the installation procedure or you could drowse and save it somewhere else so right now we're gonna select an empty project cuz that's how we started with me and see so with me and see what the difference between an empty project energy project with main.c is this is that we could within with the empty project we would have the NC function but presented to you by default but empty project which means you would have the main C function to send it to you by default yeah so this is what it looks like when you do select Amaechi project so it's really important for us to first select a view so we want to see the entire view of our projects we click on the project Explorer yeah so this is the bling program which we've used earlier and the explaining explaining it to you so what we have here is our main program and within it we've got we've defined a variable called I which is of integer type so what the first statement here does is it stops the watchdog timer now what exactly is a watchdog timer so what a watchdog timer does in your program is it makes sure that your program doesn't get stuck so it can get stuck in an infinite loop or any other or if it in case there's an interrupt which occurs so the many reasons that for your program to get stuck so what the Watts tag watchdog timer does is it prevents that but for our current led program we don't really need it so we disable the entire watchdog timer facility now we primarily using two ports one is in each – – one and the other is in eastern edge to zero and we use an infinite loop as you can see here and what we're doing right now is this is basically another way of showing an xor xor statement so what you're doing is so when you're providing the LED with the value one it close and when you're giving it a value of zero that's when it's off so you want this to happen at regular intervals time and again you want this toggling to happen over and over again right that's that's the entire way in which in an LED could flow and you can see it so this entire thing needs to be within it has to yes so for the LEDs to clove we need a delay involved with it so what this force for loop here does is it provides that DNA so that there's a blinking between the LED so as you increase this value the frequency of the LED blinking would decrease so you would have a la you would have a larger time gap between each glow now I'm going to hand it over to my friend Krishna who's going to talk about the development environment of CCS minam environment of pts basically it's not off with a host computer the host computer is one on which CCS is running and msp430 DSP is the board that you have on which you may execute the code and on the host computer the platform itself it starts off with the host computer on the target and it then adds a real-time from the shewn consisting of a library of objects which are called PSP or BIOS and we also have a real-time communication channel which is at EDX it's it's known as real-time data exchange channel so the use of this is in case you want to add some data during wear while the program is running you don't they only have to stop the entire program the coins can be inserted and signals can be sent to the code as an unnecessary and this functionality was first implemented but I owned by TI and reverse the family of focuses is a functionality and on top of this you have the program build mode and you have the debug mode and real-time analysis and the application that we have developed in our case we have tada a program to blink an LED in this so the application and this context is the program to blink the LED and we have the code composer studio which runs on top of all these people use and then different plug-in tools can also be different bugging tables from various third parties can also be used in code composer studio in effect what this does is you can you have you can add more functionality to your program and this is the list of families that are supported by this particular version of CCS it supports MSP lopa MCU C 2000 real-time C use simple ink wireless MC who still makes the m4x MCU is C idara multi-code ESP and a RL and now i'll show you how to compile a particular code that has been developed so initially what we have to do is you need to go to the includes file the project right now is blink this is the code which is explained here with my friend so first of all we need to add the path which you can find in properties and in properties you need look at the include options now the include options basically contains the directory the path to the root folder which contains all the header files and other necessary files which are required for the proper running of the CCS for so in our case we had installed it in D / VI CCS v5 so you'll be able to find the root folder in a similar path depending upon the directory in which you installed it so this is the button which you have to press to add a new path and once this path has been added you just click on OK and the system updates itself so now our new paths being generated so our program has already been billed but then you probably were going to have a symbol which once you build fineries are going to be generated and these binaries are the key to executing the code and then after in case we have no errors then what we can do is you can go ahead and debug the code and after that it can be run on the board provided you have USB connection to it yeah so basically this is the code and here we have the grilled option so you need to once so you've got a build and once you build your certainly going to get up new warnings these warnings are related to the interrupt service routines which you're not currently using in this program so the warnings can be ignored and then we have to click on the debug button and then the debug occurs oh here we have Dino USB a pity I found problem basically what we have to do is we need to connect the board to our USB to the computer on which CCS is running and then you gotta click on retry so in that case asaro be solved and then you can observe the output on the gore Theory will be growing and now it handed over to my friends just to tell you a little bit about msp430 processor exactly show you how the LEDs are glowing so what I can show you is a diagram so as you can see there's a picture of the board and you find the LED lights in the corner here and this would curve this will toggle on and off depending on the delay you used in the program and that can be varied according to the problem as I spoke about before yeah now this talks about the basic msp430 architecture yeah it's very similar to the other microcontrollers we've used before so it's got a basic peripherals there are the flash and the agrestic asynchronous clock in the synchronous clock and also got a CPU 16-bit reduced instruction set CPU that is and it's called a watchdog which I spoke about before this prevents a program from getting stuck and yes that's about it and this is the end of our presentation here and I hope you guys learned a lot today and I hope your LEDs are successfully clean thank you you

8 thoughts on “A Beginner's guide to Code Composer Studio

  1. Hi . You can specify how to retrieve their individual bits in one port of MSP432? eg retrieving such P2.5 bit. CCS uses cloud and used his structure "with struct union .." .. Hope you without feedback soon .. thanks a lot…

Leave a Reply

Your email address will not be published. Required fields are marked *