• AVR Freaks

Hot!What can I do about this?

Page: 12 > Showing page 1 of 2
Author
sahara
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2017/09/24 06:57:55
  • Location: 0
  • Status: offline
2020/05/01 01:46:43 (permalink)
0

What can I do about this?

Library File C:\Program Files (x86)\Microchip\MPLABX\v5.35\packs\Microchip\PIC12-16F1xxx_DFP\1.2.63\xc8\pic\include\xc.h
but there is an unresolved #include <pic16f1503.h>
in included C:\Program Files (x86)\Microchip\MPLABX\v5.35\packs\Microchip\PIC12-16F1xxx_DFP\1.2.63\xc8\pic\include\pic_chip_select.h
 

Attached Image(s)

#1

27 Replies Related Threads

    katela
    Super Member
    • Total Posts : 1861
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: What can I do about this? 2020/05/06 08:32:20 (permalink)
    +1 (1)
    If it compiles it's probably an IDE issue. Search the forum for red squiggly lines

    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
    du00000001
    Just Some Member
    • Total Posts : 3944
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: What can I do about this? 2020/05/06 09:02:20 (permalink)
    +2 (2)
    This somewhat enlightens us about the squiggly lines:
     
    Obviously MPLAB's search path is NOT the active compiler version's search path but some ominous path within MPLAB's installation path.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #3
    george6565
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2014/12/03 18:35:03
    • Location: 0
    • Status: offline
    Re: What can I do about this? 2020/05/10 13:23:43 (permalink)
    0
    Hello,
    I came back to MPLAB after couple of years, Installed latest MPLAB and XC compiler opened my old project with PIC16F1503 and I am unable to build it with same error as described here: "unresolved #include <pic16f1503.h>"
     
    so what can I do about it? If is it a path problem, how do I fix it?
    #4
    ric
    Super Member
    • Total Posts : 28371
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: What can I do about this? 2020/05/10 13:25:36 (permalink)
    0
    Did you #include that file yourself (normally you shouldn't), or is the problem when xc.h attempts to include it for you?
     
    You didn't make clear, are you getting compile errors, or just red squiggles?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    mbrowning
    USNA79
    • Total Posts : 1795
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: What can I do about this? 2020/05/10 13:31:24 (permalink)
    +1 (1)
    george6565
    old project with PIC16F1503 and I am unable to build it with same error as described here: "unresolved #include <pic16f1503.h>"

    Are you really unable to build it? Have you tried? This message is from the easily confused IDE, not the compiler.
    If the old project compiled under XC8 version 1.45 or earlier then it probably won't compile using the default C99 mode, but will probably compile using the C90 mode which must be selected in project properties/XC8 settings.
    #6
    du00000001
    Just Some Member
    • Total Posts : 3944
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: What can I do about this? 2020/05/10 13:31:58 (permalink)
    0
    george6565
    Hello,
    I came back to MPLAB after couple of years, Installed latest MPLAB and XC compiler opened my old project with PIC16F1503 and I am unable to build it with same error as described here: "unresolved #include <pic16f1503.h>"
     
    so what can I do about it? If is it a path problem, how do I fix it?



    • Just an MPLAB indication? Carefully read the above.
    • If the project doesn't compile: change the compiler options to "C90" (now the default is C99).
    • In addition you'd better  #include <xh.h>  than  #include <pic16f1503.h>  (although this modification isn't expected to really change a thing wrt "unresolved ..." in that notification.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #7
    george6565
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2014/12/03 18:35:03
    • Location: 0
    • Status: offline
    Re: What can I do about this? 2020/05/10 13:57:55 (permalink)
    0
    well i did not include it myself, the message is coming from include xc.h line
     
    My original project is not able to build because of some syntax problems in interrupts (which is strange I would swear it was working), nevertheless I quickly wrote simple project, it has the same warning but it is able to build so it seems it is working, but it is very uncomfortable since probably because of this problem with loading PIC16F1503 header, IDE does not know basic registers names like WDTCON or TRISC and mark them with red underline
     
    EDIT: with settings C90, even my old project is able to compile succesfully
    post edited by george6565 - 2020/05/10 14:04:29
    #8
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11982
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: What can I do about this? 2020/05/10 14:06:15 (permalink)
    0
    Right click on the project...Code Assistance...Reparse Project.
    #9
    ric
    Super Member
    • Total Posts : 28371
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: What can I do about this? 2020/05/10 15:11:02 (permalink)
    +1 (1)
    george6565
    My original project is not able to build because of some syntax problems in interrupts (which is strange I would swear it was working),

    As you have found, that is one of the big things that changed going from C90 to C99 mode.
    For more, see:
    What's new in XC8 v2.0
    and
    Moving from XC8 v1.xx to v2.0
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #10
    george6565
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2014/12/03 18:35:03
    • Location: 0
    • Status: offline
    Re: What can I do about this? 2020/05/10 15:41:21 (permalink)
    0
    ric
    george6565
    My original project is not able to build because of some syntax problems in interrupts (which is strange I would swear it was working),

    As you have found, that is one of the big things that changed going from C90 to C99 mode.
    For more, see:
    What's new in XC8 v2.0
    and
    Moving from XC8 v1.xx to v2.0
     




    thanks for the links, I made my original project work under C99
     
     
    also, because of problems with Pickit3 I have to uninstall MPLAB X v5.35 and installed v5.30 instead, now IPE is working with Pickit3 and also the projects are working without any warning, so even this underlinening of basic keywords like registers is gone
    #11
    ric
    Super Member
    • Total Posts : 28371
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: What can I do about this? 2020/05/10 15:48:19 (permalink)
    0
    george6565
    also, because of problems with Pickit3 I have to uninstall MPLAB X v5.35 and installed v5.30 instead, now IPE is working with Pickit3 and also the projects are working without any warning, so even this underlinening of basic keywords like registers is gone

    You don't have to uninstall each version. You can happily have multiple versions of MPLABX installed at the same time, and jump between them to compare.
    (Don't override where it installs itself. The default behaviour is to install each IDE into a unique folder.)
    The ONLY potential problem is if you let a later IDE update the firmware in the PK3. Sometimes an older IDE cannot talk to the newer firmware correctly. A full reload of the PK3 firmware cures that.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #12
    george6565
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2014/12/03 18:35:03
    • Location: 0
    • Status: offline
    Re: What can I do about this? 2020/05/10 16:06:49 (permalink)
    0
    ric
    george6565
    also, because of problems with Pickit3 I have to uninstall MPLAB X v5.35 and installed v5.30 instead, now IPE is working with Pickit3 and also the projects are working without any warning, so even this underlinening of basic keywords like registers is gone

    You don't have to uninstall each version. You can happily have multiple versions of MPLABX installed at the same time, and jump between them to compare.
    (Don't override where it installs itself. The default behaviour is to install each IDE into a unique folder.)
    The ONLY potential problem is if you let a later IDE update the firmware in the PK3. Sometimes an older IDE cannot talk to the newer firmware correctly. A full reload of the PK3 firmware cures that.
     




     
    thanks, good to know
     
    unfortunetly even in 5.30 the problem with "unresolved #include <pic16f1503.h>" and underlining register names is back after first build and the "reparse project" option is not helping. Is there a way how to fix it, It is very painfull to look through the code where every second line has red underline :-(
     
     
     
    #13
    mbrowning
    USNA79
    • Total Posts : 1795
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: What can I do about this? 2020/05/10 16:55:04 (permalink)
    +2 (2)
    You can go into the editor settings and turn all the code "assistance" off.
    So many people have this problem. It's always worked for me, but it sometimes takes time to catch up. But for many it seems it doesn't work most of the time.
    #14
    NKurzman
    A Guy on the Net
    • Total Posts : 18903
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: What can I do about this? 2020/05/10 21:25:39 (permalink)
    0
    All Versions on MPLabX have the Red Squiggly Line Issue.  It does NOT mean there is anything wrong with the code.
    If the Compiler does not complain , the Code is fine.
     
    You should NOT be including <pic16f1503.h>"  You should Only include <xc.h>
    #15
    ric
    Super Member
    • Total Posts : 28371
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: What can I do about this? 2020/05/10 21:38:54 (permalink)
    +1 (1)
    NKurzman
    You should NOT be including <pic16f1503.h>"  You should Only include <xc.h>

    That is all the OP is doing.


    The problem is actually from xc.h #including pic_chip_select.h which #includes pic16f1503.h
     
    The interesting detail, as pointed out in post#3, is that is it NOT looking in the compiler's search path.
    xc.h and pic_chip_select.h are both coming from
    C:\Program Files (x86)\Microchip\MPLABX\v5.35\packs\Microchip\PIC12-16F1xxx_DFP\1.2.63\xc8\pic\include\
     
    Presumably it's meant to find the file at
    C:\Program Files (x86)\Microchip\MPLABX\v5.35\packs\Microchip\PIC12-16F1xxx_DFP\1.2.63\xc8\pic\include\proc\pic16f1503.h
     
     
    post edited by ric - 2020/05/10 21:42:22

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #16
    JPortici
    Super Member
    • Total Posts : 1159
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: What can I do about this? 2020/05/10 22:37:42 (permalink)
    0
    I'm having a similar issue with XC8 2.20 and only older parts (i.e. PIC16F684 is affected, PIC16F18324 or PIC18F26K42 are not affected. I didn't investigate further than seeing it had issues with older parts as i didn't have the time, switching back to 2.10 as it doesn't have the issue)
     
    The issue being that the device include file can't be found, but the file is present in the 2.20 install forlder. The program actually compiles if i use registers, but the moment i try to access register bits it will complain because XXXbits is not defined anywhere and can't find included file <picxxxx.h>
     
    This other thread makes me think, has XC8 2.20 changed the source of the device include file from internal to PACKS? So, does this mean we need to update the packs to make it work somehow? and why it didn't complain if pack is of an older version than required?
    #17
    ric
    Super Member
    • Total Posts : 28371
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: What can I do about this? 2020/05/10 22:42:42 (permalink)
    +2 (2)
    The problem may be a side effect of XC8 moving from
    C:\Program Files (x86)\Microchip\
    to
    C:\Program Files\Microchip\
    due to the change to 64 bit.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #18
    george6565
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2014/12/03 18:35:03
    • Location: 0
    • Status: offline
    Re: What can I do about this? 2020/05/11 00:44:37 (permalink)
    +1 (1)
    ric
    The problem may be a side effect of XC8 moving from
    C:\Program Files (x86)\Microchip\
    to
    C:\Program Files\Microchip\
    due to the change to 64 bit.
     


     
    actualy first what I wanted to try was to include the file manually but i did not find it anywhere in my HDD nor even on the internet (i found some old version on Github but I was not able to compile it, so I gave up), but the compilation works so it must be somewhere.... I believe the problem with red underlines is connected with this, compiler obviously knows the registres names but IDE does not, because it can't find PIC header files where they are defined
     
    EDIT: I tried to search the file at whole HDD (originaly I searched in only in both Program files) and I found the PIC headers under User folder (C:\Users\user\.mchp_packs\Microchip\PIC12-16F1xxx_DFP\1.2.63\xc8\pic\include\proc), when I include it into project manually everything is working fine without any unexpected red underlines. Is there a way how to add this path to IDE search paths?
     
     
    post edited by george6565 - 2020/05/11 00:47:21
    #19
    mad_c
    Super Member
    • Total Posts : 1258
    • Reward points : 0
    • Joined: 2010/12/12 17:48:27
    • Location: Brisbane, Australia
    • Status: offline
    Re: What can I do about this? 2020/05/11 14:05:17 (permalink)
    +1 (1)
    Hi,
     
    Just to clarify the situation: The 2.20 XC8 compiler does now use device family packs (DFPs). The compiler comes with in-built device support, so you do not have to go downloading anything else to get it to work. If you are using the command line, you can specify the path to a different DFP if you want using the -mdfp=<path> option.
     
    If you are using the IDE, then it should manage all the DFPs for you, and let you select which one you want to use. If you select to use a DFP that is not the compiler's in-built DFP version, the IDE will pass to the compiler driver the -mdfp option to use a different pack. (You'll see that option in the IDE's build transcript.) If the IDE has been told to download a new DFP, it will be stored in the .mchp_packs directory in your user account and can be used by any IDE/compiler.
     
    Jeff
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5