SlideShare a Scribd company logo
Chapter 2 : Program
 Development Tools


  Digital Signal Controller
    TMS320F2812



Technology beyond the Dreams™   Copyright © 2006 Pantech Solutions Pvt
Code Composer Studio® IDE
                Menus or Icons                                       CPU
                                                          Help
 Project Manager:                                                    Window
 Source & object files
 File dependencies
 Compiler, Assembler
 & Linker build options

Full C/C++ & Assembly
Debugging:
C & ASM Source
Mixed mode
Disassembly (patch)
Set Break Points
Set probe Points



 Productive Editor:
 Structure Expansion     Status   Watch window    Graph
                          window                                   Memory window
                                                   window

Technology beyond the Dreams™                     Copyright © 2006 Pantech Solutions Pvt
Code Build lnk.cmd
          Compile
                  Composer Studio
                                SIM
                                            Probe In

                                                                     eZdsp™
                     Asm        Link        Debug
                                                                     EVM
                    DSP/BIOS
          Edit               DSP/BIOS Probe Out
                    Config                                           Third
                             Libraries Graphs
                    Tool                                             Party
                                       Profiling

                                                                     XDS
      •    Code Composer Studio includes:
            – Integrated Edit/Debug GUI                              DSP
            – Code Generation Tools                                  Board
            – DSP/BIOS
Technology beyond the Dreams™                     Copyright © 2006 Pantech Solutions Pvt
Code Composer Studio: IDE


                        •       Integrates: edit, code generation, and debug
                        •       Single-click access using buttons
                        •       Powerful graphing/profiling tools
                        •       Automated tasks using GEL scripts
                        •       Built-in access to BIOS functions
                        •       Support TI or 3rd party plug-ins




Technology beyond the Dreams™                                      Copyright © 2006 Pantech Solutions Pvt
The CCS Project
                                Project (.pjt) files contain:

                                •    Source files (by reference)
                                      – Source (C, assembly)
                                      – Libraries
                                      – DSP/BIOS configuration
                                      – Linker command files
                                •    Project settings:
                                      – Build Options (compiler and
                                         assembler)
                                      – Build configurations
                                      – DSP/BIOS
                                      – Linker


Technology beyond the Dreams™                       Copyright © 2006 Pantech Solutions Pvt
Build Options GUI - Compiler




                      •    GUI has 8 pages of categories for code generation
                           tools
                      •    Controls many aspects of the build process, such as:
                            – Optimization level
                            – Target device
                            – Compiler/assembly/link options
Technology beyond the Dreams™                      Copyright © 2006 Pantech Solutions Pvt
Build Options GUI - Linker


                                •   GUI has 2 categories for
                                    linking
                                •   Specifies various link options
                                •   “.Debug” indicates on
                                    subfolder level below project
                                    (.pjt) location




Technology beyond the Dreams™         Copyright © 2006 Pantech Solutions Pvt
Default Build Configurations
                                •   For new projects, CCS automatically
                                    creates two build configurations:
                                      – Debug (unoptimized)
                                      – Release           (optimized)
                                •   Use the drop-down menu to quickly select
                                    the build configuration


                                •     Add/Remove your own custom build
                                      configurations using Project
                                      Configurations
                                •     Edit a configuration:
                                       1. Set it active
                                       2. Modify build options
                                       3. Save project

Technology beyond the Dreams™                   Copyright © 2006 Pantech Solutions Pvt
Learning by doing - Step by Step
  Code Composer Studio - The Basics


     1. The Start-up - Window
     2. Create a F28x - project, based on C language
     3. Debug your program
     4. Watch your variables
     5. Perform a Single Step Debug
     6. Use Breakpoints
     7. What is a Probe Point for ?
     8. Other View Commands
     9. GEL - General Extension Language



Technology beyond the Dreams™                          Copyright © 2006 Pantech Solutions Pvt
1. The Startup - Window




              Project-
              tree
                                Working
                                Area




Technology beyond the Dreams™             Copyright © 2006 Pantech Solutions Pvt
2. Create a F28x - project
      •    Project ==> New
      give your project a name : “Lab1”, select a target and a suitable location of
      your hard disk:




     Note : The project file (“Lab1.pjt) is a plain ASCII-text file and stores all set-ups
            and options of the project. This is very useful for a version management.


Technology beyond the Dreams™                             Copyright © 2006 Pantech Solutions Pvt
•       Write a C-Source Code :
           File New Source File
                            unsigned int i=0,k=0;
                            void main (void)
                            {
                            while(1)
                            {
                                for (i=0;i<100;i++)
                                k=i*i;
                            }
                            }
             File Save as : “lab1.c”

Technology beyond the Dreams™                         Copyright © 2006 Pantech Solutions Pvt
Technology beyond the Dreams™   Copyright © 2006 Pantech Solutions Pvt
• Add your file to the project :
     Project  Add files to project
   – Add: “lab1.c”

• Compile your source code :
    Project  Compile File
   – active window will be compiled
   – in the event of syntax errors : modify your source code as needed

• Add the C-runtime-library to your project :
    Project  Build Options  Linker  Library Search Path :
       c:tic2000cgtoolslib
    Project  Build Options  Linker  Include Libraries :
       rts2800_ml.lib

• Add the stack- size of 0x400
    Project  Build Options  Linker  Stack Size : 0x400
Technology beyond the Dreams™                         Copyright © 2006 Pantech Solutions Pvt
Close the build-window by ‘OK’


Technology beyond the Dreams™              Copyright © 2006 Pantech Solutions Pvt
• Add the Linker - Command File to your project:
     Project  Add Files to Project  ..cmdEzDSP_RAM_lnk.cmd
 • Finally : Build the code ( compile / assemble / link ) :
     Project  Build




Technology beyond the Dreams™                    Copyright © 2006 Pantech Solutions Pvt
Placing Sections in Memory
                  Memory
                                           Sections
   0x00 0000     M0SARAM
                 (0x400)
                                        .ebss
   0x00 0400     M1SARAM
                 (0x400)
                                        .stack

   0x3D 8000      FLASH                 .cinit
                  (0x20000)

                                         .text




Technology beyond the Dreams™    Copyright © 2006 Pantech Solutions Pvt
Linking
                   
                     Memory description
                      Memory description
                    How to place s/w into h/w
                     How to place s/w into h/w




                                      name.cmd



                .obj            Linker                 .out



                                  .map

Technology beyond the Dreams™                     Copyright © 2006 Pantech Solutions Pvt
Linker Command File
              MEMORY
              {
                PAGE 0:           /* Program Space */
                    FLASH: org = 0x3D8000, len = 0x20000
                PAGE 1:           /* Data Space */
                    M0SARAM: org = 0x000000, len = 0x400
                    M1SARAM: org = 0x000400, len = 0x400
              }

              SECTIONS
              {
                    .text:       >   FLASH           PAGE 0
                    .ebss:       >   M0SARAM         PAGE 1
                    .cinit:      >   FLASH           PAGE 0
                    .stack:      >   M1SARAM         PAGE 1
              }


Technology beyond the Dreams™                              Copyright © 2006 Pantech Solutions Pvt
• Load the binary code into the DSP :
        File  Load Program  DebugLab1.out

        – Note: a new binary code can be downloaded automatically into the
          target. This is done by  Option  Customize  Program Load
          Options Load Program after Build. This setup will be stored for
          permanently.

    • Run the program until label “main”

         Debug  Go main.




Technology beyond the Dreams™                       Copyright © 2006 Pantech Solutions Pvt
yellow arrow :
                                       current PC




Technology beyond the Dreams™   Copyright © 2006 Pantech Solutions Pvt
3. Debug your code !
 • Perform a real time run :
      Debug  Run (F5)
     Note 1: the bottom left corner will be marked as : “DSP Running”.
     You’ll see no activity on the peripherals of the Adapter Board because our
     first example program does not use any of them !
     Note 2: the yellow arrow is no longer visible – that’s another sign of a real
     time run.
 • Stop the real time run :
      Debug  Halt
 • Reset the DSP :
     Debug  Reset CPU
     Debug  Restart
 • Run again to main :
      Debug Go Main



