chipKIT® Development Platform

Inspired by Arduino™

Problem Using Chipkit with Arduino 1.0 Libraries

Created Sun, 03 Mar 2013 00:49:49 +0000 by HacknMod


HacknMod

Sun, 03 Mar 2013 00:49:49 +0000

I'm trying to use Sparkfun's MP3 shield library with the ChipKit. I've tried both the older and newer versions of the their code with no success:

The new code has problems because it's written for Arduino 1.0, so it won't even compile. I'm getting an "Arduino.h" does not exist error. I tried telling the library that it was pre-arduino 1.0 (such as version 22 or 23) but then got a ton more errors :(

The old code does compile, but it hangs on SPI.transfer(0xdata).

Any ideas as to how to fix this problem? I'd prefer to use the newest code (if possible)

Thanks!


lloyddean

Sun, 03 Mar 2013 19:33:49 +0000

Replace <Arduino.h> with <WProgram.h>


HacknMod

Tue, 05 Mar 2013 04:15:11 +0000

Replace <Arduino.h> with <WProgram.h>

Did that and the initial errors are gone. However, a ton more have appeared (pasted below). According to this website, the errors below occur when you're not using Arduino 1.0. Now what should I do? Is there any way to get the old library (non 1.0) working?

In file included from C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/SdFat.h:35:0,
                 from sketch_mar04a.cpp:2:
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/SdFile.h:43:10: error: conflicting return type specified for 'virtual size_t SdFile::write(uint8_t)'
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\hardware\pic32\cores\pic32/Print.h:50:15: error:   overriding 'virtual void Print::write(uint8_t)'
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/SdFile.h:44:7: error: conflicting return type specified for 'virtual int SdFile::write(const char*)'
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\hardware\pic32\cores\pic32/Print.h:51:15: error:   overriding 'virtual void Print::write(const char*)'
In file included from C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/iostream.h:27:0,
                 from C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/SdStream.h:27,
                 from C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/SdFat.h:36,
                 from sketch_mar04a.cpp:2:
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/ostream.h:209:30: error: '__FlashStringHelper' does not name a type
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/ostream.h:209:51: error: ISO C++ forbids declaration of 'arg' with no type
In file included from C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/SdFat.h:38:0,
                 from sketch_mar04a.cpp:2:
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\.\hardware\pic32\libraries\SdFat/MinimumSerial.h:30:10: error: conflicting return type specified for 'virtual size_t MinimumSerial::write(uint8_t)'
C:\Users\Kendra\Desktop\mpide-0023-windows-20120903\hardware\pic32\cores\pic32/Print.h:50:15: error:   overriding 'virtual void Print::write(uint8_t)'

Jacob Christ

Wed, 10 Apr 2013 04:50:51 +0000

Yeah, the first error is basicly the major change between 0023 and 1.0. So either the lib needs to be down graded or the chipkit core needs to move forward.

Jacob


HacknMod

Fri, 12 Apr 2013 21:43:56 +0000

When is chipkit going to be upgraded???? Arduino 1.0 has been released for years now... :cry:


majenko

Fri, 12 Apr 2013 22:06:08 +0000

It is in progress. These things take time.

You have to remember that there isn't a huge team working on this - only a handful of dedicated individuals.


HacknMod

Sun, 14 Apr 2013 00:43:06 +0000

Is there an ETA?


HacknMod

Tue, 09 Jul 2013 04:24:35 +0000

Checking back a few months later... Is chipkit Arduino 1.0 compatible yet?


majenko

Tue, 09 Jul 2013 08:26:31 +0000

It's getting there. It's a slow process.


HacknMod

Sun, 29 Sep 2013 01:17:55 +0000

Still waiting...

It's incredibly misleading that Digilent continues to claim their product is Arduino compatible, when it clearly is not. :roll:


majenko

Sun, 29 Sep 2013 13:12:28 +0000

It's not that the chipKIT isn't compatible - it is compatible (with Arduino 0023). It's more a case of Arduino library writers are as a general rule clueless morons who don't know how to write good libraries that are portable across systems.

And Arduino are no help just arbitrarily changing their whole API with no thought to backwards compatability.


Jacob Christ

Mon, 30 Sep 2013 19:15:03 +0000

When the chipKIT boards were first released there was some press that claimed 100% compatibility which was in really bad form. I think was done in error and at the dismay to and as disservice to the then forming community. It was quickly corrected and I don't think such a claim is made any more. The libraries are compatible with older libraries and work is on the way on the newer libraries. The nature of these projects are that chipKIT will trail due to trying to maintain compatibility. However, I know there are things that have been fixed in chipKIT that are issues in Arduino. Though this maybe of no consequence to your efforts (since what you need is not working).

However, the beauty of open source, is you can help fix the problem. If your not skilled enough to fix code, then minimally, your complaints help prod the developers.

Jacob