-
Notifications
You must be signed in to change notification settings - Fork 44
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
Flashfs rolling erase #211
Closed
Closed
+1,701
−77
Conversation
This file contains 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
gongtao0607
force-pushed
the
background_erase
branch
2 times, most recently
from
January 3, 2025 00:24
253b426
to
4217b7e
Compare
When using loop mode, we will identify the "start of the data stream" (by empty region followed by filled region). Also the usable size is reduced to `full size - page size - buffer size`. (The - buffer size is for code simplicity). The original FLASHFS_FREE_BLOCK_SIZE is changed to page size to avoid misalignment. A new option blackbox_initial_erase is added to maintain a certain amount of free space upon record start. This also add (change) some cli cmds for diagnoses: flash_fill flash_verify flash_erase_sector flashfs_initial_erase
gongtao0607
force-pushed
the
background_erase
branch
from
January 6, 2025 04:42
4217b7e
to
e4704b0
Compare
Change `initialEraseFreeSpace` to `....KiB` and update unit tests.
A new option `blackbox_rolling_erase` is added to enable automatic rolling erase when flashfs volume is full.
gongtao0607
force-pushed
the
background_erase
branch
from
January 16, 2025 19:52
64e7f6e
to
0df8b9c
Compare
rotorflight
approved these changes
Jan 18, 2025
@@ -1753,7 +1754,7 @@ const clivalue_t valueTable[] = { | |||
{ "sbus_out_source_range_low", VAR_INT16 | MASTER_VALUE | MODE_ARRAY, .config.array.length = SBUS_OUT_CHANNELS, PG_DRIVER_SBUS_OUT_CONFIG, offsetof(sbusOutConfig_t, sourceRangeLow) }, | |||
{ "sbus_out_source_range_high", VAR_INT16 | MASTER_VALUE | MODE_ARRAY, .config.array.length = SBUS_OUT_CHANNELS, PG_DRIVER_SBUS_OUT_CONFIG, offsetof(sbusOutConfig_t, sourceRangeHigh) }, | |||
{ "sbus_out_frame_rate", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = {25, 250}, PG_DRIVER_SBUS_OUT_CONFIG, offsetof(sbusOutConfig_t, frameRate) }, | |||
{ "sbus_out_pinswap", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON}, PG_DRIVER_SBUS_OUT_CONFIG, offsetof(sbusOutConfig_t, pinSwap) }, | |||
{ "sbus_out_pinswap", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_DRIVER_SBUS_OUT_CONFIG, offsetof(sbusOutConfig_t, pinSwap) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't make changes to unrelated things.
rotorflight
pushed a commit
that referenced
this pull request
Jan 18, 2025
A new option `blackbox_rolling_erase` is added to enable automatic rolling erase when flashfs volume is full.
Conflict resolved and merged. |
gongtao0607
added a commit
to gongtao0607/rotorflight-firmware
that referenced
this pull request
Jan 18, 2025
A new option `blackbox_rolling_erase` is added to enable automatic rolling erase when flashfs volume is full.
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.
This PR is based off PR #209. It implements rolling erase.
Background: #126 (comment) bullet 3
set blackbox_rolling_erase = ON
to turn it on (default is off).The feature is tested on Matek G474Heli and Flydragon, both have w25n01g flash chip whose sector erase is ~2ms.
If the sector erase is slower, there will be buffer drops and log gaps, which is generally fine (tested). However, the exact behavior on other flash chips is untested and there may be room for improvements (e.g., erase suspend, larger buffer).