[riot-notifications] [RIOT-OS/RIOT] riotboot: add basic porting guide (#11597)
notifications at github.com
Mon Jun 3 09:40:43 CEST 2019
cladmi commented on this pull request.
> + - Make the startup code `board_init()` idempotent,
+i.e. whether you execute it once, or twice, it works all the same.
+ - Adapt the flasher script to support .bin flashing with an offset (if `make flash`
+integration is desired, and .bin flashing with offset is not supported yet). To get an idea, you can look at makefiles/tools/edbg.inc.mk
+ - Declare `FEATURES_PROVIDED += riotboot` to pull the right dependencies
+in your board's Makefile.features
+## Porting to a board based on other types of MCUs
+More work is necessary, but the approach of riotboot is purposedly kept
+"minimal" in order to minimize this work.
+- Provide the functions defined in the header sys/include/riotboot/slot.h, in particular `riotboot_slot_jump(unsigned slot)`.
+- Adapt the linker script to link to different start addresses for the bootloader, and for slot(s) for example `SLOT0_LEN`, `SLOT1_LEN`, and linker script config with `ROM_OFFSET` and `FW_ROM_LEN`. To get an idea, take a look at cpu/cortexm_common/Makefile.include
+- Make the startup code idempotent.
+- Adapt the flasher script to support .bin flashing with an offset. To get an idea, you can look at makefiles/tools/edbg.inc.mk
>From the mailing list post about doing riotboot on cc2538dk I noticed it was also important to remove the `--full-rom-erase` options from flashers to correctly flash with an offset.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications