Debugging Shared Memory Systems

Similar documents
Techniques for Profiling on ROM-Based Applications

Configuring Code Composer Studio for OMAP Debugging

Increase Current Drive Using LVDS

Using the TMS320C5509 USB Bootloader

C Fast RTS Library User Guide (Rev 1.0)

OMAP SW. Release Notes. OMAP Software Tools OST version 2.5 Release. 16xx/1710/242x platforms. Document Revision: 2.5 Release

Hardware UART for the TMS320C3x

Dual Access into Single- Access RAM on a C5x Device

Texas Instruments Voltage-Level-Translation Devices

Using the TMS320 DSP Algorithm Standard in a Dynamic DSP System

SN5446A, 47A, 48, SN54LS47, LS48, LS49 SN7446A, 47A, 48, SN74LS47, LS48, LS49 BCD-TO-SEVEN-SEGMENT DECODERS/DRIVERS

TFP101, TFP201, TFP401, TFP401A 2Pix/Clk Output Mode

INVENTORY HISTORY REPORT EXTENSION. User Guide. User Guide Page 1

FlashBurn: A DSK Flash Memory Programmer

EV Software Rev Evaluation System User Guide. Introduction. Contents. Hardware and Software Setup. Software Installation

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C5510 DSK

CUSTOM GOOGLE SEARCH. User Guide. User Guide Page 1

INVENTORY REPORT EXTENSION. User Guide. User Guide Page 1

I2C and the TAS3001C. Introduction. The I2C Protocol. Digital Audio Group ABSTRACT

TMS320C5x Memory Paging (Expanding its Address Reach)

ADD RELATED PRODUCTS TO CART. User Guide. User Guide Page 1

UCC3917 Floating Hot Swap Power Manager Evaluation Board

This document describes the features of the GUI program used to control Power Line Modem with E-Meter Platform.

Implementation of a CELP Speech Coder for the TMS320C30 using SPOX

SavvyCube Ecommerce Analytics Connector by MageWorx. User Guide

DSP/BIOS Link. Platform Guide Published on 20 th JUNE Copyright 2009 Texas Instruments Incorporated.

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C6416 DSK

Getting Started Guide: TMS-FET470A256 IAR Kickstart Development Kit

TMS320C6000 DSP Software-Programmable Phase-Locked Loop (PLL) Controller Reference Guide

TMS320C6000 DSP 32-Bit Timer Reference Guide

TMS470R1x External Clock Prescale (ECP) Reference Guide

NO P.O. BOXES ALLOWED AT CHECKOUT. User Guide. User Guide Page 1

IMPORT/EXPORT Newsletter Subscribers. User Guide. User Guide Page 1

Using LDOs and Power Managers in Systems With Redundant Power Supplies

TMS320C6000 DSP Interrupt Selector Reference Guide

TLK10081 EVM Quick Start Guide Texas Instruments Communications Interface Products

DatasheetDirect.com. Visit to get your free datasheets. This datasheet has been downloaded by

TMS320C620x/C670x DSP Boot Modes and Configuration Reference Guide

Reading a 16-Bit Bus With the TMS320C5x Serial Port

Stereo Dac Motherboard application information

TMS320C6000 DSP Expansion Bus: Multiple DSP Connection Using Asynchronous Host Mode

GUEST CHECKOUT TO REGISTERED CUSTOMERS. User Guide. User Guide Page 1

SN54F38, SN74F38 QUADRUPLE 2-INPUT POSITIVE-NAND BUFFERS WITH OPEN-COLLECTOR OUTPUTS

Power Line Modem with E-Meter Platform Quick Start Guide

PMC to PCI Express Adapter with JN4 Connector Breakout

SN54BCT760, SN74BCT760 OCTAL BUFFERS/DRIVERS WITH OPEN-COLLECTOR OUTPUTS

TMS320C64x DSP Peripheral Component Interconnect (PCI) Performance

File Downloads User Guide

TMS320C62x, TMS320C67x DSP Cache Performance on Vocoder Benchmarks

TMS320UC5409/TMS320VC5409 Digital Signal Processors Silicon Errata

PROGRAMMING THE MSC1210

GUEST CHECKOUT TO REGISTERED CUSTOMERS

IndoTraq Development Kit 1: Command Reference

Code Composer Studio Getting Started Guide

The photograph below shows the PMP9730 Rev E prototype assembly. This circuit was built on a PMP9730 Rev D PCB.

