Forum Discussion

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

CFI-Flash & EPCS-programming in production

Hi,

if the hardware consists of an EPCS device (for FPGA configuration) and a CFI-flash (for Nios software and serial number), how do I program both after hardware production via JTAG?

In the EPCS device the Nios software and a text file with product specific data (e.g. serial number, production date) must be stored.

The only way I currently know is using the Nios shell and an appr. script:

1. Use Quartus Programmer to load FPGA with configuration

2. Use Flash-Programmer to program EPCS and CFI-Flash

And this means (in my opinion) that the manufacturer has to install the Quartus Programmer AND the complete Nios software (to get the shell and the Flash Programmer)?!??!?!

That would mean installing 1 GBytes on data just for programming!??!?!

Hope somebody of you has a better solution/idea for me!!!!

Thanks

damc

6 Replies

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

    > Hope somebody of you has a better solution/idea for me!!!!

    Well, you can program the EPCS device using active serial mode and the

    standalone programmer:

    https://www.altera.com/support/software/dow...2/dnl-asap2.jsp (https://www.altera.com/support/software/download/programming/asap2/dnl-asap2.jsp)

    As for the parallel flash, what did you plan on doing when you designed the board in

    the first place? Nios has nothing to do with it -- other than providing a nice _alternative_

    to traditional methods.

    Regardless, I like to use u-boot (stored in the EPCS), which loads the application

    code via TFTP and programs the parallel flash with the downloaded image. This is

    all done with a default script and a downloaded script, and is _much_ faster than

    using the JTAG.

    Regards,

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

    Hi Scott,

    the hardware doesn't has any ethernet connection ...

    But that's also not the point.

    Altera is offering the Quartus Programmer and the Flash Programmer.

    Before 5.1 the Flash Programmer was able to program through an empty PFGA, downloading the "Target Board Design" first.

    Since the 5.1 enhancements :-( it's not possible anymore, your have to use the Quartus Programmer before the Flash Programmer.

    And additionally I have to tell the production to install 1 GByte (the whole Nios system) just to get the environment that is needed to program the hardware....

    And what are with the worldwide service partners of our product?!?! In worst-case they need also to install the GByte just to reprogram the hardware ....

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

    damc,

    Check out the Nios II Flash programmer's Guide for version 5.1 software.

    http://www.altera.com/literature/ug/ug_nio..._programmer.pdf (http://www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf)

    It is located in the Nios II literature page - under Related Documents section.

    http://www.altera.com/literature/lit-nio2.jsp (http://www.altera.com/literature/lit-nio2.jsp)

    In Appendix C it covers "How to Install Nios II Stand-Alone Flash Programmer". I think this covers what you are looking for to save harddrive space for production programming.

    You only need to install the Quartus II Stand-Alone programmer (on the Quartus II CD) along with the nios2-flash-programmer.exe copied from a PC that has the NIOS II kit installed. Then you can use the flash programmer in CMD line mode which should be the most basic way to program the flash using the Altera utilities.

    I recommend to read the whole document as there are many improvments in the new flash programming tool - for example if you have the minimum system componets to interface with a flash chip you can use your own design to program the flash chip (it can save a step in the production programming flow and should make flash upgrade programming out in the field easier).

    Regards,

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

    Hi damc,

    > Since the 5.1 enhancements :-( it's not possible anymore, your have to use the

    > Quartus Programmer before the Flash Programmer.

    ...

    > And additionally I have to tell the production to install 1 GByte (the whole Nios

    > system) just to get the environment that is needed to program the hardware....

    Ok, so now I&#39;m confused again ... <<Emphasis added>>

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    source: nios ii flash programmer user guide, october 2005

    When developing your hardware and/or software, you use the Nios II

    flash programmer on a computer with the Quartus II software and the

    Nios II development tools installed. However, in a production or service

    environment you might want to set up a computer to program flash

    memory without installing the full set of altera development tools.

    1. Install the Quartus II Stand-alone Programmer from the Quartus II

    CD. The nios2-flash-programmer utility requires the Quartus II

    Stand Alone Programmer to access the JTAG chain on the board.

    2. On a computer which has the Nios II development tools fully

    installed, find the executable file <Nios II Kit Path>/bin/nios2-flashprogrammer.

    exe.

    3. On the stand-alone computer, copy nios2-flash-programmer.exe

    into the directory <Quartus II Stand-alone Programmer Path>/bin.

    4. Open a command prompt on the stand-alone computer. Change

    directories to the location of the files you wish to program into flash

    memory.

    5. Run the nios2-flash-programmer utility as described in Chapter 3,

    Using the Flash Programmer in Command-Line Mode.[/b]

    --- Quote End ---

    Have you tried this? ... doesn&#39;t this work? What point am I missing here?

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

    Hello Scott

    --- Quote Start ---

    originally posted by smcnutt@Jan 27 2006, 07:29 AM

    regardless, i like to use u-boot (stored in the epcs), which loads the application

    code via tftp and programs the parallel flash with the downloaded image. this is

    all done with a default script and a downloaded script, and is _much_ faster than

    using the jtag.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=12429)

    --- quote end ---

    --- Quote End ---

    I store some custom bootloader in epcs. This is generated with elf2flash. I&#39;d like to have a single *.pof that contains the configuration and the bootloader and program it with the quartus programmer using active serial configuration. Do you know of a way to generate such a *.pof?

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

    --- Quote Start ---

    originally posted by smcnutt@Jan 28 2006, 02:19 AM

    3. on the stand-alone computer, copy nios2-flash-programmer.exe

    into the directory <quartus ii stand-alone programmer path>/bin.

    have you tried this? ... doesn&#39;t this work? what point am i missing here?

    --- Quote End ---

    This does not work. You must also copy cygwin1.dll to the same directory as nios2-flash-programmer.

    Otherwise the nios2-flash-programmmer will not work (tested with Nios II EDS 6.0).