Next time, please do a little bit more than copy pasting just the error message into a post, completely unformatted, without any text added on what you’re trying to do. We’re putting in effort to help you, so we can also expect a bit of effort on the poster’s side.
As you can see from the code here
the library is expecting to be used with the Maple core.
The default for the board is as you can see here, the STM32 core.
As you can read in our documentation, you can switch to the Maple core by adding
board_build.core = maple
in the platformio.ini
.
For me, when using
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = arduino
board_build.core = maple
lib_deps =
arpruss/USBComposite for STM32F1 @ ^0.99
as the platformio.ini
with this code as main.cpp
and an added #include <Arduino.h>
at the top, it compiles.
Building .pio\build\genericSTM32F103C8\firmware.bin
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 29.3% (used 6000 bytes from 20480 bytes)
Flash: [==== ] 38.0% (used 24928 bytes from 65536 bytes)
============================= [SUCCESS] Took 2.77 seconds =============================