2 - 1 32-Bit-DSP-MicrocontrollerTMS320F2812 Module 2 : Program Development Tools.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Getting started with MPLAB Launch MPLAB Set Toolbar as in the next slide by clicking the leftmost icon Open a new Source file by choosing [FILE][NEW] Type.
Introduction to HT-IDE3000 Micro-C development System Department.
Code Composer Department of Electrical and Computer Engineering
Professional Toolkit V2.0 C:\Presentations - SmartCafe_Prof_V2.0 - bsc page 1 Professional Toolkit 2.0.
Lab7: Introduction to Arduino
DAP-1520 FAQ’s Wireless AC750 Dual Band Range Extender.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
LAUNCHXL2-RM57L – Project 0
Using PDG with e2studio: Example
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
UBI >> Contents Chapter 12 Hardware Multiplier MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
1 Introduction to Programming Environment Using MetroWerks CodeWarrior and Palm Emulator.
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
M16C/Tiny SKP Tutorial 1 Software Development Process using HEW4
Getting Started with Code Composer Studio™ IDE v2.0 Presentation begins live from Dallas July 11, 7:00 a.m. and 11:00 a.m. Central Daylight Time (CDT)
C6713 DSK Diagnostic Utility included with DSK....
Getting Started With DSP A. What is DSP? B. Which TI DSP do I use? Highest performance C6000 Most power efficient C5000 Control optimized C2000 TMS320C6000™
Introduction to CCSv5. Outline  Intro to CCSv5 Intro to CCSv5  Functional Overview Functional Overview  Perspectives Perspectives  Projects Projects.
Introduction Purpose Objectives Content Learning Time
1 Semester 2 Module 2 Introduction to Routers Yuda college of business James Chen
Chapter 2 Software Tools and Assembly Language Syntax.
Silicon Labs ToolStick Development Platform
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
The instructor presents the 1st 9 slides
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
P.1ECE 331, Prof. A. Mason Professor Andrew Mason Michigan State University Spring 2013 ECE 331: PC Lab 1: Using HC12 ASM Simulators.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
High Speed Data Converter University
IE 411/511: Visual Programming for Industrial Applications
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Simulink ® Interface Course 13 Active-HDL Interfaces.
ADAM2 Single Remocon MCU IDE User’s Manual S/W Integrated Development Environment - Assembler - Simulator - Code Wizard V1.0 Technical Sales Team, ETA.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Active-HDL Interfaces Debugging C Code Course 10.
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Code Debugging Texas Instruments Incorporated University of Beira Interior.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training module provides an overview of debugging features.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
1 Lesson 11 Exploring Microsoft Office 2010 Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
MICROSOFT WORD PRESENTATION. Word Processing  Software that is designed for the entry, editing, and printing of documents.  Windows Version = Microsoft.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
1 Lesson 11 Exploring Microsoft Office 2010 Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
Code Composer Studio Compile EditAsm LinkDebug File In File OutProfileGraphStatistics IDE – Integrated Development Environment SIM DSK EVM Emulator RTDX.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Getting Started with Microsoft Word
Workshop Setup The software/hardware used in this workshop are:
Development Environment
Programming and Debugging with the Dragon and JTAG
The first change to your project files that is needed is to change the device to the correct FPGA. This is done by going to the Assignments tab on the.
CS4101 Introduction to Embedded Systems Lab 1: MSP430 LaunchPad IDE
PRU-ICSS Programming with CCS
Using Visual Studio with C#
ECE 3567 Microcontroller Lab
Software Setup & Validation
Computer System Laboratory
Code Composer Essentials 3.0
Embedded Development Tools
ECE 3567 Microcontrollers Lab
Presentation transcript:

Bit-DSP-MicrocontrollerTMS320F2812 Module 2 : Program Development Tools

2 - 2 Help CPU Window Memory window Graph window Project Manager:  Source & object files  File dependencies  Compiler, Assembler & Linker build options Status window Full C/C++ & Assembly Debugging:  C & ASM Source  Mixed mode  Disassembly (patch)  Set Break Points  Set probe Points Watch window Productive Editor:  Structure Expansion Menus or Icons Code Composer Studio® IDE