TMS320C6000 DSP General-Purpose Input/Output (GPIO) Reference Guide

2001 Mixed-Signal Products SLOU091A

The TMS320 DSP Algorithm Standard

1 Photo. 7/15/2014 PMP10283 Rev A Test Results

2. With the Evaluation Kit DVD, click the Tools button and then click the Code Composer Studio logo to start the setup program.

WM8805_6152_DS28_EV1_REV3 Schematic and Layout. WM8805_6152_DS28_EV1_REV3 Schematic and Layout. Customer Information 1 of 18 June 2007, Rev 3.

Memory Allocation Techniques in System with Dynamic Swapping of Application Codes

COMMUNICATIONS WITH THE MULTI- CHANNEL HOST P RT INTERFACE

1. Installation Instructions

Bit-reversed Addressing without Data Alignment on the C3x

Table 1. Proper Termination of Unused (Port) Pins in a Single-Port PSE System

SN54ALS32, SN54AS32, SN74ALS32, SN74AS32 QUADRUPLE 2-INPUT POSITIVE-OR GATES

Application Report. 1 Introduction. MSP430 Applications. Keith Quiring... ABSTRACT

Choosing the Appropriate Simulator Configuration in Code Composer Studio IDE

WM DS28-EV1-REV2 Schematic and Layout WOLFSON DEVICE(S):

IMPORT/EXPORT CUSTOMERS FOR MAGENTO 2. User Guide. User Guide Page 1

XIO1100 NAND-Tree Test

SN54ALS04B, SN54AS04, SN74ALS04B, SN74AS04 HEX INVERTERS

TMS320VC5409A Digital Signal Processor Silicon Errata

IMPORT/EXPORT WISH LIST ITEMS FOR MAGENTO 2. User Guide. User Guide Page 1

October 2002 PMP Portable Power SLVU074

Maximizing Endurance of MSC1210 Flash Memory

TMS320C672x DSP Software-Programmable Phase-Locked Loop (PLL) Controller. Reference Guide

1. Installation Instructions

TMS320 DSP DESIGNER S NOTEBOOK. Serial ROM Boot APPLICATION BRIEF: SPRA233. Alex Tessarolo Digital Signal Processing Products Semiconductor Group

74AC11139 DUAL 2-LINE DECODER/DEMULTIPLEXER

System-on-Chip Battery Board User s Guide

1. Installation Instructions

C Routines for Setting Up the AIC on the TMS320C5x EVM

Bootloading the TMS320VC5402 in HPI Mode

SN65DSI86 SW Examples

Wolverine - based microcontrollers. Slashing all MCU power consumption in half

EV Evaluation System User Guide. Contents. Kit Contents. Introduction

WM DS28-EV2-REV1 Schematic and Layout

Protecting the TPS25810 from High Voltage DFPs

External Programming of the TMS320C64x EDMA for Low Overhead Data Transfers

Important Notice. All company and brand products and service names are trademarks or registered trademarks of their respective holders.


WM CS20-M-REV2

Donations Ultimate User Guide

WM DT16-EV1. Customer Standalone Board WOLFSON DEVICE(S): DATE: August 2009

Store & Currency Auto Switcher

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

1. Installation Instructions

HSKT TM Technology Specifications

Transcription:

Application Report SPRA754 - May 2001 Debugging Shared Memory Systems Jeff Hunter Software Development Systems/Emulation Team ABSTRACT Multiple cores on a single processor often share a common block of memory. This application report discusses how to setup the Code Composer Studio Integrated Development Environment (IDE) to debug shared memory systems. The configuration and attributes of the shared memory must be defined in the Code Composer Studio memory map. Once Code Composer Studio is properly set up, several strategies are available for debugging shared memory systems. Users can choose to debug a single core at a time or multiple cores simultaneously. Code Composer Studio s shared memory options enable users to control whether cores with access to shared memory are halted when writing to shared memory, or stepping over a breakpoint. Contents 1 Setting Up Code Composer Studio.................................................... 1 1.1 Defining the Configuration......................................................... 2 1.2 Note to Users of CCS 1.2x......................................................... 3 2 Debugging Multi-Core Systems....................................................... 4 3 Debugging Shared Memory........................................................... 4 4 Setting Shared Memory Options...................................................... 4 4.1 Writing to Shared Memory......................................................... 4 4.2 Stepping Over a Breakpoint........................................................ 5 1 Setting Up Code Composer Studio The shared memory support in Code Composer Studio 2.0 is ISA independent. The only requirement for using the shared memory features in Code Composer Studio is to have a driver that contains shared memory support. You can verify this by looking at the list of capabilities displayed in the Code Composer Studio Setup program. One of the listed capabilities should be shared memory support. If shared memory support is not listed, you must obtain a new driver with shared memory support enabled. To setup Code Composer Studio 2.0 for debugging a shared memory system, the user must define the shared memory configuration in the Code Composer Studio memory map. Code Composer Studio is a trademark of Texas Instruments. 1

