Mbed OS 6 SDBlockDevice not found

Hi,

I’m working on an mbed project which i previously developed in mbed studio, however the debugging on my nucleo STM32L432KC is not working there. Compiling and deploying worked fine in mbed studio.

I have created an mbed project for my mcu in platformio and copied over the code.
My mbed_app.json looks the following:

{
"requires": ["bare-metal","storage"],
"target_overrides": {
    "*": {
        "target.components_add": ["SD"],
        "target.c_lib": "small"
        }
    }
}

and the platformio.ini:

[env:nucleo_l432kc]
platform = ststm32
board = nucleo_l432kc
framework = mbed

The build fails with
“fatal error: SDBlockDevice.h: No such file or directory”

The SDBlockDevice Driver should be found in FrameworkMbed/components/storage/blockdevice/COMPONENT_SD.
However in .pio/build/nucleo_l432kc/FrameworkMbed/components only has the folders 802.15.4_RF and wifi.

Somehow the “target.components_add”: [“SD”] parameter from mbed_app.json is not interpreted correctly.
How do I best continue in the troubleshooting here?

Thank you!

Have you updated the platforms and frameworks (pio platform update)? That should install mbed-os 6.2.0. Do file storage examples like platform-ststm32/examples/mbed-rtos-filesystem at master · platformio/platform-ststm32 · GitHub compile for you?