AP_Filesystem: use wear levelling sector size for ESP32 FlashFS - #34071
Open
muramura wants to merge 1 commit into
Open
AP_Filesystem: use wear levelling sector size for ESP32 FlashFS#34071muramura wants to merge 1 commit into
muramura wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use the wear levelling sector size when the ESP32 filesystem uses FlashFS.
Classification & Testing (check all that apply and add your own)
Description
AP_Filesystem_ESP32::disk_free()anddisk_space()currently alwaysconvert the FatFs sector count using
FF_SS_SDCARD.When
HAL_ESP32_FLASHFSis defined, the filesystem uses ESP-IDF wearlevelling, so the correct sector size is
FF_SS_WL.This change selects:
FF_SS_WLfor FlashFSFF_SS_SDCARDotherwiseThe existing SD card behavior is unchanged.
Testing
Built Copter for
esp32buzzwith the normal filesystem configuration:AP_FILESYSTEM_ESP32_ENABLED=1HAL_ESP32_FLASHFSnot definedBuilt Copter for
esp32buzzwith:supplied through
--extra-hwdef, verifying theFF_SS_WLbuild path.Both builds completed successfully.
git diff --check upstream/masteralso passed.