1.1 Defining the Configuration A shared memory attribute has been added to Code Composer Studio 2.0 to describe the configuration of shared memory to the debugger. The shared memory attribute is used to define: The cores that have access to the shared memory block(s). The range of the shared memory block(s). The access privileges of each core to the shared memory block(s). The GEL command, GEL_MapAddStr, is used to define shared memory. The syntax is: GEL_MapAddStr(start address, page, length, string, waitstate) The string parameter is formatted as: TYPE [ SH n [ C ] ] The required TYPE attribute designates one of three possible access types: RAM Core has Read and Write access to the shared memory block. ROM Core has Read Only access to the shared memory block. WOM Core has Write Only access to the shared memory block. When defining a shared memory block, append the optional shared memory attribute by using the operator. SHn[C] Core has access to shared memory. The above TYPE attribute determines the type of access the core has to the shared memory block. The n represents the block number that uniquely identifies the block on all processors. It should never be zero. The SH symbol has an optional C attribute. The C attribute can be used to designate Common Shared memory (i.e., the shared memory block contains executable code). The attribute is used to differentiate between memory that contains code or data that will be accessed by two or more cores, and memory that is physically shared but the memory contents are not. When describing each core s shared memory access privileges to Code Composer Studio, the user must describe the emulation read/write access to shared memory, not the CPU s access. For instance, the CPU on the TMS320C5421 cannot write directly to any shared memory. The DMA module must perform all shared memory writes. However, the emulation portion of the TMS320C5421 has direct write access to portions of the shared memory configuration. 2 Debugging Shared Memory Systems

Example: The TMS320C5421 has the following shared memory emulation configuration: Core 1: 0x08000 0x0ffff Read/Write Access 0x18000 0x1ffff Read/Write Access 0x28000 0x2ffff Read Only Access 0x38000 0x3ffff Read Only Access Core 2: 0x08000 0x0ffff Read Only Access 0x18000 0x1ffff Read Only Access 0x28000 0x2ffff Read/Write Access 0x38000 0x3ffff Read/Write Access If an application is linked into the entire shared memory section, the GEL entries to Code Composer Studio look like: Core 1: GEL_MapAddStr(0x08000,0,0x8000, RAM SH1C,0); GEL_MapAddStr(0x18000,0,0x8000, RAM SH2C,0); GEL_MapAddStr(0x28000,0,0x8000, ROM SH3C,0); GEL_MapAddStr(0x38000,0,0x8000, ROM SH4C,0); Core 2: GEL_MapAddStr(0x08000,0,0x8000, ROM SH1C,0); GEL_MapAddStr(0x18000,0,0x8000, ROM SH2C,0); GEL_MapAddStr(0x28000,0,0x8000, RAM SH3C,0); GEL_MapAddStr(0x38000,0,0x8000, RAM SH4C,0); For your convenience, pre-formatted GEL files for all currently available devices that support shared memory are provided in the cc\gel directory of the Code Composer Studio 2.0 installation. When shared memory support is enabled in Code Composer Studio, the shared memory icon is visible at the bottom of the Code Composer window in the center of the status bar. If you configure the GEL file for shared memory, but the driver does not contain shared memory support, Code Composer Studio reports: The driver does not support shared memory. All shared memory support will be disabled for the remainder of this session. 1.2 Note to Users of CCS 1.2x The separate shared memory drivers (5421_shared.dvr, 5440_shared.dvr and 5441_shared.dvr files) are no longer needed in CCS 2.0. The shared memory support present in these files has been moved into the Code Composer executable file. Debugging Shared Memory Systems 3

