• AVR Freaks

Hot!plib.h not found

Page: 12 > Showing page 1 of 2
Author
FerrariLuigi
Starting Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2015/07/16 11:19:30
  • Location: 0
  • Status: offline
2017/03/02 00:55:09 (permalink)
0

plib.h not found

Dear all,
 
I have PIC32 USB starter kit and I downloaded from Microchip site the demo application "port_io_-_PIC32_Starter_Kit".
I downloaded the XC32 compiler and I installed it in my computer equipped with Ubuntu 16.04.
 
I opened the downloaded project with MPLAB-X IDE v3.55 and I tried to recompile the software.
But an error occurs:
 
 
 
../port_io.c:41:18: fatal error: plib.h: No such file or directory
 #include <plib.h>

 
The toolchain is correctly installed in /opt/microchip/xc32/v1.42/bin and in the Tools->Options menu BuildTools tab the XC32 toolchain is the default compiler.
 
Passing the mouse cursor over the line  #include <plib.h> while pressing CTRL key, the following tooltip is shown:
 
Unresolved directive #include <plib.h> 
Analyzed system include paths:
/opt/microchip/xc32/v1.42/lib/gcc/pic32mx/4.8.3/include
/opt/microchip/xc32/v1.42/lib/gcc/pic32mx/4.8.3/include-fixed
/opt/microchip/xc32/v1.42/pic32mx/include

 
Unfortunately the plib.h file is in the folder:
 
/opt/microchip/xc32/v1.42/pic32-libs/include/lega-c
/opt/microchip/xc32/v1.42/pic32mx/include/lega-c

 
and the compiler can't find it.
 
Did you have a similar problem ? How did you fix it =
Thank you for your help and cooperation
 
regards
 
 
 
 
 
 
#1

