Embedded Development Tools

Slides:



Advertisements
Similar presentations
Code Composer Department of Electrical and Computer Engineering
Advertisements

U-Boot and Linux Kernel Debug using CCSv5
LAUNCHXL2-RM57L – Project 0
Using PDG with e2studio: Example
MZ790 Print Driver and RINC Software Install and Setup These instructions are to assist you in installation and setup of the MZ790 Print Driver and RINC.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
1. 2 LXU800 User’s Manual 1.Installation – Windows XP UI Features Introduction Data Connection & Disconnection.
Introduction Purpose Objectives Content Learning Time
1 Semester 2 Module 2 Introduction to Routers Yuda college of business James Chen
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
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.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
Packet Tracer: Novice Session
Packet Tracer 4.1: Novice Session
Configuring the MagicInfo Pro Display
Hands-On Microsoft Windows Server 2008
AT91SAM9261-EK WinCE 6.0 DEMO ATMEL AT91 Application & Support Group
ICP Kit 2011 HHC Data Entry Module The World Bank ICP Kit Training African Development Bank.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
AT91SAM9261-EK WinCE 5.0 DEMO ATMEL AT91 Application & Support Group Version 1.O February 2007.
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.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
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.
Version How to Use Packet Tracer MarinaMD.
Design Verification Code and Toggle Coverage Course 7.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced E 2 Studio Topics.
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.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
ChibiOS/RT Demo A free embedded RTOS
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course describes Coverage, a utility that is used.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
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.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
TIZEN STUDIO INSTALLATION & ENVIRONMENT SETUP FOR DEVLAB
After Construction Name: Per #:.
Workshop Setup The software/hardware used in this workshop are:
Making a 24hr Timer.
Programming and Debugging with the Dragon and JTAG
VAB™ for INFINITY Tutorial
Use of MPLab software Paul Cockshott.
CS4101 Introduction to Embedded Systems Lab 1: MSP430 LaunchPad IDE
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Introduction to Programming
Introduction Purpose Objectives Content Learning Time
PRU-ICSS Programming with CCS
iSERIES PROGRAMMING/LOGGING TRAINING
RX111 Promotion Board (RPB) hands on
Debugging with Eclipse
Advisor: Prof. Gandhi Puvvada
Processor Fundamentals
ECE 3567 Microcontroller Lab
Examplify The following slides are the ExamSoft’s recommended best practices to help you take your exam. We want you to be prepared for your exam on exam.
Software Setup & Validation
Computer System Laboratory
Code Composer Essentials 3.0
Debugging with Eclipse
ECE 3567 Microcontrollers Lab
ECE 3567 Microcontrollers Lab
Presentation transcript:

Embedded Development Tools Real-time Debug Embedded Development Tools

What is Real-time Debug? Stop Mode Debug (traditional debugging) require the processor to be completely halted to access memory and registers stops all threads and prevents interrupts from being handled Stop Mode can be used as long as system/application does not have real-time constraints, but is very undesirable for real-time applications Real-time Mode Debug enables programmers to: examine and modify contents of memory/register locations while CPU is running and executing code halt/debug application while allowing user specified time critical interrupts to be serviced without interference Real-time debug capabilities vary by device and are supported via different methods 2

Real-time Debug capabilities Access to memory while the processor is running Supported on Tiva, Stellaris, Hercules, C28x, C66x, C64x, C55x On ARM it is enabled through the DAP (Debug Access Port) DAP is part of the ARM emulation logic and enables the debugger to access memory of the device without requiring the processor to enter the debug state On DSP/28x it is enabled via ICEMaker hardware Also possible on Cortex A devices but is not recommended when the MMU is in use (will always show physical memory and not virtual) Access to registers while the processor is running Supported on C28x, C66x, C64x, C55x Enabled through hardware (ICEMaker) Service interrupts while the processor is halted It’s not tightly integrated for Cortex A devices because it’s a direct access to system memory, and may not be what a traditional memory access would show.  So, if the MMU is on, the DAP access will show physical memory, but a core access while halted will show virtual memory.  The M3 doesn’t have an MMU, so it’s tightly integrated.  (There are plans to have the DAP access tightly integrated, but as a physical memory access). 3

Real-time Mode: Polite and Rude Memory accesses and halts issued from the debugger can be blocked For example, when in a critical section of code setting the DBGM (Debug Mask) bit in status/control register will block accesses Hardware or application can set DBGM bit In some devices hardware sets it automatically when any interrupt is taken In Polite real-time mode (default when real-time mode is enabled) DBGM settings are respected by debugger Debugger will not stall the processor to make memory accesses, but rather will wait for processor to get into non-critical section of code before making the access In Rude real-time mode DBGM settings are ignored by debugger and accesses are made anyway Allows for error recovery if application sets these bits and then hangs 4

