[riot-notifications] [RIOT-OS/RIOT] cpu/stm32f2: add riotboot requirements (#11900)

Francisco notifications at github.com
Wed Jul 24 10:52:17 CEST 2019


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description

<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->

This PR adds riotboot for stm32f2. Since F2 works with sectors for riotboot to work each slot must start at the beginning of a sector. For stm32f2 the smallest sector is of length 16kB therefore that must be the length of the bootloader and the same amount must be taken from the second half of the flash to optimize flash usage.

This PR is part of 3, since just adding riotboot doesn't make much sense if it can't perform ota. Although it doesn't depend on them but it is highly related to:

* Support flashpage: https://github.com/RIOT-OS/RIOT/pull/11681
* Support flashpage raw for flashwrite: https://github.com/RIOT-OS/RIOT/pull/11705

Also pulling https://github.com/RIOT-OS/RIOT/pull/11808 can ease testing significantly.

### Testing procedure

It has been tested on the supported boards: `nucleo-f207zg`

1.- Test riotboot:

`BOARD=nucleo-f207zg FEATURES_REQUIRED+=riotboot make -C tests/xtimer_usleep riotboot/flash-extended-slot0 term`

`BOARD=nucleo-f207zg FEATURES_REQUIRED+=riotboot make -C tests/xtimer_usleep riotboot/flash-slot1 term`

In both cases it should run without issues.

2.- Since the sector division is important when updating the slots by writing to flash directly it would be ideal to rebase on top off flashpage: https://github.com/RIOT-OS/RIOT/pull/11681 and https://github.com/RIOT-OS/RIOT/pull/11705, as well as https://github.com/RIOT-OS/RIOT/pull/11808

and run `tests/riotboot_flashwrite`

The following patch can be applied to the test Makefile

`make -C tests/riotboot_flashwrite/ BOARD=nucleo-f207zg flash test`

<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->

### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

* Support flashpage: https://github.com/RIOT-OS/RIOT/pull/11681
* Support flashpage raw for flashwrite: https://github.com/RIOT-OS/RIOT/pull/11705

* Also pulling https://github.com/RIOT-OS/RIOT/pull/11808 can ease testing significantly.
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11900

-- Commit Summary --

  * stm32f2/Makefile.include: add riotboot requirements
  * boards/nucleo-f207zg: add riotboot

-- File Changes --

    M boards/nucleo-f207zg/Makefile.features (3)
    M cpu/stm32f2/Makefile.include (20)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11900.patch
https://github.com/RIOT-OS/RIOT/pull/11900.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190724/b4c9759f/attachment-0001.htm>


More information about the notifications mailing list