Forum Discussion
Altera_Forum
Honored Contributor
16 years agoYes, I got the stack running and the simple socket server portion of the example running. I left out some of the code from the superloop_simple_socket server_plus example since I don't have a display device and I'm not sure if I can use the ROZIPFS with my EPCS Flash device. My approach was as follows:
1.) Downloaded and unziped the source file directories from 20090611_superloop_sss_plus_neek_90sp1.tgz. The source files contain the hardware image for the neek eval board and scripts for generating the project from the hardware image. 2.) Replaced the hardware image (files with .sof, .ptf, and .sopcinfo extensions) with the ones from my custom board. 3.) Modified the create-this-bsp script in the bsp folder to configure my custom board's hardware configuration. I had to change the memory mapping since I'm using SRAM, not DDRAM. I also removed references to the ROZIPFS because I'm not sure if my hardware can support it. 4.) I commented out the line "tar -kxf sources.tar 2> /dev/null" in the create-this-app script in the app directory so that I could include only the source files that I wanted. I manually extracted the source files in the "sources.tar" file and included only the following source files: iniche_init.c network_utilities.c network_utilities.h simple_socket_server.c simple_socket_server.h I will go back later and try to get the complete example running by including all the source files, but for now, I like to keep things simple. Note: I had to make a slight change to the create-this-lib script in the superloop_tse_lib folder. The example was made for nios version 9.0 and makes reference to C:/altera/90/ip... directory. Since I'm running nios 9.0 sp2, I had to change it to C:/alter/90sp2/ip.... in order for the script to find the driver. 5.) I modified the code in the network_utlilities.c file to change the get_mac_addr() function to manually set the MAC address since I don't have eeprom memory. My function is as follows: int get_mac_addr(NET net, unsigned char mac_addr[6]) { int ret_code = -1; mac_addr[0] = MAC_ADDR0; mac_addr[1] = MAC_ADDR1; mac_addr[2] = MAC_ADDR2; mac_addr[3] = MAC_ADDR3; mac_addr[4] = MAC_ADDR4; mac_addr[5] = MAC_ADDR5; ret_code = 1; return ret_code; } 6.) I commented out all the references to the graphics display and the demo_init() function call in the iniche_init.c source file. I removed all references to the demo.c source file. 7.) Opened the nios command shell and changed the directory to the app directory. Typed ./create-this-app. The script automatically builds and links the necessary bsp files and libraries. The project compiles after generating the bsp and libraries. With this partial implementation of the superloop_simple_socket_server_plus example I was able to get the IP stack running and was able interact with the simple socket server menu through a telnet client. I just wanted to get enough done to prove that I could get the stack running without using uC/OSII. I would like to continue to get the all the network features of this example running on my custom board. Hope this helps someone.