Skip to content

MBRBlockDevice: cannot mount multiple partitions #4526

@netanelgonen

Description

@netanelgonen

Description

  • Type: Bug
  • Priority: | Major

Bug

cannot create mulipal partitions with the new API in mbed-os 5.5 receiving this error:
“ mbed assertation failed: is_valid_read(addr, size), file: ../..//mbed-os/features/filesystem/bd/MBRBlockDevice.cpp, line 234”

This is my init code for the partiotions (in global scope)

    int partitonoGlobal1 = MBRBlockDevice::partition(&sd, 1, 0x00, 0, 512*1024);
    int partitonGlobal2 = MBRBlockDevice::partition(&sd, 2, 0x00, 0, 512*1024);

    // Create the block device for each partition
    MBRBlockDevice part1(&sd, 1);
    MBRBlockDevice part2(&sd, 2);

    // Format each partition with a FAT filesystem

    // Create the FAT filesystem instance for each filesystem
    FATFileSystem fat1("sd1", &part1);
    FATFileSystem fat2("sd2", &part2);

What am I doing wrong?
Thank you for your help

Some more info:
Mbed-os tag mbed-os-5.5
My code:
Repo: mbed-client-pal
Branch: format_partiotions
Init file : https://github.com/ARMmbed/mbed-client-pal/blob/format_partitions/Examples/PlatformBSP/MK64F_mbedOS/FileSystemInit.cpp#L46

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions