PlatformIO Community

STM32 - platformio does not pick up platform libraries


#1

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: https://docs.platformio.org/page/boards/ststm32/bluepill_f103c8.html
PLATFORM: ST STM32 > BluePill F103C8
HARDWARE: STM32F103C8T6 72MHz 20KB RAM (64KB Flash)
DEBUG: CURRENT(stlink) EXTERNAL(blackmagic, jlink, stlink)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
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/
RTClock.cpp
RTClock.h
utility

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?


#2

What is the content of your platformio.ini?


#3
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
build_flags=
  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
  -DSERIAL_USB

lib_deps =
  # Using a library name
  #UTouch
  Adafruit GFX Library
  Adafruit ILI9341
  Time
  SerialCommand
  Bounce2

#4

Adding RTClock to lib_deps makes no difference?


#5

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.


#6

Okay then do a platform rollback. Change

to

platform=ststm32@4.6.0

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


#7

Thanks, rolling back to 4.5.0 did the trick.