- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It seems difficult to get help on these forums so I want to pass on what i learnt for others. I've struggled to learn FPGAs over the past few weeks and I have finally got a simple socket server working for the DE2-115. I'll quickly post my findings so someone else can take this and learn from it and not have to struggle on their own as i did. procedure I'll make this brief:- I used updated versions for everything as of 4/4/11. 10.1 Sp1.
- Download and install the Knowledge base update to prevent nios from crashing. http://www.altera.com/support/kdb/solutions/rd12222010_317.html
- Take the Quartus DE2_115 webserver example for Enet0 RGMII that comes on the CD and use quartus flash programmer to program.
- Get this PDF and follow its instructions "http://www.altera.com/literature/tt/tt_nios2_tcpip.pdf?gsa_pos=1&wt.oss_r=1&wt.oss=simple socket server example nios edition socket server example nios edition" NOTE it includes the spaces (wierd). do everything the same except the part mentioned in my next step.
- Instead of copying the files from the tutorial.zip; copy the ones that i have attached to this post. (the .c and .h files including the eeprom folder)
- This example will now work as explained in the pdf.
- The original example code in the tutorial does not have the correct method for gettig the MAC address on the DE2-115. I have deleted the majority of the original MAC code and replaced it with code i got from the DE2-115 webserver example. This includes the flashgetoffset function.
- The LED_PIO_BASE in the original is an invalid for the DE2-115. I replaced it with the LEDG (green leds), you could replace it with red if you wished. This has been done by modifying the led.c file.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks bjtuxuxu for your reply
when I disable the DHCP the application won't build and I can't download the elf file to the target so I enable it but I connect directly FPGA to the host and it's work but I don't know if enable DHCP will add some overhead even I don't use it. can I escape the time spending to fin IP address from DHCP ? many thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you disable the DHCP, it will not spend you any time to find IP address.
The IP, which will be used, is the one in# simple_socket_server.h# I ever met the same problem:when disable the DHCP the application won't build. Then I Generate Bsp again, and Build bsp project again, at last I can build the project.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- When you disable the DHCP, it will not spend you any time to find IP address. The IP, which will be used, is the one in# simple_socket_server.h# I ever met the same problem:when disable the DHCP the application won't build. Then I Generate Bsp again, and Build bsp project again, at last I can build the project. --- Quote End --- thank you anyway I'll keep it with the dhcp with direct connection between the fpga and the host I couldn't run the SSS with disabling the DHCP !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- If you are wanting to send UDP messages, then you need to change your type to SOCK_DGRAM and the protocol (last parameter) to IPPROTO_UDP in your socket call. Once you have the type and protocol set for UDP, then your recvfrom() call should block until data is ready on the fd. --- Quote End --- Thank you lornewellington can you please give us more details how to implement an UDP application ? what I have to change ? only the simple_socket_server.c file ? and what can of trandfert can be done with the udp ? many thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, thank you. You have helped by providing this source. I don't know what to do if I didn't see this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi to all :
this project is my goal currently, but, when i build the project, there're some errors . Here are some problem to ask : 1. when create the new bsp , which .sopcinfo to use ? (My board is de2-115 , ep4ce115f29c7n) I download from "nios ii ethernet standard design example" ,choose the file named "niosii-ethernet-standard-3c120.zip" 2."with a file management tool (such as windows explorer), drag and drop all the nios ii simple socket server source files and folders from the<tutorial_files>\nichestack_tutorial folder to the niosii_simple_socket_server_0 folder in the nios ii sbt for eclipse project explorer view." , I don't know where to copy .c .v etc. file . plz help me , best regard !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
omg , my sss is working!
here are another problem : when i telnet the board , it prints : ================================= Nios II Simple Socket Server Menu ================================= 0-7: Toggle board LEDs D0 - D7 S: 7-Segment LED Light Show Q: Terminate session ================================= Enter your choice & press return: only type "Q" can terminate it , other choice can't work , how could i do ? (( i just use the basic project in NiosII IDE without modify)) regard- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,I am new to fpga and NIOSII, i am trying to use simple web server eg given as a template in NIOSII ide. For that my first step was ,i included dm9000a driver in qsys and connected it with appropriate pins in quartus bdf. When i tried to run the eg on NIOSII. i got the following message (down)which is very familiar here but i cannot figure out what should i do. Please if someone can post some help soon,Your help will be highly appreciated. My board is DE2. (2c35f672c6 FPGA)
interniche portable tcp/ip, v3.1
copyright 1996-2008 by interniche technologies. all rights reserved.
prepped 0 interfaces, initializing...
inet startup error: unable to find any working interfaces
panic: ip
dtrap - needs breakpoint Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi is this code compatible with DE2 cyclone II ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I want set network parameters for simple socket server example statically. I am not using DHCP server. I want to read all network settings like IP address, subnet mask from flash. How can I have network settings file in flash and the how simple socket server application can read network settings from flash. I want to have HTML web server application in flash which can be accessed by normal web browser and network settings can be configured.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1.The tutorial mentioned that we will use "sopc_system.sopcinfo ",shall we follow the instruction?
2.Step 3 is "Take the Quartus DE2_115 webserver example for Enet0 RGMII that comes on the CD and use quartus flash programmer to program."Why have we do this?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all. I recently went through the exercise of getting the simple socket server to run on the DE2-115. The first guy who posted got it to work with version 10.1, I got it to work with Quartus 13.0 and the SBT for Eclipse.
I had to make some slightly different modifications to the code to get it to work with the template that comes with 13.0, so I thought I would share it here. The entire process I went through is documented in the attached word document. The code is in the zip file.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to get the most recent files (above this post) to work. Does the above example have the modification to code outlined in document already applied? I had to manually enter the CFI/EXT mod. So perhaps not? I am stuck at the:
Can't read the MAC address from your board (this probably means that your flash was erased). We will assign you a MAC address and static network settings And don't seem to be getting anywhere copying the old code at the start of this thread either. Any pointers?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- I am trying to get the most recent files (above this post) to work. Does the above example have the modification to code outlined in document already applied? I had to manually enter the CFI/EXT mod. So perhaps not? I am stuck at the: Can't read the MAC address from your board (this probably means that your flash was erased). We will assign you a MAC address and static network settings And don't seem to be getting anywhere copying the old code at the start of this thread either. Any pointers? --- Quote End --- Hi, I am too getting the same error, I have Quartus 12.0 edition & After downloading DE2_115_WEB_SERVER.sof I am trying to Download the application code (flash file system) for web server. But it gives the following error & asks to type the serial number. Actually I didn't find 9 digit serial number starting with ASJ on DE2115 board. Can anyone please help. --> Copyright 1996-2008 by InterNiche Technologies. All rights res prep_tse_mac 0 Can't read the MAC address from your board (this probably mean that your flash was erased). We will assign you a MAC address static network settings Please enter your 9-digit serial number. This is printed on a label under your Nios dev. board. The first 3 digits of the label are ASJ and the serial number follows this. -->Created "Inet main" task (Prio: 2) Created "clock tick" task (Prio: 3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi all. I recently went through the exercise of getting the simple socket server to run on the DE2-115. The first guy who posted got it to work with version 10.1, I got it to work with Quartus 13.0 and the SBT for Eclipse. I had to make some slightly different modifications to the code to get it to work with the template that comes with 13.0, so I thought I would share it here. The entire process I went through is documented in the attached word document. The code is in the zip file. --- Quote End --- cheers mate :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi all. I recently went through the exercise of getting the simple socket server to run on the DE2-115. The first guy who posted got it to work with version 10.1, I got it to work with Quartus 13.0 and the SBT for Eclipse. I had to make some slightly different modifications to the code to get it to work with the template that comes with 13.0, so I thought I would share it here. The entire process I went through is documented in the attached word document. The code is in the zip file. --- Quote End --- using hardware design attached with the tutorial on this link https://www.altera.com/support/support-resources/design-examples/intellectual-property/embedded/nios-ii/exm-net-std-de.html there is no hardware design related to DE2-115 I tried (niosii-ethernet-standard-3c120.zip ) related to Cyclone III, and I am facing a problem with pin assignment could you please help me thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried it but I still have some problems, during runing I got the MAC and IP addresses and after nearly 1min
I got the following message from the Console then I lose the ip and MAC Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Processor is already paused Reading System ID at address 0x0B000140: ID value verified Timestamp value was not verified: value was not specified Initializing CPU cache (if present) OK Downloading 00000000 ( 0%) Downloading 00010000 (19%) Downloading 00020000 (38%) Downloading 00030000 (57%) Downloading 00040000 (76%) Downloading 00050000 (95%) Downloading 00054290 (97%) Downloaded 337KB in 6.6s (51.0KB/s) Verifying 00000000 ( 0%) Verifying 00010000 (19%) Verifying 00020000 (38%) Verifying 00030000 (57%) Verifying 00040000 (76%) Verifying 00050000 (95%) Verifying 00054290 (97%) Verified OK Leaving target processor paused- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
m trying to replicate the results here. I believe im following all the correct steps, but when i run it, no text shows up in the nios console window. It downloads ok, but i get no errors, no messages, just a blank screen. Does anyone know what mght be causing that or what to check? I am not loading anything to flash memory. just programming the sof and the elf. never get to the code that says printf("\nSimple Socket Server starting up\n"); i dont think im getting past here: while (!iniche_net_ready) TK_SLEEP(1); and i get some kind of terminated exit value on the download inside the debug window? see attached The last thing that shows up on the console is listenng on port ... for connection from GDB, thats in debug mode. see attached Also, i dont get any complaints about mac address like this: "Can't read the MAC address from your board (this probably means that your flash was erased). We will assign you a MAC address and static network settings" One other thing: in the bsp editor, for the stdin,out,err, i dont have the option for "peripheral_subsystem_jtag_uart"... just jtag_uart. but i think thats ok as the qsys file just says jtag_uart. but this might be a reason i dont see any output on screen thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So it looks like im not getting the MAC address either. I can hardcode the mac address into the code, but i dont know what the mac for my de2-115 is. How can i find out what its set to?
thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how can I set my static IP address ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to build a project in NIOS but it is giving "undefined reference to `tse_mac_device' " error. I am using NIOS II-Eclipse, Quartus 15.1 and Altera's DE2-115 board.
The error occurred in two files generated by Eclipse: error in 'altera_avalon_tse' line 119 tse_mac_device[tse_system_count].tse_mac_base = pmac->tse_mac_base + (i * 0x400); error in 'ins_tse_mac file' line 342 if(tse_mac_device.tse_mac_base == p_driver_data->hw_mac_base_addr){
psys_info = &tse_mac_device; } Here is the error report from NIOS when I tried to build the project: 20:02:08 **** Incremental Build of configuration Nios II for project OpenTOF **** make all Info: Building ../OpenTOF_bsp/ C:/altera_lite/15.1/nios2eds/bin/gnu/H-x86_64-mingw32/bin/make --no-print-directory -C ../OpenTOF_bsp/ [BSP build complete] Info: Linking OpenTOF.elf nios2-elf-g++ -T'../OpenTOF_bsp//linker.x' -msys-crt0='../OpenTOF_bsp//obj/HAL/src/crt0.o' -msys-lib=ucosii_bsp -L../OpenTOF_bsp/ -Wl,-Map=OpenTOF.map -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -o OpenTOF.elf obj/default/OpenTOF_lib.o obj/default/main.o obj/default/network.o -lm -msys-lib=m ../OpenTOF_bsp/\libucosii_bsp.a(ins_tse_mac.o): In function `altera_eth_tse_init': C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Fir mware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:119: undefined reference to `tse_mac_device' C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Fir mware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:119: undefined reference to `tse_mac_device' C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Fir mware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:120: undefined reference to `tse_mac_device' C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Fir mware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:120: undefined reference to `tse_mac_device' ../OpenTOF_bsp/\libucosii_bsp.a(altera_avalon_tse.o): In function `alt_tse_system_add_sys': C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Fir mware\OpenTOF_bsp/drivers/src/altera_avalon_tse.c:342: undefined reference to `tse_mac_device' ../OpenTOF_bsp/\libucosii_bsp.a(altera_avalon_tse.o):C:\Users\ach oo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Firmware\OpenTO F_bsp/drivers/src/altera_avalon_tse.c:342: more undefined references to `tse_mac_device' follow collect2.exe: error: ld returned 1 exit status make: *** [OpenTOF.elf] Error 1 20:02:09 Build Finished (took 1s.425ms)

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