2 - 3 Code Composer Studio Code Composer Studio includes: –Integrated Edit/Debug GUI –Code Generation Tools –DSP/BIOS Asm Link Edit Debug Compile Probe In Probe Out GraphsProfiling SIM eZdsp™ EVM ThirdParty XDS DSPBoard DSP/BIOSConfigTool DSP/BIOSLibraries lnk.cmd Build

2 - 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 3 rd party plug-ins

2 - 5 The CCS Project 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 Project (.pjt) files contain:

2 - 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

2 - 7 Build Options GUI - Linker GUI has 2 categories for linking Specifies various link options “.\Debug\” indicates on subfolder level below project (.pjt) location

2 - 8 Default Build Configurations Add/Remove your own custom build configurations using Project Configurations Edit a configuration: 1.Set it active 2.Modify build options 3.Save project For new projects, CCS automatically creates two build configurations: –Debug(unoptimized) –Release(optimized) Use the drop-down menu to quickly select the build configuration

2 - 9 eZdsp™ F2812 Hardware Parallel Port/ JTAGController Interface (P3) I/O Interface (P4/P8/P7) ANALOG Interface (P5/P9) SRAM 64K x 16 JTAG Interface (P1) EXPANSION Data & Address (P2) Power Connector (P6) +5V TMS320F DSP

Connecting the eZdsp  to your PC Code Composer Studio – eZdsp  F2812 Configuration eZdsp  F Conductor Cable To wall outlet PowerSupply 25 pin male D-sub connector (Plugs into parallel port on PC) 25 pin male D-sub connector 25 pin female D-sub connector

Lab Experiments - the Peripheral Adapter eZdsp  F2812 plus Zwickau Adapterboard 8 x LED 8 x switch 2 x push- button 2 potentiometers 1 SPI DAC ( TLV 5617 ) 1 SPI EEPROM ( M95080) 1 I2C Sensor ( DS 1621) 1 SCI - Transceiver (MAX 232) 1 CAN - Transceiver ( TJA 1054 ) 1 CAN - Transceiver ( SN 65HVD230 ) 1 Loudspeaker

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

The Startup - Window Working Area Project- tree

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.

Write a C-Source Code :  File  New  Source File unsigned int k; void main (void) { unsigned int i; while(1) { for (i=0;i<100;i++) k=i*i; } 2. Create a F28x - project (cont.)  File  Save as : “lab1.c”

Create a F28x - project (cont.)

Create a F28x - project (cont.) 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:\ti\c2000\cgtools\lib  Project  Build Options  Linker  Include Libraries : rts2800_ml.lib Add the stack- size of 0x400  Project  Build Options  Linker  Stack Size : 0x400

Create a F28x - project (cont.) Close the build-window by ‘OK’

Create a F28x - project (cont.) Add the Linker - Command File to your project:  Project  Add Files to Project ..\cmd\EzDSP_RAM_lnk.cmd Finally : Build the code ( compile / assemble / link ) :  Project  Build

Placing Sections in Memory.ebss.cinit.textMemoryM0SARAM(0x400) 0x x3D x M1SARAM(0x400) FLASH(0x20000) Sections.stack

Linking Linker name.cmd.map.obj.out Memory description Memory description How to place s/w into h/w How to place s/w into h/w Memory description Memory description How to place s/w into h/w How to place s/w into h/w

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:>FLASHPAGE 0.ebss:> M0SARAM PAGE 1.cinit:> FLASH PAGE 0.stack:>M1SARAMPAGE 1 }

Create a F28x - project (cont.) Load the binary code into the DSP :  File  Load Program  Debug\Lab1.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

yellow arrow : current PC 2. Create a F28x - project (cont.)

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

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.

Watch- Window 4. Watch your variables

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

Source Single Step RunHalt Run to cursor Source Step Over Step Out 5. Perform a Single Step Debug Assembly Single Step Assembly Step Over

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.

Red dot : active Breakpoint Yellow arrow : Current PC Toggle Breakpoint Remove all Breakpoints 6. Adding a Breakpoint (cont. )

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.

Set a Probe Point (cont.)

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

Other View Commands (cont.) 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

Current C - line Current Instruction 8. View C and Disassembly

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