• 0
1996_Donzi

chipKITCan Problem

Question

Hello, I am having a problem using the CanDemo sketch.  I am using Arduino 1.6.9 with chipkit-core-windows.16778040.master-v1.2.0-4-g3088e62 files.

The problem is this error -

Arduino\libraries\chipKITCAN\chipKITCAN.cpp:45:21: fatal error: plib.h: No such file or directory

 #include    <plib.h>

                     ^

compilation terminated.

exit status 255
Error compiling for board chipKIT MAX32.

So if i comment out the plib.h I get another slew of errors.  If I copy over the plib.h file and the peripheral folder from the MPIDE-0150 folder I get a hole bunch of other errors.

 

So my first question is has anyone used the CanDemo in the Arduino IDE successful?

And if so how in the heck do I fix it?

 

Thank You,

Scott

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Scott,

Microchip has deprecated the plib.h library. There is a new version that is used with Microchip's harmony but will not help here. Plib.h was not open source so it was not supported in the Arduino IDE. The way we resolved this with the chipKit core was to remove plib.h and write directly to the hardware. That is what will have to be done with the CanDemo sketch and corresponding libraries called.

Thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi Scott,

I took a bit a of a deeper look at the chipKIT CAN demo and found that it's going to be quite a bit of work removing the plib.h dependency from the demo, or at least a lot more than I originally thought it might be. I'll try to keep working on it to see if I can get more of the errors resolved, but it may end up being beyond most of the Forum moderators realms of expertise to update this demo to work with the Arduino IDE.

Alternatively, you could use the most recent version of MPIDE (before it was depreciated in favor of the Arduino IDE with chipKIT Core) which you can download for Windows, Mac, or Linux. I was able to successfully able to compile the demo (although I don't have the hardware to test it).

Let me know if you have any more questions.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0
On 7/19/2016 at 5:37 PM, JColvin said:

Hi Scott,

I took a bit a of a deeper look at the chipKIT CAN demo and found that it's going to be quite a bit of work removing the plib.h dependency from the demo, or at least a lot more than I originally thought it might be. I'll try to keep working on it to see if I can get more of the errors resolved, but it may end up being beyond most of the Forum moderators realms of expertise to update this demo to work with the Arduino IDE.

Alternatively, you could use the most recent version of MPIDE (before it was depreciated in favor of the Arduino IDE with chipKIT Core) which you can download for Windows, Mac, or Linux. I was able to successfully able to compile the demo (although I don't have the hardware to test it).

Let me know if you have any more questions.

Thanks,
JColvin

Hello J Colvin.

 

I'm doing my thesis that involves Chipkit use of CANbus with Arduino IDE. MPIDE is not an option for now.

Did you have any sucess removing the plib.h dependency? Did anyone managed to use the CANDemo scketch with Arduino IDE?

I really need to solve this, in order to continue my paper.

 

Thanks.

Alex_Francis

Share this post


Link to post
Share on other sites
  • 0

Hello @Alex_Francis,

I do not think this is in the Arduino IDE proper, but there is a library and example code for the Pmod CAN for the Basys MX3 that works with the Arduino IDE available on the Pmod CAN Resource Center. I believe it was originally configured for MPLABX so some of the material in the library reflects this stylization (such as the configuration of the SPI port), but otherwise this library does not use plib.h and can be reworked for other boards.

Thanks,
JColvin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now