Technology beyond the Dreams™                           Copyright © 2006 Pantech Solutions Pvt
4. Watch your variables
    • Open the Watch Window :
        View  Watch Window

    • The variable ‘i’ is already visible inside the “Watch Locals”-window .

    • To see also the global ‘k’ we need to add this variable manually. This
      can be done inside window ‘Watch 1’. In the column ‘name’ we just
      enter ‘k’ and in the second line ‘i’.
       – Note : another convenient way is to mark the variables inside the
          source code with the right mouse button and then select “Add to
          watch window”

    • note : with the column ‘radix’ one can adjust the data format between
      decimal, hexadecimal, binary etc.

Technology beyond the Dreams™                          Copyright © 2006 Pantech Solutions Pvt
Watch your variables




                                Watch-
                                Window
Technology beyond the Dreams™            Copyright © 2006 Pantech Solutions Pvt
5. Perform a Single Step Debug
 • Perform a single step trough the program :
     Debug  Step Into ( or F8 )

 • Watch the current PC ( yellow arrow) and the numerical values of i and k in
   Watch Window while you single step through the code !

 • There are more debug - commands available, see next slide




Technology beyond the Dreams™                          Copyright © 2006 Pantech Solutions Pvt
Perform a Single Step Debug
                                Source Single Step


                                     Source Step Over

                                           Step Out

                                      Assembly Single Step


                                    Assembly Step Over
                                 Run to
            Halt       Run       cursor


Technology beyond the Dreams™                Copyright © 2006 Pantech Solutions Pvt
6. Adding a Breakpoint
 • Set a Breakpoint :
    – Place the Cursor in Lab1.c on line : k = i * i;
    – Click right mouse and select ‘Toggle Breakpoint’
    – the line is marked with a red dot ( = active breakpoint )
    Note : most Code Composer Studio Commands are also available through
       buttons or trough Command -Keys ( see manual, or help )
 • Reset the Program
     Debug  Reset CPU
     Debug  Restart
 • Perform a real time run
     Debug  Run ( or F5)
 • DSP stops when reaching an active breakpoint
 • Repeat ‘Run’ and watch your variables
 • Remove the breakpoint ( Toggle again) when you’re done.

Technology beyond the Dreams™                     Copyright © 2006 Pantech Solutions Pvt
Adding a Breakpoint
                                Toggle
                                Breakpoint


                                Remove all
                                Breakpoints


      Red dot :                               Yellow arrow :
      active                                  Current PC
      Breakpoint




Technology beyond the Dreams™                 Copyright © 2006 Pantech Solutions Pvt
7. Set a Probe Point
   • Causes an update of a particular window at a specific point in your program.

   • When a window is created it is updated at every breakpoint. However, you
     can change this so the window is updated only when the program reaches
     the connected Probe Point. When the window is updated, execution of the
     program is continued.

   • To set a Probe - Point :
      – Click right mouse on the line ‘k = i*i;’ in the program first.c
      – select : ‘Toggle Probe Point ‘ ( indicated by a blue dot )
      – select  Debug  Probe Points...
      – In the Probe Point Window click on the line ‘first.c line 13 -> no
         Connection’
      – in the ‘Connect to’ - selector select ‘Watch Window’
      – exit this dialog with the ‘Replace’ and ‘OK’ – Button
   • Run the program and verify that the watch window is updated continuously.
Technology beyond the Dreams™                         Copyright © 2006 Pantech Solutions Pvt
Set a Probe Point




Technology beyond the Dreams™      Copyright © 2006 Pantech Solutions Pvt
8. Other View Commands
    • The View menu includes more useful windows to monitor and control
      the DSP

    •  View  Registers  Core
    •  View  Registers  Status

        – click right mouse inside the new windows and select ‘Float in Main
          Window’

        – double click on line ‘ACC’ and modify the value inside the
          Accumulator ACC




Technology beyond the Dreams™                         Copyright © 2006 Pantech Solutions Pvt
• To view both the Assembler code and the C Source Code :

    • click right mouse inside “Lab1.c” and select “Mixed Mode”

    • The Assembler Instruction Code generated by the Compiler is added
      and printed in grey colour

    • Single Step ( ‘Assembly Step Into’ ) is now possible on instruction level
       – Perform :  Debug  Reset DSP
                       Debug  Restart
                       Debug  Go Main
                       Debug  Step Into (F8)
       – You’ll see two arrows , a yellow one on C-lines and a green one for
          assembler instruction-lines

Technology beyond the Dreams™                           Copyright © 2006 Pantech Solutions Pvt
8. View C and Disassembly


                                    Current
                                    C - line




                                          Current
                                          Instruction




Technology beyond the Dreams™   Copyright © 2006 Pantech Solutions Pvt
9. GEL - General Extension Language
     •   language similar to C
     •   lets you create functions to extend Code Composer's features
     •   to create GEL functions use the GEL grammar
     •   load GEL-files into Code Composer

     • With GEL, you can:
        – access actual/simulated target memory locations
        – add options to Code Composer’s GEL menu

     • GEL is useful for automated testing and user workspace adjustment .

     • GEL - files are ASCII with extension *.gel



Technology beyond the Dreams™                         Copyright © 2006 Pantech Solutions Pvt

More Related Content

What's hot (20)

PDF
Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source...
Perforce
 
PPTX
Tuning For Deep Learning Inference with Intel® Processor Graphics | SIGGRAPH ...
Intel® Software
 
PDF
Dave 3 presentation
Infineon Microcontroller
 
PDF
Learn C Programming Language by Using GDB
National Cheng Kung University
 
PDF
Python_for_Visual_Effects_and_Animation_Pipelines
Russell Darling
 
PPTX
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...
Intel® Software
 
PDF
Droidcon ndk cpu_architecture_optimization
Droidcon Berlin
 
PDF
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intel
Droidcon Berlin
 
PDF
The anatomy and philosophy of Android - Google I/O 2009
Viswanath J
 
PDF
Android media framework overview
Jerrin George
 
PDF
V Labs Product Presentation
Wil Huijben
 
PPTX
Dalvik Vm &amp; Jit
Ankit Somani
 
PDF
Eclipse Summit 2008 - Thales - SolFa
BENOIT_LANGLOIS
 
PDF
Explore Android Internals
National Cheng Kung University
 
PDF
Operating System Windows CE 7.0 and Processor ARM Advantages and Disadvantages
Fatih Özlü
 
PDF
Inside Android's Dalvik VM - NEJUG Nov 2011
Doug Hawkins
 
PDF
Release planning
Oleg Seriaga
 
PDF
Build Community Android Distribution and Ensure the Quality
National Cheng Kung University
 
PDF
Alliance Successful Selenium Automation
sadams22
 
DOC
Resume
Sanjay Kumar
 
Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source...
Perforce
 
Tuning For Deep Learning Inference with Intel® Processor Graphics | SIGGRAPH ...
Intel® Software
 
Dave 3 presentation
Infineon Microcontroller
 
Learn C Programming Language by Using GDB
National Cheng Kung University
 
Python_for_Visual_Effects_and_Animation_Pipelines
Russell Darling
 
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...
Intel® Software
 
Droidcon ndk cpu_architecture_optimization
Droidcon Berlin
 
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intel
Droidcon Berlin
 
The anatomy and philosophy of Android - Google I/O 2009
Viswanath J
 
Android media framework overview
Jerrin George
 
V Labs Product Presentation
Wil Huijben
 
Dalvik Vm &amp; Jit
Ankit Somani
 
Eclipse Summit 2008 - Thales - SolFa
BENOIT_LANGLOIS
 
Explore Android Internals
National Cheng Kung University
 
