5 years, 3 months ago.

mbed-os storageAPI does not contain FlashIAPBlockDevice

Hello,

I am trying to run theFlashIAPBlockDevicesBlockDevice example from https://os.mbed.com/docs/mbed-os/v5.11/apis/flashiapblockdevice.html. After including "mbed.h" and "FlashIAPBlockDevice.h", the Online Compiler throws error:

Error: Cannot open source input file "FlashIAPBlockDevice.h": No such file or directory in "main.cpp", Line: 2, Col: 34

I have been looking at the the mbed-os git repo, and it is not included with the rest of the block devices. https://github.com/ARMmbed/mbed-os/tree/master/features/storage/blockdevice

My target is WIZwiki-W7500P and the NUCLEO-F207ZG.

Does anyone have a clue on how to use this BlockDevice?

1 Answer

5 years, 3 months ago.

I was missing the set up of the Block-Device in mbed_app.json using target_overrides.

Accepted Answer

Hello, how to config mbed_app.json?

posted by Petro Borys 31 Jan 2019

I just added in mbed_app.json

{
    "target_overrides": {
        "NUCLEO_F207ZG": {
             "target.features_add": ["STORAGE"],
             "target.components_add": ["FLASHIAP"]
        }
    }
}

Documentation for BlockDevice configuration can be found here: https://os.mbed.com/docs/mbed-os/v5.11/reference/storage.html#blockdevice-default-configuration

And the example is a good way to go: https://github.com/ARMmbed/mbed-os-example-filesystem

posted by Jose Marquez 31 Jan 2019

Assigned to Jose Marquez 5 years, 3 months ago.

This means that the question has been accepted and is being worked on.