Workshop Setup The software/hardware used in this workshop are:

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

Code Composer Department of Electrical and Computer Engineering
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Getting your Arduino to Work: Microsoft Windows 1.Install Arduino programming environment 2.Install Arduino Uno driver 3.Make sure you can download a program.
Choose a category: Install Episys Install Accessories Synergent Confidential Episys Version Synergent 2008Download latest guides from:
Microsoft Windows Vista Chapter 6 Customizing Your Computer Using the Control Panel.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
LAUNCHXL2-RM57L – Project 0
Using PDG with e2studio: Example
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
Using the Unity 98 Cordless Response System Directions : Courtesy of IHC public relations.
1 Introduction to Programming Environment Using MetroWerks CodeWarrior and Palm Emulator.
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
DWR-113 FAQ’s 3G WiFi Router.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Silicon Labs ToolStick Development Platform
U-Boot Debug using CCSv5 In this session we will cover fundamentals necessary to use CCSv5 and a JTAG to debug a TI SDK-based U-Boot on an EVM platform.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
MagicInfo Pro Server Software All control, content, and scheduling is performed within the MagicInfo Pro Server software previously installed. Before.
Installing the SAFARIODBC.EXE For use with Excel May 3, 2002.
ICP Kit 2011 HHC Data Entry Module The World Bank ICP Kit Training African Development Bank.
Chapter 1a© copyright Janson Industries RAD ▮ Explain Eclipse, RAD, and their relationship ▮ Basic RAD concepts ▮ How to install RAD ▮ How to import.
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
Geo CE-XM ch 4 Edited 10/14/05 1 The XM is the newest of the rovers, and unlike other units, it comes with software installed on the unit as well as using.
VistA Imaging Capture via Scanning. October VistA Imaging Capture via Scanning The information in this documentation includes only new and updated.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Active-HDL Interfaces Debugging C Code Course 10.
Active-HDL Interfaces Building VHPI Applications C Compilation Course 9.
Downloading and Installing Autodesk Revit 2016
Unit 1: Java and Eclipse The Eclipse Development Environment.
From Scratch: Open CCS Exit and restart CCS Click Browse to create a new workspace directory.
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
1 PanelView ™ 300 Micro & MicroLogix ™ Lab 1. 2 Today you will receive training on the NEW PanelView 300 Micro operator terminal and the NEW version of.
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.
LANDESK SOFTWARE CONFIDENTIAL Tips and Tricks with Filters Jenny Lardh.
Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains.
Eclipse Project. Installing Visit to download a copy for your home computerhttp:// –Get Release version 3.0 (or.
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.
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.
Troubleshooting Dashhawk Issues. Here's what you have to do to have the DashHawk run properly Go to the ACTUAL PROGRAM file (not the short cut)
Chapter 1a© copyright Janson Industries RAD ▮ Explain Eclipse, RAD, and their relationship ▮ Basic RAD concepts ▮ How to install RAD ▮ How to import.
Chapter 2: The Visual Studio .NET Development Environment
Programming and Debugging with the Dragon and JTAG
Lab 1: Using NIOS II processor for code execution on FPGA
Introduction Purpose Objectives Content Learning Time
PRU-ICSS Programming with CCS
Using Visual Studio with C#
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
Debugging with Eclipse
NextGen Purchasing Calendar Year End 1099 Process
Creating and Modifying Queries
Getting Started: Developing Code with Cloud9
ECE 3567 Microcontroller Lab
Founded in Silicon Valley in 1984
Software Setup & Validation
RapidFinder Analysis Software How-To Guide
Debugging with Eclipse
Fast-Track UiPath Developer Module 2: Getting to Know UiPath Studio
Embedded Development Tools
Embedded Development Tools
ECE 3567 Microcontrollers Lab
How to install and manage exchange server 2010 OP Saklani.
Presentation transcript:

Workshop Setup The software/hardware used in this workshop are: CCSv6.0.1.00039 http://processors.wiki.ti.com/index.php/Download_CCS TivaWare C Series 2.1.0.12573 http://www.ti.com/tool/sw-tm4c PuTTY terminal program http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe Tiva C Series Connected Launchpad (EK-TM4C1294XL) with USB cables connected from board to PC Notes: 1. If you are using different versions of software, some lab steps may require slight modifications and/or screenshots may look a bit different 2. If the labs are not being done in a class environment where the software is already installed, install the above listed software first

LAB conventions Lab steps are numbered for easier reference … Explanations, notes, warnings are written in blue 2

