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*/
default:
/*Issue warning and update to current Rev*/
Warning - unexpected design revision;
/*Program device with
newest rev anyway*/
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:
Referenced Documents
This chapter references the following documents:
■
■
chapter in the
MAX II Device Handbook
chapter in the
MAX II
Device Handbook