Skip to content
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

mtd_mapper problem #17904

Closed
Laczen opened this issue Apr 6, 2022 · 1 comment
Closed

mtd_mapper problem #17904

Laczen opened this issue Apr 6, 2022 · 1 comment

Comments

@Laczen
Copy link

Laczen commented Apr 6, 2022

Description

I am trying to work with mtd_mapper. As a test I have changed the filesystem example (first lines in main) as:

#if defined(MTD_0) && \
   (defined(MODULE_SPIFFS) || defined(MODULE_LITTLEFS) || \
    defined(MODULE_LITTLEFS2) || defined(MODULE_FATFS_VFS))
    /* spiffs and littlefs need a mtd pointer
     * by default the whole memory is used */
    mtd_mapper_parent_t parent = MTD_PARENT_INIT(MTD_0);
 
    mtd_mapper_region_t region = {
        .mtd = {
            .driver = &mtd_mapper_driver,
            .sector_count = MTD_0->sector_count,
            .pages_per_sector = MTD_0->pages_per_sector,
            .page_size = MTD_0->page_size,
        },
        .parent = &parent,
        .sector = 0,
    };

    fs_desc.dev = MTD_0;
    fs_desc.dev = &region.mtd;

#endif

(I switch the two last lines to go from MTD_0 to mtd_mapper).

When I compile and test this for MTD_0 the sample works, if I use the mtd_mapper the sample gets in a read-loop (reading the first page of the MTD_0). I am working on a esp8266.

As I am quite new to riot, is the mtd_mapper definition correct ? If so, how can I avoid it going into a read-loop ?

@Laczen
Copy link
Author

Laczen commented Apr 7, 2022

After doing some further research I found that this is fixed by (#17866).

@Laczen Laczen closed this as completed Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant