Hot!TCP-IP lite using on PIC18F24k40

Author
AMPS
Super Member
  • Total Posts : 347
  • Reward points : 0
  • Status: offline
2018/12/07 22:49:50 (permalink)
0

TCP-IP lite using on PIC18F24k40

Dear all,
I am trying to config TCp-IP lite using mCC. i used to get below list o error. 
I used ENC28J60.
compile error as below
In file included from mcc_generated_files/TCPIPLibrary/network.h:44:
mcc_generated_files/TCPIPLibrary/tcpip_types.h:58:22: error: bit-field 'vlanId' too large (12 bits)
        unsigned int vlanId:12; // not PIC compatible
                     ^
mcc_generated_files/TCPIPLibrary/tcpip_types.h:280:14: error: bit-field 'version' has bad bitfield type 'uint16_t' (aka 'unsigned short')
    uint16_t version:4;
             ^
mcc_generated_files/TCPIPLibrary/tcpip_types.h:281:14: error: bit-field 'trafficClass' has bad bitfield type 'uint16_t' (aka 'unsigned short')
    uint16_t trafficClass:8;// this is a problem
             ^
mcc_generated_files/TCPIPLibrary/tcpip_types.h:282:14: error: bit-field 'flowLabel1stNibble' has bad bitfield type 'uint16_t' (aka 'unsigned short')
    uint16_t flowLabel1stNibble:4;
             ^
4 errors generated.
(908) exit status = 1
nbproject/Makefile-default.mk:258: recipe for target 'build/default/production/mcc_generated_files/TCPIPLibrary/icmp.p1' failed
make[2]: *** [build/default/production/mcc_generated_files/TCPIPLibrary/icmp.p1] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory 'C:/Users/Desktop/Trial/TCP_IP_Test.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Desktop/Trial/TCP_IP_Test.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 2s)

 

Attached Image(s)


Amps
*.*.*.*.*.*.*.*.*.*.*.*.*
#1

4 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5375
    • Reward points : 0
    • Status: offline
    Re: TCP-IP lite using on PIC18F24k40 2018/12/08 05:11:25 (permalink)
    0
    Hi,
    Which compiler and which version did you use ?
    If you use XC8 v2.00 are you in C90 standard mode or C99 ?
    Regards
     
    #2
    AMPS
    Super Member
    • Total Posts : 347
    • Reward points : 0
    • Status: offline
    Re: TCP-IP lite using on PIC18F24k40 2018/12/11 22:54:33 (permalink)
    0
    I used XC8 V2.0 i am using standard mode. when i checked the TCP-IP lite option it say module is supported  but not tested.
     
    Is there any equivalent controller where it has been tested. Here list of controller TCP-IP supported but there is no where it mentioned it has been tested.
    https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en573940
     

    Amps
    *.*.*.*.*.*.*.*.*.*.*.*.*
    #3
    mbrowning
    Just a Member
    • Total Posts : 1251
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: online
    Re: TCP-IP lite using on PIC18F24k40 2018/12/12 07:45:54 (permalink)
    4 (1)
    I don't believe XC8 (or HTC or C18) has never supported bit-fields greater than 8bits, so the comment on line 58 is true for 8-bit pics - "not PIC compatible"
     
    For XC8 versions 1.45 and 2.00, error message 264 has this to say:
    (264) bad bitfield type (Parser)
    A bit-field can only have a type of int (or unsigned), for example:
    struct FREG {
    char b0:1; /* these must be part of an int, not char */
    char :6;
    char b7:1;
    } freg;

     
    So no short or char. Only int
    Looks like TCP-IP Lite needs a bit of rework to compile on any 8-bit PIC.
     

    Oh well - there's always next year
    #4
    christinaz
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2018/05/17 09:58:42
    • Location: 0
    • Status: offline
    Re: TCP-IP lite using on PIC18F24k40 2019/01/10 17:03:09 (permalink)
    0
    Hi AMPS, it looks you are using an old version of tcpip library code cause in the latest version, this field: unsigned int vlanId has been deleted. It's because XC8 C99 doesn't support bit-fields greater than 8bits and this field is not used in current tcpip library.
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5