HP EZ-KIT User Manual

Getting Started with
ADSP-BF548 EZ-KIT Lite
Revision 1.0, November 2007
®
Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106
Part Number
82-000206-02
a
Copyright Information
©2007 Analog Devices, Inc., ALL RIGHTS RESERVED. This document may not be reproduced in any form without prior, express written consent from Analog Devices, Inc.
Printed in the USA.
Limited Warranty
The EZ-KIT Lite evaluation system is warranted against defects in materi­als and workmanship for a period of one year from the date of purchase from Analog Devices or from an authorized dealer.
Disclaimer
Analog Devices, Inc. reserves the right to change this product without prior notice. Information furnished by Analog Devices is believed to be accurate and reliable. However, no responsibility is assumed by Analog Devices for its use; nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by impli­cation or otherwise under the patent rights of Analog Devices, Inc.
Trademark and Service Mark Notice
The Analog Devices icon bar and logo, VisualDSP++, the VisualDSP++ logo, Blackfin, the CROSSCORE logo, EZ-KIT Lite, and EZ-Extender are registered trademarks of Analog Devices, Inc.
All other brand and product names are trademarks or service marks of their respective owners.
Regulatory Compliance
The ADSP-BF548 EZ-KIT Lite is designed to be used solely in a labora­tory environment. The board is not intended for use as a consumer end product or as a portion of a consumer end product. The board is an open system design which does not include a shielded enclosure and therefore may cause interference to other electrical devices in close proximity. This board should not be used in or near any medical equipment or RF devices.
The ADSP-BF548 EZ-KIT Lite has been certified to comply with the essential requirements of the European EMC directive 89/336/EEC amended by 93/68/EEC and therefore carries the “CE” mark.
The ADSP-BF548 EZ-KIT Lite has been appended to Analog Devices, Inc. Technical Construction File (TCF) referenced ‘DSPTOOLS1’ dated December 21, 1997 and was awarded CE Certification by an appointed European Competent Body as listed below.
Technical Certificate No: Z600ANA1.029
Issued by: Technology International (Europe) Limited
60 Shrivenham Hundred Business Park Shrivenham, Swindon, SN6 8TY, UK
The EZ-KIT Lite evaluation system contains ESD (electrostatic discharge) sensitive devices. Electrostatic charges readily accumulate on the human body and equipment and can discharge without detection. Permanent damage may occur on devices subjected to high-energy discharges. Proper ESD precautions are recommended to avoid performance degradation or loss of functionality. Store unused EZ-KIT Lite boards in the protective shipping package.

CONTENTS

