• AVR Freaks

Hot!MPLAB 5.35 cannot find the register definitions. 5.10 can

Page: 12 > Showing page 1 of 2
Author
user2x
Super Member
  • Total Posts : 429
  • Reward points : 0
  • Joined: 2011/02/10 20:43:36
  • Location: 0
  • Status: offline
2020/09/16 21:43:59 (permalink)
0

MPLAB 5.35 cannot find the register definitions. 5.10 can

PIC24FG64GA702
 
I upgraded today due to the sfr window not working for register changes to the chip on 5.10.
 
Now this late version does not identify any of the chip's registers or definitions.
They are all underlined in red and I cannot Shift-click, them either.
 
The code compiles though.
 
How do I get this to work again?
 

Attachment(s)

Attachments are not available: Download requirements not met
#1

21 Replies Related Threads

    ric
    Super Member
    • Total Posts : 28676
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/16 21:51:29 (permalink)
    +1 (1)
    That has been an underlying problem in MPLABX/Netbeans for years.
    Just search "red squiggles" on this board.
    It's very bad form, but one hack to fix it is to add a #include using the absolute path to the correct C header file for your PIC.
     
     
     

    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!
    #2
    GeeWhizz
    Starting Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/07/12 03:44:26
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/16 22:07:17 (permalink)
    0
    ric
    That has been an underlying problem in MPLABX/Netbeans for years.
    Just search "red squiggles" on this board.
    It's very bad form, but one hack to fix it is to add a #include using the absolute path to the correct C header file for your PIC.

    It's an annoying quirk with v5.35.  I find the "feature" comes and goes.  Thankfully my projects continue to compile OK.  We seek perfection but (mostly) accept what we can get.
    #3
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/16 22:09:36 (permalink)
    0
    I did come across it a while back on 5.3?? and then downgraded back to 5.10 It worked again.
    But now I need the new one as it will allow writing to register via the sfr window. I hope!
     
    Plus, today, my code configurator upgraded itself on 5.10 and then stopped working. It now required 5.35 to operate.
    Grr!!
     
    #4
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/16 22:17:59 (permalink)
    0
    Wait, 
    <xc.h> is being included.
    And in that, the correct PIC  .h file is trying to be included but that is underlined and cannot resolve - apparently
    See here.
    Is there a path that is not set in 5.35?  The project settings look all different.
     

    Attachment(s)

    Attachments are not available: Download requirements not met
    #5
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 12019
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/16 22:33:14 (permalink)
    +1 (3)
    <xc.h> is being included.


    That's not what ric said to do.
     
    "Reparse project" also might fix it.
    #6
    ric
    Super Member
    • Total Posts : 28676
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/16 22:33:17 (permalink)
    +1 (1)
    It's ultimately meant to end up pointing at a header file somewhere in the latest device pack that you have installed.
    I think that's where something is getting confused.
    That's why forcing an absolute path to a known good header can be a temporary fix.
     

    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!
    #7
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/17 14:16:56 (permalink)
    0
    Where does one set a path to the header files in the XC16 installation?
     
    On 5.10, hovering on the file name:

    #if defined(__PIC24FJ64GA702__)
    #include <p24FJ64GA702.h>
    #endif

     
    will bring up the path to the file.
    in 5.35, nothing.
     
    #8
    ric
    Super Member
    • Total Posts : 28676
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/17 15:27:04 (permalink)
    0
    Something like
    C:\Program Files\Microchip\xc16\v1.50\support\PIC24F\h\p24FJ64GA702.h

     
    I would say that hovering is failing for the same reason you are getting the red squiggle. It doesn't know where it is.
     

    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!
    #9
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/17 15:30:54 (permalink)
    0
    Exactly. so I wonder how it is supposed to know where this is in the first place.
    It must have a patch set up somewhere and perhaps that setup is not correct?
     
    Is there a list on included paths somewhere that anyone knows of?
     
    EDIT: The path point to Program Files (x86) in 5.10
    post edited by user2x - 2020/09/17 15:37:30
    #10
    ric
    Super Member
    • Total Posts : 28676
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/17 15:33:10 (permalink)
    0
    I suspect the latest issue is all the new "device packs" which means the header is no longer in a fixed location with respect to the compiler.
     

    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!
    #11
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/17 15:49:40 (permalink)
    0
    I did not actually re-install the compiler when upgrading to 5.35.   It is the previous installation used with 5.10.
     
    5.35 just imported the settings from somewhere.
     
    #12
    ric
    Super Member
    • Total Posts : 28676
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/17 15:51:50 (permalink)
    0
    user2x
    I did not actually re-install the compiler when upgrading to 5.35.   It is the previous installation used with 5.10.

    That moght be the problem, i.e. the installer not observing all the settings from the previous MPLABX.
    Possibly reinstalling the compiler )(and/or the latest device packs) may fix it.
     

    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!
    #13
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/17 15:52:45 (permalink)
    0
    I have added this  now:

     
    #include "C:\Program Files (x86)\Microchip\xc16\v1.41\support\PIC24F\h\p24FJ64GA702.h"
     

     
    It works for the registers such as
    CCP2RAL
    but not the unions and other defs such as:
    CCP2CON1Hbits
     
    #14
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/20 15:19:23 (permalink)
    0
    I have since re-installed the compiler and all that comes with it but it has not made any difference.
     
     
     
    #15
    GeeWhizz
    Starting Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/07/12 03:44:26
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/20 19:16:59 (permalink)
    +1 (1)
    I installed 5.35 on a new SSD when the old one was failing, a few months ago.  At the time, it was the latest version.
     
    My current projects use three different processors.
     
    Since then, on some days it shows the red squiggles and on other days, it displays fine.  The apparent lack of reference definitions does not affect the way programs compile.  All I can say is the issue is flaky - some days (or bootups) show the error and other days it displays fine.  For the past week, no errors have been displayed.
     
    To me, at worst, the issue is "a little irritating".  At some point in the future, I'll upgrade to a later version but I don't have a good enough reason to waste the time.  Life is too short!
     
    (Edit: spelling)
    post edited by GeeWhizz - 2020/09/21 16:26:36
    #16
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/21 15:34:23 (permalink)
    +1 (1)
    Delete.
    post edited by user2x - 2020/09/21 15:36:39
    #17
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/22 21:59:08 (permalink)
    +1 (1)
    UPDATE:
     
    I have it operational now.
     
    Here is a brief summary to help other poor souls who have the same issue.
     
    Summary:
    From MPLAB X 5.20, they use device family packs (DFP) instead of the compiler include files.
    More info here:
    https://microchipdeveloper.com/xcc:introduction-to-dfps
     
    These are installed in something like:
     
    C:\Program Files (x86)\Microchip\MPLABX\v5.30\packs
     
    The IDE is supposed to use these if no updates or others have been manually installed with the pack manager under 
    in the IDE  Menu  Tools->Packs.
    Installing anything from that manager goes into the PC  
    C:\Users\[USERNAME]\.mchp_packs
     
    The IDE will then use those, instead of the default ones as above.
     
     
    So when I initially installed the new IDE, it asked me whether I want to import the settings from the old IDE.
    I said yes but should have said no.
     
    To get it working I had to delete the 
    C:\Users\[USERNAME]\.mchp_packs
     
    and then the persistent IDE data in:
    C:\Users\[USERNAME]\AppData\Roaming\mplab_ide
     
     
     
    After restarting the IDE, it then uses the correct pack in it's default location and all the registers, unions etc. for this processor resolve and are no longer underlined in red.
     
     
    Cheers
    X
     
     
     
     
     
     
     
     
    #18
    user2x
    Super Member
    • Total Posts : 429
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/23 14:57:17 (permalink)
    0
    Unfortunately, it seems I was over optimistic.
     
    It appears that only one of my projects is working correctly and none of the others.
     
    The working one resolves the header files into the XC16 / support  directories.
    The setting in the preferences has DFP x.xxx highlighted.
     
     
    The non working projects have the same preference settings but simply do not work.
     
    I have absolutely no idea which exact header files are now even used for compiling.
     
    Are there hidden settings somewhere, that defines which paths to use?
     
    What a total mess!
     
     
     
    post edited by user2x - 2020/09/23 14:59:27
    #19
    ric
    Super Member
    • Total Posts : 28676
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: MPLAB 5.35 cannot find the register definitions. 5.10 can 2020/09/23 15:30:15 (permalink)
    +1 (1)
    Strange that the compiler can always find the header files, it's just the IDE that can't.
    The whole idea of "packs" seems to have made a bad situation even worse, especially as there's no documentation on how it works or how to fix problems.
     

    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!
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5