Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: GoAhead Webserver

  1. #1
    Join Date
    Feb 2005
    Posts
    13
    Rep Power
    1

    Default

    hello there,

    anyone know how to port the goahead webserver to NIOS2?

    Thnx

  2. #2
    Join Date
    Jul 2004
    Location
    New Jersey, USA
    Posts
    731
    Rep Power
    1

    Default

    Hi Preloader,

    Based on the docs, GoAhead already supports ecos ... but I've
    never actually tried it. Did you download and review the source
    and accompanying docs yet?

    Regards,
    --Scott

  3. #3
    Join Date
    May 2004
    Posts
    239
    Rep Power
    1

    Default

    Preloader,

    Go Ahead is already ported to eCos.

    A web server is high enough level that there will be nothing that requires porting to a processor architecture. You will just need to modify the makefiles (or whatever go ahead uses) to use the Nios II toolchain.

  4. #4
    Join Date
    Feb 2005
    Posts
    13
    Rep Power
    1

    Default

    Hi ruglybloke,

    yes you are right. goahead webserver is ported to ecos. There is a makefile example with an arm platform, but i do not know how to modify the makefile for my nios2 platform.

    There are three lines in the makefile which have to be modify:

    PKG_INSTALL_DIR := /work/net_test/install
    COMMAND_PREFIX := arm-elf-
    CFLAGS := -mcpu=arm7tdmi -D__EDB7209 -D__EDB7212 $(DEBUG)

    Can you tell me how the CFLAGS have to be set?

    Thnx

  5. #5
    Join Date
    May 2004
    Posts
    239
    Rep Power
    1

    Default

    If you follow the instructions in the tutorial you can look at the command line options

    COMMAND_PREFIX := nios2-elf-

    The CFLAGS will vary depending upon your hardware these will work for a Cyclone part

    CFLAGS = -g -O3 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div

    If you have a Stratix part or a hardware multiply/divide unit you may wish to change these to use the multiply unit and generate faster code

    nios2-elf-gcc --help will provide more information on what the options mean

  6. #6
    Join Date
    Feb 2005
    Posts
    13
    Rep Power
    1

    Default

    hi rugbybloke,

    thanks for your answer. I'll try your suggestion.

  7. #7
    Join Date
    Feb 2005
    Posts
    13
    Rep Power
    1

    Default

    hi rugbybloke,

    i follow your suggestion, but i run into conflicting errors:

    D:\Ha\ecos_sk3\SK3_webserver\ECOS>make
    nios2-elf-gcc -c -o main.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvt
    able-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS -D_
    _ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-sec
    tions -fdata-sections -Wp,-MD,main.d main.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    main.c:252: error: conflicting types for 'send'
    /cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include/sys/socket.h:466: error: previous declaration of
    'send' was here
    main.c:252: error: conflicting types for 'send'
    /cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include/sys/socket.h:466: error: previous declaration of
    'send' was here
    main.c:257: error: conflicting types for 'recv'
    /cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include/sys/socket.h:463: error: previous declaration of
    'recv' was here
    main.c:257: error: conflicting types for 'recv'
    /cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include/sys/socket.h:463: error: previous declaration of
    'recv' was here
    make: *** [main.o] Error 1


    I try to deactivate the "send" and "recv" part in the main.c file and then recompile it. Then i run into these errors:


    nios2-elf-gcc -c -o main.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvt
    able-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS -D_
    _ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-sec
    tions -fdata-sections -Wp,-MD,main.d main.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../asp.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -f
    vtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS -
    D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-s
    ections -fdata-sections -Wp,-MD,../asp.d ../asp.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../balloc.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions
    -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECO
    S -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunctio
    n-sections -fdata-sections -Wp,-MD,../balloc.d ../balloc.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../base64.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions
    -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECO
    S -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunctio
    n-sections -fdata-sections -Wp,-MD,../base64.d ../base64.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../default.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exception
    s -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DEC
    OS -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffuncti
    on-sections -fdata-sections -Wp,-MD,../default.d ../default.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../ejlex.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions
    -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS
    -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction
    -sections -fdata-sections -Wp,-MD,../ejlex.d ../ejlex.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../ejparse.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exception
    s -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DEC
    OS -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffuncti
    on-sections -fdata-sections -Wp,-MD,../ejparse.d ../ejparse.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../form.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -
    fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS
    -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-
    sections -fdata-sections -Wp,-MD,../form.d ../form.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../h.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvt
    able-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS -D_
    _ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-sec
    tions -fdata-sections -Wp,-MD,../h.d ../h.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../handler.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exception
    s -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DEC
    OS -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffuncti
    on-sections -fdata-sections -Wp,-MD,../handler.d ../handler.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../mime.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -
    fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS
    -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-
    sections -fdata-sections -Wp,-MD,../mime.d ../mime.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    nios2-elf-gcc -c -o ../misc.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -
    fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS
    -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-
    sections -fdata-sections -Wp,-MD,../misc.d ../misc.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    ../misc.c: In function `gstrtoi':
    ../misc.c:685: warning: implicit declaration of function `atoi'
    nios2-elf-gcc -c -o ../page.o -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -
    fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -DWEBS -DUEMF -DOS="eCos" -DECOS
    -D__ECOS -D__NO_FCNTL=1 -I.. -Wall -I/cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include -ffunction-
    sections -fdata-sections -Wp,-MD,../page.d ../page.c
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    ../page.c: In function `websPageOpen':
    ../page.c:35: warning: implicit declaration of function `open'
    ../page.c: In function `websPageStat':
    ../page.c:68: error: storage size of 's' isn't known
    ../page.c:70: warning: implicit declaration of function `stat'
    ../page.c:75: error: `S_IFDIR' undeclared (first use in this function)
    ../page.c:75: error: (Each undeclared identifier is reported only once
    ../page.c:75: error: for each function it appears in.)
    ../page.c:68: warning: unused variable `s'
    ../page.c: In function `websPageIsDirectory':
    ../page.c:96: error: storage size of 'sbuf' isn't known
    ../page.c:99: error: `S_IFDIR' undeclared (first use in this function)
    ../page.c:96: warning: unused variable `sbuf'
    ../page.c: In function `websPageSeek':
    ../page.c:137: warning: implicit declaration of function `lseek'
    ../page.c:137: error: `SEEK_CUR' undeclared (first use in this function)
    make: *** [../page.o] Error 1


    Any idea how to solve this?

    Thnx

  8. #8
    Join Date
    May 2004
    Posts
    239
    Rep Power
    1

    Default

    <div class='quotetop'>QUOTE </div>
    main.c:252: error: conflicting types for &#39;send&#39;
    /cygdrive/d/ha/Sk3_Ecos/sk3_goahead_install/include/sys/socket.h:466: error: previous declaration of
    &#39;send&#39; was here[/b]
    This is a standard C compiler error somewhere in your project you have multiple declarations of send. You need to find out where these are in your include files. Short of actually doing the job for you it&#39;s hard to be any more helpful I&#39;m afraid.

  9. #9
    Join Date
    Feb 2005
    Posts
    13
    Rep Power
    1

    Default

    hi,

    now i got the goahead webserver running on my custom nios2 platform. I included some header files and do some defines. Then i compile it.


  10. #10
    Join Date
    Jul 2009
    Posts
    1
    Rep Power
    1

    Default

    <div class='quotetop'>QUOTE (Preloader @ Jun 23 2005, 04:37 AM) <{POST_SNAPBACK}></div>
    hi,

    now i got the goahead webserver running on my custom nios2 platform. I included some header files and do some defines. Then i compile it.

    [/b]
    Hi,

    Can you tell me how you had get rid of the conflicting types error for send() and recv()?
    I&#39;m also getting the same error that you got.
    Thanks in advance
    nayk

Similar Threads

  1. Help Getting goAhead Web Server Working
    By graham615 in forum ecos Forum
    Replies: 7
    Last Post: April 6th, 2012, 04:13 PM
  2. port goahead web server to nios2 uclinux
    By alex824 in forum Linux Forum
    Replies: 15
    Last Post: April 6th, 2012, 04:12 PM
  3. nios II webserver
    By watchpuppy in forum General Altera Discussion
    Replies: 0
    Last Post: April 14th, 2009, 05:21 AM
  4. Webserver
    By samar in forum General Altera Discussion
    Replies: 0
    Last Post: March 25th, 2009, 12:49 AM
  5. problem with goahead webserver...
    By jwlam in forum Linux Forum
    Replies: 13
    Last Post: August 11th, 2006, 06:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •