PartitionStream requires blockErase, other OTA-related improvements #2729
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.
Leaving
blockErase
parameter atfalse
when constructing aPartitionStream
will result in corruption unless partition has already been erased. This is not always immediately apparent so can be difficult to diagnose.Breaking change Replacing
blockErase
with an enumeratedmode
parameter enforces read-only behaviour by default (new feature and a good thing), with write access more explicitly defined. It's a simple change to existing code and will ensure it gets manually checked to ensure correct behaviour.Update the
Basic_Ota
sample to check that an OTA update is not being attempted on the active running partition. This can happen with esp8266, for example, when running in temporary boot mode. (NB. Other checks may include active filing system partitions but that is application-specific.)Update notes on migrating from Sming 4.2 to include updating boot sector. (Learning points froim existing Sming 4.2 based app - OTA to 5.1 #2727.)
Remove redundant flashsize calculation from rboot and update version string to
Sming v1.5
(from v1.4.2). Note this should have been done in Add rBoot partition support #2258.Fix rboot README regarding use of slot 2, should correspond with subtype
ota_2
notota_1
.