[riot-devel] CC2538dk Riotboot support

Emmanuel Baccelli Emmanuel.Baccelli at inria.fr
Tue May 28 17:45:32 CEST 2019


FYI I opened a PR adding a WIP porting guide:
https://github.com/RIOT-OS/RIOT/pull/11597

On Mon, May 27, 2019 at 2:43 PM Gaëtan Harter <gaetan.harter at fu-berlin.de>
wrote:

> On 5/27/19 2:36 PM, Emmanuel Baccelli wrote:
> > Seems to me that a quick riotboot porting guide could be useful somewhere
> > in the wiki.
> >
>
> More in the `riotboot` documentation in the repository I would say.
>
> >
> > On Mon, May 27, 2019 at 2:30 PM Gaëtan Harter <
> gaetan.harter at fu-berlin.de>
> > wrote:
> >
> >> Hi Brenton,
> >>
> >> if you only use the default `riotboot/flash` or `flash` in
> >> `tests/riotboot` targets, you do not need flasher changes.
> >> But you should not use `riotboot/flash-slot0` and `riotboot/flash-slot1`
> >> targets for the moment.
> >>
> >> To have the support declared and merged in RIOT, it also needs to
> >> support flashing the `slot-` firmwares alone. These require having
> >> flasher that can flash with an offset`.
> >>
> >> For `cc2538-bsl.py` it looks like there is the `-a` option for this.
> >>
> >> Maybe changing it to use `IMAGE_OFFSET` if set would be enough.
> >> An example is in
> >>
> >>
> https://github.com/RIOT-OS/RIOT/blob/8fe12bc82cfbb83a90efd018e11c044d0a40696b/makefiles/tools/edbg.inc.mk#L14-L15
> >>
> >> The `flash.sh` is currently using `jlink` without using the common
> >> `jlink` scripts thing, it is in my todo list after
> >> https://github.com/RIOT-OS/RIOT/pull/11554 to migrate to use the common
> >> one where applicable.
> >>
> >> Cheers,
> >> Gaëtan
> >>
> >> On 5/24/19 2:32 PM, Francisco Acosta wrote:
> >>> Hi Brenton!
> >>>
> >>> So far I remember we didn't take it into account, and I don't know if
> >>> someone is taking care of it.
> >>>
> >>> As far as I know, there are two ways of supporting that CPU:
> >>>
> >>> 1. The way we do it now, which is linking the image in another start
> >>> address so the bootloader can recognise it and boot it.
> >>>
> >>> 2. Modify the start address on the CC2538 register dedicated to this.
> >>> This might be a bit tricky but also interesting for the sake of
> research
> >>> and compatibility.
> >>>
> >>> However, I'd advice the first option to have the full benefits of the
> >>> bootloader and struggling less with the particular settings on that
> >>> chip.
> >>>
> >>> Overall, the steps would be the following:
> >>>
> >>> 1. Adapt the linker scripts to succeed tests/cortexm_common_ldscript.
> >>> This consists on making the linker scripts on cpu/cc2838/ldscripts
> >>> comply with cpu/cortexm_common/ldscrpts/cortexm.ld. You might take a
> >>> look how is it done for stm32 or sam0 families.
> >>>
> >>> 2. Provide the length and start variables to link slots correctly:
> >>>     - ROM_LEN
> >>>     - RAM_LEN
> >>>     - ROM_START_ADDR
> >>>     - RAM_START_ADDR
> >>>
> >>> Again, take a look on the supported CPUs as examples.
> >>>
> >>> 3. Make tests/riotboot pass
> >>>
> >>> 4. Perform a firmware update or flash different firmwares with
> different
> >>> versions so the bootloader choses the newest.
> >>>
> >>> Optionally you might want to test if the WIP SUIT update format works.
> >>>
> >>> Don't hesitate to make more questions if you have some!
> >>>
> >>> Cheers,
> >>>
> >>> Paco.
> >>>
> >>>
> >>> On 24/05/2019 13:43, Brenton Chetty wrote:
> >>>> Hey guys, has anyone succeeded in providing riotboot support for the
> >>>> cc2538dk board as yet?
> >>>>
> >>>> _______________________________________________
> >>>> devel mailing list
> >>>> devel at riot-os.org
> >>>> https://lists.riot-os.org/mailman/listinfo/devel
> >>>>
> >>> _______________________________________________
> >>> devel mailing list
> >>> devel at riot-os.org
> >>> https://lists.riot-os.org/mailman/listinfo/devel
> >> _______________________________________________
> >> devel mailing list
> >> devel at riot-os.org
> >> https://lists.riot-os.org/mailman/listinfo/devel
> >>
> >
> >
> > _______________________________________________
> > devel mailing list
> > devel at riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
> >
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20190528/cceb2c59/attachment.html>


More information about the devel mailing list