Your SlideShare is downloading. ×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Getting started with code composer studio v3.3 for tms320 f2812

2,317
views

Published on

To understand the basic features and functions to create and debug a project in CCS v3.3 …

To understand the basic features and functions to create and debug a project in CCS v3.3
To get familar with CCS v3.3
More in-depth explanations of Code Composer Studio’s various features .
Ex: Breakpoints,watch window, single stepping, memory etc..,
Finally, you will able to work with CCS v3.3

Published in: Education, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,317
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
80
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Getting Started with CodeComposer Studio v3.3 forTMS320F2812
  • 2. OBJECTIVETo understand the basic features andfunctions to create and debug a project in CCSv3.3To get familar with CCS v3.3More in-depth explanations of CodeComposer Studio’s various features .Ex: Breakpoints,watch window, single stepping,memory etc..,Finally, you will able to work with CCS v3.3
  • 3. IntroductionCode Composer Studio is the IntegratedDesign Environment for the Texas InstrumentsDSP/DSC/MC.DSP – TMS320C6745DSC – TMS320F2812MC – MSP430F5529Code Composer Studio is the environment forproject development for all tools needed tobuild an application for the Specific Target.
  • 4. Contents at a GlanceSetting up a TargetCreate a projectBulid a ProjectRunning a projectBreakpointsSource steppingWatch window
  • 5. Launching The CCS v3.3 Click this icon shown on yourdesktop. To launch Code Composer StudioIDE for the first time, configure CodeComposer Studio for a specific target.
  • 6. Setting Up The Target Double-click theSetup CCStudio iconon desktop.
  • 7. Target InformationIn Family, Select C28xx.In platform, Select XDS 100 USB Emulator.In Endianness, Select little.Then Select F2812 XDS100 USB Emulatorfactory board.Select Add.Select Save and Quit.
  • 8. Creating a New Project Launch Code Composer Studio. From the CCStudio Project menu, choose New.
  • 9. Project Name : Type the project name.Location field : Type or browse to the folder where youwant to save projectBy default, Project Type is set as Executable (.out) andTarget is set as the current configuration of CCS.
  • 10. From the CCStudio File menu, choose New – SourceFile.
  • 11. Type the program in untitled window then , File –Save. The Save As dialog box will appear. Choose ourproject path and type practice.c – Click save.
  • 12. Add files to the project by choosing Add Files toProject from the Project menu. You can also right-clickthe project in the Project View window on the left andthen select Add Files to Project.
  • 13. Add practice.c, DSP281x_GlobalVariableDefs.c, andF2812_EzDSP_RAM_lnk.cmd (this is a linker commandfile that maps sections to memory) from the folder youcreated.
  • 14. Project - Build Options.In compiler tab –preprocessor -Include Search Path(-i) :C:tidcsc28DSP281xv120DSP281x_headersinclude - preprocessor path
  • 15. In linker tab,1. Select Basic –a. stack size(-stack):0x4002. Select Libraries –a. Search path(-i):C:CCStudio_v3.3C2000cgtoolslibb. Incl Libraries(-l):rts2800_ml.lib3. Click Ok.
  • 16. Now that you have created a functional program, youcan build it. Use the Project - Rebuild AllThe Rebuild AllCommand ismainly used torebuild theproject when theproject optionsor any files in theproject havechanged.
  • 17. An output window will show the build process andstatus. When the build is finished, the output windowwill display Build complete 0 errors, 0 warnings.
  • 18. Connecting the TargetNote: Before doing this step be sure that powercable and usb cable has plugged.After the program has been built successfully,connect the target by going to Debug - Connect.The Target is now connected with code composerstudio, at once the disassembly window will open.Status Displayed in status bar at the bottom of theCCStudio window.
  • 19. Load the ProjectAfter the Target has been connected successfully,load the program by going to File - Load Program. Bydefault, CCS IDE will create a subdirectory calledDebug within your project directory and store the.out file in it. Select practice.out and click Open toload the program.File – Load Program – Debug – open – Practice.out –open.Note: Remember to reload the program by choosingFile - Reload Program if you rebuild the project aftermaking changes.
  • 20. Go MainTo begin execution of the Main function,Select, Debug – Go Main. The execution halts at the Main function and youwill notice the program counter (yellow arrow) in theleft margin beside the function. This is called theselection margin.
  • 21. BreakPointsTo set a breakpoint, place the cursor on the desiredline and press F9 or by selecting the ToggleBreakpoint toolbar button.When a breakpoint has been set, a red icon willappear in the selection margin. To remove thebreakpoint, simply press F9 or the Toggle Breakpointtoolbar button again. You can also open the Breakpoints Manager ( Debug– Breakpoints ) to view all the breakpoints, set newones, or change the breakpoint action.
  • 22. In practice.c, set a breakpoint at the line: k=i*i; Asexecution was halted at the main function(in go mainstep),Select Debug – Run , you can press F5 , select theRun toolbar button to run the program. Once execution reaches the breakpoint, it halts, asdisplayed in the status bar at the bottom of theCCStudio window.After reached the breakpoint, it halts later you giverun or Single stepping. Now we will see the sourcestepping to run further.
  • 23. Source SteppingSource stepping is only possible when programexecution has been halted. Since you halted at thebreakpoint, you can now execute the program lineby line using source stepping.
  • 24. Step into the while(1) Loop function by selecting theSource-Single Step button on the side toolbar. Stepthrough a few times to observe the executions. TheStep Over and Step Out functions are also availablebelow the Single Step button.Assembly stepping is also available. Whereas sourcestepping steps through the lines of code, assemblystepping steps through the assembly instructions.Now we will see something about Watch Window,later we follow the execution of above exampleprogram, then we understand about breakpoints ,source stepping and watch window together.
  • 25. Watch WindowIn the debugging process, you should view the valueof the variables to ensure that the function executesproperly. Variables can be viewed in the watchwindow when the CPU has been halted.The watch window can be opened by selecting View– Watch Window. The Watch Locals tab shows all therelevant variables in the current execution. Once theprogram reached breakpoint then , it halts.Select , View – Watch Window., watch window boxappear in ccs itself
  • 26. As you continue to Step Into the while loop, thevalues of the variables change through eachexecution.Example: As per our previous discussion, programexecution reached breakpoint then it halts, weopened the watch window to viewing the varibles.Now the value of k is zero, then follow the belowsteps to understand breakpoint, source stepping andwatch window. Degug – run (or) click this icon Nowsee the watch window
  • 27. Again Degug – run (or) click this iconNow see the watch window
  • 28. In addition, you can view the values of specificvariables by hovering the mouse pointer over thevariable or by placing the variables in the Watch1 tab.
  • 29. Output Window The Output window islocated at the bottomof the screen by default.It can also be accessedby View – OutputWindow. By default, theprintf function displaysthe same Outputwindow, showinginformation such as thecontents of Stdout andthe build log.
  • 30. HelpCCS provides many help tools through the Helpmenu. Select Help Contents to search by contents.Select Help Tutorial to access tutorials to guide youthrough the CCStudio development process.Select Help Web Resources to obtain the mostcurrent help topics and other guidance. Usermanuals are PDF files that provide information onspecific features or processes.You can access updates and a number of optionalplug-ins through Help Update Advisor.
  • 31. Presented byS.THIYAGARAJAN,Senior R & D Engg,Pantech Solutions,Chennai - 96THANK YOU