When attempting to build the arcada_clue_test for a nordicnrf52 (Adafruit Clue), it seems that PlatformIO is trying to compile the library Adafruit ZeroTimer which is for selected SAMD platforms.
My platformio.ini:
[env]
platform = nordicnrf52
board = adafruit_clue_nrf52840
framework = arduino
monitor_speed = 115200
[env:arcada_clue_test]
lib_deps=
adafruit/Adafruit Arcada Library@^2.5.4
adafruit/Adafruit BusIO@^1.14.1
build_src_filter =
+<arcada_clue_test.cpp>
arcada_clue_test.ino
is properly adapted to .cpp
, I run pio run -e arcada_clue_test
and all the libraries get properly installed with no missing dependencies but then I get a bunch of errors related to ZeroTimer, an extract of which is:
In file included from .pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.cpp:13:0:
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:14:29: error: 'TC_CTRLA_PRESCALER' was not declared in this scope
TC_CLOCK_PRESCALER_DIV1 = TC_CTRLA_PRESCALER(0),
^~~~~~~~~~~~~~~~~~
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:14:29: note: suggested alternative: 'TPI_ACPR_PRESCALER_Msk'
TC_CLOCK_PRESCALER_DIV1 = TC_CTRLA_PRESCALER(0),
^~~~~~~~~~~~~~~~~~
TPI_ACPR_PRESCALER_Msk
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:16:29: error: 'TC_CTRLA_PRESCALER' was not declared in this scope
TC_CLOCK_PRESCALER_DIV2 = TC_CTRLA_PRESCALER(1),
^~~~~~~~~~~~~~~~~~
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:16:29: note: suggested alternative: 'TC_CLOCK_PRESCALER_DIV1'
TC_CLOCK_PRESCALER_DIV2 = TC_CTRLA_PRESCALER(1),
^~~~~~~~~~~~~~~~~~
TC_CLOCK_PRESCALER_DIV1
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:18:29: error: 'TC_CTRLA_PRESCALER' was not declared in this scope
TC_CLOCK_PRESCALER_DIV4 = TC_CTRLA_PRESCALER(2),
^~~~~~~~~~~~~~~~~~
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:18:29: note: suggested alternative: 'TC_CLOCK_PRESCALER_DIV2'
TC_CLOCK_PRESCALER_DIV4 = TC_CTRLA_PRESCALER(2),
^~~~~~~~~~~~~~~~~~
TC_CLOCK_PRESCALER_DIV2
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:20:29: error: 'TC_CTRLA_PRESCALER' was not declared in this scope
TC_CLOCK_PRESCALER_DIV8 = TC_CTRLA_PRESCALER(3),
^~~~~~~~~~~~~~~~~~
.pio/libdeps/arcada_clue_test/Adafruit ZeroTimer Library/Adafruit_ZeroTimer.h:20:29: note: suggested alternative: 'TC_CLOCK_PRESCALER_DIV4'
The sketch builds fine in the Arduino IDE, and Arduino IDE correctly lists the examples for the ZeroTimer lib as incompatible with the selected board “Adafruit CLUE”.
Why would platformio build ZeroTimer, a SAMD compatible pltform, when my current specified platform is nordic52?
And how could I prevent this from happening?