Blinky Example: Exercise Summary Key Objectives Import and build a simple program to blink LED Start a debug session and load/flash the program to the Launchpad Run the program to blink LED Tools and Concepts Covered Workspaces Welcome screen / Resource Explorer Project concepts Basics of working with views Debug launch Debug control Profiling Clock Cycles Local History Build Properties Updating compiler tools Changing compiler versions 3

Import ‘blinky’ Project Import the blinky project into the CCS Workspace by going to menu Project  Import CCS Projects In the box Select search-directory, type or browse to the TivaWare directory: C:\ti\TivaWare_C_Series- 2.1.0.12573\examples\boards\ek- tm4c1294xl\blinky Confirm the project “blinky” is selected Click Finish

Build ‘blinky’ Project In the Project Explorer view, select the blinky project Click on the Build icon in the toolbar The Console view will appear at the bottom with build messages (information, warnings, errors) as the project builds The Problems view will also appear at the bottom to highlight any possible build errors or warnings If the build is successful, the Problems view will contain no errors (warnings may still be seen) In this case, there may be a warning that this project was originally created using a version of the compiler that is currently not installed

Debug ‘blinky’ Project Click on the Debug (green bug) button – make sure the project is selected first! When you hit the green bug button, several actions are done automatically Prompt to save modified source files Build the project (incrementally) Start the debugger (CCS will switch to the CCS Debug perspective) Connect CCS to the target Load the program on the target Run to main()

Debug ‘blinky’ Project Program counter at main() Switched to CCS Debug perspective 7

Run ‘blinky’ Project Press the Run button in Debug view to run the program LED on the Launchpad should now be blinking (at a very high rate) 8

Debugging: Using Watchpoints A Watchpoint is a type of breakpoint that monitors activity on a memory address In this step we will set a watchpoint to halt the CPU every time the LED toggles Press the Suspend button to halt the running program The code should stop somewhere in the for() loop Open the Breakpoints view by going to menu View  Breakpoints Create a new Hardware Watchpoint as shown Location: 0x400643FC (GPIO_PORTN_DATA register) Memory: Write Click OK 9

Debugging: Using Watchpoints The Watchpoint should appear in the Breakpoints view Run the target multiple times Observe that the execution now halts each time LED is toggled, (ie) whenever GPIO_PORTN_DATA register is written to 10

More Debugging Investigate other debugging views (Open via View menu) Memory Browser Registers Disassembly (see next slide) Set breakpoints Double click on a source line to set/clear See list of breakpoints with the Breakpoints view Use the buttons in the Debug view to: Restart the program Source stepping Assembly stepping 11

View: Disassembly Open the disassembly view by going to View->Disassembly You can see the current location of the PC (small blue arrow) and any breakpoints (small blue circles) Toggle the Show Source button. Note the toggling of interleaved source with the disassembly 12

Debugging: Measuring Clock Cycles The profile clock (used on most other TI devices to count cycles) is disabled on Tiva devices due to hardware limitations, but Count Event can be configured to count cycles In the Breakpoints view, create a Count Event Select Event to Count to be Clock Cycles Click OK

Debugging: Measuring Clock Cycles The Count Event works by counting cycles between breakpoints, so we will create two hardware breakpoints and disable the previously created watchpoint Enable breakpoint at line lines 73 and 85 of blinky.c by double-clicking on the left editor margin Disable the previously created watchpoint (click in the checkbox to uncheck it) Click the Run button Clock should now show ~2000005 cycles

Modify LED Blink Rate The blink rate of LED can be modified by changing the delay value in the loop Modify lines 78 and 90 of blinky.c From: for(ui32Loop = 0; ui23Loop < 200000; ui32Loop++) To: for(ui32Loop = 0; ui32Loop < 800000; ui32Loop++) Save blinky.c In Breakpoints view, disable the two breakpoints set before at lines 73 and 85 by unchecking the checkboxes In Debug View, click on the Terminate button 15

View: Local History CCS keeps a local history of source changes Switch to the CCS Edit perspective Right-click on a file in the editor and select Team  Show Local History You can compare your current source file against any previous version or replace it with any previous version Double-click on a revision to open it in the editor Right-click on a revision and select Compare Current with Local to compare that revision to the current version CCS also keeps project history Recover files deleted from the project Right-click on the project and select Recover from Local History in the context menu 16

Rebuild, Reload and Run the code Make sure you are in the CCS Edit perspective and project blinky is active Click the Debug (green bug) button to rebuild the project and reload the code Press the Run button to run the program The LED on the Launchpad should now be blinking at a slower rate since we increased the number of loops between LED toggles If it is not blinking, remember to disable (not delete) the breakpoints set in the previous session!  17

