• AVR Freaks

Hot!TCP/IP Lite Stack AN1921 (8bit PIC16)

Author
PottyMonster
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2011/12/09 18:14:20
  • Location: 0
  • Status: offline
2020/07/10 03:27:55 (permalink)
0

TCP/IP Lite Stack AN1921 (8bit PIC16)

Hi all, I'm trying to learn about TCP/IP stack implementation using a Curiosity board + PIC16F18875 +ETH Click board using the guide described in AN1921 (which conveniently uses a very similar setup), however when I attempt to compile the source code with XC8 I get errors with the TCP/IP library files suggesting it's not compatable with 8bit Microcontrollers, for example:
 
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;

 
Full error dump attached. I've tried this with TCP/IP Lite Stack versions 2.1.1, 2.2.8 and 2.2.12, plus "Link in C Library" C99 and C90 and it still fails. I'm pretty new to all this, and struggle to believe that the official library and application notes just don't work as described. Any suggestions greatly appreciated.
#1

2 Replies Related Threads

    katela
    Super Member
    • Total Posts : 1830
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: online
    Re: TCP/IP Lite Stack AN1921 (8bit PIC16) 2020/07/10 09:27:54 (permalink)
    +1 (1)
    Did you change the C standard to C90 as well?
     
    The TCP/IP Lite stack release note also states that:
    This light stack provides an optimized (low Flash and RAM footprint) TCP/IP stack for microcontrollers with ≥8 KB Flash (UDP only) and ≥16 KB Flash (TCP/IP), while still having a fully functional TCP/IPv4 stack
     
    PottyMonster
    I'm pretty new to all this, and struggle to believe that the official library and application notes just don't work as described. Any suggestions greatly appreciated.


    I have tried it, and it worked with 8-bit MCUs, when using the right tools.




    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
    #2
    beginM
    Senior Member
    • Total Posts : 38
    • Reward points : 0
    • Joined: 2015/05/19 15:52:21
    • Location: 0
    • Status: offline
    Re: TCP/IP Lite Stack AN1921 (8bit PIC16) 2020/07/21 13:25:38 (permalink)
    0
    Please use the latest TCP/IP library from MCC. 
    Create a new MCC project in MPLABX and select TCP/IP Lite Stack v2.2.12 available through MCC.
    The generated code doesn't show the errors that you have mentioned but it runs out of memory when compiled using XC8 under C99 and C90.
    Please refer to the release notes for memory restrictions  https://ww1.microchip.com/downloads/en/DeviceDoc/release_notes_TCPIPLite_library_v2_2_12.pdf
     
    post edited by beginM - 2020/07/21 14:35:08
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5