FPGA, CPLD, and ASIC solutions from Altera
  • Download Center
  • Literature
Sign in/register
myAltera Account
Welcome
  •   myAltera
  •   Logout
  • Products
    • Devices
    • Design Software
    • Intellectual Property
    • Development Kits/Cables
    • Design & Support Services
    • Literature
  • End Markets
    • Automotive
    • Broadcast
    • Computer & Storage
    • Consumer
    • Industrial
    • Medical
    • Military
    • Test & Measurement
    • Wireless
    • Wireline
  • Technology
    • DSP
    • External Memory
    • Embedded Processing
    • Transceivers
    • Parallel I/O
    • Signal Integrity
    • System Integration
  • Training
    • Training Courses
    • University Program
    • Webcasts & Videos
    • Demonstrations
    • Events Calendar
  • Support
    • Design & Support Resources
    • Knowledge Database
    • Devices
    • Design Software
    • Intellectual Property
    • Development Kits/Cables
    • Design Examples
    • Downloads
    • User Communities/Forums
    • mySupport
  • About Altera
    • About Us
    • Environmental
    • Customer Successes
    • Partners
    • Newsroom
    • Investor Relations
    • Jobs
    • Contact Us
  • Buy Online
    • Devices
    • Design Software
    • Development & Education Kits
    • Cables & Programming Hardware
    • Intellectual Property
  • Entire Site
  • Part Number
  • Knowledge Database
  • Support & Technical Docs
  • Forums & Wiki
Username:  
Password:  
 
Forgot my username or password
Don't have myAltera account? Register Now.
Enter your email address:

Embedded Programming With Jam STAPL

Home > Support > Devices > Programming Tools > Jam STAPL > Embedded Programming

Solve Technical Issues With Online Troubleshooters

Download Free Quartus II Web Edition Software

Jam Standard Test and Programming Language (STAPL) meets the necessary system requirements of in-system programming via an embedded processor, as it offers small file sizes, ease of use, and platform independence. Using Jam STAPL for in-system programming via an embedded processor permits convenient in-field upgrades, easy design prototyping, and fast production. These benefits lengthen the life and enhance the quality and flexibility of end-products. It can also reduce device inventories by eliminating the need to stock and track programmed devices.

How It Works

Using Jam STAPL for in-system programming via an embedded processor takes place in two stages (as shown in Figure 1). First, the Altera® Quartus® II development tool generates the Jam STAPL source code, or Jam File (.jam), then stores it in the system memory. The Jam File contains all information required to program the in-system programmability (ISP)-capable device(s), including the programming algorithm and data needed to upgrade one or more devices.

Second, the Jam Player runs on the embedded processor, interprets the information in the Jam File, and generates the binary data stream for device programming. Because upgrades are confined to the Jam File, the Jam Player can be used to program any vendor's device without requiring upgrades.

Figure 1. In-System Programming Using the Jam File & Jam Player via an Embedded Processor

Figure 1. In-System Programming Using the Jam File

About the Jam File (.jam)

To program Altera devices using Jam STAPL, designers must first create a Jam File with the Quartus II development software. It is not necessary to recompile existing designs, because the Quartus II software can create a Jam File from a Programmer Object File (.pof). To store a Jam File in erasable programmable read-only memory (EPROM) or Flash memory, it must be converted first to a Hexadecimal (Intel-format) File (.hex) or a similar programming file. Embedded processor software packages or other utilities can automatically convert a Jam File for EPROM or Flash programming. Similarly, some EPROM programmers support "raw binary" or "absolute binary" formats, which allow the Jam File to be read directly by the programmer without conversion.

Figure 2 describes how to generate a Jam File for in-system programming.

Figure 2. Generating a Jam File

Figure 2. Generating a Jam File

About the Jam Player

The Jam Player is a C program that parses the Jam File, interprets each Jam STAPL instruction, and reads and writes data to and from the JTAG chain. The variables processed by the Jam Player depend on the initialization list variables present at the time of execution. Because each application has unique requirements, the Jam Player source code can be modified easily.

Figure 3 illustrates the Jam Player source code structure.

Figure 3. Jam Player Source Code Structure (1)

Figure 3. Jam Player Source Code Structure

Note:
1. TCK, TMS, TDI, and TDO are the JTAG I/O pins.

