Hot!Problem plib.h Compiler change XC32 1.33 a 1.40

Page: 12 > Showing page 1 of 2
Author
jo1234
Junior Member
  • Total Posts : 109
  • Reward points : 0
  • Joined: 2015/09/17 09:01:38
  • Location: Switzerland
  • Status: offline
2017/07/13 05:27:06 (permalink)
0

Problem plib.h Compiler change XC32 1.33 a 1.40

Hello I have a compiler problem.
 
I used the XC compiler 1.33 for i2c functions, but now I have switched to the XC32 version 1.40. I download the peripheral liraries because it no longer exists on the recent compiler. But my code does not work. I have errors like:
 
c:/microchip/harmony/v1_08_01/apps/bootloader/basic/firmware/src/mc32_i2cutilccs.c:97: undefined reference to `I2CConfigure'
c:/microchip/harmony/v1_08_01/apps/bootloader/basic/firmware/src/mc32_i2cutilccs.c:100: undefined reference to `I2CConfigure'
c:/microchip/harmony/v1_08_01/apps/bootloader/basic/firmware/src/mc32_i2cutilccs.c:105: undefined reference to `I2CEnable'

 
If anyone could help me.
 
thank you in advance
#1

30 Replies Related Threads

    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 05:40:51 (permalink)
    0
    I assume you not only download it but also installed it ?
     
    Into which directory did you install it ?
    Do you now have a directory
    C:\Program Files (x86)\Microchip\xc32\v1.40\pic32-libs\include\peripheral
    #2
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 05:45:02 (permalink)
    +1 (1)
    Yes i install them mr green: mr green and i have exactly that.
    #3
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 06:07:42 (permalink)
    0
    Check whether it finds your i2c.h in that directory.
    Also check the include paths set in your project. I think you do not need to set them explicitly, if you used the mentioned default directory.
     
    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.
    If you only compile the .c file which includes the plib.h, then you will have less output, i.e. more readable
    #4
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 06:51:58 (permalink)
    0
    If I understood correctly in 'additional options' I must add:
     
      "C: \ Program Files (x86) \ Microchip \ xc32 \ v1.40 \ pic32mx \ include \ peripheral"
    ??
    Because the field and empty.
    #5
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 07:49:19 (permalink)
    +1 (1)
    No.
     
    To set additional include paths:
    Project Properties / XC32 Global Options / xc32-gcc / Option Categories / Preprocessing and messages / Include Directories.
    C:\Program Files (x86)\Microchip\xc32\v1.40\pic32mx\include\
     
    and
     
    Project Properties / XC32 Global Options / xc32-ld / Option Categories / Libraries
    C:\Program Files (x86)\Microchip\xc32\v1.40\pic32mx\lib
     
    And before you ask:
    Possibly you likely want to set
    #define _SUPPRESS_PLIB_WARNING
    I'm not sure if this is only for 1.43 or also for 1.40
     
     
    #6
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 08:20:04 (permalink)
    0
    Thank you very much it is clearer for me like that.
     
    I have already added _SUPPRESS_PLIB_WARNING in preprocessor macros
     
    But unfortunately it still does not work
    #7
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 08:37:57 (permalink)
    +1 (1)
    Adding the paths for include and the library resolved your problem on my 1.43 installation.
     
    "Does not work" doesn't mean anything. 
     
     
    #8
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 08:46:14 (permalink)
    0
    I try the 1.40 and the 1.42 I try the 1.43 now
    #9
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 09:19:49 (permalink)
    0
    I have installed "PIC32 Legacy Peripheral Libraries.exe"
    In the following location: "C: \ Program Files (x86) \ Microchip \ xc32 \ v1.43 \ pic32mx \ include"
     
    I add the path in xc32-gcc / / Option Categories / Preprocessing and messages / Include Directories. to the following location: "C: \ Program Files (x86) \ Microchip \ xc32 \ v1.43 \ pic32mx \ include"
     
    I add the path in xc32-id / Option Categories / Libraries to the following location: "C: \ Program Files (x86) \ Microchip \ xc32 \ v1.43 \ pic32mx \ include \ pic32-libs"
     
    Where is my mistake?
    #10
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 09:25:17 (permalink)
    +1 (1)
    You did not mention any mistake. Please don't say "it does not work" ...
     
    In the following location: "C: \ Program Files (x86) \ Microchip \ xc32 \ v1.43 \ pic32mx \ include"

    I hope you did NOT install it in this directory.  Please be more precise.
    You should install it in your 1.43 directory.
     
    Where is your plib.h and i2c.h located ?
    Where was it for 1.40 ?
    #11
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/13 09:31:34 (permalink)
    0
    Apparently that is not clear:
    you have two different path's to set. One is for the compiler, the other one is for the linker (lib). 
    You now also have choosen to use a wrong lib path ... pic32-libs, that's not what I wrote in #6
     
    #12
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 00:43:11 (permalink)
    0
    Now I have corrected,
     
    I have my plib.h in the directory:
    "C: \ Program Files (x86) \ Microchip \ xc32 \ v1.43 \ pic32mx \ include"
     
    And i2c.h:
    C: \ Program Files (x86) \ Microchip \ xc32 \ v1.43 \ pic32mx \ include \ peripheral
    #13
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 02:46:10 (permalink)
    0
    Now I have corrected,

    Corrected what ? Uninstall and new installation ?
     
    The pathes are ok.
    Since you do not report any problem, I assume everything is working now.
    #14
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 02:49:44 (permalink)
    0
    Yes I have Uninstall and install a new installation. But he still does not want to compile
    #15
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 03:21:18 (permalink)
    0
    In my file Mc32_I2cUtilCCS.c
     
    I added : #include "peripheral / i2c / plib_i2c.h" instead of #include "plib.h"
     
    But it gives me other mistakes
     
    ../src/Mc32_I2cUtilCCS.c:255:5: error: implicit declaration of function 'I2CSendByte' [-Werror=implicit-function-declaration]
         if(I2CSendByte(KIT_I2C_BUS, data) == I2C_MASTER_BUS_COLLISION)
         ^
    ../src/Mc32_I2cUtilCCS.c:255:42: error: 'I2C_MASTER_BUS_COLLISION' undeclared (first use in this function)
         if(I2CSendByte(KIT_I2C_BUS, data) == I2C_MASTER_BUS_COLLISION)
                                              ^
    ../src/Mc32_I2cUtilCCS.c:262:5: error: implicit declaration of function 'I2CTransmissionHasCompleted' [-Werror=implicit-function-declaration]
         while(!I2CTransmissionHasCompleted(KIT_I2C_BUS));
         ^
    ../src/Mc32_I2cUtilCCS.c:264:5: error: implicit declaration of function 'I2CByteWasAcknowledged' [-Werror=implicit-function-declaration]

     
    When I do Ctrl + click on the variables or function in my project nothing happens. I'm not redirecting to the source.
     
     
     
    #16
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 03:54:32 (permalink)
    0
    If cannot test your individual file modifications.
    It works for me with just including plib.h
     
    Did you set the paths as mentioned in #6 for your new 1.43 installation ?
    It's tedious having to ask for everything.
     
    What are you doing here ?
    [-Werror=implicit-function-declaration]
    #17
    rodims
    Super Member
    • Total Posts : 815
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 04:24:23 (permalink)
    0
    I added : #include "peripheral / i2c / plib_i2c.h" instead of #include "plib.h"

     
    What is plib_i2c.h  ?
    Such a file does not exist, or we are talking about very different things.
    #18
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 05:12:53 (permalink)
    0
    Yes I have added the files since the new installation.
     
    Oops forgets the last message.
    #19
    jo1234
    Junior Member
    • Total Posts : 109
    • Reward points : 0
    • Joined: 2015/09/17 09:01:38
    • Location: Switzerland
    • Status: offline
    Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 05:32:50 (permalink)
    0
    It would be simpler if I sent you my project so that you could better understand my error. But I can not send it to you on this forum because I have access denied when I try the post due to your server (microchip server).
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2017 APG vNext Commercial Version 4.5