Operating System Windows CE 7.0 and Processor ARM Advantages and Disadvantages
Fatih Özlü
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Doug Hawkins
 
Release planning
Oleg Seriaga
 
Build Community Android Distribution and Ensure the Quality
National Cheng Kung University
 
Alliance Successful Selenium Automation
sadams22
 
Resume
Sanjay Kumar
 

Similar to Program development tools (20)

PPT
Introduction to Code Composer Studio 4
Pantech ProLabs India Pvt Ltd
 
PDF
Skype testing overview
QA Club Kiev
 
PDF
CMake: Improving Software Quality and Process
Marcus Hanwell
 
PPTX
ECE-3567-Lecture-1-Spring-2025 for beginner
MahmoudElsamanty
 
PDF
Kubernetes and the Rise of Application-centric Computing
Bitnami
 
PDF
Creating an Embedded System Lab
Nonamepro
 
PPTX
Game Studio
MarinaOpera
 
PDF
Embedded system-Introduction to development cycle and development tool
Pantech ProLabs India Pvt Ltd
 
PPTX
02 - Build and Deployment Management
Sergii Shmarkatiuk
 
DOCX
desktop_resume
Chris Markle
 
PDF
DDGen Product Brief
Vayavya Labs Pvt Ltd
 
DOC
Srikanth_PILLI_CV_latest
Srikanth Pilli
 
PPTX
Automatize everything
Boris Bucha
 
PDF
Kitware: Qt and Scientific Computing
account inactive
 
PPTX
C# Production Debugging Made Easy
Alon Fliess
 
PPT
Using PSoC Creator
LloydMoore
 
PDF
Rhapsody reverseengineering
Scott Althouse
 
PPT
System software
Senthil Kanth
 
PDF
Flash Catalyst at Flex Camp Orange County
Juan Sanchez
 
PPTX
Automated Build using teamcity
Md Jawed
 
Introduction to Code Composer Studio 4
Pantech ProLabs India Pvt Ltd
 
Skype testing overview
QA Club Kiev
 
CMake: Improving Software Quality and Process
Marcus Hanwell
 
ECE-3567-Lecture-1-Spring-2025 for beginner
MahmoudElsamanty
 
Kubernetes and the Rise of Application-centric Computing
Bitnami
 
Creating an Embedded System Lab
Nonamepro
 
Game Studio
MarinaOpera
 
Embedded system-Introduction to development cycle and development tool
Pantech ProLabs India Pvt Ltd
 
02 - Build and Deployment Management
Sergii Shmarkatiuk
 
desktop_resume
Chris Markle
 
DDGen Product Brief
Vayavya Labs Pvt Ltd
 
Srikanth_PILLI_CV_latest
Srikanth Pilli
 
Automatize everything
Boris Bucha
 
Kitware: Qt and Scientific Computing
account inactive
 
C# Production Debugging Made Easy
Alon Fliess
 
Using PSoC Creator
LloydMoore
 
Rhapsody reverseengineering
Scott Althouse
 
System software
Senthil Kanth
 
Flash Catalyst at Flex Camp Orange County
Juan Sanchez
 
Automated Build using teamcity
Md Jawed
 
Ad

More from Pantech ProLabs India Pvt Ltd (20)

PDF
Registration process
Pantech ProLabs India Pvt Ltd
 
PPTX
Choosing the right processor for embedded system design
Pantech ProLabs India Pvt Ltd
 
PPT
Brain Computer Interface
Pantech ProLabs India Pvt Ltd
 
PPTX
Electric Vehicle Design using Matlab
Pantech ProLabs India Pvt Ltd
 
PPTX
Image processing application
Pantech ProLabs India Pvt Ltd
 
PPTX
Internet of Things using Raspberry Pi
Pantech ProLabs India Pvt Ltd
 
PPTX
Internet of Things Using Arduino
Pantech ProLabs India Pvt Ltd
 
PPTX
Brain controlled robot
Pantech ProLabs India Pvt Ltd
 
PPTX
Brain Computer Interface-Webinar
Pantech ProLabs India Pvt Ltd
 