The main program performs all of the basic functions of the Jam Player without modification. Only the I/O functions must be modified. They are contained in the jamstub.c file, as shown in Figure 3, and include functions which specify addresses to I/O pins, delay routines, operating system-specific functions, and routines for file I/O pins. These functions can be customized by simply editing the jamstub.c file to then compile the source code for use on any platform.

The Jam Player resides permanently in system memory, where it interprets the commands given in the Jam File and generates a binary data stream for device programming. This structure confines all upgrades to the Jam File, and it allows the Jam Player to adapt to any system architecture.

Downloads

  • Jam STAPL Programs Free
  • Quartus II Web Edition software Free

Related Documents

  • Using Jam STAPL for ISP via an Embedded Processor (PDF) chapter of the MAX II Handbook

Frequently Asked Questions

  • Can I use the Jam STAPL Player or Jam STAPL Byte-Code Player with older versions of .jam and .jbc?
  • Why do I get a "Device Programming Failure" error when programming devices using the stand-alone DOS Jam STAPL Player with the ByteBlasterTM II download cable but not when using the Quartus II programmer?
  • When programming devices with the Jam STAPL files, how do I set the security bits?
  • Solutions/Find Answers…

Related Links

  • JTAG Configuration & ISP Troubleshooter
  • Jam STAPL Vendor Support
  • Programming Tools
  • BSDL Files
  • Programming Center
Rate This Page


  • FPGAs
    • Stratix IV (E, GX, GT)
    • Stratix III
    • Stratix II/Stratix II GX
    • Stratix/Stratix GX
    • Arria II GX
    • Arria GX
    • Cyclone IV (E and GX)
    • Cyclone III
    • Cyclone II
    • Cyclone
  • CPLDs
    • MAX II
    • MAX 3000A
    • MAX 7000
  • ASICs
    • HardCopy IV
    • HardCopy III
    • HardCopy II
    • HardCopy Stratix
    • HardCopy APEX
  • Downloads
    • Device Pin-Outs
    • Gerber Files
    • IBIS Models
    • BSDL/BST
      • IEEE 1149.1
      • IEEE 1149.6
      • IEEE 1532
    • PCB Symbols
    • Schematic Review Worksheets
  • Configuration/Programming
    • Configuration
      • Schemes
        • AP
        • AS
        • FPP
        • JTAG
        • PPA
        • PPS
        • PS
      • Comparison
      • Features
      • Solutions
    • Programming
      • MAX II
      • MAX 3000A
      • MAX 7000
      • Configuration Devices
    • Programming Tools
      • Altera Programming Tools
        • Download Cables
        • Altera Programming Unit
        • Altera Programming SW
      • In-Circuit Testers
        • ICT Vendors
      • Boundary-Scan Tools
        • Vendor Support
      • Third Party
      • IEEE 1532
      • Jam STAPL
        • Embedded Programming
        • Vendor Support
  • Power
    • Power Management
      • Overview
      • Thermal Management
      • Power Supply Integrity
      • Power Supply Regulation
    • Early Power Estimators
    • Certified Power Solutions
  • I/O
    • Features
    • Specifications
    • Hot Socketing
  • PLL & Clock Management
    • Overview
    • PLL Basics
    • Using PLLs in Software
    • Jitter Information
    • Clock Networks
    • Glossary
  • Packaging & Board Design
    • Specification
    • Thermal Resistance
    • Sockets and Layout
    • Manufacturing
  • Quality & Reliability
    • MSL Calculator
    • Certifications
    • Environmental
      • Policy Statement
      • Banned Chemicals
      • REACH
      • RoHS Compliant
        • Alloy Compositions
        • EU Directive Compliance
        • Chinese RoHS
    • PCNs & Advisories
    • Reports
      • Reliability Report
      • Process Technology
      • JEDEC Compliance
    • Single Event Upset
  • Failure Analysis
    • Overview
    • Capabilities
    Please give us feedback
    Products | End Markets | Technology | Training | Support | About Altera | Buy Online
    Jobs | Investor Relations | Contact Us | Site Map | Privacy | Legal Notice
    Copyright © 1995-2010 Altera Corporation. All Rights Reserved.
    Altera Forum
    Altera
    Forum
    Twitter
    Twitter
    RSS
    RSS
    Facebook
    Facebook
    Flickr
    Flickr
    YouTube
    YouTube
    Email Updates
    Email
    Updates