PREFACE
Purpose of This Manual ................................................................ xiii
Intended Audience ........................................................................ xiii
Manual Contents .......................................................................... xiii
What’s New in This Manual ............................................................ xv
Technical or Customer Support ....................................................... xv
Supported Processors ...................................................................... xvi
Product Information ...................................................................... xvi
MyAnalog.com ........................................................................ xvii
Processor Product Information ................................................. xvii
Related Documents ................................................................ xviii
Online Technical Documentation ............................................. xix
Printed Manuals ....................................................................... xxi
Notation Conventions ................................................................. xxiii
PROGRAMMING ADSP-BF548 EZ-KIT LITE WITH
VISUALDSP++
Installing VisualDSP++ and the EZ-KIT Lite ................................. 1-2
Starting VisualDSP++ and Connecting to the EZ-KIT Lite ............ 1-3
Example 1: Building and Running an Application .......................... 1-6
Getting Started with ADSP-BF548 EZ-KIT Lite v
CONTENTS
Example 1: Sorts.c File .................................................................. 1-9
USING ADSP-BF548 EZ-KIT LITE TO INVESTIGATE
PERFORMANCE FACTORS
ADSP-BF548 Processor Memory Hierarchy .................................. 2-2
Example 2: Benchmarking the Relative Performance of Memories .. 2-4
Example 3: Using the Blackfin Processor Voltage Regulator ........... 2-8
USING ADSP-BF548 EZ-KIT LITE PERIPHERALS
ADSP-BF548 Processor I/O Peripherals ........................................ 3-2
ADSP-BF548 Peripheral Interfaces on the EZ-KIT Lite ................. 3-4
Using ADSP-BF548 Peripherals on the EZ-KIT Lite ..................... 3-5
Example 4: Overview .................................................................... 3-7
Example 4: Audio.c File ................................................................ 3-8
InitAudio()—Opening the Driver ............................................ 3-8
adi_dev_Control()—Configuring the Driver .......................... 3-11
TerminateAudio() ................................................................. 3-14
PlayBuffer() .......................................................................... 3-14
AD1980Callback() ................................................................ 3-16
Example 4: Running ................................................................... 3-17
USING ADSP-BF548 EZ-KIT LITE AS A MASS STORAGE
DEVICE
ADSP-BF548 Processor USB Interface .......................................... 4-2
Analog Devices USB Software ....................................................... 4-2
Example 5: USB Project ................................................................ 4-3
vi Getting Started with ADSP-BF548 EZ-KIT Lite
CONTENTS
Example 5: Running ..................................................................... 4-6
USING ADSP-BF548 EZ-KIT LITE HARD DISK AND LCD
SCREEN
SSL File System Service ................................................................. 5-2
Sharp LQ043T1DG01 LCD Device Driver ................................... 5-3
Example 6: Displaying a Bitmap File on the EZ-KIT Lite .............. 5-4
Example 6: Project Options ........................................................... 5-4
Example 6: Application Structure .................................................. 5-9
FileSystem.c ............................................................................ 5-9
LCD.c ................................................................................... 5-10
adi_ssl_Init.h ........................................................................ 5-11
Example 6: Running ................................................................... 5-12
USING ADSP-BF548 EZ-KIT LITE KEYPAD AND LED
INDICATOR
Event-Driven Device Drivers ......................................................... 6-2
VDK Device Model ...................................................................... 6-3
VDK Message Passing ................................................................... 6-4
Example 7: Creating a VDK Application ....................................... 6-4
Example 7: Source Files ................................................................. 6-7
CREATING A BOOTABLE APPLICATION
VisualDSP++ Utility Programs ...................................................... 7-2
Executable and Loadable Program Files .......................................... 7-2
Creating a Loadable Program File .................................................. 7-3
Getting Started with ADSP-BF548 EZ-KIT Lite vii
CONTENTS
Writing a Loader File to Flash Memory ......................................... 7-5
Booting From Burst Flash Memory ............................................... 7-8
Example 8: Loading ...................................................................... 7-9
Epilogue ..................................................................................... 7-10
INDEX
viii Getting Started with ADSP-BF548 EZ-KIT Lite

PREFACE

