Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Program the EPCS via the JTAG interface (cycIII)

Hi Guys,

I am trying to re-program the EPCS through the FPGA JTAG port. Does anyone familiar if Altera has some C code or AppNote explaining how to do so in the attached topology?

The basic idea is to mimic the Byteblaster and quartos programmer while using an embedded uP.

I Think that "Altera Srunner/Jrunner" Softwares does not serve my purpose (if someone disagree, pls say how?)

so i have tried to use the Jam STAPL software along with the SFL megafunction, but i am not sure it the correct way (so far i have got unrecognized device error...).

Can someone suggest a way of doing so?

Thanks

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I think using a embedded STAPL player is the best way do it.

    You'll need to convert the JTAG Indirect Configuration (.JIC) file Quartus uses into a .JAM file, of course.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi rbugalho,

    I did this of course, I had converted the .JIC file into JAM file using the Altera programmer, as mention in AN370.

    we are using linux OS, So the software guy had converted and implemented the Windows functions (of the STAPL) to linux functions, and mapped the IO's and the std file managament,

    but still no luck,

    he had succeded in reading the SFL version(#31), but still we get an error of :

    Unrecognized device

    Exit code = 6 … Unrecognized device

    he added some debuging print out to the code, and we are getting now:

    jam_process_exit()

    error code# 6

    jam_process_action()

    error code# 6

    thus the error came from this rotines.

    Does anyone success performing this process?

    Are you familer with any AN for the STAPL beside the Readme file of the STAPL?

    Thanks,
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    what JAM player are you using?

    BTW, if you have an Altera programing cable (USB-Blaster, etc), Quartus comes with it's own JAM player, both under Windows and Linux: quartus_jli

    So, you can use that to test your JAM files.

    BTW, you may want to take a look at AN 122 and 586.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I am using VERSION 2.5, is there other version?

    I will look into the quartos_jli as you mentioned,

    Thanks
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I have found the quartus_jl application in C:\altera\90\qprogrammer\bin

    I have executed it with :

    quartus_jli.exe C:\JAM\top_design.jam -a PROGRAM

    This is what I have got :

    *******************************************************************

    Info: Running Quartus II Jam Tools

    Info: Version 9.0 Build 132 02/25/2009 SJ Full Version

    Info: Copyright (C) 1991-2009 Altera Corporation. All rights reserved.

    Info: Your use of Altera Corporation's design tools, logic functions

    Info: and other software and tools, and its AMPP partner logic

    Info: functions, and any output files from any of the foregoing

    Info: (including device programming or simulation files), and any

    Info: associated documentation or information are expressly subject

    Info: to the terms and conditions of the Altera Program License

    Info: Subscription Agreement, Altera MegaCore Function License

    Info: Agreement, or other applicable license agreement, including,

    Info: without limitation, that your use is for the sole purpose of

    Info: programming logic devices manufactured by Altera and sold by

    Info: Altera or its authorized distributors. Please refer to the

    Info: applicable agreement for further details.

    Info: Processing started: Mon Mar 22 10:36:30 2010

    Info: Command: quartus_jli C:\JAM\topmcu_comm.jam -a PROGRAM

    SFL VERSION: 31

    Unrecognized device

    Exit code = 6... Unrecognized device

    Error: Quartus II Jam Tools was unsuccessful. 0 errors, 0 warnings

    Error: Peak virtual memory: 39 megabytes

    Error: Processing ended: Mon Mar 22 10:36:32 2010

    Error: Elapsed time: 00:00:02

    Error: Total CPU time (on all processors): 00:00:00

    Still got the same error,

    Does anyone know what can be the reason?

    Thanks
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Procedure:

    1) Create .JIC file.

    2) In Quartus Programmer, setup necessary infomation. Choose .jic file.

    3) Erase EPCS content (for verification purpose)

    4) In Quartus Programmer, Check Program function, then create .jbc or .jam file. (File-> Convert programming files)

    5) Open NIOS-II command shell.

    6) Using quartus_jli.exe to program device with .jbc file.

    $ quartus_jli.exe -c 1 -aCONFIGURE DE0_Nano.jbc

    $ quartus_jli.exe -c 1 -aPROGRAM DE0_Nano.jbc