• AVR Freaks

Hot!Strange error when migrating from 1.35 to 1.36

Author
sggaunt
Super Member
  • Total Posts : 211
  • Reward points : 0
  • Joined: 2009/12/03 06:51:45
  • Location: Huddersfield
  • Status: offline
2019/05/13 06:55:00 (permalink)
0

Strange error when migrating from 1.35 to 1.36

Fine under 1.35 but a move to 1.36 gives this error. I cannot see anything in the change log that would account for it so stumped!
 
C:\Program Files (x86)\Microchip\xc8\v1.36\include\pic18f6527.h:10175: error: (1098) conflicting declarations for variable "_SSP1STATbits" 
 
Removing all references to INTCONbits from my code has no effect, same error
 
 
#1

12 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 2678
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 07:27:35 (permalink)
    0
    Search pic18f6527.h and all files of your project for the declaration of SSP1STATbits.
    There might be a "nicety" like being once delared as unsigned, then as signed - or something quite similar.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    sggaunt
    Super Member
    • Total Posts : 211
    • Reward points : 0
    • Joined: 2009/12/03 06:51:45
    • Location: Huddersfield
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 08:05:48 (permalink)
    0
    No this is only defined within within the 'chip' header, and it does not matter which chip the project uses  all give the same error (except for the header filename of course). All compilers have the same peripheral library installed.
      
    #3
    davekw7x
    Entropy++
    • Total Posts : 1734
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 08:12:50 (permalink)
    +1 (1)
    To the OP:
    Are you using the no-longer-supported MLA (Microchip Library for Applications)?
     
    If not, then ignore the rest of this post.
     
    If you are still with me...
     
    To the OP and others:
    It turns out that for certain chips (I'm pretty sure that yours is one), the last time the MLA libraries were compiled XC8 had certain "anomalies" in some of the header files that were cleaned up in later versions of XC8.  In order to use those devices with MLA, I think you have to recompile the libraries.
     
    An alternative is to not include plib.h and copy the MLA source code (and specific function headers) for the stuff you need into your project.  Also make sure to uncheck the "Link in peripheral library" box in the Project->XC8 Linker->Runtime window
     
    There is a long thread about this.  See https://www.microchip.com/forums/FindPost/912921 for some explanation.  Note that there is another thread on this forum about rebuilding the libraries.  You can search for it.
     
    If this still doesn't help (and you are not convinced) maybe mad_c can check in again.  There is no way that I would attempt to give a more clear or complete explanation.
     
     
    Regards,

    Dave
    post edited by davekw7x - 2019/05/13 08:38:41

    Sometimes I just can't help myself...
    #4
    sggaunt
    Super Member
    • Total Posts : 211
    • Reward points : 0
    • Joined: 2009/12/03 06:51:45
    • Location: Huddersfield
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 10:59:40 (permalink)
    0
    Dave
    I rather suspect that you are correct, as there does not seem to be a 'sensible' reason for what is happening, and
    It may not be related to MLA as don't use it AFIK 
    v1.36 does add several more devices compared to only two additional one in V1.35.
    This is the 1.36 change log. I may also be something to do with the EEPROM Access Macros but I think this is less likely
    I will look into it shortly
    ---------------------
    New device support Support is now available for the following parts (and their corresponding LF variants): 16F18326, 16F18346, 18F46K40, 18F26K40, 18F65K40, and 18F66K40.
    New assertion A new assertion macro has been added. It implements a light-weight embedded version of the standard C assert() macro, and is used in the same way.  The macro is called __conditional_software_breakpoint() and, if possible, it attempts to halt program execution via a software breakpoint if its argument is false.
    Coverity support files Support files for Coverity are now provided. They can be found in the compiler’s  etc/coverity directory.
    New EEPROM access The compiler now has the ability to access EEPROM for those devices that use the NVMREG register set. Access is transparent when using any provided EEPROM routines. A new preprocessor macro _EEPROM_INT is defined to indicate the access type available with the selected device. Note that those devices which use the new NVMREG set have no flash library support.
    #5
    vloki
    Jo, alla!
    • Total Posts : 6803
    • Reward points : 0
    • Joined: 2007/10/15 00:51:49
    • Location: Germany
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 12:01:25 (permalink)
    +1 (1)
    Dave is right. ( If you did try to search the forum ... ;-)

    Uffbasse !
    #6
    du00000001
    Just Some Member
    • Total Posts : 2678
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 12:03:12 (permalink)
    +1 (1)
    Do it the fast & smart way: zip your project and upload it.
    This way we won't have to guess about your "AFAIK"s.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #7
    vloki
    Jo, alla!
    • Total Posts : 6803
    • Reward points : 0
    • Joined: 2007/10/15 00:51:49
    • Location: Germany
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 12:12:35 (permalink)
    +1 (1)

    Uffbasse !
    #8
    du00000001
    Just Some Member
    • Total Posts : 2678
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 12:17:56 (permalink)
    0
    @ Steve
    Other compiler, just the same story.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #9
    davekw7x
    Entropy++
    • Total Posts : 1734
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/13 13:01:04 (permalink)
    +1 (1)
    sggaunt
    ...
    It may not be related to MLA as don't use it AFIK
    ...This is the 1.36 change log...



    There are undocumented changes in headers for some chips between XC8 v1.35 and v1.36 that affect use of the MLA functions.  The two text files that I attached show the section with typedef for the particular union in the error message you posted.
     
    If you have ever installed MLA for the version of compiler you are using (> v1.34) and if you use any function(s) with the same name(s) as some of the plib functions, then for certain chips you are susceptible to the exact error you posted.
     
    To eliminate this possibility, make absodamnlutely sure that you have unchecked the "Link in peripheral library" box in the Project->Properties->XC8 Linker->Runtime window.
     
    Regards,

    Dave
     
    post edited by davekw7x - 2019/05/13 13:08:07

    Attached Image(s)


    Sometimes I just can't help myself...
    #10
    sggaunt
    Super Member
    • Total Posts : 211
    • Reward points : 0
    • Joined: 2009/12/03 06:51:45
    • Location: Huddersfield
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/14 03:32:00 (permalink)
    0
    I think the search function in this Forum is as good as the search function in many other forums. i.e No much help, unless you get the terms exactly right.
     
    Dave problem is that my project is converted from C18 under MPLab8.9, and makes heavy use of the peripheral Libraries. 
    But No never have installed MLA
    Problem is deffo in the header file though, replacing it with a copy of the older version fixes it.
     
     
    #11
    vloki
    Jo, alla!
    • Total Posts : 6803
    • Reward points : 0
    • Joined: 2007/10/15 00:51:49
    • Location: Germany
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/15 00:57:02 (permalink)
    +1 (1)
    In you older thread I linked to another one where
    mad_c recommended not to do use older headers.
    https://www.microchip.com/forums/FindPost/897800
     
    Don't ask me what the problem is exactly,
    In the beginning I did the same ;-)

    Uffbasse !
    #12
    sggaunt
    Super Member
    • Total Posts : 211
    • Reward points : 0
    • Joined: 2009/12/03 06:51:45
    • Location: Huddersfield
    • Status: offline
    Re: Strange error when migrating from 1.35 to 1.36 2019/05/20 01:42:54 (permalink)
    +1 (1)
    Cheers for all that guys.
    The answer for me will be this.
    As there does not seem to be a 'Simple' answer and as I wont be doing any further development to the projects where this happens due to impending complete retirement, and as my client is happy with this, and the projects are small enough for Free mode to work fine.
    So when I hand over, the projects will 'require' a compiler version less than 1.36 (or even 1.35 so you don't get the annoying 'HPA has ended' message) 
    Steve
     
     
    #13
    Jump to:
    © 2019 APG vNext Commercial Version 4.5