Getting started with Code Composer Studio V4
Transcription
Getting started with Code Composer Studio V4
DSP HOW-TO GUIDE Getting started with Code Composer Studio V4 FOR TMS320F2812 Contents at a Glance 1. Introduction of Code Composer Studio ......................3 2. Launching The Code Composer Studio V4 ..................4 3. Setting The Workspace Location ................................4 4. Create a New Project .................................................6 5. Add a Files to Project ............................................... 12 6. Create a Target Configuration File ........................... 14 7. Build a Project ......................................................... 16 8. Run a project ........................................................... 18 9. Console Window ..................................................... 23 10. Help ........................................................................ 24 Join the Technical Community Today! http://www.pantechsolutions.net 1. Introduction of Code Composer Studio Code Composer Studio Integrated Design Environment for the C2000 Family of Texas Instruments Digital Signal Processors. Simply, Code Composer Studio is the environment for project development for all tools needed to build an application for the C2000-Family. The objective of this module is to understand the basic functions of the Code Composer Studio v4, how to create and debug a project in CCS v4 for TMS320F2812/F28335 kit. This following section will introduces some of the basic features and functions in Code Composer Studio so you can create and build simple projects. Experienced users can proceed to the following sections for more in-depth explanations of Code Composer Studio’s various features. Finally, you will able to work the TYRO-TMS320F2812/TYRO TMS320F28335 kit with CCS v4 Join the Technical Community Today! http://www.pantechsolutions.net 2. Launching The Code Composer Studio V4 Click this icon shown on your desktop. A prompt will appear asking for a workspace location. To launch Code Composer Studio IDE for the first time, configure Code Composer Studio for a fixed workspace location. 3. Setting The Workspace Location To create a workspace location using a standard configuration file: 1. Double-click the Setup CCStudio icon on desktop. Join the Technical Community Today! http://www.pantechsolutions.net The workspace launcher dialog box appears. Note: Be sure that workspace location is empty for a fresh project 2. Tick the use this as the default and do not ask again(Optional). Note: Again to get the workspace launcher at startup. open ccs go to window – preference – general – startup and shutdown – tick “prompt for workspace on startup”. 3. Click ok. 4. The empty workspace editor will open. Join the Technical Community Today! http://www.pantechsolutions.net 4. Create a New Project To create a project, follow these steps: 1. Launch Code Composer Studio. See Chapter 2 2. From the CCStudio File menu, choose New – CCS Project. New CCS Project dialog box appears. Join the Technical Community Today! http://www.pantechsolutions.net 3. In the Project Name field, type the project name & click Next. 4. Tick the use default Location field, type or browse to the folder you created as workspace loaction. Click Next. Join the Technical Community Today! http://www.pantechsolutions.net 5. In the Project type field, Select C2000. 6. Tick Debug and Release in configuration box. Click Next. 7. Then also, Click Next. 8. In output Type, select the Executable. Join the Technical Community Today! http://www.pantechsolutions.net 9. In Device Variant , Choose TMS320C28XX & TMS320F2812. 10. Click Finish. Code Composer Studio creates a project file called practice.pjt. This file stores your project settings and references the various files used by your project. Join the Technical Community Today! http://www.pantechsolutions.net 11.From the CCStudio C/C++ Projects, Right click the led [ Active – Debug ] New – Source File. 12.In the source file field, Type the source file name with extension. (led.c) Join the Technical Community Today! http://www.pantechsolutions.net 13. Click Finish. 14. Type the program in led.c editorwindow then , File – Save. Join the Technical Community Today! http://www.pantechsolutions.net 5. Add a Files to Project After Creating the project and source file we must add some addition files to our project. These addition files may vary depend upon the projects which we used. Create/add new source files to your project by right-clicking on the project in the “C/C++ Projects” 1. From the CCStudio C/C++ Projects, Right click the led [ Active – Debug ] Select the Add files to project. Join the Technical Community Today! http://www.pantechsolutions.net 2. Then browse and select all the needed files. 3. Click Open. The selected all the files are added to your project. Join the Technical Community Today! http://www.pantechsolutions.net 6. Create a Target Configuration File 1. From the CCStudio C/C++ Projects, Right click the led [ Active – Debug ] New – Source File. 2. New Target Configuration dialog appears. Then Click Finish Join the Technical Community Today! http://www.pantechsolutions.net NewTargetConfiguration.ccxml will open, This will help to communicate between hardware and softeware. While connecting the hardware to the software the target configuration file will run. If any initialize needed we can add gel file additionally in the target configuration. 3. In General setup, there are more connection available to choose. Accorcding to our board, we have to choose XDS 100 USB emulator version 1 and TMS320F2812( Target Device ). Join the Technical Community Today! http://www.pantechsolutions.net 4. Tick the TMS320F2812 & Click Save. 7. Build a Project Before Building the project we must modify project properties , add the include files and path according to our usage. 1. From the CCStudio C/C++ Projects, Right click the led [ Active – Debug ] – Properties. 2. In C/C++ Build, go to C2000 compiler a. Include Options (Add dir to #include search path(-include_path,-I)) select this add icon and add the following three path by indivdually. "${XDAIS_CG_ROOT}/packages/ti/xdais" "C:/tidcs/c28/DSP281x/v120/DSP281x_headers /include" Join the Technical Community Today! http://www.pantechsolutions.net 3. IN C/C++ Build, go to c2000 linker a. Basic option - stack size - 0x400. b. Include library file or command file as input (--library,-I) "rts2800_ml.lib" c. file search path (Add <dir> to library search path(-include_path,-i)) select this add icon and add the following three path by indivdually. "${PROJECT_ROOT}" "C:\Program Files\Texas Instruments\ccsv4\tools\compiler\c2000\lib" Join the Technical Community Today! http://www.pantechsolutions.net 4. From the CCStudio C/C++ Projects, Right click the led [ Active – Debug ] – Build Project or Rebuild Project. Note: Once the project is successfully build you will get 0 Errors. If Errors arise check the code and project properties then rebuild the project. 8. Run a project To run a project , Join the Technical Community Today! http://www.pantechsolutions.net 1. Target – Debug Active Project. Note: at this step, Target will connect, gel file will run, led.out will load to target then finally Keep the cursor at main() of program to start execute. Join the Technical Community Today! http://www.pantechsolutions.net Join the Technical Community Today! http://www.pantechsolutions.net 2. This is Debug workspace., at this we can debug a code using breakpoints, single stepping, watch window, memory etc.., 3. Target – Run. For led code, check the output at on board. The Leds is will on and off with few delay. 4. Target – Halt. Join the Technical Community Today! http://www.pantechsolutions.net 5. Target – Terminate all. Join the Technical Community Today! http://www.pantechsolutions.net Again, the ccs will return to edit workspace from debug workspce. 6. Close the Code composer studio. 9. Console Window The Output window is located at the bottom of the screen by default. By default, the printf function displays in console window, showing information such as the contents of Stdout and the build log. Join the Technical Community Today! http://www.pantechsolutions.net 10. Help Code Composer Studio provides many help tools through the Help menu. Select Help Contents to search by contents. Select Help Tutorial to access tutorials to guide you through the Code Composer Studio development process. Select Help Web Resources to obtain the most current help topics and other guidance. User manuals are PDF files that provide information on specific features or processes. You can access updates and a number of optional plug-ins through Help Update Advisor. Join the Technical Community Today! http://www.pantechsolutions.net Did you enjoy the read? Pantech solutions creates information packed technical documents like this one every month. And our website is a rich and trusted resource used by a vibrant online community of more than 1,00,000 members from organization of all shapes and sizes. Join the Technical Community Today! http://www.pantechsolutions.net What do we sell? Our products range from Various Microcontroller development boards, DSP Boards, FPGA/CPLD boards, Communication Kits, Power electronics, Basic electronics, Robotics, Sensors, Electronic components and much more . Our goal is to make finding the parts and information you need easier and affordable so you can create awesome projects and training from Basic to Cutting edge technology. Join the Technical Community Today! http://www.pantechsolutions.net