Upgrade to v2.0.1 renders code non-functioning
Following a recent update to the latest version (2.0.1) of the RTClib, we get strange errors in the compiled code for this project:
- https://github.com/tstana/proto-cubes-obc
The way in which the error manifests itself is that code which used to work... no longer works. Details on reproducing and the solution we adopted can be found below. Before that:
-
Arduino board: Arduino Due (using the Programming Port)
-
Shield: Adafruit Data Logger with the PCF8523
-
Arduino IDE version: 1.8.13 (but the problem manifests itself in 1.8.16 too)
The steps to reproduce the issue are:
- Install v2.0.1 of RTClib.
- Clone (or get a .zip of) the
proto-cubes-obccode linked above. - Upload the code to the Due.
- Bring up the Serial Monitor; you should see it only printing several '=' signs, for example
=====. - In the file
debug.hpp, comment out#define DEBUG_ENABLE - Upload the code again
- The serial monitor should now say that the "RTC could not be found", along with some other prints. The "RTC could not be found" line is printed from the file
rtc.cppin our code, after a call toRTC_PCF8523::begin().
Reverting the library to version 1.4.0 returns the code to a functioning condition. Unfortunately, I cannot say which version of the library I was running before the upgrade to 2.0.1.
I'm suspecting something "interesting" introduced in the compiled code by some modification to the library. If anyone cares to try to reproduce and look at the compiled code in an effort to fix any potential issues in the future, you now know all I do.
Good luck - and let me know if I can help.
Does the library example work as expected? https://github.com/adafruit/RTClib/blob/master/examples/pcf8523/pcf8523.ino