I had to add the following #include to system.h in order to use the library under PlatformIO #include <limits.h> // Defines ULONG_MAX etc, (required by samd21lpe library)