PPTX
Development of Deep Learning Architecture
Pantech ProLabs India Pvt Ltd
 
PPTX
Gate driver design and inductance fabrication
Pantech ProLabs India Pvt Ltd
 
PPTX
Brainsense -Brain computer Interface
Pantech ProLabs India Pvt Ltd
 
PPT
Median filter Implementation using TMS320C6745
Pantech ProLabs India Pvt Ltd
 
PPT
Waveform Generation Using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
PPT
Interfacing UART with tms320C6745
Pantech ProLabs India Pvt Ltd
 
PPT
Switch & LED using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
PPT
Led blinking using TMS320C6745
Pantech ProLabs India Pvt Ltd
 
PPT
Introduction to tms320c6745 dsp
Pantech ProLabs India Pvt Ltd
 
PPT
Brainsense -Introduction to brain computer interface
Pantech ProLabs India Pvt Ltd
 
Registration process
Pantech ProLabs India Pvt Ltd
 
Choosing the right processor for embedded system design
Pantech ProLabs India Pvt Ltd
 
Brain Computer Interface
Pantech ProLabs India Pvt Ltd
 
Electric Vehicle Design using Matlab
Pantech ProLabs India Pvt Ltd
 
Image processing application
Pantech ProLabs India Pvt Ltd
 
Internet of Things using Raspberry Pi
Pantech ProLabs India Pvt Ltd
 
Internet of Things Using Arduino
Pantech ProLabs India Pvt Ltd
 
Brain controlled robot
Pantech ProLabs India Pvt Ltd
 
Brain Computer Interface-Webinar
Pantech ProLabs India Pvt Ltd
 
Development of Deep Learning Architecture
Pantech ProLabs India Pvt Ltd
 
Gate driver design and inductance fabrication
Pantech ProLabs India Pvt Ltd
 
Brainsense -Brain computer Interface
Pantech ProLabs India Pvt Ltd
 
Median filter Implementation using TMS320C6745
Pantech ProLabs India Pvt Ltd
 
Waveform Generation Using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
Interfacing UART with tms320C6745
Pantech ProLabs India Pvt Ltd
 
Switch & LED using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
Led blinking using TMS320C6745
Pantech ProLabs India Pvt Ltd
 
Introduction to tms320c6745 dsp
Pantech ProLabs India Pvt Ltd
 
Brainsense -Introduction to brain computer interface
Pantech ProLabs India Pvt Ltd
 
Ad

Recently uploaded (20)

PPTX
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PDF
EXCRETION-STRUCTURE OF NEPHRON,URINE FORMATION
raviralanaresh2
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
PPTX
K-Circle-Weekly-Quiz12121212-May2025.pptx
Pankaj Rodey
 
PPTX
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
PPTX
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
PPTX
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PPTX
Introduction to Probability(basic) .pptx
purohitanuj034
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
EXCRETION-STRUCTURE OF NEPHRON,URINE FORMATION
raviralanaresh2
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
K-Circle-Weekly-Quiz12121212-May2025.pptx
Pankaj Rodey
 
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
Introduction to Probability(basic) .pptx
purohitanuj034
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 