Debugging: Measuring Clock Cycles Pause execution of the program In Breakpoint view, right-click on Count Event and go to Breakpoint Properties Set Reset Count on Run to “true” to reset the cycle count upon each run Click OK 18

Debugging: Measuring Clock Cycles Enable the two breakpoints at lines 73 and 85 added earlier by clicking in the checkboxes Click the Run button to halt at one of the lines that modify GPIO_PORTN_DATA_R Click Run again Clock should now show ~ 8000010 or 8000011 cycles (about 4x the values seen earlier due to increasing the loop count 4x times) 19

Terminate the Debug Session In the Breakpoint view, delete (not disable) the watchpoint, count event and breakpoints as they will not be used in the next lab – simply highlight them and press the <Delete> key. In Debug View, click on the Terminate button This will terminate the debugger and return you to the CCS Edit perspective

Project Properties Make sure you are in the CCS Edit perspective Right click on the blinky project and select Properties General Settings and Compiler and Linker options can be observed and set from here Click Cancel Device and high level settings Compiler Options Linker Options Version of compiler tools used to create original project [Version of compiler tools used by CCS for current build]

Update Compiler Tools Internet connection is required to install updates using CCS update manager Note: For a hands-on workshop in a class environment, this compiler update may already be installed in a specific location Go to Help->Check for Updates In the list of Available Updates, Deselect All and then select the latest version of ARM Compiler Tools, in this case 5.1.8 Click Next and again Next Accept terms of license agreement Click Finish Restart CCS when it prompts for restart and go through installation

Change Compiler Version Make sure you are in the CCS Edit perspective Right click on the blinky project and select Properties In Compiler version field, notice the version of compiler used for the build is TI v5.1.8 CCS will default to use the latest version installed Click on the drop-down button for the Compiler version field Notice the earlier versions installed with CCS are also available to select Click Cancel to leave settings as-is

Optional: Change Build Options Build options are set per build configuration Right click on the blinky project and select Properties Change your Configuration to Release Change the optimization settings Go to the Build  ARM Compiler  Optimization Change the optimization level to 4 Click OK

Optional: Change Build Configuration Change the active configuration to Release Right click on the Project Select Build Configurations  Set Active  Release Build the project by clicking the build button In the console view you will see that the Release configuration has been built You can also change the configuration and build it by clicking on the arrow beside the build button and selecting the configuration you want to build Select Release and it will build this configuration The active configuration is indicated by the Checkmark

Optional: Load and Run optimized code After building the code, hit the Debug (green bug) button Press the Run button in Debug view to run the program and verify that the LED on the Launchpad is blinking Press Suspend button to halt the program Click on Terminate button to end the debug session

Blinky Example: Summary In this lab we completed the following: Imported and built a simple program to blink the on-board LED Started a debug session and flashed the program to the Launchpad Ran the program to blink LED Used data watchpoints to halt CPU during each LED toggle Measured clock cycles Studied Project Build Properties Updated version of compiler tools Changed compiler version and compiler options in the project and rebuilt/re-ran the code 27

Hello Example (Portable Project): Exercise Summary Key Objectives Create a new portable project based on the “hello” example Create workspace level variables for the project Link files to the project using variables Configure build properties using variables Validate project by building, loading and running the program Tools and Concepts Covered Portable Projects Linked resources Linked resource path variables Build variables 28

Create a New Project Launch the New CCS Project Wizard Go to menu Project  New CCS Project Fill in the fields as shown in the right Target: Tiva TM4C1294NCPDT Connection: Stellaris In-Circuit Debug Interface Project name: hello In Project templates and examples, select Empty Project Click Finish when done Generated project will appear in the Project Explorer view Expand the project to view contents Delete the files tm4c1294ncpdt.cmd and tm4c1294ncpdt_startup_ccs.c from the project 29

Create a Linked Resource Path Variable Here we will create the Linked Resource Path Variable which will be used when linking source files (resources) to the project Open the workspace preferences Menu Window  Preferences Go to the Linked Resources preferences Type ‘Linked’ in the filter field to make it easier to find Click the New button to create a ‘Linked Resource Variable’: Name: SW_ROOT Location: C:\ti\TivaWare_C_Series- 2.1.0.12573 (which is the root location of TivaWare) Click OK 30