Thank you for purchasing the ADSP-BF548 EZ-KIT Lite®, Analog Devices, Inc. evaluation system for ADSP-BF548 Blackfin® processors.
Blackfin processors are embedded processors that support a Media Instruction Set Computing (MISC) architecture. This architecture is the natural merging of RISC, media functions, and digital signal processing (DSP) characteristics towards delivering signal processing performance in a microprocessor-like environment.
The evaluation board is designed to be used in conjunction with the Visu­alDSP++® development environment to test the capabilities of ADSP-BF548 Blackfin processors. The VisualDSP++ development envi­ronment gives you the ability to perform advanced application code development and debug, such as:
Create, compile, assemble, and link application programs written in C++, C, and ADSP-BF548 assembly
Load, run, step, halt, and set breakpoints in application programs
Read and write data and program memory
Read and write core and peripheral registers
Plot memory
Access to the ADSP-BF548 processor from a personal computer (PC) is achieved through a USB port or an optional JTAG emulator. The USB interface provides unrestricted access to the ADSP-BF548 processor and the evaluation board peripherals. Analog Devices JTAG emulators offer
Getting Started with ADSP-BF548 EZ-KIT Lite ix
faster communication between the host PC and target hardware. Analog Devices carries a wide range of in-circuit emulation products. To learn more about Analog Devices emulators and processor development tools, go to
http://www.analog.com/dsp/tools/.
The ADSP-BF548 EZ-KIT Lite provides example programs to demon­strate the capabilities of the evaluation board.
L
alDSP++ installation. The EZ-KIT Lite is a licensed product that offers an evaluation (temporary) license. Once the evaluation license expires, the linker restricts a user’s program to 60 KB of memory for code space with no restrictions for data space
The board features:
Analog Devices ADSP-BF548 Blackfin processor
The ADSP-BF548 EZ-KIT Lite installation is part of the Visu-
D Core performance up to 600 MHz
D External bus performance up to 133 MHz
D 400-pin mini-BGA package
D 25 MHz crystal
Double data rate (DDR) synchronous dynamic random access memory (SDRAM)
D Micron MT46V32M16 – 64 MB (8M x 16-bits x 4 banks)
Burst flash memory
D Intel PC28F128K3C115 – 32 MB (16M x 16-bits)
NAND flash memory
D ST Micro NAND02 – 2 Gb
x Getting Started with ADSP-BF548 EZ-KIT Lite
Preface
SPI flash memory
D ST Micro M25P16 – 16 Mb
Advanced technology attachment packet interface (ATAPI)
D Toshiba 2.5” MK4032GAX – 40 GB HDD
Analog audio interface
D Analog Devices AD1980 SoundMAX codec
D 6 DAC channels for 5.1 surround
D 1 input stereo MIC jack
D 1 input stereo LINE IN jack
D 1 output stereo LINE OUT/HEAD PHONE OUT jack
D 1 output stereo SURROUND jack
D 1 output center and LFE jack
TFT LCD display with touchscreen
D Sharp LQ043T1DG01 – 480 x 272, 4.3” touchscreen LCD
D Analog Devices AD7877 – touchscreen controller
Ethernet interface
D SMSC LAN9218 device
D 10-BaseT and 100-BaseTX Ethernet controller
D Integrated PHY and MAC
D HP Auto-MDIX
•Keypad
D ACT components– 4 x 4 keypad assembly
Getting Started with ADSP-BF548 EZ-KIT Lite xi
Thumbwheel
D CTS Corp rotary encoder
Universal asynchronous receiver/transmitter (UART)
D ADM3202 RS-232 line driver/receiver
D DB9 female connector
•LEDs
D 10 LEDs: 1 power (green), 1 board reset (red), 1 USB (red),
6 general-purpose (amber), and 1 USB monitor (amber)
Push buttons
D 5 push buttons: 1 reset, 4 programmable flags with
debounce logic
Expansion interface: all ADSP-BF548 processor signals
Other features
D JTAG ICE 14-pin header
D USB OTG connector
D HOST interface connector
D Blackfin power measurement jumpers
D PPI1 IDC connector
D SPORT2 and SPORT3 IDC connectors
D TWI, SPI, timers, UART3 IDC connectors
For information about the hardware components of the EZ-KIT Lite, refer to the ADSP-BF548 EZ-KIT Lite Evaluation System Manual.
xii Getting Started with ADSP-BF548 EZ-KIT Lite
Preface

Purpose of This Manual

The Getting Started with ADSP-BF548 EZ-KIT Lite familiarizes users with the hardware capabilities of the evaluation system and demonstrates how to access these capabilities in the VisualDSP++ environment.
EZ-KIT Lite users should use this manual in conjunction with the ADSP-BF548 EZ-KIT Lite Evaluation System Manual, which describes the evaluation system’s components in greater detail.

Intended Audience

The primary audience of this manual is a programmer with experience in desktop and/or embedded programming, but with little or no experience with the Blackfin architecture and/or VisualDSP++. A working knowledge of the C and C++ programming languages will be extremely helpful in understanding the examples and source code blocks referenced in this manual.

Manual Contents

