- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am trying to get "nios ii stand-alone flash programmer" work in Windows.
I follow the Altera "NiosII flash programmer guide" : I --- Quote Start --- nstalling the Nios II Stand-Alone Flash Programmer To install the Nios II Flash Programmer in stand-alone mode, perform the following steps: 1. install the quartus ii stand-alone programmer from the Quartus II CD. thenios2-flash-programmer utility requires the quartus ii stand-aloneprogrammer
to access the jtag chain on the board. --- Quote End --- OK. We can also download 123MB from Altera website. I notice that installer first decompress the files and then copy them to destination. So, 200% disk space needed installation quartus ii stand alone flash programmer (version 12.0sp1) takes 860 mo (not well mentioned in documents). --- Quote Start --- 2. On a computer which has the Nios II EDS fully installed, find the executable file <Nios II EDS install path>/bin/nios2-flash-programmer.exe. 3. On the stand-alone computer, copy nios2-flash-programmer.exe to the directory
<quartus ii stand-alone programmer path>/bin. --- Quote End --- WELL, I just copy nios2-flash-programmer.exe to my standalone directory (of the stand-alone computer) --- Quote Start --- 4. On the computer with the full Nios II EDS installation, find the Windows library file c:/cygwin/bin/cygwin1.dll. If you install cygwin separately from the Nios II EDS, your cygwin DLLs might reside in a different directory. 5. On the stand-alone computer, copy cygwin1.dll into c:/cygwin/bin (or the
equivalent path, based on the cygwin installation). --- Quote End --- cygwin installation ? not found WELL I just copy cygwin1.dll to my standalone directory (of the stand-alone computer) If all files (my_SW_project.flash, nios2-flash-programmer.exe, cygwin1.dll) are located in <Quartus II Stand-Alone Programmer Path>/bin. Nios2-flash-programmer seems to work fine. But it is an ugly solution. To make nios2-flash-progammer work fine, I have to : * manually append <quartus ii stand-alone programmer path>/bin to path environment * OR search by hand <not_automatically_known_Quartus II Stand-Alone Programmer Path>/bin and pass my_SW_project.flash by using "d:\complicated_path_to_my_SW_flash\....." I also use nio2-flash-programmer for other purpose. So It will be greatfull if Quartus II Stand-Alone Programmer installer updates the PATH environment (or equivalent) Have you experienced Nios II standalone flash programmer ?
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am also trying to get "Nios II stand-alone flash programmer" work in Windows.
But I cannot be successful. I do same thing as you about 5 intalling steps. And then I do not know how to do about next Run steps. 1. Open a command prompt on the stand-alone computer. Change directories to the location of the files you wish to program into flash memory. 2. Run thenios2-flash-programmerutility as described inChapter 3, Using the Flash Programmer from the Command Line. My qestion: a. How to open "a command prompt"? b. Is "a command prompt" the Nios II Command Shell? if yes, where is it ? Thanks.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
a) How to open "a command prompt"? In Windows, Do Start menu > execute > "cmd". b) Is "a command prompt" the Nios II Command Shell? if yes, where is it ? In a stand alone installation, I think NO. ELSE it would be something like "C:\altera\12.0sp1\nios2eds\Nios II Command Shell.bat" EDIT : For Nios II programmer, you need to copycygwin1.dll
nios2-flash-programmer.exe
from a full quartus + nios installation
It is complex and the whole takes over 800 MBytes ! for a standalone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, it can work well.
After open the cmd.exe, I run 3 commands to program to EPCS on a stand-alone computer. 1.//Location of nios2-flash-programmer.exe cd "C:\altera\91sp2\qprogrammer\bin" 2.//program .flash of sof2flash. nios2-flash-programmer "D:/C_epcs.flash" --base=0x81800 --epcs --id=0x1C53A879 --timestamp=1395209813 --device=1 --program --verbose 3.//program .flash of elf2flash. nios2-flash-programmer "D:/C_SOPC_epcs.flash" --base=0x81800 --epcs --id=0x1C53A879 --timestamp=1395209813 --device=1 --program --verbose Some picture as follow: https://www.alteraforum.com/forum/attachment.php?attachmentid=8677 And I find some errors like: Initial values: ......... Not here: reserved fields are non-zero. I donot kown why.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You say you have 2 files to download to EPCS, don't you ?
C_epcs.flash to configure the FPGA and C_SOPC_epcs.flash is your embedded NIOS II program. BUT you try to write the both at the same address in EPCS. Your FPGA configuration C_epcs.flash whould be at address 0x00 Your embedded software should be located after the FPGA configuration. look at documentation of nios2-programmer, flash to epcs converter, generation of .pof file (specially to epcs)... They describe how to insert software program after the FPGA configuration.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi, I know what you say. Embedded software should be located after the FPGA configuration. The 2 files downloaded to EPCS is from the directory "You nois profect\flash" and they are generated when downloading to EPCS by flash programmer in Nios II SBT for Eclipse. The first file is generated by the command "$SOPC_KIT_NIOS2/bin/sof2flash --input="D:/.../C.sof" --output="D:/.../flash/c.flash" --epcs --verbose". The second file is generated by the command "$SOPC_KIT_NIOS2/bin/elf2flash --input="D:/.../software/C_SOPC/C_SOPC.elf" --output="D:/.../flash/c_sopc.flash" --epcs --after="D:/.../flash/C.flash" --verbose ". Refer to the description of "flash_programmer.sh" for the two commands above, paragraph 4 in page 3-1 of documentation "Nios II Flash Programmer User Guide.pdf (2010)". You can see "--after="D:/.../flash/c.flash"". So it is OK when downloading the "c_sopc.flash" after downloading "c.flash". The way I used is not convenient, I must make sure the directory of two .flash files. My workmate suggest editing the tree commands to a bat file, but I know few about bat file. My qestion: My operation about CMD is in# 4 floor. Please share your operation about CMD. Do you just program 1 file by CMD? what is your file programmed? where is it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't understand you question.
bat files are files written in batch. they are script files for ms dos and windows similar to .sh .bash .dash for Linux, but a little reduced. CMD files are very similar to BATCH. After you can double clic on it to launch the script. rem : the "tree" commands :-) You have to generate the .flash (and/or .pof) only once on the development computer. On the standalone computer, just use this flash file.to resume at minimum, the batch files are a sequence of commands
keep in mind that there are differnences from the nios shell :
in directory paths change "/" to "\"
replace "$xxxx" by "%xxxx%"
To make the world easy, put the .flash and the .bat in the same directory. For you, the bat file could be :
REM This line is a comment
REM Be ware about the dir separator, it must be "\" (antislash) on Windows
nios2-flash-programmer "C_SOPC_epcs.flash" --base=0x81800 --epcs --id=0x1C53A879 --timestamp=1395209813 --device=1 --program --verbose
REM Make a pause so as the user to check if all is OK
pause
Your antivirus/Windows may warn you when you try to launch the bat.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page