14–18
Chapter 14: Using Jam STAPL for ISP via an Embedded Processor
Conclusion
The following shows example code for the Jam Player.
switch (USERCODE)
{
case "0001":
/*Rev 1 is old - update to new Rev*/
result = jbi_execute (rev3_file, file_size_3, 0, 0, “PROGRAM”,
0, error_line, exit_code);
case "0002":
/*Rev 2 is old - update to new Rev*/
result = jbi_excecute(rev3_file, file_size_3, 0, 0, "PROGRAM",
0, error_line, exit_code);
case "0003":
;
/*Do nothing - this is the current Rev*/
/*Issue warning and update to current Rev*/
default:
Warning - unexpected design revision;
newest rev anyway*/
/*Program device with
result = jbi_execute(rev3_file, file_size_3, 0, 0, "PROGRAM", 0,
error_line, exit_code);
}
A switch statement can be used to determine which device needs to be updated and
which design revision should be used. With Jam STAPL Byte-Code software support,
PLD updates become as easy as adding a few lines of code.
Conclusion
Using Jam STAPL provides an simple way to benefit from ISP. Jam meets all of the
necessary embedded system requirements, such as small file sizes, ease of use, and
platform independence. In-field upgrades are simplified by confining updates to the
Jam STAPL Byte-Code file. Executing the Jam Player is straightforward, as is the
calculation of resources that will be used. For the most recent updates and
information, visit the Jam website at: www.altera.com/jamisp.
Referenced Documents
This chapter references the following documents:
■
■
■
■
■
AN 39: IEEE 1149.1 (JTAG) Boudary-Scan Testing in Altera Devices
AN 111: Embedded Programming Using the 8051 & Jam Byte-Code
AN 122: Using Jam STAPL for ISP & ICR via an Embedded Processor
DC and Switching Characteristics chapter in the MAX II Device Handbook
In-System Programmability Guidelines for MAX II Devices chapter in the MAX II
Device Handbook
MAX II Device Handbook
© October 2008 Altera Corporation