The manual consists of:
Chapter 1, “Programming ADSP-BF548 EZ-KIT Lite with Visu-
alDSP++” on page 1-1
Provides instructions for connecting the EZ-KIT Lite to Visu­alDSP++ running on your PC. The established connection allows you to download the example program (along with your own) to
Getting Started with ADSP-BF548 EZ-KIT Lite xiii
Manual Contents
the board and control the program execution. You will build and run the first example project using the VisualDSP++ debug and data display tools.
Chapter 2, “Using ADSP-BF548 EZ-KIT Lite to Investigate Per-
formance Factors” on page 2-1
Explores the memory hierarchy of the EZ-KIT Lite and measures the ramifications of memory placement decisions. Demonstrates the Blackfin processor core’s built-in voltage regulator and its abil­ity to throttle the processor’s power consumption and clock rate at run-time. The system services library (SSL), your API to the Black­fin processor, also is introduced in this chapter.
Chapter 3, “Using ADSP-BF548 EZ-KIT Lite Peripherals” on
page 3-1
Explores the peripheral interfaces and devices available on the EZ-KIT Lite. Introduces the device driver software supplied with VisualDSP++. You will use one of the supplied device drivers to play an audio clip through the AD1980 audio codec on the EZ-KIT Lite.
Chapter 4,“Using ADSP-BF548 EZ-KIT Lite As A Mass Storage
Device” on page 4-1
Examines the USB and hard disk functionality. You will connect the EZ-KIT Lite to your PC and have Windows use it as a remov­able mass storage device.
Chapter 5, “Using ADSP-BF548 EZ-KIT Lite Hard Disk and
LCD Screen” on page 5-1
Introduces the LCD panel driver of the SSL. You will copy a bit­map file to the EZ-KIT Lite hard disk and display the file on the LCD panel.
xiv Getting Started with ADSP-BF548 EZ-KIT Lite
Chapter 6, “Using ADSP-BF548 EZ-KIT Lite Keypad and LED
Indicator” on page 6-1
Explores the keypad interface of the EZ-KIT Lite and introduces the VisualDSP++ real-time kernel (VDK). You will use the LEDs to communicate the application status.
Chapter 7, “Creating A Bootable Application” on page 7-1 Finally, you will construct an application, drawing from the previ­ous chapters in the manual. A working bitmap photo viewer application will be created, including hard drive access, USB con­nectivity, push button navigation, and audio sample triggering. The application will be burned to the on-board flash devices. This will allow the application to run while not connected to VisualDSP++.

What’s New in This Manual

Preface
This is the first revision of the Getting Started with ADSP-BF548 EZ-KIT Lite.

Technical or Customer Support

You can reach Analog Devices, Inc. Customer Support in the following ways:
Visit the Embedded Processing and DSP products Web site at
http://www.analog.com/processors/technicalSupport
E-mail tools questions to
processor.tools.support@analog.com
Getting Started with ADSP-BF548 EZ-KIT Lite xv

Supported Processors

E-mail processor questions to
processor.support@analog.com (World wide support) processor.europe@analog.com (Europe support) processor.china@analog.com (China support)
Phone questions to 1-800-ANALOGD
Contact your Analog Devices, Inc. local sales office or authorized distributor
Send questions by mail to:
Analog Devices, Inc. One Technology Way P.O. Box 9106 Norwood, MA 02062-9106 USA
Supported Processors
The ADSP-BF548 EZ-KIT Lite evaluation system supports Analog Devices ADSP-BF548 Blackfin processors.

Product Information

You can obtain product information from the Analog Devices Web site, from the product CD-ROM, or from printed publications (manuals).
Analog Devices is online at mation about a broad range of products—analog integrated circuits, amplifiers, converters, and digital signal processors.
xvi Getting Started with ADSP-BF548 EZ-KIT Lite
www.analog.com. Our Web site provides infor-
Preface

MyAnalog.com

MyAnalog.com is a free feature of the Analog Devices Web site that allows customization of a Web page to display only the latest information on products you are interested in. You can also choose to receive weekly e-mail notifications containing updates to the Web pages that meet your interests, including documentation errata against all manuals. You can also choose to receive weekly e-mail notifications containing updates to the Web pages that meet your interests. MyAnalog.com provides access to books, application notes, data sheets, code examples, and more.
Registration:
Visit www.myanalog.com to sign up. Click Register to use MyAnalog.com. Registration takes about five minutes and serves as means for you to select the information you want to receive.
If you are already a registered user, just log on. Your user name is your e-mail address.

Processor Product Information

For information on embedded processors and DSPs, visit our Web site at
www.analog.com/processors, which provides access to technical publica-
tions, data sheets, application notes, product overviews, and product announcements.
Getting Started with ADSP-BF548 EZ-KIT Lite xvii
Product Information
You may also obtain additional information about Analog Devices and its products in any of the following ways.
E-mail questions or requests for information to
processor.support@analog.com (World wide support) processor.europe@analog.com (Europe support) processor.china@analog.com (China support)
Fax questions or requests for information to
1-781-461-3010 (North America) +49-89-76903-157 (Europe)

Related Documents

