chipKIT® Development Platform

Inspired by Arduino™

Arduino IridiumSBD Library for ChipKIT

Created Sat, 13 Aug 2016 21:01:13 +0000 by Digisol


Digisol

Sat, 13 Aug 2016 21:01:13 +0000

Hello everybody. my first post on your forum. There is an Arduino library for IridiumSBD modem at http://arduiniana.org/libraries/iridiumsbd/ I need to use it on ChipKIT uC32 board. Lots of compile time errors. Any hints? Many thanks!


majenko

Sat, 13 Aug 2016 23:14:17 +0000

That library relies on the Arduino's Harvard architecture to store and retrieve strings from flash. Something the chipKIT never needs to do. It includes a set of hacks that force certain overloads that completely break on the chipKIT boards. It's not possible to change the chipKIT end of things because those overloads would then conflict with other overloads. It's all a bit of a mess really.

To fix the library you would need to go through and either delete any functions that use FlashString or replace FlashString with "const char *" - you can't just change the typedef or you run into the same problem - collisions with overloads of functions that take "const char *" already.

So:

  • If there is a pair of overloaded functions with FlashString and "const char *" then delete the FlashString version
  • If there is no overloaded equivalent of a FlashString function then change it to "const char *".

majenko

Sat, 13 Aug 2016 23:18:08 +0000

Oh, and on top of that they have written it so it will only work on an 8-bit CPU by mixing and matching "size_t" and "uint16_t" at will. On a 32 bit system "size_t" is "uint32_t" not "uint16_t" - so more overloading will have to be added to compensate.


majenko

Sat, 13 Aug 2016 23:20:14 +0000

Ok, here is a sanitized version that at least compiles. I can't tell if it works or not of course.


majenko

Sat, 13 Aug 2016 23:20:39 +0000

Ok, here is a sanitized version that at least compiles. I can't tell if it works or not of course.


Digisol

Mon, 15 Aug 2016 19:09:17 +0000

Dear Majenko. I want you to know how much I appreciate the time dedicated to help people like me with limited programming skills. Your help is greatly appreciated. :D :D Thanks again for a very fast response! Have a nice day!.