STM32 - platformio does not pick up platform libraries

I have problem compiling project fot STM32 (stm32duino). It does not pickup platform libraries like RTClock or libmaple.
In the source file I have

#include <RTClock.h>
RTClock rt(RTCSEL_LSE); // initialise

But when I build I get:
Processing bluepill_f103c8 (platform: ststm32; board: bluepill_f103c8; framework: arduino)
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 > BluePill F103C8
HARDWARE: STM32F103C8T6 72MHz 20KB RAM (64KB Flash)
DEBUG: CURRENT(stlink) EXTERNAL(blackmagic, jlink, stlink)
Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
Collected 22 compatible libraries
Scanning dependencies…
Dependency Graph
|-- 1.3.6
| |-- 1.0
|-- 1.2.0
| |-- 1.3.6
| | |-- 1.0
| |-- 1.0
|-- 1.5
|-- 2.52
|-- 1.0
Compiling .pioenvs/bluepill_f103c8/src/main.cpp.o
Compiling .pioenvs/bluepill_f103c8/libbc2/SPI/SPI.cpp.o
src/main.cpp:65:10: fatal error: RTClock.h: No such file or directory

But… this is file is actually present in STM32 platform libs
ls -1 /home/oskar/.platformio/packages/framework-arduinoststm32/STM32F1/libraries/RTClock/src/

I tried to copy it to private lib directory, but then it complains about missing libmaple etc…

What can I do to fix this problem?

What is the content of your platformio.ini?

platform = ststm32
board = bluepill_f103c8
framework = arduino

lib_deps =
  # Using a library name
  Adafruit GFX Library
  Adafruit ILI9341

Adding RTClock to lib_deps makes no difference?

No, it installs library with the same name but for mbed framework only. After that ldf complains that it is for incompatible framework.
Framework incompatible library /home/oskar/PlatformIO/Projects/STM32-Oscilloscope_1/.piolibdeps/RTclock_ID4569

This project was working fine about 2 months ago. I updated STM32 framework in the meantime and now I suddenly encountered this strange error.

Okay then do a platform rollback. Change



And if that still doesn’t work ststm32@4.5.0. The STM32 Arduino core implementations were recently switched out, see Releases · platformio/platform-ststm32 · GitHub. Seems they’re not compatible to each other?

1 Like

Thanks, rolling back to 4.5.0 did the trick.