For information on product related development software and hardware, see these publications:
Table 1. Related Processor Publications
Title Description
ADSP-BF542/BF544/BF548/BF549 Embedded Processor Data Sheet
ADSP-BF548 Blackfin Processor Hardware Ref­erence
General functional description, pinout, and timing
Description of internal processor architecture and all register functions
Table 2. Related VisualDSP++ Publications
Title Description
ADSP-BF548 EZ-KIT Lite Evaluation System
Manual
VisualDSP++ User’s Guide Description of VisualDSP++ features and usage
VisualDSP++ Assembler and Preprocessor Man­ual
Description of the ADSP-BF548 EZ-KIT Lite hardware and software components
Description of the assembler function and commands
xviii Getting Started with ADSP-BF548 EZ-KIT Lite
Table 2. Related VisualDSP++ Publications (Cont’d)
Title Description
Preface
VisualDSP++ C/C++ Complier and Library Manual for Blackfin Processors
VisualDSP++ Linker and Utilities Manual Description of the linker function and com-
VisualDSP++ Loader and Utilities Manual Description of the loader/splitter function and
VisualDSP++ Device Drivers and System Services Manual for Blackfin Processors
Description of the complier function and com­mands for Blackfin processors
mands
commands
Description of the device drivers’ and system services’ functions and commands
If you plan to use the EZ-KIT Lite board in conjunction with a
L
JTAG emulator, also refer to the documentation that accompanies the emulator.
All documentation is available online. Most documentation is available in printed form.
Visit the Technical Library Web site to access all processor and tools man­uals and data sheets:
http://www.analog.com/processors/technicalSupport/technicalLi­brary/.

Online Technical Documentation

Online documentation comprises the VisualDSP++ Help system, software tools manuals, hardware tools manuals, processor manuals, the Dinkum Abridged C++ library, and Flexible License Manager (FlexLM) network license manager software documentation. You can easily search across the entire VisualDSP++ documentation set for any topic of interest. For easy printing, supplementary .pdf files of most manuals are also provided.
Getting Started with ADSP-BF548 EZ-KIT Lite xix
Product Information
Each documentation file type is described as follows.
File Description
.chm Help system files and manuals in Help format
.htm or .html
.pdf VisualDSP++ and processor manuals in Portable Documentation Format (PDF).
Dinkum Abridged C++ library and FlexLM network license manager software doc­umentation. Viewing and printing the Internet Explorer 6.0 (or higher).
Viewing and printing the .pdf files requires a PDF reader, such as Adobe Acrobat Reader (4.0 or higher).
.html files requires a browser, such as
If documentation is not installed on your system as part of the software installation, you can add it from the VisualDSP++ CD-ROM at any time by running the Tools installation. Access the online documentation from the VisualDSP++ environment, Windows
®
Explorer, or the Analog
Devices Web site.
Accessing Documentation From VisualDSP++
To view VisualDSP++ Help, click on the Help menu item or go to the Windows task bar and navigate to the VisualDSP++ documentation via the Start menu.
To view ADSP-BF548 EZ-KIT Lite Help, which is part of the Visu­alDSP++ Help system, use the Contents or Search tab of the Help window.
Accessing Documentation From Windows
In addition to any shortcuts you may have constructed, there are many ways to open VisualDSP++ online Help or the supplementary documenta­tion from Windows.
xx Getting Started with ADSP-BF548 EZ-KIT Lite
Preface
Help system files (
.chm) are located in the Help folder, and .pdf files are
located in the Docs folder of your VisualDSP++ installation CD-ROM. The Docs folder also contains the Dinkum Abridged C++ library and the FlexLM network license manager software documentation.
Your software installation kit includes online Help as part of the Windows interface. These help files provide information about VisualDSP++ and the ADSP-BF548 EZ-KIT Lite evaluation system.
Accessing Documentation From Web
Download manuals at the following Web site:
http://www.analog.com/processors/technicalSupport/technicalLi­brary/.
Select a processor family and book title. Download archive (.zip) files, one for each manual. Use any archive management software, such as Win­Zip, to decompress downloaded files.

Printed Manuals