Create a Build Variable Here we will create the Build Variable which will be used when setting the project’s compiler and linker options Go to the Build Variables preferences Type ‘Variables’ in the filter field to make it easier to find Click the Add button to create a ‘Build Variable’: Variable name: SW_ROOT Location: C:\ti\TivaWare_C_Series-2.1.0.12573 (which is the root location of the TivaWare directory) Click OK and OK again 31

Link Source Files to Project Here we will link source files relative to the Linked Resource Path Variable previously created Open Windows Explorer and browse to: C:\ti\TivaWare_C_Series-2.1.0.12573\examples\boards\ek-tm4c1294xl\hello Select the following files and drag and drop them into the “hello” project in the CCS Project Explorer view hello.c, startup_ccs.c, hello_ccs.cmd 32

Link Source Files to Project A dialog will appear asking if you wish to Copy or Link the files: Select Link to files Select Create link locations relative to: Use the new Linked Resource variable we created (SW_ROOT) Click OK Files will now appear in the Project Explorer with the ‘link’ icon 33

Link Source Files to Project Follow the same procedure to link other required source files (uartstdio.c and pinout.c) Open Windows Explorer and browse to: C:\ti\TivaWare_C_Series-2.1.0.12573\examples\boards\ek-tm4c1294xl\drivers Select “pinout.c” and drag and drop it into the “hello” project in the CCS Project Explorer view In the dialog that appears, select Link to files Select Create link locations relative to: Use the new Linked Resource variable we created (SW_ROOT) Click OK In Windows Explorer, browse to: C:\ti\TivaWare_C_Series-2.1.0.12573\utils Select “uartstdio.c” and follow above steps to link this file relative to SW_ROOT as well 34

Link Files to Project Right-click on source file “hello.c” and go to Properties Notice how the Location parameter references the Linked Resource Path Variable 35

Modifying Project Properties Here we will add include file search paths using the Build Variable Right-click on the project and select Properties In the Compiler Include Options, click on the Add icon for -- include_path option to add the following entries: ${SW_ROOT}/examples/boards/ek-tm4c1294xl ${SW_ROOT} ${<BUILD VARIABLE>} is the syntax to use a Build Variable in the project properties. Here we are setting an include path to the root of TivaWare installation Linked Resource Path Variables are only used when linking source files to a project. They cannot be used for build options. Build Variables should be used when modifying build options 36

Modifying Project Properties Here we will add paths to libraries using the Build Variable Expand ARM Linker options In the Linker File Search Path, click on the Add icon for --library option to add the following entry: ${SW_ROOT}/driverlib/ccs/Debug/driverlib.lib Click OK 37

Modifying Project Properties Here we will add compiler options specific to this Tiva device Right-click on the project and select Properties In the Compiler Advanced Options->Predefined Symbols, click on Add icon for --define option to add the following entry: TARGET_IS_TM4C129_RA0 38

Project Properties Go to Resource  Linked Resources to see all the Linked Resource Path Variables that are available to the project This will show all variables created at the project level and workspace level Verify that the workspace level Linked Resource Path Variable that was created earlier appears in the list Variables may be edited here but changes will only be recorded at the project level (stored in the project files) 39

Project Properties The Linked Resources tab will show all the files that have been linked to the project It will sort them by files linked with a variable and files linked with an absolute path Links can be modified here with the Edit… button Links can be converted to use an absolute path with the Convert… button 40

Project Properties Go to Build  Variables tab to see all the Build Variables that are available to the project Only project level variables will be listed by default Enable the Show system variables checkbox to see variables set at the workspace and system level Observe that the workspace level Build Variable that was created earlier appears in the list Click OK 41

Build and Load the Program Make sure the ‘hello’ project is in focus in the Project Explorer view Click the Debug button to build and load the code 42

Seeing the output on terminal A terminal program, such as PuTTY is used to view the output on the UART ( UART connected to Stellaris Virtual Serial Port) Start up PuTTY Select the Connection type as “Serial” Set the Serial line parameters are shown below and click Open COM port number should be the appropriate one for your PC (Use Stellaris Virtual Serial Port COM# listed in Device Manager) Speed is 115200 43

Seeing the output on terminal Click the Run button in CCS The PuTTY screen should show the string below which verifies that the program functioned correctly: Hello, world! Click the Suspend button to pause the program Click the Terminate button to terminate the debug session You have now successfully created a “Hello World” portable project that makes use of Linked Resource Path variables and Build variables!! 44

Hello Example (Portable Project): Summary In this lab we completed the following: Created a new portable project Created workspace level variables for the project – Linked Resource path variable and Build variable Linked source files to the project using Linked Resource path variable Configured include paths for compiler using Build variable Validated project by building, loading and running the program 45