23 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 9999
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: plib.h not found 2017/03/02 01:29:10 (permalink)
    +1 (1)
    The peripheral libraries are no longer part of the compiler download.
    You can still download them from the same page you downloaded the compiler from.
    This is documented in the readme file that comes with the compiler.
     
    #2
    balastat
    Starting Member
    • Total Posts : 40
    • Reward points : 0
    • Joined: 2017/04/11 10:55:21
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/04/12 02:27:23 (permalink)
    0
    I am beginner I also facing the same issue can any one please help me how to resolve the above issue
    please explain
    #3
    rodims
    Super Member
    • Total Posts : 1533
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: offline
    Re: plib.h not found 2017/04/12 07:39:34 (permalink)
    +1 (1)
    And did you read the answer ?

    If you do not really have 100 % the same issue and error messages, please create your own thread.
    Otherwise read the release notes of XC32 (plib) 
    New Features in MPLAB® XC32 v1.32
     
    http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library
     
     
     
    #4
    balastat
    Starting Member
    • Total Posts : 40
    • Reward points : 0
    • Joined: 2017/04/11 10:55:21
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/04/12 22:40:12 (permalink)
    0
    yes , I have 100% same issue, I also added the plib directory in include directory path, when I include <plib.h> in my source file it shows the same error as displayed above  
    I am actually trying to program for pic32mx564f128l
     
    please help me somehow to get rid of the above same error
     
    thank you for your cooperation                                                                                  
    #5
    Akshayy
    Super Member
    • Total Posts : 351
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/04/13 00:46:55 (permalink)
    +1 (1)
    i faced same issue..Use older version of compiler XC32 V1.22
    #6
    rodims
    Super Member
    • Total Posts : 1533
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: offline
    Re: plib.h not found 2017/04/13 03:13:19 (permalink)
    0
    You still did not answer whether you installed the peripheral libraries explicitly.
    And also, where is your plib.h located on your disk ?
     
    Add the GNU
       -v
    (verbose) parameter  to your xc32 compiler options  (probably Properties/<your configuration>/XC... global options -> edit control for 'additional options'. 
    This should show the include paths effectively used by your compiler, so you can compare them to what you think  they currently are.
    <edit: if you only compile the .c file which includes the plib.h, then you will have less output, i.e. more readable>
     
    Debugging this problem yourself should be straigth forward, 'where is my xyz file (take care of multiple locations) and why doesn't the compiler find it'.
     
    I cannot support you for xc32 and Ubuntu.
    If you get no answer here, possibly create a new thread in the xc32 forum.
     
    post edited by rodims - 2017/04/13 03:16:13
    #7
    qhb
    Superb Member
    • Total Posts : 9999
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: plib.h not found 2017/04/13 04:52:38 (permalink)
    0 (2)
    balastat
    yes , I have 100% same issue, I also added the plib directory in include directory path, when I include <plib.h> in my source file it shows the same error as displayed above.
    ...

    Because that is not sufficient.
    You have to actually install the plib library into the compiler you are using, not just tell it where it can find the header files.
    #8
    balastat
    Starting Member
    • Total Posts : 40
    • Reward points : 0
    • Joined: 2017/04/11 10:55:21
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/06/11 23:33:48 (permalink)
    0 (2)
    Hi  I am using PIC Starter kit PIC32mx360f512l controller and use the RTCC demo  code
    Iam trying to send Time stamp via UART
    It just get struck in while(RtccGetClkStat()!=RTCC_CLK_ON); 
    and what RtccInit(); is returning.
    I just don't know  what is the issue whether issue is in software side or hardware side iam new to RTCC
    kindly help me to solve this issue
     
    configuration used
    #pragma config FNOSC = PRIPLL // Oscillator Selection // Oscillator Selection
    #pragma config FPLLIDIV = DIV_2 // PLL Input Divider (PIC32 Starter Kit: use divide by 2 only)
    #pragma config FPLLMUL = MUL_20 // PLL Multiplier
    #pragma config FPLLODIV = DIV_1 // PLL Output Divider
    #pragma config FPBDIV = DIV_1 // Peripheral Clock divisor
    #pragma config FWDTEN = OFF // Watchdog Timer
    #pragma config WDTPS = PS1 // Watchdog Timer Postscale
    #pragma config FCKSM = CSDCMD // Clock Switching & Fail Safe Clock Monitor
    #pragma config OSCIOFNC = OFF // CLKO Enable
    #pragma config POSCMOD = HS // Primary Oscillator
    #pragma config IESO = OFF // Internal/External Switch-over
    #pragma config FSOSCEN = OFF // Secondary Oscillator Enable
    #pragma config CP = OFF // Code Protect
    #pragma config BWP = OFF // Boot Flash Write Protect
    #pragma config PWP = OFF // Program Flash Write Protect
    #pragma config ICESEL = ICS_PGx2 // ICE/ICD Comm Channel Select
    #pragma config DEBUG = OFF // Debugger Disabled for Starter Kit
     
     
     
    int init_Rtc( rtccTime tm,rtccDate dt)
    {
    tm.l=0;
    tm.sec=0x30;
    tm.min=0x07;
    tm.hour=0x10;
    dt.wday=2;
    dt.mday=0x16;
    dt.mon=0x01;
    dt.year=0x07;
    RtccSetTimeDate(tm.l, dt.l);
    RtccInit();
    while(RtccGetClkStat()!=RTCC_CLK_ON);
    if(!CheckRtccRunning(3))
    {
    return 0;
    }
    return 1;
    }
    #9
    rodims
    Super Member
    • Total Posts : 1533
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: offline
    Re: plib.h not found 2017/06/12 05:09:26 (permalink)
    +5 (5)
    Please create a new thread for your completely new topic, and also consider to choose a suitable forum.
    Threads are not be 'member' based, but 'topic' based. 
    Also please use 'code tags' for your code.
    post edited by rodims - 2017/06/12 05:51:42
    #10
    BL
    Starting Member
    • Total Posts : 87
    • Reward points : 0
    • Joined: 2011/01/23 10:15:14
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/10/17 07:40:37 (permalink)
    0
    Hi,
     
    I'm a a absolut MPLABX- and XC32-beginner(but some years on CC5x and CC8E and MPLAB8.66) and I've the same problem.

    "make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory 'X:/Daten/Datasheets/Grafik/PIC32MX_PCAP_LCC_Demo_121012/PCAP Demo Code/PIC32 LCC Demo.X'
    make  -f nbproject/Makefile-default.mk dist/default/production/PIC32_LCC_Demo.X.production.hex
    make[2]: Entering directory 'X:/Daten/Datasheets/Grafik/PIC32MX_PCAP_LCC_Demo_121012/PCAP Demo Code/PIC32 LCC Demo.X'
    ../../Microchip/Common/TimeDelay.c:43:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
    "
     
    I found the readme and downloaded the "pic32 legaca peripheral libraries.zip" and installed this. Then I found the plib.h and the folder "peripherals"(for the anothers) under "...Microchip\MPLAB C32 Suite\pic32mx\include\lega-c" and I wrote this folder in the project properties under general in the source folders.
     
    No success.

    What I've to do?
    #11
    rodims
    Super Member
    • Total Posts : 1533
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: offline
    Re: plib.h not found 2017/10/17 08:52:16 (permalink)
    0
    BLI found the readme and downloaded the "pic32 legaca peripheral libraries.zip" and installed this. Then I found the plib.h and the folder "peripherals"(for the anothers) under "...Microchip\MPLAB C32 Suite\pic32mx\include\lega-c" and I wrote this folder in the project properties under general in the source folders.
    No success.
    What I've to do?



    If you would try #7 (verbose option) this  could enlighten you concerning the effective include paths used by the compiler.  Did you really show us your error message after adding that path to your include path or was this before you added that path ?
    #12
    BL
    Starting Member
    • Total Posts : 87
    • Reward points : 0
    • Joined: 2011/01/23 10:15:14
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/10/18 00:41:33 (permalink)
    0
    The error-text it's the same. Before an after I wrote the folder in the project properties.
     
    "make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory 'X:/Daten/Datasheets/Grafik/PIC32MX_PCAP_LCC_Demo_121012/PCAP Demo Code/PIC32 LCC Demo.X'
    make  -f nbproject/Makefile-default.mk dist/default/production/PIC32_LCC_Demo.X.production.hex
    make[2]: Entering directory 'X:/Daten/Datasheets/Grafik/PIC32MX_PCAP_LCC_Demo_121012/PCAP Demo Code/PIC32 LCC Demo.X'
    ../../Microchip/Common/TimeDelay.c:43:19: fatal error: plib.h: No such file or directory
      #include <plib.h>
                       ^
    compilation terminated.
    ...
    "
    The MPLAB finds the header-files if I copy plib.h and the completly path "peripherals" into the poject folder. The MPLAB brings an error because he don't find variables(first "I2CGetByte"). And really this variables is not defined. A lot of anothers are no defined also.
    This ist not my software, this is a demo project from microchip. Actually it should be to work. If it don't work, can it be that this demo needs another versions of header files and maby is this the reason because the MPLAB don't find the includes?
    #13
    rodims
    Super Member
    • Total Posts : 1533
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: offline
    Re: plib.h not found 2017/10/18 01:32:46 (permalink)
    0
    I don't know about your demo source, it may be ok or not.
    If you install the Peripheral library into the correct XC32 directory, there is no need to add any addition include path in MPLabX. But it is an option to do so for non standard installation and it should work if it is set up correctly.
    If you have a look into plib.h you will see that it just includes all the individual peripheral include files like i2c.h
    The error with I2CGetByte is just a subsequent error, because it cannot / did not include i2c.h.
    Copying all includes into your project folder of course is not a good solution. Did you check #7 ?
     
     
     
    #14
    BL
    Starting Member
    • Total Posts : 87
    • Reward points : 0
    • Joined: 2011/01/23 10:15:14
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/10/18 02:43:43 (permalink)
    0
    Thanks for your help!
     
    I'm sorry, I'm a beginer for XC32 and the microchip code ressources. I don't know what that means the #7 where I've write this.
     
    But I'm one step further. I've adding the search path not in the catagorie "General" iin the options but rather in the categorie XC32(global options) under "Cammon include dirs". Then the MPLAB finds the header files.
     
    But now I've the next problems. In this case the compiler don't find declarations. No declarations the identifier of the pins alos not. In the 8bit-C-World is it clear, you have to load a header of the controller type.
    But how is this here?
    #15
    rodims
    Super Member
    • Total Posts : 1533
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: offline
    Re: plib.h not found 2017/10/18 03:49:23 (permalink)
    +1 (1)
    #7 was a reminder to read post #7 in this thread to see how to set the compiler verbose mode. This would display WHERE the compiler actually searches for files.
     
    For testing very basic stuff like this I would recommend not to use an existing project but to create a simple New Project (Menu File / New Project / microchip embedded / standalone project), but that's up to you ...
     
    Concerning your new problem, you simply include the file xc.h, this will handle the rest according to your project configuration. I.e. it will choose the right processor specific include file automatically
     
     
    #16
    BL
    Starting Member
    • Total Posts : 87
    • Reward points : 0
    • Joined: 2011/01/23 10:15:14
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/10/18 07:17:42 (permalink)
    0
    Hallo,
     
    all that don't bring further. I must look in another direction.
     
    Thank you!
    #17
    acharnley
    Super Member
    • Total Posts : 424
    • Reward points : 0
    • Joined: 2016/05/01 06:51:28
    • Location: 0
    • Status: offline
    Re: plib.h not found 2017/10/18 07:30:24 (permalink)
    +1 (1)
    I believe plib is deprecated?, certainly it doesn't work with the PIC32MM series. Instead the MPLAB Code Configurator plugin creates API's on a device specific basis.
    #18
    dave1001
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2011/01/05 09:29:55
    • Location: Peshawar
    • Status: offline
    Re: plib.h not found 2017/12/29 00:52:42 (permalink)
    0

    plib.h is no longer shipped with latest version XC32 compiler as of June 2017. The peripherals "includes" are also no longer shipped. It is replaced by harmony model.

     
    Technically speaking the plib.h file should be in this folder C:\Program Files (x86)\Microchip\xc32\v1.44\pic32-libs\include but it is not. Also the peripherals folder no longer exists.
     
    You may note that for XC1.40 plib.h exists and should work. The folder for that is C:\Program Files (x86)\Microchip\xc32\v1.40\pic32-libs\include
     
    lega-c\
    peripheral\
    plib.h
     
     (Note I am novice and I dont have complete information about harmony model yet, but it looks like it works with archecture of the CPU/SFR rather than peripherals)
    #19
    btremaine
    Junior Member
    • Total Posts : 54
    • Reward points : 0
    • Joined: 2013/08/17 14:46:34
    • Location: San Jose, CA
    • Status: offline
    Re: plib.h not found 2019/12/06 12:37:56 (permalink)
    0
    I realize this is an old post but I am having a problem compiling PIC32MX Core Timer API Example Code with the v2.30 compiler. I did explicitly install the peripheral library and it added files under v1.40.
     
    When I compile I get an error it can't find peripheral/adc10.h. I do find these files in the v1.40 folder. Do I need to manually move these files to my project folder ?
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5