Program development tools

  • 1. Chapter 2 : Program Development Tools Digital Signal Controller TMS320F2812 Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 2. Code Composer Studio® IDE Menus or Icons CPU Help Project Manager: Window Source & object files File dependencies Compiler, Assembler & Linker build options Full C/C++ & Assembly Debugging: C & ASM Source Mixed mode Disassembly (patch) Set Break Points Set probe Points Productive Editor: Structure Expansion Status Watch window Graph window Memory window window Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 3. Code Build lnk.cmd Compile Composer Studio SIM Probe In eZdsp™ Asm Link Debug EVM DSP/BIOS Edit DSP/BIOS Probe Out Config Third Libraries Graphs Tool Party Profiling XDS • Code Composer Studio includes: – Integrated Edit/Debug GUI DSP – Code Generation Tools Board – DSP/BIOS Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 4. Code Composer Studio: IDE • Integrates: edit, code generation, and debug • Single-click access using buttons • Powerful graphing/profiling tools • Automated tasks using GEL scripts • Built-in access to BIOS functions • Support TI or 3rd party plug-ins Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 5. The CCS Project Project (.pjt) files contain: • Source files (by reference) – Source (C, assembly) – Libraries – DSP/BIOS configuration – Linker command files • Project settings: – Build Options (compiler and assembler) – Build configurations – DSP/BIOS – Linker Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 6. Build Options GUI - Compiler • GUI has 8 pages of categories for code generation tools • Controls many aspects of the build process, such as: – Optimization level – Target device – Compiler/assembly/link options Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 7. Build Options GUI - Linker • GUI has 2 categories for linking • Specifies various link options • “.Debug” indicates on subfolder level below project (.pjt) location Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 8. Default Build Configurations • For new projects, CCS automatically creates two build configurations: – Debug (unoptimized) – Release (optimized) • Use the drop-down menu to quickly select the build configuration • Add/Remove your own custom build configurations using Project Configurations • Edit a configuration: 1. Set it active 2. Modify build options 3. Save project Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 9. Learning by doing - Step by Step Code Composer Studio - The Basics 1. The Start-up - Window 2. Create a F28x - project, based on C language 3. Debug your program 4. Watch your variables 5. Perform a Single Step Debug 6. Use Breakpoints 7. What is a Probe Point for ? 8. Other View Commands 9. GEL - General Extension Language Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 10. 1. The Startup - Window Project- tree Working Area Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 11. 2. Create a F28x - project • Project ==> New give your project a name : “Lab1”, select a target and a suitable location of your hard disk: Note : The project file (“Lab1.pjt) is a plain ASCII-text file and stores all set-ups and options of the project. This is very useful for a version management. Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 12. Write a C-Source Code : File New Source File unsigned int i=0,k=0; void main (void) { while(1) { for (i=0;i<100;i++) k=i*i; } }  File Save as : “lab1.c” Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 13. Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 14. • Add your file to the project :   Project  Add files to project – Add: “lab1.c” • Compile your source code :  Project  Compile File – active window will be compiled – in the event of syntax errors : modify your source code as needed • Add the C-runtime-library to your project :  Project  Build Options  Linker  Library Search Path : c:tic2000cgtoolslib  Project  Build Options  Linker  Include Libraries : rts2800_ml.lib • Add the stack- size of 0x400  Project  Build Options  Linker  Stack Size : 0x400 Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 15. Close the build-window by ‘OK’ Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 16. • Add the Linker - Command File to your project:  Project  Add Files to Project  ..cmdEzDSP_RAM_lnk.cmd • Finally : Build the code ( compile / assemble / link ) :  Project  Build Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 17. Placing Sections in Memory Memory Sections 0x00 0000 M0SARAM (0x400) .ebss 0x00 0400 M1SARAM (0x400) .stack 0x3D 8000 FLASH .cinit (0x20000) .text Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 18. Linking   Memory description Memory description  How to place s/w into h/w  How to place s/w into h/w name.cmd .obj Linker .out .map Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 19. Linker Command File MEMORY { PAGE 0: /* Program Space */ FLASH: org = 0x3D8000, len = 0x20000 PAGE 1: /* Data Space */ M0SARAM: org = 0x000000, len = 0x400 M1SARAM: org = 0x000400, len = 0x400 } SECTIONS { .text: > FLASH PAGE 0 .ebss: > M0SARAM PAGE 1 .cinit: > FLASH PAGE 0 .stack: > M1SARAM PAGE 1 } Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 20. • Load the binary code into the DSP :  File  Load Program  DebugLab1.out – Note: a new binary code can be downloaded automatically into the target. This is done by  Option  Customize  Program Load Options Load Program after Build. This setup will be stored for permanently. • Run the program until label “main”  Debug  Go main. Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 21. yellow arrow : current PC Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 22. 3. Debug your code ! • Perform a real time run :  Debug  Run (F5) Note 1: the bottom left corner will be marked as : “DSP Running”. You’ll see no activity on the peripherals of the Adapter Board because our first example program does not use any of them ! Note 2: the yellow arrow is no longer visible – that’s another sign of a real time run. • Stop the real time run :  Debug  Halt • Reset the DSP : Debug  Reset CPU Debug  Restart • Run again to main :  Debug Go Main Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 23. 4. Watch your variables • Open the Watch Window :  View  Watch Window • The variable ‘i’ is already visible inside the “Watch Locals”-window . • To see also the global ‘k’ we need to add this variable manually. This can be done inside window ‘Watch 1’. In the column ‘name’ we just enter ‘k’ and in the second line ‘i’. – Note : another convenient way is to mark the variables inside the source code with the right mouse button and then select “Add to watch window” • note : with the column ‘radix’ one can adjust the data format between decimal, hexadecimal, binary etc. Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 24. Watch your variables Watch- Window Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 25. 5. Perform a Single Step Debug • Perform a single step trough the program :  Debug  Step Into ( or F8 ) • Watch the current PC ( yellow arrow) and the numerical values of i and k in Watch Window while you single step through the code ! • There are more debug - commands available, see next slide Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 26. Perform a Single Step Debug Source Single Step Source Step Over Step Out Assembly Single Step Assembly Step Over Run to Halt Run cursor Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 27. 6. Adding a Breakpoint • Set a Breakpoint : – Place the Cursor in Lab1.c on line : k = i * i; – Click right mouse and select ‘Toggle Breakpoint’ – the line is marked with a red dot ( = active breakpoint ) Note : most Code Composer Studio Commands are also available through buttons or trough Command -Keys ( see manual, or help ) • Reset the Program  Debug  Reset CPU  Debug  Restart • Perform a real time run  Debug  Run ( or F5) • DSP stops when reaching an active breakpoint • Repeat ‘Run’ and watch your variables • Remove the breakpoint ( Toggle again) when you’re done. Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 28. Adding a Breakpoint Toggle Breakpoint Remove all Breakpoints Red dot : Yellow arrow : active Current PC Breakpoint Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 29. 7. Set a Probe Point • Causes an update of a particular window at a specific point in your program. • When a window is created it is updated at every breakpoint. However, you can change this so the window is updated only when the program reaches the connected Probe Point. When the window is updated, execution of the program is continued. • To set a Probe - Point : – Click right mouse on the line ‘k = i*i;’ in the program first.c – select : ‘Toggle Probe Point ‘ ( indicated by a blue dot ) – select  Debug  Probe Points... – In the Probe Point Window click on the line ‘first.c line 13 -> no Connection’ – in the ‘Connect to’ - selector select ‘Watch Window’ – exit this dialog with the ‘Replace’ and ‘OK’ – Button • Run the program and verify that the watch window is updated continuously. Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 30. Set a Probe Point Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 31. 8. Other View Commands • The View menu includes more useful windows to monitor and control the DSP •  View  Registers  Core •  View  Registers  Status – click right mouse inside the new windows and select ‘Float in Main Window’ – double click on line ‘ACC’ and modify the value inside the Accumulator ACC Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 32. • To view both the Assembler code and the C Source Code : • click right mouse inside “Lab1.c” and select “Mixed Mode” • The Assembler Instruction Code generated by the Compiler is added and printed in grey colour • Single Step ( ‘Assembly Step Into’ ) is now possible on instruction level – Perform :  Debug  Reset DSP  Debug  Restart  Debug  Go Main  Debug  Step Into (F8) – You’ll see two arrows , a yellow one on C-lines and a green one for assembler instruction-lines Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 33. 8. View C and Disassembly Current C - line Current Instruction Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 34. 9. GEL - General Extension Language • language similar to C • lets you create functions to extend Code Composer's features • to create GEL functions use the GEL grammar • load GEL-files into Code Composer • With GEL, you can: – access actual/simulated target memory locations – add options to Code Composer’s GEL menu • GEL is useful for automated testing and user workspace adjustment . • GEL - files are ASCII with extension *.gel Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt