November 15, 2019, 04:32:12 am


SMF - Just Installed!

modified tcp/ip stack for pic-web board using xc8 compiler

Started by otanoz, January 29, 2013, 06:06:51 pm

Previous topic - Next topic


I started using pic-web board a few months ago.
Everthing was going fine until I tried to use new xc8 compiler with the source code from Olimex web page.
It gives so many errors...
Does anybody have a modified version to work with xc8 compiler


Hey otanoz,

Unfortunately, we don't have a demo created with XC8. The task of converting all available PIC projects to the new compiler has been added to our TODO list a couple of months ago but it proved to be a much more time consuming task than initially evaluated. The big problem comes mainly from the fact that our PIC examples are based on the Microchip's application libraries BUT the unmodified demo projects does not compile with XC8, either (since the projects are meant to compile with MPLAB C18 and XC8 is essentially Hi-Tech C18.

There appear to be substantial differences between the MPLAB C18 and XC8 compilers, such as:

  • changes in the format of #pragma and significant differences in how sections are managed;

  • differences in the names of pre-defined Macros ( e.g. __18CXX in MPLAB C18 and  __XC8 in XC8 );

  • differences in the storage classes ( e.g. MPLAB C18 overlay and static function arguments;These features are either not present or not documented in the XC8 compiler);

  • differences in Special Type Qualifiers ( e.g. persistent, eeprom and  bankN in XC8; rom & ram in MPLAB C18).

Many of the above features of MPLAB C18 are used in the Microchip Solutions Libraries which are widely incorporated into customer code. As a result, large blocks of  solution library code ( e.g. the MDD File System ) do not compile using the XC8 compiler since they use features only implemented by the MPLAB C18 compiler.

We are patiently waiting for a newer release of Microchip's Solutions Libraries which hopefully would be adjusted for the new compiler.

Best regards,
Technical support and documentation manager at Olimex



I am also unable to even get the demo app compiled and linked using the older MPLAB v8.x and C18 ... The compile works, but then I get a Linker error ...

MPLINK 4.46, Linker
Device Database Version 1.11
Copyright (c) 1998-2011 Microchip Technology Inc.
Error - could not find definition of symbol 'BIT_COUNTER' in file 'Objects\Custom_I2C_Low.o'.
Errors    : 1

Can you tell me what is missing or not set-up correctly?  Where does BIT_COUNTER get defined?




Technical support and documentation manager at Olimex