ANALOG DEVICES EE-311 Service Manual

Engineer-to-Engineer Note EE-311
a
Technical notes on using Analog Devices DSPs, processors and development tools
Visit our Web resources http://www.analog.com/ee-notes and http://www.analog.com/processors or e-mail processor.support@analog.com or processor.tools.support@analog.com for technical support.
VisualDSP++® Flash Programmer API for Blackfin® Processors
Contributed by Igor Likhotkin Rev 1 – December 14, 2006

Introduction

Embedded application testing usually involves using a JTAG emulator to debug an executable that has been loaded onto a target processor. Toward the end of the development process, it becomes critically important to test application code that has been booted into the processor from flash, PROM, or another peripheral device. Often, this software development phase is difficult to fully automate. VisualDSP++® features an additional set of API functions that facilitate the uploading (burning) of executable code and data image files into flash memory. Using the new API functions, application images can be programmed into flash, and flash contents can be filled or erased.

Hardware/Software Requirements

The Flash Programmer plug-in API interface requires VisualDSP++ Development Tools version 4.5 or higher. In addition, a suitable hardware board is needed in order to test the loading of bootable application images onto flash devices. The ADSP-BF533 EZ-KIT Lite® and the ADSP-BF537 EZ-KIT Lite evaluation systems were used to construct and test the example code described by this EE-Note. However, the Flash Programmer API supports all Blackfin® processors.

New API Functions

The API for the Flash Programmer plug-in provides a relatively small subset of functions:
EraseAll – erases the entire contents of the flash device EraseBlock – erases the specified (numeric) sector of the flash device FillFlash – fills the flash memory with the specified number pattern LoadDriver – downloads the flash device driver program (.dxe) onto the processor, which facilitates
loading the flash image onto the flash chip
LoadFile – uploads the bootable application image into the flash device
The Flash Programmer API is part of the general VisualDSP++ API, which enables users to create scripts or programs in any language that supports Automation.
An example script (
programFlash.vbs
All of the code samples and commands below refer to the example script.
Copyright 2006, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer product design or the use or application of customers’ products or for any infringements of patents or rights of others which may result from Analog Devices assistance. All trademarks and logos are property of their respective holders. Information furnished by Analog Devices applications and development tools engineers is believed to be accurate and reliable, however no responsibility is assumed by Analog Devices regarding technical accuracy and topicality of the content provided in Analog Devices Engineer-to-Engineer Notes.
[1]
) has been written to exercise the entire Flash Programmer API.
a

Typical Use of Flash Programmer API

The most common use for the new API functions is to upload an embedded application image file into flash memory on a target board as part of a large test suite. To accomplish this, scripts can be written in a variety of Automation-enabled languages.
The example script performs each of the following tasks:
Connects to the VisualDSP++ IDDE object Retrieves a handle on the Flash Programmer plug-in object Loads the flash chip driver program onto the target board processor Erases all (or specified) flash sectors Fills the flash memory range with a user-specified value Uploads the selected application image into flash memory Optionally sends a soft reset (boot up) signal to the processor
The example Automation script requires that the VisualDSP++ IDDE is open and
that an appropriate hardware debug session is established. To automate session creation in the script, refer to VisualDSP++ online Help, which includes the complete VisualDSP++ Automation interface reference.

Connecting to IDDE and Obtaining Flash Programmer Handle

Implementing the above steps is a fairly straightforward process with the VisualDSP++ API. The flash­related part of the example script begins with obtaining the handle to the Flash Programmer plug-in object, as shown in Listing 1.
'... WScript.StdOut.WriteLine "Starting the FlashProgrammer plugin..." Set FPPlugin = app.PluginList.Item("Flash Programmer") Set FlashProgrammer = FPPlugin.Open() '...
Listing 1. Script to Obtain Handle to the Flash Programmer Plug-In Object

Loading the Flash Driver

Next, loading the flash driver into the target processor is accomplished in a single line:
FlashProgrammer.LoadDriver FPDriver
Since the script works with the ADSP-BF533 EZ-KIT Lite, the flash driver was provided by Analog Devices. The Flash Programmer plug-in, however, can communicate with custom flash drivers for various memory chips.
VisualDSP++® Flash Programmer API for Blackfin® Processors (EE-311) Page 2 of 6
Loading...
+ 4 hidden pages