Advanced Scripting Techniques for Automating Regression Tests and Measurements with the Code Composer Studio Scripting Utility



Similar documents
Automated Regression Tests and Measurements with the CCStudio Scripting Utility

LabVIEW DSP Test Integration Toolkit for TI DSP

Analysis Toolkit v1.3 for Code Composer Studio User s Guide

Freescale Semiconductor, I

An Introduction to MPLAB Integrated Development Environment

Microsoft Windows PowerShell v2 For Administrators

Using Code Coverage and Multi-event Profiler in Code Composer Studio v2.3 for Robustness and Efficiency Analyses

Using Example Projects, Code and Scripts to Jump-Start Customers With Code Composer Studio 2.0

Code Composer Studio Development Tools v3.3. Getting Started Guide

Using the Scripting Utility in the Code Composer Studio Integrated Development Environment

µtasker Document FTP Client

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

KeyStone Multicore. Ecosystem

Developing applications under CODE COMPOSER STUDIO

Embedded Software development Process and Tools:

TIPS & TRICKS JOHN STEVENSON

Performance Testing for Ajax Applications

Product Development Flow Including Model- Based Design and System-Level Functional Verification

Using C to Access Data Stored in Program Memory on the TMS320C54x DSP

PHP on IBM i: What s New with Zend Server 5 for IBM i

BarTender Integration Methods. Integrating BarTender s Printing and Design Functionality with Your Custom Application WHITE PAPER

Load and Performance Load Testing. RadView Software October

TI expressdsp Digital Media Software Frequently Asked Questions: General Questions

Embedded Linux Platform Developer

Using C to Access Data Stored in Program Space Memory on the TMS320C24x DSP

Copyrighted , Address :- EH1-Infotech, SCF 69, Top Floor, Phase 3B-2, Sector 60, Mohali (Chandigarh),

Digital Guitar Effects Pedal

System Software Integration: An Expansive View. Overview

Andreas Burghart 6 October 2014 v1.0

Applications to Computational Financial and GPU Computing. May 16th. Dr. Daniel Egloff

Software Automated Testing

SOFTWARE TESTING TRAINING COURSES CONTENTS

UNIT 4 Software Development Flow

Development Kit (MCSDK) Training

LABVIEW DSP TEST TOOLKIT FOR TI DSP

Software Engineering for LabVIEW Applications. Elijah Kerry LabVIEW Product Manager

What s New in Version Cue CS2

Introduction. How does FTP work?

PetaLinux SDK User Guide. Application Development Guide

Automating Security Testing. Mark Fallon Senior Release Manager Oracle

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

LoadRunner and Performance Center v11.52 Technical Awareness Webinar Training

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Am186ER/Am188ER AMD Continues 16-bit Innovation

CS222: Systems Programming

Testing Intelligent Device Communications in a Distributed System

Pcounter Web Report 3.x Installation Guide - v Pcounter Web Report Installation Guide Version 3.4

Embedded Component Based Programming with DAVE 3

Notes and terms of conditions. Vendor shall note the following terms and conditions/ information before they submit their quote.

Keil C51 Cross Compiler

Choosing A Load Testing Strategy Why and How to Optimize Application Performance

White Paper. Real-time Capabilities for Linux SGI REACT Real-Time for Linux

Application Note: AN00141 xcore-xa - Application Development

Plug. & Play. Various ECUs tested by automated sequences. dspace Magazine 3/2009 dspace GmbH, Paderborn, Germany info@dspace.com

EE289 Lab Fall LAB 4. Ambient Noise Reduction. 1 Introduction. 2 Simulation in Matlab Simulink

IBM WebSphere MQ File Transfer Edition, Version 7.0

Config software for D2 systems USER S MANUAL

Enterprise Data Integration for Microsoft Dynamics CRM

Complete Integrated Development Platform Copyright Atmel Corporation

Debugging with TotalView

Using WebLOAD to Monitor Your Production Environment

Getting Started with CodeXL

Mobile Application Testing

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Converting Models from Floating Point to Fixed Point for Production Code Generation

Basics of VTune Performance Analyzer. Intel Software College. Objectives. VTune Performance Analyzer. Agenda

ALM120 Application Lifecycle Management 11.5 Essentials

VMware Server 2.0 Essentials. Virtualization Deployment and Management

JOURNAL OF OBJECT TECHNOLOGY

SCCM Plug-in User Guide. Version 2.21

USE OF PYTHON AS A SATELLITE OPERATIONS AND TESTING AUTOMATION LANGUAGE

Selection Criteria for ZigBee Development Kits

AdminToys Suite. Installation & Setup Guide

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Linux. Reverse Debugging. Target Communication Framework. Nexus. Intel Trace Hub GDB. PIL Simulation CONTENTS

