- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm again facing a curious episode. I have a system that consists of a fpga with a nios processor (included a epcs controller) + epcs + external sram + external cfi flash. Currently I'm using an epcs to store software and fpga configuration data. Following the solution described in everything works pretty fine. After programming with the programmer (using the jic file), the fpga don't start, but after turn off/turn on the power supply used with the system, the fpga load the content recently programmed in the epcs and starts sucessfully. However when trying to use the nios2-flash-programmer, I have some problems.. I tried to follow the hints in the threads- http://www.alteraforum.com/forum/showthread.php?t=14665
- http://alteraforums.net/forum/showthread.php?p=111765
nios2-configure-sof --cable='USB-Blaster ' ${hwproject}myhardware.sof
sof2flash --input=${hwproject}myhardware.sof --output=myhardware.flash --epcs --verbose
elf2flash --input=${swproject}mysoftware.elf --output=mysoftware.flash --epcs --after=myhardware.flash --verbose
nios2-flash-programmer --cable='USB-Blaster ' --epcs --base=0x00 myhardware.flash
nios2-flash-programmer -g --cable='USB-Blaster ' --epcs --base=0x00 mysoftware.flash
I would like to use the nios2-flash-programmer due to possibility of use scripts and avoid using the Programmer.. About my environment: My EPCS controller was set up with the base address 0x00000000 in SOPC builder. I'm using Quartus 10.1 Are there any bug related with this feature / quartus / nioseds version ? Thank you !
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- After programming with the programmer (using the jic file), the fpga don't start, but after turn off/turn on the power supply used with the system, the fpga load the content recently programmed in the epcs and starts sucessfully. --- Quote End --- Try check "Configure device after programming" or same option in Quartus Programmer. To flash sw and hw I use Nios Flash Programmer, it works perfectly. But hw desing should be previously downloaded to device. I prefer sof file instead of jic, no need to convert to jic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you babitsyn,
I haven't seen this option in Programmer. It is in menu Tools > Options. In this window there's the option "Initiate configuration after programming" that can be checked. Do you use the Nios Flash Programmer GUI or the command line nios2-flash-programmer software ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, this option "Initiate configuration after programming", you are right.
I use Nios Flash GUI.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting..
For a system that shares the epcs between configuration data and nios software you just select the .sof and the .elf in the tab Flash:epcs_controller in the Nios II Flash Programmer, without any additional argument ? It's really strange that nios-flash-programmer don't work with my custom.. I believe that if something would be wrong, I wouldn't have success with using the format jic file and the Quartus Programmer. Thank you again !- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Interesting.. For a system that shares the epcs between configuration data and nios software you just select the .sof and the .elf in the tab Flash:epcs_controller in the , without any additional argument ? --- Quote End --- Yes, without any arguments. I download sof file to device by Quartus Programmer and write flash (.sof and .elf) by Nios II Flash Programmer. Simply press "Connection" button, check system ID and timestamp, add .sof and .elf without offset, then start flashing device. Nios II Flash Programmer automatically writes hw design into epcs, then writes bootloader, then writes sw. Then reset device. After that device configures itself, writes bootloader into onchip ram, then bootloader copies code to memory, which defined as .text and so on, except reset vector, which should be pointed to epcs (check it by BSP editor).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've just tried this method with no success :(
Something really strange is happening with my board.. or I'm taking some little mistake.. Using the GUI, it's similar to the command sequences that I tried to used before, with the advantage that it's no necessary to concern with the command syntax. Command lines that are used by the GUI:sof2flash
--input=".../quartus/hardware/hardware.sof"
--output=".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/hardware.flash"
--epcs --verbose
elf2flash
--input=".../software/nios/software.elf"
--output=".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/software.flash"
--epcs
--after=".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/hardware.flash"
--verbose
nios2-flash-programmer
".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/hardware.flash"
--base=0x0 --epcs --sidp=0x2000100 --id=0x0 --accept-bad-sysid --device=1
--instance=0 '--cable=USB-Blaster on localhost ' --program --verbose --erase-all
nios2-flash-programmer
".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/software.flash"
--base=0x0 --epcs --sidp=0x2000100 --id=0x0 --accept-bad-sysid --device=1 --instance=0
'--cable=USB-Blaster on localhost ' --program --verbose --go
I've attached the window with the jic creation configuration. It's really weird, that the fpga works when I program it using the jic file while the use of nios2-flash-programmer has no effect. Thank you again !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you change reset vector in NIOS 2 CPU point to epcs flash.
In my project with DE2-115 board, I stored FPGA configuration in EPCS64, it has 8MB space and software in CFI_FLASH. In order to do that, I did these following steps: + CONFIG EPCS64 with .pof file (ACTIVE SERIAL PROGRAMMING mode instead of JTAG) + Make some changes with the SOPC builder: Your SOPC builder need to have CFI_FLASH or EPCS_CONTROLLER and change NIOS2 reset vector to EPCS or CFI flash + Regenerate BSP settings in ECLIPSE + USE NIOS2-flash programmer as user guide on altera wiki good luck with that- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rossetto, I'm running into the same thing. Did you figure out the little missing nugget?
If so, please ping me the solution! thanks!!!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- I've just tried this method with no success :( Something really strange is happening with my board.. or I'm taking some little mistake.. Using the GUI, it's similar to the command sequences that I tried to used before, with the advantage that it's no necessary to concern with the command syntax. Command lines that are used by the GUI:
sof2flash
--input=".../quartus/hardware/hardware.sof"
--output=".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/hardware.flash"
--epcs --verbose
elf2flash
--input=".../software/nios/software.elf"
--output=".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/software.flash"
--epcs
--after=".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/hardware.flash"
--verbose
nios2-flash-programmer
".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/hardware.flash"
--base=0x0 --epcs --sidp=0x2000100 --id=0x0 --accept-bad-sysid --device=1
--instance=0 '--cable=USB-Blaster on localhost ' --program --verbose --erase-all
nios2-flash-programmer
".../quartus/hardware/FNIOS/SOFTWARE/SBSP/flash/software.flash"
--base=0x0 --epcs --sidp=0x2000100 --id=0x0 --accept-bad-sysid --device=1 --instance=0
'--cable=USB-Blaster on localhost ' --program --verbose --go
I've attached the window with the jic creation configuration. It's really weird, that the fpga works when I program it using the jic file while the use of nios2-flash-programmer has no effect. Thank you again ! --- Quote End --- Hi I am using Web version 12.SP2. I think you have same problem I have right now. To figure it out what is wrong, I recommend you try NIOS memory test. In my case I can't open EPCS memory with Nios Flash Programmer. When I run memory test, I got Error message as below. When I used Ver.7.2, I didn't see this kind of error. If you can open EPCS memory, can access(Wr/Rd) EPCS, that is different issue. ---------------------------------- ---------------------------------- Memory Test Main Menu ---------------------------------- a: Test RAM b: Test Flash c: Test EPCS Serial Flash q: Exit ---------------------------------- Select Choice (a-c): [Followed by <enter>] c Enter the name of the EPCS flash device to be opened, or just press <enter> to open "/dev/epcs_controller" > -ERROR: Could not open /dev/epcs_controller

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