Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Superloop SSS+ on 10.1sp1

Altera_Forum
Honored Contributor II
1,142 Views

Hello, 

 

The title says all. As anyone been trying and successfully building the Superloop Simple Socket Server Plus on 10.1sp1? I guess there are corrections to be done in patches first before compiling with the new iniche library. 

 

Thanks, JC
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
410 Views

Any luck ricardjc? I am also looking for updated patches for Superloop Simple Socket Server Plus on 10.1sp1.

0 Kudos
Altera_Forum
Honored Contributor II
410 Views

No luck on my side - I had to put the project on the side for now. If you get anything on your side, I'd be interested to see it works or not. 

 

Good luck!
0 Kudos
Altera_Forum
Honored Contributor II
410 Views

Hello, 

 

Are there any news regarding this topic? 

 

 

cu, 

niosIIuser
0 Kudos
Altera_Forum
Honored Contributor II
410 Views

Hello combatants, 

 

After a lot of attempts, tweaks, workarounds and so on, a small but working guideline was compiled. Of course, there will be better solutions like scripts - I am very happy to see more efficient solutions. 

 

Have fun, 

niosIIuser 

 

 

environment: 

  • Windows XP SP3 

  • Altera Embedded Systems Development Kit, Cyclone III Edition, 3C120 

  • Quartus 9.0 SP1 and Nios II EDS 9.0 SP1  

  • Quartus 10.1 SP1 and Nios II EDS 10.1 SP1 

 

 

first step (prepare the 9.0 sp1 sources) 

 

Info: (superloop_simple_socket_server_plus.elf) 269 KBytes program size (code + initialized data). Info: 130802 KBytes free for stack + heap. To download and run the application: 1. Make sure the board is connected to the system. 2. Run 'nios2-configure-sof <SOF_FILE_PATH>' to configure the FPGA with the hardware design. 3. If you have a stdio device, run 'nios2-terminal' in a different shell. 4. Run 'make download-elf' from the application directory. To debug the application: Import the project into Nios II IDE. Refer to Nios II IDE Documentation for more information. 

 

second step (import the files to 10.1) 

  • Install Quartus 10.1 SP1 and Nios II EDS 10.1 SP1 or change the environment variables if necessary 

  • Download and install the Embedded Systems Development Kit, Cyclone III Edition v10.1.0 (ftp://ftp.altera.com/outgoing/devkit/10.1/cycloneiii_3c120_embedded_v10.1.0.exe

  • Copy the directories “app”, “superloop_iniche_lib” and “superloop_tse_lib” from “superloop_sss_plus_3c120_marvell_90sp1\software_example\superloop_simple_socket_server_plus” to “kits\cycloneIII_3c120_embedded\examples\standard\software\superloop” (do not copy the “bsp” directory) 

  • Delete the files “display.c” and “display.h” in “ kits\cycloneIII_3c120_embedded\examples\standard\software\superloop\app” 

  • Open Nios II 10.1sp1 Software Build Tools for Eclipse 

  • Generate a BSP: File &#8594; New &#8594; Nios II Board Support Package 

  • Project Name = bsp 

  • SOPC Information File name = cycloneIII_3c120_niosII_standard_sopc.sopcinfo (“\kits\cycloneIII_3c120_embedded\examples\standard”) 

  • Disable “Use Default Location” 

  • Location = ...\kits\cycloneIII_3c120_embedded\examples\standard\software\superloop\bsp 

  • CPU = cpu 

  • BSP type = Altera HAL 

  • Finish 

  • Right klick on “bsp” in the Project Explorer &#8594; Nios II &#8594; BSP Editor... 

  • Tab “Software Packages” &#8594; Enable “altera_ro_zipfs” 

  • Tab “Drivers” &#8594; Disable “tse_mac. triple_speed_ethernet, 10.1, triple_speed_ethernetdriver_hal, 10.1” &#8594; Generate &#8594; Exit 

  • File &#8594; Import... &#8594; Nios II Software Build Tools Project &#8594; Import Nios II Software Build Tools Project &#8594; Next  

  • Project Location = ...\kits\cycloneIII_3c120_embedded\examples\standard\software\superloop\app 

  • Project name = app 

  • Finish 

  • File &#8594; Import... &#8594; Nios II Software Build Tools Project &#8594; Import Custom Makefile for Nios II Software Build Tools Project &#8594; Next  

  • Project Location = ...\kits\cycloneIII_3c120_embedded\examples\standard\software\superloop\superloop_iniche_lib 

  • Project name = superloop_iniche_lib 

  • Finish 

  • File &#8594; Import... &#8594; Nios II Software Build Tools Project &#8594; Import Custom Makefile for Nios II Software Build Tools Project &#8594; Next  

  • Project Location = ...\kits\cycloneIII_3c120_embedded\examples\standard\software\superloop\superloop_tse_lib 

  • Project name = superloop_tse_lib 

  • Finish 

 

third step (modify files) 

  • Open the “Makefile” in “superloop_iniche_lib” 

  • Look for “MKDIR := $(shell which mkdir) -p” and exchange it with “MKDIR := mkdir -p” (Propably, there is a better way as this workaround) 

  • Do the same with the “Makefile” in “superloop_tse_lib” 

  • Do the same with the “Makefile” in “app” 

  • Remove “C_SRCS += displays.c” in the “Makefile” in “app” 

  • Exchange “USER_LED_PIO_8OUT_BASE” with “LED_PIO_BASE” in demo_control.c 

  • Exchange “CFI_FLASH_64M_NAME” with “EXT_FLASH_NAME” 

  • Remove “#include "displays.h"” in “simple_socket_server.c” 

  • Remove lines with “putstr_” in “simple_socket_server.c” 

  • Setup IP, gateway and network mask in “simple_socket_server.h” in accordance with you network. 

  • The following changes are some kind of “dirty”. Thanks to “mmTsuchi” and “artyanez” who are Member of the Altera forum 

  • rename function “int close (int fd)” to “int alt_close (int fd)” in “superloop_iniche_lib/iniche/src/alt_iniche_close.c” 

  • rename function “int fcntl (int file, int cmd, ...)” to “int alt_fcntl (int file, int cmd, ...)” in ““superloop_iniche_lib/iniche/src/alt_iniche_close.c”/alt_iniche_fcntl.c” 

  • rename function “int read (int fd, void *ptr, size_t len)” to “int alt_read (int fd, void *ptr, size_t len)” in “alt_iniche_read.c” 

  • rename function “int write (int fd, const void *ptr, size_t len)” to “int alt_write (int fd, const void *ptr, size_t len)” in “alt_iniche_write.c” 

 

forth step (build and be happy) 

  • Build the “app” with “Build Project” 

  • Configure the FPGA with “..kits\cycloneIII_3c120_embedded\examples\standard\cycloneIII_3c120_niosII_standard.sof 

  • Download and run the “app/superloop_simple_socket_server_plus.elf” 

0 Kudos
Altera_Forum
Honored Contributor II
410 Views

What is the point of the Quartus 9sp1 step here? It looks like all it does is build the software which you should be able to do once you have the correct bsp generated.

0 Kudos
Altera_Forum
Honored Contributor II
410 Views

 

--- Quote Start ---  

What is the point of the Quartus 9sp1 step here? It looks like all it does is build the software which you should be able to do once you have the correct bsp generated. 

--- Quote End ---  

 

 

Feel free to do so and contribute your solution. May be it is necessary to edit the initial script.
0 Kudos
Reply