2 Debugging Multi-Core Systems There are several strategies that can be used to debug target devices containing multiple cores that share the same memory block(s). Many users of multi-core devices run the same code on each core (i.e., the use of shared memory). The cores may or may not interact or depend on what the other cores are doing. If there is no interaction between cores, the best strategy is to debug the code on a single core, then simply load and run it on the other cores. In fact, the majority of users debug multi-core systems by debugging code on a single core at a time. However, when individual cores interact or depend on what other cores are doing, it is desirable to debug multiple cores simultaneously. There are two ways to debug multiple cores simultaneously. These methods can be used exclusively or interchangeably: Use the Parallel Debug Manager for broadcasting commands to multiple cores simultaneously. The Parallel Debug Manager allows users to perform synchronous execution on multiple cores or multiple devices. This includes stepping, running, and halting in parallel. Use the Parallel Debug Manager to start a separate Code Composer Studio debug session for each core, then switch back and forth between the separate sessions running on different cores. In this case, the user executes debug commands within one debug session at a time. Normally, a debug session is unaffected by the actions being performed in another debug session. However, when debugging shared memory systems, any activity in shared memory affects all of the other debug sessions running on cores with access to the shared memory. Support has been added to Code Composer Studio 2.0 to deal with these situations. 3 Debugging Shared Memory When writing to shared memory or reading from shared memory, the debugger knows what read/write access is allowed for each core and chooses a correct core to do the write or read. Breakpoints set in shared memory are active in all debuggers running on cores with access to the shared memory. 4 Setting Shared Memory Options The Code Composer Studio Shared Memory Configuration dialog box enables users to control whether cores with access to shared memory are halted when: Writing to shared memory. Stepping over a breakpoint. 4.1 Writing to Shared Memory Code Composer Studio enables users to force all the cores with access to shared memory to halt while shared memory is modified. This feature is useful when debugging multiple cores simultaneously or while other cores are running code or reading/writing data to shared memory. This is the default behavior of Code Composer Studio. 4 Debugging Shared Memory Systems

When debugging a single core at a time, while no other cores are accessing shared memory, this feature is not needed and can be turned off. To toggle this option on or off: 1. Select Options Customize. 2. In the Customize dialog box, select the Shared Memory Configuration tab. 3. Click the check box to select or de-select Affected cores will be halted during a write to shared memory. Alternatively, the following GEL commands can be used to turn this feature on and off: GEL_SharedMemHaltOnWriteOn() GEL_SharedMemHaltOnWriteOff() 4.2 Stepping Over a Breakpoint If a breakpoint set in shared memory must be stepped over, all cores that have access to the shared memory must be halted. The breakpoint will be cleared, the core(s) stepping over the breakpoint will be stepped, and the breakpoint will be set again. Code Composer Studio enables users to force all the cores with access to shared memory to halt while a breakpoint in shared memory is being stepped over. This feature is useful when users are debugging multiple cores/devices simultaneously, or while other cores are running code or reading/writing data to shared memory. This is the default setting in Code Composer Studio. When debugging a single core at a time, while no other cores are accessing shared memory, this feature is not needed and can be turned off. NOTE: Turning off this setting may result in missed breakpoints if other cores execute code where the breakpoint has been removed to perform the step-over function. To toggle this option on or off: 1. Select Options Customize. 2. In the Customize dialog box, select the Shared Memory Configuration tab. 3. Click the check box to select or deselect Affected cores will be halted when a breakpoint in shared memory is stepped over. Alternatively, the following GEL commands can be used to turn this feature on and off: GEL_SharedMemHaltOnStepOn() GEL_SharedMemHaltOnStepOff() Debugging Shared Memory Systems 5

IMPORTANT NOTICE Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify, before placing orders, that information being relied on is current and complete. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement, and limitation of liability. TI warrants performance of its products to the specifications applicable at the time of sale in accordance with TI s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements. Customers are responsible for their applications using TI components. In order to minimize risks associated with the customer s applications, adequate design and operating safeguards must be provided by the customer to minimize inherent or procedural hazards. TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of TI covering or relating to any combination, machine, or process in which such products or services might be or are used. TI s publication of information regarding any third party s products or services does not constitute TI s approval, license, warranty or endorsement thereof. Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations and notices. Representation or reproduction of this information with alteration voids all warranties provided for an associated TI product or service, is an unfair and deceptive business practice, and TI is not responsible nor liable for any such use. Resale of TI s products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service, is an unfair and deceptive business practice, and TI is not responsible nor liable for any such use. Also see: Standard Terms and Conditions of Sale for Semiconductor Products. www.ti.com/sc/docs/stdterms.htm Mailing Address: Texas Instruments Post Office Box 655303 Dallas, Texas 75265 Copyright 2001, Texas Instruments Incorporated