Failure building Adafruit Sensor Calibration Library - can't find Adafruit_SPIFlash.h

Seems like you’ve found a bug in PlatformIO’s LDF. I was able to reproduce your error with the above platformio.ini and minimal code

#include <Arduino.h>
#include <Adafruit_Sensor_Calibration_SDFat.h>

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

Please report it to Issues · platformio/platformio-core · GitHub.

I’ve also checked that lib_ldf_mode = chain+ does not make a difference.

To compile it, some workarounds have to be used to help PlatformIO…

build_flags = -DEXTERNAL_FLASH_DEVICES=GD25Q16C

at the bottom of the platformio.ini defines that macro to the same value is it would be normally, but PlatformIO then sees the dependency correctly.

1 Like