Real-time Interrupts When halted in Stop mode, all interrupts are blocked When halted in Real-time mode, time critical interrupts can continue to be serviced The Debug Interrupt Enable Register (DBGIER on C28x) is used to designate time-critical interrupts Interrupts which are enabled by both IER and DBGIER will be serviced when halted in real-time mode, regardless of global interrupt mask bit (INTM on C28x) 5

Viewing Real-time accesses with CCS To enable/view real-time access to memory and registers, click on Continuous Refresh in Memory Browser and Registers view in CCS Continuous Refresh will periodically refresh the debug views Default refresh interval is 500 ms Default refresh interval is configurable 6

Using Real-time mode with CCS To enable real-time mode, click on Enable Silicon Real-time Mode icon Or from CCS menu Run->Debug Configurations->Target tab When enabled: The debugger will respect the DBGM bit and will not stall the processor to make the memory accesses Time-critical interrupts can continue to be serviced while target is halted If enabled prior to launching the debugger, will allow connecting to running device 7

Using Real-time mode with CCS When real-time mode is enabled, it defaults to Polite real-time mode In Polite mode, debugger will prevent the target from being halted while application is servicing a time-critical interrupt If a debugger access requires target to be halted when servicing a time- critical interrupt, user will be asked whether Rude real-time mode should be enabled In Rude mode, halt requests are serviced immediately, regardless of whether the processor is executing a time-critical ISR 8

LABS

LAB Requirements Software: Hardware Code Composer Studio v6.1.0.00104 Download from http://processors.wiki.ti.com/index.php/Download_CCS and install to c:\ti controlSUITE Download from http://www.ti.com/tool/controlsuite and install to c:\ti Hardware F28027 LaunchPad Connected to PC using USB cable Other F28x hardware such as experimenter kits or Launchpads could also be used as long as the appropriate example project for that device exists in controlSUITE

LAB Conventions Before starting, it is important to review some lab conventions that will ease your work… Lab steps are in black and numbered for easier reference … Explanations, notes, warnings are written in blue Warnings are shown with Information is marked with Tips and answers are marked with Questions are marked with 11

LAB 1: Real-time access and real-time mode 30 MINUTES Open CCS and select a workspace (the default is fine) You can close the TI Resource Explorer View (it will not be used) 12

LAB 1: Real-time access and real-time mode on F28x Objectives Demonstrate how to access/modify memory and registers in real time when processor is running Enable real-time mode in Code Composer Studio Set up interrupts in code so they can continue to run when debugger is halted Step through code while time critical interrupts continue to be serviced Tools and Concepts Covered Real-time access to memory and registers Real-time mode and real-time interrupts 13

Importing Example Projects Go to menu Project  Import Existing CCS Eclipse Project Click the Browse button and go to C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_examples\epwm_real-time_interrupts Select the project “Example_F2802xEPwmRealTimeInt” Ensure the “Copy projects into workspace” is selected Click Finish

Reviewing code In Project Explorer view, expand the project Example_F2802xEPwmRealTimeInt Open the source file Example_2802xEPwmRealTimeInt.c Observe the following: The program configures ePWM1 timer and increments a counter each time interrupt is taken LED2 is toggled in the main routine and LED3 is toggled in the interrupt service routine epwm1_timer_isr FREE_SOFT bits in EPwm1Regs and DBGIER.INT3 bit are initially cleared. These bits must be set to designate ePWM1 interrupt as time critical and operational in real time mode after halt command. During the lab, these bits will be set through the Expressions view in CCS when processor is halted to see how real-time interrupts work

Important Variables While running the labs, the following variables are of interest. Observe how they change while the program is running and halted: EPwm1TimerIntCount - counts the number of times the ISR for PWM1 is serviced ePWM1.TBCTR - register containing the counter for PWM1 – observe that it will stop with an emulation halt unless FREE_SOFT bits are set ePWM1.TBCTL – Bits 14 and 15 (FREE_SOFT bits) establish how the counter for the PWM reacts to an emulation halt command. The default 00 in these bits will stop the counter when a halt command is received. A 10 or 11 will allow the counter to run freely after the halt command is received DBGIER.INT3 - Debug Interrupt Enable Register bit that is used to designate whether the corresponding interrupt is time critical. Setting this bit will designate the PWM interrupt to be time critical and operate as real-time interrupt

Build the Example Project Go to the Project Explorer view Right-click on Example_F2802xEPwmRealTimeInt and select “Build Project”

Create a Target Configuration File Right-click on the project and go to File  New  Target Configuration File Specify f28027lp as the name and click Finish In the “Connection” field, select Texas Instruments XDS100v2 USB Debug Probe In the “Board or Device” filter field, type F28027 Select TMS320F28027 Click Save

Launch the Debugger Click on the debug button (green bug icon) to debug the project This will build the project (if required), launch the debugger, flash the program onto the device and run to main() Add these variables to the Expressions view: EPwm1TimerIntCount ePWM1.TBCTR ePWM1.TBCTL DBGIER.INT3

Setup Continuous Refresh Open the Memory Browser and enter &EPwm1TimerIntCount in the address field to view the address of that variable Arrange the views such that the Expressions, Memory Browser and Registers views are all visible at once In Registers view, expand the ePWM1 register Enable Continuous Refresh on all three views

Run the program Click Resume to run the program The LEDs on the board should be blinking, LED2 (toggled in main routine) and LED3 (toggled in ISR routine). LED2 appears to stay on continuously but is actually just blinking at a very high speed. The Expressions, Memory Browser and Registers view update in real-time while the processor is running Halt the core by clicking the Suspend button The LEDs on the board should stop blinking and the views stop updating

Enable Real-time Mode Enable real-time mode in CCS by clicking the button shown here: Click Resume to run the core In the Expressions view, set ePWM1.TBCTL to 0x8090 to set FREE_SOFT bit to 2, which will enable free run mode on the counter Setting this bit allows the timer to continue to increment even when the core is halted Click the Suspend button to halt the core Notice that ePWM1.TBCTR keeps changing in the Expressions view even when the target is halted as it is set to free run However note that the interrupt is not being serviced (EPwm1TimerIntCount is not incrementing and LED3 has stopped blinking) as it has not been designated as a real-time interrupt

Real-time Interrupts In the Expressions view, set DBGIER.INT3 to be 1 to designate PWM1 as a real-time interrupt Notice that EPwm1TimerIntCount now continues to increment even though target is halted. Similarly notice that LED3 which is toggled within ISR has resumed toggling while LED2 which is toggled within main routine remains stopped Click the Step Into button several times to single-step through the code Notice that LED2 toggles on and off as you step through the main routine while LED3 continues to blink These steps demonstrate that, in real-time mode, the PWM1 interrupt that we designated as time critical is continuing to be serviced even when the core is halted Click the Terminate button in the Debug View to close the debug session

LAB 2: CONNECT to running program 15 MINUTES Open CCS and select a workspace (the default is fine) You can close the TI Resource Explorer View (it will not be used) 24

LAB 2: Connect to running program Objectives Connect to a program already flashed and running on target without resetting the device Tools and Concepts Covered Debug properties and Real-time mode 25

Change build configuration of Project In Project Explorer view, right-click on Example_F2802xEPwmRealTimeInt, go to Build Configurations- >Set Active and select Flash This will change the build configuration to the Flash version

Launch the Debugger (default settings) Click on the Debug button (green bug icon) to debug the project This will build the project (if required), launch the debugger, flash the program onto the device and run to main() Click Resume in the Debug view to run the program Verify that LED2 and LED3 are blinking as expected. Note that LED2 may look like it is continuously on but is actually just blinking at a very high speed. Click the Terminate button in the Debug View to close the debug session Unplug and re-plug the USB cable to power cycle the board so the program starts running from Flash

Modify the Debug settings Go to menu Run->Debug Configurations and select Example_F2802xEPwnRealTimeInt in the left pane Go to Program tab and select Load Symbols Only This will load just the symbols for the program rather than reflashing the whole program every time the debugger is launched Go to Target tab->Auto Run and Launch Options and check the box for Enable realtime mode Click Apply and Close

Launch the Debugger Click on the Debug button (green bug icon) to debug the project This will build the project (if required), launch the debugger, connect to the device, load symbols in this case, and halt the target at the current point of execution Click Resume in the Debug view to continue running the program from that point Verify that LED2 and LED3 are blinking as expected Click the Terminate button in the Debug View to close the debug session

Modify the Debug settings Go to menu Run->Debug Configurations and select Example_F2802xEPwnRealTimeInt in the left pane Go to Target tab->Program/Memory Load Options and uncheck the box for Halt the target on a connect Click Apply and Close

Launch the Debugger Click on the Debug button (green bug icon) to debug the project This will build the project (if required), launch the debugger, connect to the device, load symbols in this case, and leave the target running Observe the LEDs blinking and variables changing in the Expressions view (if Continuous Refresh icon is enabled) to confirm program is running Click the Suspend button in the Debug view to halt the core and perform other debugging actions, as required Click the Terminate button in the Debug view to close the debug session

Summary After completing these labs you should now be familiar with: Accessing memory and registers in real time while the processor is running Enabling real-time mode in Code Composer Studio Setting up interrupts so they can continue to run when the debugger has halted the processor Stepping through code while time critical interrupts continue to be serviced Using real-time mode to connect to a program already flashed and running on target 32