Skip to content

SDBlockDevice error #8494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pilotak opened this issue Oct 22, 2018 · 7 comments
Closed

SDBlockDevice error #8494

pilotak opened this issue Oct 22, 2018 · 7 comments

Comments

@pilotak
Copy link
Contributor

pilotak commented Oct 22, 2018

Description

When using SDBlockDevice from external repo i get an error, which is fine
[Error] SDBlockDevice.cpp@157,2: #error "Started from version 5.10.0 SDBlockDevice external repo is deprecated. please use the SDBlockDevice component inside mbed-os."

so i deleted the folder and i get fatal error: SDBlockDevice.h: No such file or directory

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug

@linlingao
Copy link
Contributor

It looks like you might not have upgraded your Mbed OS to 5.10.
You should see SDBlockDevice.h in the following directory:
<your_project_dir>/mbed-os/components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.h.
If you don't see this file or even the directory, please upgrade your Mbed OS to 5.10.

@yennster
Copy link
Contributor

Hi @pilotak,

As of 5.10 you will also need to configure your target board to have the "STORAGE" component in order to successfully pull in the SDBlockDevice files: https://os.mbed.com/docs/v5.10/reference/configuration-storage.html#blockdevice-default-configuration

@pilotak
Copy link
Contributor Author

pilotak commented Oct 23, 2018

@linlingao yes i have the latest OS.

Thank you @yennster for pointing me to the right direction however it is not very clear in documentation for devices that do not have BlockDevice on development board. Anyway here is how i got it to work if somebody else struggles.

mbed_app.json

{
    "target_overrides": {
        "NUCLEO_F412ZG": {
            "target.features_add": ["STORAGE"],
            "target.components_add": ["SD"]
        }
    }
}

@linlingao linlingao reopened this Oct 23, 2018
@linlingao
Copy link
Contributor

Reopen issue for doc enhancement.

@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-100

@linlingao
Copy link
Contributor

Fixed by PelionIoT/sd-driver#115.

@wdx04
Copy link
Contributor

wdx04 commented Jun 3, 2023

For anyone who want to use SD cards with bare metal profile : it is also needed to add "storage" and "sd" to the "requires" section:
"requires": ["bare-metal", "events", "storage", "sd", "filesystem", "fat_chan"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants