I don't believe this issue is Moteino specific, but I did discover it because I'm working on two different Moteino boards.
I have 100 Moteino's (trace antenna) and 3 RFGateway (M4) gateways. I started using a library, SafeString (
https://www.forward.com.au/pfod/ArduinoProgramming/SafeString/index.html) to handle string tokens and serial communication. I first wrote it with the Meteino AVR board definition, it compiles fine, but oops that's not the platform I need, I need it on the RFGateway M4. Change board definition, and now I get a slew of errors, this is the top and bottom portions:
In file included from C:\Users\micha\OneDrive\Documents\platformIO\Projects\test adafruit arduino\lib\SafeString\examples\SafeStringReader_GPS\SafeStringReader_GPS.ino:17:0:
C:\Users\micha\OneDrive\Documents\Arduino\libraries\SafeString\src/SafeStringReader.h:46:44: error: expected class-name before '{' token
class SafeStringReader : public SafeString {
^
C:\Users\micha\OneDrive\Documents\Arduino\libraries\SafeString\src/SafeStringReader.h:49:41: error: expected ')' before '&' token
explicit SafeStringReader(SafeString& _sfInput, size_t bufSize, char *tokenBuf, const char* _name, const char* delimiters, bool skipToDelimiterFlag = false, uint8_t echoInput = false, unsigned long timeout_mS = 0 );
^
C:\Users\micha\OneDrive\Documents\Arduino\libraries\SafeString\src/SafeStringReader.h:50:41: error: expected ')' before '&' token
explicit SafeStringReader(SafeString& _sfInput, size_t bufSize, char *tokenBuf, const char* _name, const char delimiter, bool skipToDelimiterFlag = false, uint8_t echoInput = false, unsigned long timeout_mS = 0 );
^
C:\Users\micha\OneDrive\Documents\Arduino\libraries\SafeString\src/SafeStringReader.h:157:36: error: declaration of 'operator=' as non-function
SafeStringReader & operator = (SafeString &rhs);
.
.
.
.
C:\Users\micha\AppData\Local\Arduino15\packages\Moteino\hardware\samd\1.6.3\cores\arduino/Print.h:84:12: note: no known conversion for argument 1 from 'SafeStringReader' to 'double'
C:\Users\micha\AppData\Local\Arduino15\packages\Moteino\hardware\samd\1.6.3\cores\arduino/Print.h:85:12: note: candidate: size_t Print::println(const Printable&)
size_t println(const Printable&);
^~~~~~~
C:\Users\micha\AppData\Local\Arduino15\packages\Moteino\hardware\samd\1.6.3\cores\arduino/Print.h:85:12: note: no known conversion for argument 1 from 'SafeStringReader' to 'const Printable&'
C:\Users\micha\AppData\Local\Arduino15\packages\Moteino\hardware\samd\1.6.3\cores\arduino/Print.h:86:12: note: candidate: size_t Print::println()
size_t println(void);
^~~~~~~
C:\Users\micha\AppData\Local\Arduino15\packages\Moteino\hardware\samd\1.6.3\cores\arduino/Print.h:86:12: note: candidate expects 0 arguments, 1 provided
exit status 1
'sfReader_SF_INPUT' was not declared in this scope
These particular errors actually aren't from attempting to compile my code, they're from a sample sketch included in the library (sorry I can't find a link directly to it). Other samples also produced errors.
I found when I selected a randomly sampling of boards, most if not all AVR and M0 boards compiled fine, but no M4 boards would compile. Any ideas?