For general questions regarding literature ordering, call the Literature Center at 1-800-ANALOGD (1-800-262-5643) and follow the prompts.
Hardware Tools Manuals
To purchase EZ-KIT Lite and in-circuit emulator (ICE) manuals, call 1-603-883-2430. The manuals may be ordered by title or by product number located on the back cover of each manual.
Processor Manuals
Hardware reference and instruction set reference manuals may be ordered through the Literature Center at 1-800-ANALOGD (1-800-262-5643), or downloaded from the Analog Devices Web site. Manuals may be ordered by title or by product number located on the back cover of each manual.
Getting Started with ADSP-BF548 EZ-KIT Lite xxi
Product Information
Data Sheets
All data sheets (preliminary and production) may be downloaded from the Analog Devices Web site. Only production (final) data sheets (Rev. 0, A, B, C, and so on) can be obtained from the Literature Center at 1-800-ANALOGD (1-800-262-5643); they also can be downloaded from the Web site.
To have a data sheet faxed to you, call the Analog Devices Faxback System at 1-800-446-6212. Follow the prompts and a list of data sheet code numbers will be faxed to you. If the data sheet you want is not listed, check for it on the Web site.
xxii Getting Started with ADSP-BF548 EZ-KIT Lite

Notation Conventions

Text conventions used in this manual are identified and described as follows.
Example Description
Preface
Close command (File menu)
{this | that} Alternative required items in syntax descriptions appear within curly
[this | that] Optional items in syntax descriptions appear within brackets and sepa-
[this,…] Optional item lists in syntax descriptions appear within brackets
.SECTION Commands, directives, keywords, and feature names are in text with
filename Non-keyword placeholders appear in text with italic style format.
L
a
Titles in reference sections indicate the location of an item within the VisualDSP++ environment’s menu system (for example, the Close command appears on the File menu).
brackets and separated by vertical bars; read the example as this or
that. One or the other is required.
rated by vertical bars; read the example as an optional
delimited by commas and terminated with an ellipse; read the example as an optional comma-separated list of this.
letter gothic font.
Note: For correct operation, ... A Note provides supplementary information on a related topic. In the
online version of this book, the word Note appears instead of this
symbol.
Caution: Incorrect device operation may result if ... Caution: Device damage may result if ...
A Caution identifies conditions or inappropriate usage of the product that could lead to undesirable results or product damage. In the online version of this book, the word Caution appears instead of this symbol.
this or that.
Warn in g: Injury to device users may result if ... A Warning identifies conditions or inappropriate usage of the product
[
that could lead to conditions that are potentially hazardous for the devices users. In the online version of this book, the word Wa rn in g appears instead of this symbol.
Getting Started with ADSP-BF548 EZ-KIT Lite xxiii
Notation Conventions
L
Additional conventions, which apply only to specific chapters, may appear throughout this document.
xxiv Getting Started with ADSP-BF548 EZ-KIT Lite
1 PROGRAMMING
ADSP-BF548 EZ-KIT LITE WITH VISUALDSP++
In this chapter, you will connect your personal computer (PC) to the ADSP-BF548 EZ-KIT Lite evaluation system and write a simple C lan­guage program to perform two sorting algorithms.
In the exercise, you will learn about the following concepts.
VisualDSP++ sessions and target types
Plot windows
Project configurations
The chapter includes the following sections.
“Installing VisualDSP++ and the EZ-KIT Lite” on page 1-2
“Starting VisualDSP++ and Connecting to the EZ-KIT Lite” on
page 1-3
“Example 1: Building and Running an Application” on page 1-6
“Example 1: Sorts.c File” on page 1-9
Getting Started with ADSP-BF548 EZ-KIT Lite 1-1

Installing VisualDSP++ and the EZ-KIT Lite

Installing VisualDSP++ and the EZ-KIT Lite
If you have not already done so, install the ADSP-BF548 EZ-KIT Lite. Ensure the board is disconnected from your PC, then install VisualDSP++ by following instructions in the VisualDSP++ Installation Quick Reference Card, steps 1 to 3.
L
Once the installation is complete, the amber LED (labeled MON, found near the USB jack) is illuminated, indicating a successful physical connec­tion between the PC and EZ-KIT Lite.
Install your license following instructions in the VisualDSP++ Installation Quick Reference Card, step 4.
There are two USB interfaces on the ADSP-BF548 EZ-KIT Lite. Be sure to use the debugger’s interface (labelled USB Debug Agent) when connecting your computer to the board with provided USB cable. The other USB interface (labelled USB-OTG) is for applica­tions use.
1-2 Getting Started with ADSP-BF548 EZ-KIT Lite
Programming ADSP-BF548 EZ-KIT Lite with VisualDSP++

Starting VisualDSP++ and Connecting to the EZ-KIT Lite

If you have not already done so, start VisualDSP++. Use the Windows Start menu to launch the VisualDSP++ environment (also called the Inte­grated Development and Debugging Environment or IDDE).
When VisualDSP++ first launches, it is disconnected from your EZ-KIT Lite or any other kind of debugging session (Figure 1-1).

Figure 1-1. VisualDSP++ Main Window

A VisualDSP++ debugging session consists of a session type and target processor. There are three basic session types:
Getting Started with ADSP-BF548 EZ-KIT Lite 1-3
Starting VisualDSP++ and Connecting to the EZ-KIT Lite
EZ-KIT Lite. This is the dedicated USB connection between the
PC and EZ-KIT Lite. The connection is simple to manage and is an integral part of the EZ-KIT Lite. However, the connection is available with the EZ-KIT Lite only. Once your custom hardware board is available for development, you will use an emulator session (description follows) to connect to the custom hardware.
Simulator. This is a software model of the processor. Simulators
offer unique advantages, the first being that no external hardware is required, a great benefit when using VisualDSP++ on the road. Furthermore, simulators offer a deep insight to the internal work­ings of the processor (pipelines, caches, and more), which is not possible with hardware-based sessions. The downside is that a sim­ulator is several orders of magnitude slower than actual hardware. The software model simulates only the processor, making it diffi­cult to accurately simulate a complex system that involves more than the processor.
VisualDSP++ includes two types of Blackfin simulators: a cycle-accurate, interpreted simulator and a functional, compiled simulator. A cycle-accurate simulator is a completely accurate model of the Blackfin processor and allows you to fully visualize the inner-workings of the processor. The compiled simulator sacri­fices the detailed view but allows you to simulate much more quickly, at millions of simulated cycles per second depending on the speed of your PC.
Emulator. This is a JTAG emulator, the ideal device for connect-
ing to hardware, giving the best performance and maximum flexibility. An emulator is a separate module that provides a
1-4 Getting Started with ADSP-BF548 EZ-KIT Lite
Programming ADSP-BF548 EZ-KIT Lite with VisualDSP++
high-bandwidth USB or PCI connection between the PC and the target device. An emulator is required to connect to a non-EZ-KIT Lite target.
To inform VisualDSP++ that your target is an ADSP-BF548 processor on an EZ-KIT Lite, you must create and activate a new session. Follow these steps:
1. From VisualDSP++ Session menu, select New Session, which launches the Session Wizard (Figure 1-2).
Figure 1-2. Session Wizard
2. On the Select Processor page, ensure that Processor family is set to
Blackfin. In Choose a target processor, select ADSP-BF548. Click Next.
Getting Started with ADSP-BF548 EZ-KIT Lite 1-5

Example 1: Building and Running an Application

3. On the Select Connection Type page, select EZ-KIT Lite. Click Next.
4. On the Select Platform page, ensure that the selected platform is ADSP-BF548 EZ-KIT Lite via Debug Agent. Specify your own Session name for your session or accept the default name. Click Next.
5. On the Finish page, check the presented information and click Finish. VisualDSP++ creates the new session and connects to the
ADSP-BF548 EZ-KIT Lite. Once connected, the main window’s title is changed to include the session name set in step 4.
Creating a particular session is a one-time job. VisualDSP++ records a ses­sion’s details between runs and, by default, tries to reconnect to the session that was in force when VisualDSP++ last ran. You can create more than one session, possibly changing the connection type to Simulator or Emulator. The Session menu allows you to swap between sessions as you wish.
L
Examples in this manual assume that you are using an ADSP-BF548 EZ-KIT Lite session.
Example 1: Building and Running an Application
Now it is time to start our first C program. “Example 1: Sorts.c File” on
page 1-9 is the C program we start in this chapter and develop in the fol-
lowing one. The program randomizes and sorts two arrays using classic sorting algorithms: the bubble sort and the quick sort. If you are familiar with the algorithms, you know that the quick sort, true to its name, is the faster of the two algorithms (on average,
1-6 Getting Started with ADSP-BF548 EZ-KIT Lite
O(n log n) versus O(n2)).
Loading...
+ 82 hidden pages