Git Product home page Git Product logo

Comments (3)

snahmad avatar snahmad commented on June 12, 2024

This example works
https://github.com/espressif/esp-idf/tree/master/examples/storage/wear_levelling

but not ESP32 explorer example.

Any idea?

from esp32_explorer.

snahmad avatar snahmad commented on June 12, 2024

Fix by specifying allocation_unit_size

void FATFS_VFS::mount() {
esp_vfs_fat_mount_config_t mountConfig;
mountConfig.max_files = m_maxFiles;
mountConfig.format_if_mount_failed = true;
mountConfig.allocation_unit_size = 4096;

ESP_LOGD(LOG_TAG, "FATFS_VFS::mount(%s,%s)", m_mountPath.c_str(), m_partitionName.c_str());
ESP_ERROR_CHECK(esp_vfs_fat_spiflash_mount(m_mountPath.c_str(), m_partitionName.c_str(), &mountConfig, &m_wl_handle));

} // mount

from esp32_explorer.

nkolban avatar nkolban commented on June 12, 2024

Very NICE catch. It appears that the allocation_unit_size field was added 5 months (ago - Jan 2018) and that the library/code base in this project pre-dates that addition.

https://github.com/espressif/esp-idf/blame/363c096f2b4d518f5d423718973f76aa5e009fbc/components/fatfs/src/esp_vfs_fat.h#L110

This is a maintenance issue that we will fix by exposing the ability (or default) to set that value.

from esp32_explorer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.