Informatica e Sistemi in Tempo Reale

VELOCITY LAB TM Embedded Development Ecosystem

How to create a load testing environment for your web apps using open source tools by Sukrit Dhandhania

Price: see your VeriFone sales representative. Per student, Excluding VAT.

Embedded Software Development

Open Source and Commercial Performance Testing Tools

Unit Testing webmethods Integrations using JUnit Practicing TDD for EAI projects

Lazy OpenCV installation and use with Visual Studio

Module 15: Monitoring

Silabs Ember Development Tools

Echo Backup Software. Quick Start Guide

ANDROID DEVELOPER TOOLS TRAINING GTC Sébastien Dominé, NVIDIA

Using Microsoft Visual Studio API Reference

WaveLab Application Programming Interface

GEDAE TM - A Graphical Programming and Autocode Generation Tool for Signal Processor Applications

Lab 1 Course Guideline and Review

presentation Our customers & Partners AE

How to start with 3DHOP

Transcription:

01001000100000110000001000001100 010010001000 Advanced Scripting Techniques for Automating Regression Tests and Measurements with the Code Composer Studio Scripting Utility Name: Vincent Wan, Ki-Soo Lee Title: SDO Applications Engineer Company Name: Texas Instruments Email: vwan@ti.com, kisoo@ti.com

Agenda The Growing Need for Automation CCStudio Tools for Automation CCStudio General Extension Language (GEL) CCStudio Scripting Utility (CCScripting) Scripting Tips and Tricks Scripting Demo: Automated Profiling Demo Summary References 2

Customers are Challenged with Skyrocketing Application Size and Complexity Skyrocketing Size and Complexity As embedded development continues to grow in both scope and complexity, so does the demands on unit and system testing Effectively automating such testing is a crucial phase in the development cycle and can substantially decrease time to market 3

CCStudio Tools for Automation General Extension Language (GEL) CCStudio Scripting Utility (CCScripting) 4

GEL (General Extension Language) C like scripting language that extends CCStudio usefulness Enter GEL expressions in a GEL file Use GEL to automate actions within CCStudio Many built-in GEL functions for common IDE actions (Halt, Run, Load Program, Set Breakpoint, etc) Create custom GEL functions for additional functionality Automate several steps within one GEL function OnTargetConnect() { /* User must set this value based on board being used */ int sdr_ddr_startup = 0; /* (SDR=0 DDR=1) */ } int armboot; GEL_MapOff(); /* Determine value of ARMBOOT */ armboot = find_armboot(); /* Memory mapping */ GEL_MapReset(); memorymap_init(armboot); GEL_MapOn(); /* OMAP3.2 Setup */ memif_init(armboot); access_width_init(); release_mgs3_reset(); if (sdr_ddr_startup == 0) { SDR_enable(); } else { DDR_enable(); } /* Helen2 Setup */ helen2_setup(); watchdog_disable(); 5

GEL Limitations for Automation GEL scripts can run only from within CCStudio CCStudio must already be configured and IDE running Many GEL calls only apply to that instance of the debug window (heterogeneous debugging) Can not open CCStudio Asynchronous behavior for some built-in functions Difficult to create long complex script with dependencies Not enough built-in GEL callback functions (OnHalt(), OnReset(), etc) to workaround this effectively Cannot create additional callback functions GEL was never meant for full blown automation purposes like overnight testing or batch-runs 6

CCStudio Scripting Utility CCStudio plug-in available via Update Advisor Provides access to CCStudio functionality from either Perl or COM-based (VBA, JScript, etc) scripting languages Provides 50+ useful API s for common actions (launch CCStudio, open project, load program, set breakpoints, run, halt, etc ) Addresses CCStudio GEL automation limitations Scripts can configure and open CCStudio All APIs are synchronous in behavior One script to control multiple CCStudio debug windows during multiprocessor debug Can run/call GEL Functions CCScripting can leverage all GEL functionality Not meant to replace GEL usage but support GEL usage for automation 7

GEL vs. CCScripting GEL (for Automation) Integrated w/ccstudio Scripts run from within IDE Mix of synchronous and asynchronous behavior of built-in functions Control active debug window ~100 built-in GEL functions + ability to create additional custom GEL functions CCScripting Available via Update Advisor Scripts called outside the IDE All APIs are synchronous in behavior Control multiple debug windows (Parallel Debugging) from one script ~50 CCScripting APIs + access to all GEL functions (built-in or custom) Additional capability provided with the scripting language being used (file system access, logging, etc) 8

Maximizing the Value of CCScripting The CCS Scripting Utility can be a valuable tool for automating your environment Creative usage of CCScripting can lead to powerful scripts that: Are fully portable and reusable Are multi-purpose Can workaround known limitations in CCS Provide fully automated test benches Some creative examples/techniques include: Avoiding hard-coded paths/parameters passed in to GEL calls Passing command line parameters to a CCS executable Creating a fully automated CCS profiling test bench 9

