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

Page: < 12 Showing page 2 of 2
Author
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 06:14:18 (permalink)
0
Where did you add #include "plib.h"?
#21
rodims
Super Member
  • Total Posts : 715
  • Reward points : 0
  • Joined: 2009/02/10 11:08:59
  • Location: 51.9627, 7.6262
  • Status: offline
Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 06:23:55 (permalink)
+1 (1)
 
It would be even more simpler if you would not ignore most of my questions. sad: sad
And it's not 'my' server.  


Apparently you are cluttering your project or files, or you are probably doing some things which you don't tell.
 
So this is my last hint: 
Why don't you just create a fresh very small XC32 project and check yourself, if that also has a problem or not.


For your information, I just did a fresh install of the PLIB (PIC32 Legacy Peripheral Libraries.exe) into my XC32 1.43 installation. As said above during Setup you MUST use the 1.43 directory (or the one for the compiler version which you are using) to avoid problems.
And as I said in the very beginning, my test project does NOT require any additional path to be set, neither for the includes, nor for the lib. So usually the need to specify an additional path means that you are doing something non standard. For this test, do not add them to your test project.

Here is the very simple code, which I use for testing 'your' problem with the paths of the PLIB installation.

#include <stdio.h>
#include <stdlib.h>

#define _SUPPRESS_PLIB_WARNING
#include "plib.h"

I2C_MODULE  just_to_test_if_available;

int main(int argc, char** argv) {

    I2CEnable(I2C1, 1);
    return (EXIT_SUCCESS);
}


 
and here is the Build Output
 

