- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm new to Quartus and Nios, and I've been trying to get the DE2-115 web server example (RGMII-ENET0) running with no luck. I followed the instructions in the user manual trying the bat file first. Using Nios 10.1 I:- Programmed the flash with the file DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENET0\software\web_server_0_syslib\ro_zipfs.zip in Nios II Flash Programmer with the DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENET0\DE2_115_SOPC.sopcinfo (attached is a screen shot of the programmer commands).
- Ran batch file: DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENET0\demo_batch\web_server.bat
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the BSP Editor, Software Packages Tab.: ro_zipfs_offset was set to 0x100000.
Using the Nios II 10.1 Command line I ran:
bash-3.1$ bin2flash --input="c:/<path to>/ro_zipfs.zip" --output=ro.flashfs_cfi_flash.flash --location=0x100000 --verbose
bash-3.1$ /cygdrive/c/Altera/10.1/nios2eds/bin/nios2-flash-programmer.exe ro.flashfs_cfi_flash.flash --base=0x0a800000 --sidp=0x9000140 --id=0x61f7c611 --device=1 --instance=0 --program --verbose --erase-all
Then ran the .bat file in <path to>/demo_batch. Now the example works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, now I got a compiled version running:
1. Open up from CD: x:\<path_to>\DE2_115_1.0.4_CD\DE2_115_demonstrations\DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENET0 DE2_WEB_SERVER.qpf file in Quartus 10.1 2. Open SOPC Builder wait for project to load 3. Click Generate 4. Should be successful, click Exit 5. Compile .qpf project in Quartus (I got over 600 warnings but it was successful) 6. Program FPGA with new .sof file (mine has 'time-limited' in the name so I know which one is the new one 7. Leave Open Core Status dialog box open 9. Start up Nios 10.1 10. Point the workspace to the same directory above and go into the software directory 11. File > New > Nios II Application and BSP Template 12. Choose the .sopcinfo file that is in the main project directory 13. Give your new project a name (web_server_test) 14. Choose Web Server RGMII template 15. Click Finish 16. Open up Nios 10.1 Command Shell and enter these commands in:
cd /cygdrive/<path_to>/DE2_115_1.0.4_CD\DE2_115_demonstrations\DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENET0
mkdir flash (if it is not already there)
bin2flash --input="../software/web_server_test/system/ro_zipfs.zip" --output=ro.flashfs_cfi_flash1.flash --location=0x100000 --verbose
nios2-flash-programmer.exe ro.flashfs_cfi_flash1.flash --base=0x0a800000 --sidp=0x9000140 --id=0x0 --device=1 --instance=0 --program --verbose --erase-all
* Note 1: if you get any errors on these commands, you can check ids and timestamps in Nios Eclipse Program Nios II > Flash Programmer. The problem with the Flash Programmer is that it incorrectly puts the location = 0x0 for the bin2flash command * Note 2: There are two files systems that exist. You can use the default zip file system that gets created when you make the example. It's 39kB. Or you can add or replace the file system (in web_server_test/system) with the one from the example, it's 199kB and has more functions you can try on the board. It is located in web_server_0_bsp directory of the original DE2 software directory. 17. Anyway you want to, copy the contents of the .c and .h files in software/web_server_0 into the same .c and .h files in web_server_test (don't worry about tse_my_system.c) 18. In Nios II Eclipse > Nios II > BSP Editor , choose the bsp for your project 19. Choose the Software packages tab, Settings > altera_ro_zipfs 20. Be sure _base matches your SOPC Builder setting for the CFI_FLASH (mine is 0x0a800000) 21. _name is /mnt/rozipfs 22. _offset matches the location value you used in the bin2flash command above (0x100000 for me) 23. Click Generate, wait until complete, then Exit 24. Build the project and then exit out of Nios II (I was unable to run the project from Nios II because the program froze while running it) 25. From the Nios Command line run
nios2-download -g web_server_rgmii_test.elf && nios2-terminal
* The software will pause and wait for a serial number, any 9-digit number will work * After you see "Web Server starting up" type in the address your DHCP server found in a web browser Have fun!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks to this thread I managed to run the web server example as well. So thanks to windex! But I still have some problem with this web server.
When the web server is up and running and i've changed my ip-address to the number next to the server's IP I don't get any connection. When I try to ping the server I get answer, but still 50% loss of packets. Why is it so slow? Anyone had the same problem? Thanks in advance :)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Erlendaa,
that looks to me that you have problems with the SDRAM. There are timing problems with DE2 Board between the clock and the RAM. Have you tried to use just the the small CPU Implementation in SOPC Builder? That means the simplest without Cache. When this solves your problem the SDRAM has timing issues. Urmel- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
Windex thank you for your effort in making this post. I'm working through it now.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having some trouble getting this going, i spent the past few days trying all sorts of combinations of tricks etc that i've read. Windex's guide is is by far the best thing i have seen while trying to get ethernet going on this de2-115. But this whole ethernet task is driving me postal.
side note: My end goal is actually to get a simple socket server running so i can then write a custom windows app to connect to the board. If you know how to get this going on the DE2-115 that would be awesome. I've tried with no sucess atm. the webserver guide problem I've followed your exact tutorial up to step 16 but i'm not exactly sure if i'm doing it right.- I assume the commands in setp 16 are 3 (or 4?) seperate commands? A cd/ to get to directory, a bin2flash and a flash program?
- I've had to add a slash "\" to the end of the first command to get it to work, as in point to a directory.
- --- Quote Start --- mkdir flash (if it is not already there) --- Quote End --- I have no idea what this is meant to do and i cannot get the console to accept this command on its own or combined with the previous command. So i've had to ignore it.
- I then do the bin2flash command and i get "(FINE) bin2flash: starting" plus then some infor on using that command itself. So i assumme this has worked?
- I cannot get the flash program command to work. I just get --- Quote Start --- ro.flashfs_cfi_flash1.flash: Unable to open input file Empty flash content cannot be programmed or verified --- Quote End ---
- Also as you said i get a crash when i try to run the program in Nios EDS 10.1. I did get it to run the first time i tried, but this was before i saw your tutorial and i hadn't programmed any flash so the webserver obviously didn't work.
- For some reason if i just try to build the project rather than run it, i get undefined errors on two extern variables "lednum" and "segnum"; i assume this must be because the niche stack isn't included until runtime?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any luck with this, I'm trying to do a similar project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
basically i dropped the webserver example and went for the simple socket example. I'll explain further in my topic here:
http://www.alteraforum.com/forum/showthread.php?t=28577- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Windex
I try your support a methods[/U] [/U] I open the Nios 10.1 Command Shell and enter the code but , when I enter the code : nios2-flash-programmer.exe...--erase-all the message tell me ---------------------------------------------------------------------------- There are two or more JTAG cables available but you have not chosen which one to use. please use the configuration dialog to pick one, or specify a value for the --cable parameter on the command line. ---------------------------------------------------------------------------- I try a long time , but still appear this message ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the message is self explicit... If you have several USB blasters connected (a development kit connected through a USB cable counts as a USB blaster) you need to add the --cable and a number to select which one to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daixiwen
Thanks for Daixiwen , the question is solve. The question isdue to quartusii of programmer Hardware setup (need delet USB-Blaster of outside) but...I occur the new question , I referance http://www.alteraforum.com/forum/showthread.php?p=119191#post119191 (http://www.alteraforum.com/foru/showthread.php?p=119191#post119191) and I make step to No.16 when enter the code : nios2-flash-programmer.exe ro.flashfs_cfi_flash1.flash ... --erase-all Message tell me -------------------------------------------------------------- Timestamp value was not verified : value was not specified The software you are downloading may not run on the system which is crrrently configured into the device . Please download the correct SOF or recompile . Leaving target processor paused -------------------------------------------------------------- so , I try to quartusii of programmer and recompile , then download to DE2-115. but...still can't and appear the message. And...other a question . When I bulid NiosII Application and BSP from Template , but not creat a nios2-flash-programmer.exe...I don't know this status.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This messages appears because you don't have a system ID component in your SOPC system. Either add a system ID component (recommended) or add the correct option to the NIOS programmer to disable the system ID / timestamp check before download.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daixiwen
Thanks your support , I try again and again... 1. QuartusII →SOPC Builder 2. Add system id set "0" 3. And generate → compilation Report → download but , when I open NiosII and New Application and BSP from Template I found...the project file of "de2_115_sopc.sopcinfo" is not update Result...the bsp fail of creat...so I think... how do due de2_115_sopc.sopcinfo for update ... maybe the question is for other places...I think- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The .sopcinfo file is updated automatically by SOPC builder each time you click on generate. Are you sure you are pointing to the right file? The one in the same folder than the SOPC project?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daixiwen
I check many times , the folder and project is same of directory. but , I found , the example of SOPC Builder already have system id for include , so I try again. 1. Open d:\DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENE T0 DE2_WEB_SERVER.qpf file in Quartus 10.1 2. SOPC Builder(no change anything to example) 3. Click Generate(successful) 4. Compile .qpf project in Quartus(but don't have download to de2-115) 5. Start up Nios 10.1 → File > New > Nios II Application and BSP Template (Finsh reference of step No.11 ~ No.15) 6. Open up Nios 10.1 Command Shell and enter code but ... the message again tell me ----------------------------------------------------------- Timestamp value was not verified : value was not specified The software you are downloading may not run on the system which is crrrently configured into the device . Please download the correct SOF or recompile . Leaving target processor paused ----------------------------------------------------------- I think...maybe , I need enter SOPC Builder and delet system id of original , and add new system id (system id parameters not change) maybe need this make... I will try again : ) p.s It is to strange , before in the SOPC Builder. If I add a new system id (I don't delet or change the origin system id). and Builder → Generate → Compile , but in the Nios 10.1 Command Shell haven't any questione , only questione is due to can't ... In NiosII download software to De2-115...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Windex
I finsh!!! for function!!!!! After time , I will po my all make. p.s Thanks your help to until : )- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Open D:\demo\DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENET0\DE2_115_WEB_SERVER.qdf
2. Open SOPC Builder to Regenerate , finsh and compilation 3. Open Nios II 10.1sp1 Software Build Tools for Eclipse 4. New → NiosII Application and BSP from template 5. SOPC Information name , select your project location of DE2_115_SOPC.sopcinfo 6. Application poject select porject location , project reneme → web_server_test 7. Templates select Web_Server(RGMII) , when finsh then exit the NiosII 8. Open up Nios 10.1 Command Shell and enter these commands in: cd /.../DE2_115_Web_Server/DE2_115_WEB_SERVER_RGMII_ENET0 mkdir flash bin2flash --input=D:/demo/DE2_115_Web_Server/DE2_115_WEB_SERVER_RGMII_ENET0/software/web_server_test/system/ro_zipfs.zip --output=ro.flashfs_cfi_flash1.flash --location=0x100000 --verbose nios2-flash-programmer.exe ro.flashfs_cfi_flash1.flash --base=0x0a800000 --sidp=0x9000140 --id=0x0 --device=1 --instance=0 --program --verbose --erase-all 9. Download of QuartusII and DE2_115_WEB_SERVER.qdf 10. Open up NiosII and Run hardware 11. Enable browse for file system ELE file 12. Select D:\...\DE2_115_Web_Server\DE2_115_WEB_SERVER_RGMII_ENET0\demo_batch\web_server_0.elf 13. In Target Connection , System ID check → select ignore mismatched system ID and mismatched system timestamp 14. Apply Run and open commend , enter ping xxx.xxx.xxx.xxx 15. Enter the ip addres- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by
--- Quote Start --- (but don't have download to de2-115) --- Quote End --- After you compile the project in Quartus, you need to upload the .sof file to the FPGA before running the Nios environment.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daixiwen
Sorry , I haven't explanation of clear. (but don't have download to de2-115) The mean is , I wait for NiosII to bsp builder finsh. When I finsh about NiosII action , and this time , I make burn to de2-115 of QuartusII , then download NiosII : )- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I've tried these steps, but It doesn't work. Could any one please say more details about flash programmer and what to do in steps. It seems a bit mixed up to me. Thanks in advance.- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page