cpu/nrf52: set RIOTBOOT_LEN to 8k #11518
Merged
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.
Contribution description
For nrf52 flash page is 4k. By default the bootloader is 4k but it needs to be at max(4k, 2xFASHPAGE_SIZE) so slots start at the beginning of a page since for now there is only support for writing full pages with flashpage module.
Testing procedure
In https://github.com/RIOT-OS/RIOT/blob/master/tests/riotboot_flashwrite/Makefile uncomment ethos lines. Then flash firmware on an nrf52 board:
Setup ethos
Confirm it booted from slot 0 (it should print "Current slot=0"), then
recompile in order to get an image for the second slot with a newer version
number:
Then send via CoAP, for example, with libcoap's coap_client:
Then reboot the node manually. With this PR it will reboot from slot 1, without this pr it will reboot from slot 0.
Issues/PRs references
#9342