CLEAN SUCCESSFUL (total time: 51ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/NotMe/MPLABXProjects/First32.X'
make  -f nbproject/Makefile-default.mk dist/default/production/First32.X.production.hex
make[2]: Entering directory 'C:/Users/NotMe/MPLABXProjects/First32.X'
"C:\Program Files (x86)\Microchip\xc32\v1.43\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX220F032D -MMD -MF build/default/production/newmain.o.d -o build/default/production/newmain.o newmain.c -DXPRJ_default=default -legacy-libc
"C:\Program Files (x86)\Microchip\xc32\v1.43\bin\xc32-gcc.exe"   -mprocessor=32MX220F032D  -o dist/default/production/First32.X.production.elf build/default/production/newmain.o          -DXPRJ_default=default  -legacy-libc    -Wl,--defsym=__MPLAB_BUILD=1,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="dist/default/production/First32.X.production.map",--memorysummary,dist/default/production/memoryfile.xml
"C:\Program Files (x86)\Microchip\xc32\v1.43\bin"\\xc32-bin2hex dist/default/production/First32.X.production.elf
make[2]: Leaving directory 'C:/Users/NotMe/MPLABXProjects/First32.X'
make[1]: Leaving directory 'C:/Users/NotMe/MPLABXProjects/First32.X'

BUILD SUCCESSFUL (total time: 757ms)
Loading code from C:/Users/NotMe/MPLABXProjects/First32.X/dist/default/production/First32.X.production.hex...
Loading completed

 
As said, this will work the same if you specify the directories as explained in previous post
C:\Program Files (x86)\Microchip\xc32\v1.43\pic32mx\include\
C:\Program Files (x86)\Microchip\xc32\v1.43\pic32mx\lib
but it should not be necessary.
#22
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 08:51:32 (permalink)
0
The addition of Plib.h in a small project works well. I have successfully used i2c, but with my basic project (that of the microchip example: C: \ microchip \ harmony \ v1_08_01 \ apps \ bootloader) does not compile.
 
It generates errors of the kind :
 
[code]In file included from ../../../../../framework/peripheral/eth/plib_eth.h:243:0,
from ../../../../../framework/tcpip/../driver/ethphy/drv_ethphy.h:61,
from ../../../../../framework/tcpip/tcpip_mac.h:49,
from ../../../../../framework/tcpip/tcpip.h:603,
from ../src/system_config/udp_pic32mx_eth_sk/system_definitions.h:67,
from ../src/system_config/udp_pic32mx_eth_sk/system_init.c:50:
../../../../../framework/peripheral/eth/src/plib_eth_lib.h:163:5: note: previous definition of 'ETH_FILT_PMATCH_MCAST_ACCEPT' was here
ETH_FILT_PMATCH_MCAST_ACCEPT,
^
In file included from c:\program files (x86)\microchip\xc32\v1.43\pic32mx\include\plib.h:71:0,
from ../src/system_config/udp_pic32mx_eth_sk/system_init.c:59:
c:\program files (x86)\microchip\xc32\v1.43\pic32mx\include\peripheral\eth.h:2357:5: error: redeclaration of enumerator 'ETH_FILT_PMATCH_NOT_MCAST_ACCEPT'
ETH_FILT_PMATCH_NOT_MCAST_ACCEPT,
^
In file included from ../../../../../framework/peripheral/eth/plib_eth.h:243:0,
from ../../../../../framework/tcpip/../driver/ethphy/drv_ethphy.h:61,
from ../../../../../framework/tcpip/tcpip_mac.h:49,
from ../../../../../framework/tcpip/tcpip.h:603,
from ../src/system_config/udp_pic32mx_eth_sk/system_definitions.h:67,
from ../src/system_config/udp_pic32mx_eth_sk/system_init.c:50:
../../../../../framework/peripheral/eth/src/plib_eth_lib.h:166:5: note: previous definition of 'ETH_FILT_PMATCH_NOT_MCAST_ACCEPT' was here
ETH_FILT_PMATCH_NOT_MCAST_ACCEPT,
^
[code]
#23
rodims
Super Member
  • Total Posts : 715
  • Reward points : 0
  • Joined: 2009/02/10 11:08:59
  • Location: 51.9627, 7.6262
  • Status: offline
Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 09:29:45 (permalink)
-1 (1)
I do not see how this relates to your original post.
Anyway, I cannot help you with Harmony.
#24
NKurzman
A Guy on the Net
  • Total Posts : 14388
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/14 09:41:57 (permalink)
+2 (2)
You do not need to Mix Plib with Harmony.
Harmony has its own version of Plib.
#25
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/16 23:53:08 (permalink)
0
The report with my original publication is that I need to add this Plib to this example to use my 24LC256 EEPROM. I run them on MPLAB x IDE v2.30 and the v1.42 compiler Harmony v1_03_01, but when you change version. Nothing works. Nothing is compatible between the old and the new version.
#26
RISC
Super Member
  • Total Posts : 4022
  • Reward points : 0
  • Status: online
Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/17 02:33:47 (permalink)
+3 (3)
Hi,
If you used Harmony v1.03.01  and you try to migrate this to the recent versions of Harmony, then you're are right. There is absolutely no compatibility. Compatibility ( migration of projects) started with version v1.06).
You should absolutely not add external PLIBs because Harmony already includes its own PLIBs.
So to make it short I would say : recreate your project from scratch if you want to use the current version of Harmony (v2.03b) and copy paste your own code into the project.
Additionally you must use a very recent version of MPLAB X so use the current Harmony version as well as a recent Harmony plugin (MHC) otherwise it won't work
Regards
NB : there is a dedicated thread for Harmony related questions
#27
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/17 08:43:04 (permalink)
0
I would like to avoid rewriting all my code. Because there is a lot of work, so if you can help me find a solution to run my EEPROM24lc256 on Harmoy v1_08_01 MPLAB X IDE v3.55 and compiler v1.40 / 1.42 / 1.43. It will be a great service.
#28
RISC
Super Member
  • Total Posts : 4022
  • Reward points : 0
  • Status: online
Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/17 08:53:31 (permalink)
+1 (1)
Hi,
Did you exclusively use Harmony PLIBs ?
I did not say that you have to rewrite your project.
I said that you need to re-create an Harmony project from scratch (project configuration) which can be done in a short time and then copy your application.
The MHC plugin changed dramatically but It could be that the I2C PLIBs also changed...and that I2C APIs are not anymore compatible.


To check this is simple : install the Harmony version you want to use and check in the documentation if the PLIB you used still exist.
 
It might still be some significant work because of the large evolution in Harmony from v1.03 which is probably 3/4 years old. Some APIs did change but there is no easy way to recognize / find about this
 
This is only my personal advice. Maybe some other users have other ideas 
 
Regards
#29
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/20 01:17:52 (permalink)
0
No, it is not identical. Maintanant I have a file named plib_i2c.h. But the functions are a bit similar so I try to redo the old code with this bookstore but not easy. :-(
 
If you have functions to do the basic code of the i2c (Start, Restart, Write, Read and Stop.) With this Plib_i2c.h or an example I would like to know where.Smile: Smile
 
thank you in advance for your help.
#30
NKurzman
A Guy on the Net
  • Total Posts : 14388
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Problem plib.h Compiler change XC32 1.33 a 1.40 2017/07/20 06:13:05 (permalink)
+1 (1)
If you look in the harmony documentation you will find PLIB functions that are similar to the old PLIB
#31
Page: < 12 Showing page 2 of 2
Jump to:
© 2017 APG vNext Commercial Version 4.5