Passing parameters to GEL calls We can use CCScripting s TargetEvalExpression() API to dynamically construct GEL calls with different parameters This is particularly useful for passing strings to GEL functions since GEL scripts do not support strings as a built-in type. Good for passing in different filenames and avoid hard-coded paths Otherwise, similar variants of the same GEL file would be needed to make GEL calls that require slightly different parameters depending on ISA, platform, etc. 10

Passing parameters to GEL calls /* do pin connect for the specified McBSP using correct pin connect file */ tmp = basepathfwdslash + testenv.simfilespath + "/CLKX" + testenv.mcbspnumber + ".txt"; pin = "CLKX" + testenv.mcbspnumber; ccs.targetevalexpression('gel_pinconnect("' + pin + '", "' + tmp + '" )' ); Constructed this GEL call Can pass this in based on the device GEL_PinConnect( CLKX0, c:/clkx0.txt ) Note: code shown in JScript 11

Passing command line parameters to a DSP executable CCS does not have built-in support to set command line parameters to a DSP executable (argc, argv) Often it is nice to be able to parameterized e.g. test code via command line parameters CCScripting can do the parameter passing by directly writing argc and argv to DSP memory before running an executable We have implemented a Jscript function to do this for C6000 platforms Need to allocate memory for arguments use args linker switch (for non-bios executables) set.args section size in configuration tool (for BIOS executables) 12

Contents of argument memory section For a non-bios-based executable: Int argc; Char * argv[0]; Char * argv[1]; Char * argv[n]; For a bios-based executable: Int argc; Char ** argv; Char * envp Char * argv[0]; Char * argv[1]; Char * argv[n]; string corresponding to arg 0 string corresponding to arg 1 string corresponding to last arg string corresponding to arg 0 string corresponding to arg 1 string corresponding to last arg 32-bit value written by script string written by script not supported (ignored) by script 13

Getting profiling results via CCScripting Profiling can easily be automated via CCScripting Has built-in APIs to expose functionality of the CCS profiler Configure, start, stop profiler Allow access to profiler clock Export data in both binary and Excel spreadsheet formats Also has extended API for accessing the ATK via Perl in the form of a Perl module We have ported the tprof2xls functionality to Jscript so that ATK results can be delivered in a spreadsheet with a single function call 14

Automated Profiling Demo Executable to be profiled - one per platform (e.g. C6416) Automation Script written in Jscript Windows Scripting Host CCS Scripting APIs Log files Profiling results 15

CCS 3.1 Demo Setup CCScripting 1.50 C6416 Device Cycle Accurate Simulator Reference Frameworks level 3 (with minor modifications to run on simulator) 16

Profiling RF3 Make minor (almost zero) modifications to Reference Frameworks Level 3 Use Simulation of McBSP, EDMA, Timers. Use pin and port connect to simulate McBSP interaction with a virtual audio codec Use the analysis toolkit (ATK) to profile the application Identify function(s) to optimize Validate numbers again post-optimization We can automate the iterative process of loading, running and profiling RF3 on the simulator using CCScripting 17

Peripheral simulation The simulator simulates the application and its use of peripherals CLKR External Clock CLKX Application EDMA McBSP BCLK* DRR DXR FSR FSX Hardware Audio Codec denotes fictitious signals/hardware components, not present in simulation denotes pin-connect simulated signal denotes port-connect simulated address * BCLK is the base clock signal used to drive the audio codec 18

Setting up pin and port connect To automate pin/port connect and disconnect, we called these GEL functions using TargetEvalExpression() in CCScripting: GEL_PinConnect() GEL_PortConnect() GEL_PinDisconnect() GEL_PortDisconnect() 19

Multi Event Profiler Also referred to as Analysis Toolkit (ATK) Provides exclusive function profiling and code coverage Results displayed in an Excel spreadsheet 20

Demo and script walkthrough 21

Summary The Code Composer Studio Scripting Utility was designed to provide the ability to automate unit and system-level testing of an application with CCStudio Creative usage of CCScripting can lead to powerful scripts such as fully automated benchmarking and regression testing of an application with CCStudio 22

References Application Note (SPRAAB7): Automated Regression Tests and Measurements with the Code Composer Studio Scripting Utility Microsoft Windows Scripting: JScript 23

Advanced Scripting Techniques for Automating Regression Tests and Measurements with the Code Composer Studio Scripting Utility Presenter Name: Vincent Wan, Ki-Soo Lee Title: SDO Applications Engineer Company Name: Texas Instruments Email Address: vwan@ti.com, kisoo@ti.com 24