Closed vshymanskyy closed 1 year ago
@JAndrassy what do you think?
Hello Volodymyr
did you test it on SAMD21, SAMD51 too?
I would call erase at the beginning of write
and remove the erase call from open
.
why the const nextAddress
variable?
why the recalculation of pageAlignedLength in close
? and what is * 4
there?
Honestly, I did this change quite some time ago, so I don't remember ;) But, I'll be running this modified version of ArduinoOTA on a bunch of platforms soon (including SAMD) so I'll try to answer all the questions!
write
nownextAddress
was removedpageAlignedLength
...This is needed in case the actually written binary is smaller than the size provided in open(). Why? In some cases (i.e. a compressed firmware binary, HTTP file upload) the size of the firmware binary is not known upfront. The firmware update can be achieved in such cases by calling:
InternalStorage.open(InternalStorage.maxSize());
I've added some comments, and the * 4
was changed to * sizeof(uint32_t)
to make it easier to understand.
I've tested this version on multiple platforms:
OK
OK
Failed
SAMD51P19A (Wio Terminal): Failed
Based on these tests, I changed the PR so that the page erasing strategy is changed only for nRF52 devices.
@JAndrassy LMK your thoughts!
I like it. Is it ready to merge or you want to change something on it yet?
it's ready
On Thu, 23 Mar 2023, 16:03 Juraj Andrássy, @.***> wrote:
I like it. Is it ready to merge or you want to change something on it yet?
— Reply to this email directly, view it on GitHub https://github.com/JAndrassy/ArduinoOTA/pull/190#issuecomment-1481255756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALP3FCMVIVN3JPD5NEMTMTW5RJ2XANCNFSM6AAAAAAVYIEJWI . You are receiving this because you authored the thread.Message ID: @.***>
Volodymyr, let me know when you need a release of ArduinoOTA
No urgency! i can use it as is. Thanks ;)
On Wed, 26 Apr 2023, 09:47 Juraj Andrássy, @.***> wrote:
Volodymyr, let me know when you need a release of ArduinoOTA
— Reply to this email directly, view it on GitHub https://github.com/JAndrassy/ArduinoOTA/pull/190#issuecomment-1522874547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALP3FFYKJLWMVPHUNLWKB3XDDAHNANCNFSM6AAAAAAVYIEJWI . You are receiving this because you authored the thread.Message ID: @.***>
Areaseing all pages at once can take ~30 seconds on Micro:bit 2, and the board it unresponsive during this time, which leads to timeouts, etc.