Forum Discussion
Altera_Forum
Honored Contributor
21 years agoNew version of NiosII Flash Programmer
Hello,
I'm reading the manual for the Nios II Flash Programmer User Guide, but it appears to not cover my software? On page 18, figure 1-3 shows options for "Program flash memory with software project" - I do not have this at all on my display? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif I'm fully patched up 4.1 sp2? help! I'm trying to understand how to place my program into the EPCS after the bitsream!! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif Thanks for any and all guidance offered! joe26 Replies
- Altera_Forum
Honored Contributor
Joe,
If you are refering to the Nios II Flash Programmer User Guide ver 1.1, Jan 2005 then this version has been updated for Nios2 v1.1. Nios2 v1.1 requires Quartus2 v4.2. You may need to upgrade to the latest versions of Quartus and Nios2. Refer: nios ii & nios processor version compatibility with quartus ii software & sopc builder (http://www.altera.com/support/ip/processors/nios2/compatibility/ips-nios2_compatibility.html) However there is a patch for Nios2 1.1 to address a problem booting the EPCS4. You need to apply this after installing Nios2 1.1. Refer: nios ii development kits version 1.1 errata (http://www.altera.com/support/ip/processors/nios2/ips-nios2_devkit1.1-er.html#config) Once upgraded just following the Nios II Flash Programmer User Guide and you should have no problems getting it to boot from the EPCS4. Good luck. Bob. - Altera_Forum
Honored Contributor
I am using Nios2 1.0, updates/patches from Altera.
I notice that 1.1 (Evaulation) is available for download - but since it needs quartus 4.2 I can't use that. Did the Flash Programmer work in Nios2 1.0 ? So far I haven't got to the stage where I would expect it to boot, for the moment I can't get past this sync error while trying to program to device from flash programmer..... I wonder has *anyone* manged to get this to work? Maybe most folks boot from an external flash memory and avoid these problems/issues? Thanks! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ohmy.gif - Altera_Forum
Honored Contributor
Hi joe,
> Did the Flash Programmer work in Nios2 1.0 ? Yes ... I'm still using 1.0. > I wonder has *anyone* manged to get this to work? Yes. > I'm trying to understand how to place my program into the > EPCS after the bitsream! The following topic describes how to load/boot the u-boot monitor into/from the EPCS: http://www.niosforum.com/forum/index.php?a...3&hl=bootloader (http://www.niosforum.com/forum/index.php?act=st&f=17&t=1023&hl=bootloader) > I can't get past this sync error while trying to program to device from > flash programmer..... What 'sync' error are you referring to? Regards, --Scott - Altera_Forum
Honored Contributor
Thanks for your help!
here are the details (also in http://www.niosforum.com/forum/index.php?a...=st&f=17&t=1033 (http://www.niosforum.com/forum/index.php?act=st&f=17&t=1033) ) When I try to program an EPCS device using the Nios II Flash Programmer and my own custom Cyclone board, I get the error: make: *** [epcs_controller_boot_rom_programflash] Error 5 or in more detail..... make: Entering directory `/cygdrive/f/projects/emshw/full_featured/software/ems_boot/Release' 28-Jan-2005 14:40:30 - (INFO) nios2-flash-programmer: Launching Quartus Programmer to download: f:/projects/emshw/full_featured/target_board/system/target_board.sof Send (64) failed. Unable to synchronize with target. 28-Jan-2005 14:41:18 - (SEVERE) nios2-flash-programmer: Error opening target hardware 28-Jan-2005 14:41:18 - (SEVERE) nios2-flash-programmer: In order to program flash, you must first create a purpose-built flash-programming design (i.e. FPGA configuration) and associate it with your particular board. The Nios development kit is delivered with purpose-built flash-programming designs pre-built for several development boards. If you wish to program flash on your own board, you must first create a flash-programming design. The process of creating a flash-programming design for your board is mostly automated. From a bash-shell, execute this script: mk_target_board --help The help-message includes references to other documentation on programming flash and targeting Nios systems to custom board designs. Then this windows message-box pops up.... --------------------------------------------------------------------------------------------------- java.exe - Application Error The instruction at "0x032c2140" referenced memory at "0x033e2390". The memory could not be "read". Click on OK to terminate the program --------------------------------------------------------------------------------------------------- Then I click OK and the Console output continues with... - exiting. make: *** [epcs_controller_boot_rom_programflash] Error 5 make: Leaving directory `/cygdrive/f/projects/emshw/full_featured/software/ems_boot/Release' - Altera_Forum
Honored Contributor
hi joe,
> When I try to program an EPCS device using the Nios II Flash > Programmer and my own custom Cyclone board .... <snip> > Launching Quartus Programmer to download: > f:/projects/emshw/full_featured/target_board/system/target_board.sof Sounds like a problem with your programming design. Is this your custom programming design file? -- The one generated by building the design from mk_target_board? It looks like nios2-flash-programmer is attempting to communicate with the programming design but is failing. - Altera_Forum
Honored Contributor
yes, that is the mk_target_board design. I used the following :-
The command I entered was basically as shown in the screen on page 24 of the User Guide :- mk_target_board --name=target_board --family=cyclone --clock=50 --index=1 --buffer_size=4096 --epcs=U2 My device is a 1C12, and I chose 4096 instead of 16384 just to be safe!! I had some problems initially with quartus complaining about constraints, until I removing the asmi component. I added the EPCS controller and labelled it as U2. Can I ask, do you thing is a reset input pin necessary for the programmer to work? I do not have a reset signal on my board - just a watchdog reset input which I do not connect to the programmer design, since I don't want to reset it!!! So at the moment I just tie reset to vcc on the schematic? - Altera_Forum
Honored Contributor
joe,
Ok ... now I'm up to speed after reading the other topic. > I do not have a reset signal - only a watchdog reset input which I do > not connect to the programmer design, since I don't want to reset it!!! > So at the moment I just tie reset to vcc on the schematic? This is probably your problem ... I have a similar situation as you on one of my boards, so I dropped in a little delay counter that drives the system module reset_n. Here's what I use with the programmer design:
You can just tie rsti_n to Vcc, clk to your device clk input and rsto_n to the system module reset_n. Regards, --Scottmodule cpurst ( clk, rsti_n, rsto_n ); input clk; input rsti_n; output rsto_n; /* Counter width, delay is 1 << (cw-1) */ parameter cw = 9; reg cnt; always @(posedge clk) if (rsti_n == 0) cnt = 1'b0; else if (cnt == 0) cnt = cnt + 1'b1; assign rsto_n = cnt; endmodule - Altera_Forum
Honored Contributor
scott,
so i need a delay block on the reset pin for the programmer-design? like the one on the dev.kit? I still have that on my schematic for the FPGA design, since I derived everything from that devkit reference design. i hadn't thought of needing it on the programmer design though? interesting idea! certainly, i will try this and see what happens! joe - Altera_Forum
Honored Contributor
> so i need a delay block on the reset pin for the programmer-design
> like the one on the dev.kit? Yes. BTW: You might want to use the full buffer sizes too ... it should improve your download performance. Hope you're up-and-running shortly :-) Regards, --Scott - Altera_Forum
Honored Contributor
Well, it has certainly resulted in a step forward!!! now it communicates with the target but has something new to complain about!!
I don't know what it means by "Unrecognized EPCS device ID: -1" make: Entering directory `/cygdrive/f/projects/emshw/full_featured/software/ems_boot/Release' 29-Jan-2005 17:39:35 - (INFO) nios2-flash-programmer: Launching Quartus Programmer to download: F:/projects/emshw/full_featured/target_board/system/target_board.sof Unrecognized EPCS device ID: -1 29-Jan-2005 17:39:47 - (SEVERE) nios2-flash-programmer: Error opening target hardware 29-Jan-2005 17:39:47 - (SEVERE) nios2-flash-programmer: Unable to open flash-device after successfully communicating with target. It is likely that you are using a flash-programming FPGA design which was not created for your target board. In order to program flash, you must first create a purpose-built flash-programming design (i.e. FPGA configuration) and associate it with your particular board. The Nios development kit is delivered with purpose-built flash-programming designs pre-built for several development boards. If you wish to program flash on your own board, you must first create a flash-programming design. The process of creating a flash-programming design for your board is mostly automated. From a bash-shell, execute this script: mk_target_board --help The help-message includes references to other documentation on programming flash and targeting Nios systems to custom board designs. - exiting. make: *** [epcs_controller_boot_rom_programflash] Error 5 make: Leaving directory `/cygdrive/f/projects/emshw/full_featured/software/ems_boot/Release'