While it seems to work fine in Arduino, I'm using PlatformIO to build the ENV example. When Wire1.begin() is present in the RTC initializer, the program crashes before setup() with an "uninitialized data" diagnostic on serial. Because it crashes before setup(), this implies something bad is going on before then — probably in constructors.
In https://github.com/m5stack/M5StickC/blob/3f8f30d6d77c064526723a7d33cd885cbe387ff7/src/RTC.cpp#L5-L7 ,
Wire1.begin()
is called in a constructor. This is bad form, and none of the other modules do it. Wire1 setup should be moved into anrtc.begin()
function.While it seems to work fine in Arduino, I'm using PlatformIO to build the ENV example. When
Wire1.begin()
is present in theRTC
initializer, the program crashes beforesetup()
with an "uninitialized data" diagnostic on serial. Because it crashes beforesetup()
, this implies something bad is going on before then — probably in constructors.