Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefiles/tools/uf2conv.inc.mk: partial riotboot support #16323

Merged
merged 1 commit into from
Jun 2, 2022

Conversation

fjmolinas
Copy link
Contributor

@fjmolinas fjmolinas commented Apr 13, 2021

Contribution description

Follow up to #16276, by setting the correct base when converting some of the riotboot/% commands are now supported. The other ones require to flash a binary

Testing procedure

  • flash bootloader BOARD=feather-nrf52840 make -C tests/riotboot riotboot/flash-bootloader

  • flash slot0 BOARD=feather-nrf52840 make -C tests/riotboot riotboot/flash-slot0

2021-04-13 14:29:17,349 # om slot 0
2021-04-13 14:29:17,350 # Image magic_number: 0x544f4952
2021-04-13 14:29:17,351 # Image Version: 0x60758e66
2021-04-13 14:29:17,352 # Image start address: 0x00002400
2021-04-13 14:29:17,353 # Header chksum: 0x0075b07d
2021-04-13 14:29:17,353 #
> dumpaddrs 0
2021-04-13 14:29:30,796 # slot 0: metadata: 0x2000 image: 0x00002400
2021-04-13 14:29:30,798 # slot 1: metadata: 0x7a800 image: 0x00000000
  • flash slot1 BOARD=feather-nrf52840 make -C tests/riotboot riotboot/flash-slot1
2021-04-13 14:29:59,982 # om slot 1
2021-04-13 14:29:59,984 # Image magic_number: 0x544f4952
2021-04-13 14:29:59,984 # Image Version: 0x60758ec0
2021-04-13 14:29:59,985 # Image start address: 0x0007ac00
2021-04-13 14:29:59,986 # Header chksum: 0x11e538df
2021-04-13 14:29:59,986 #
> dumpaddrs
2021-04-13 14:30:05,181 # dumpaddrs
2021-04-13 14:30:05,181 # slot 0: metadata: 0x2000 image: 0x00002400
2021-04-13 14:30:05,182 # slot 1: metadata: 0x7a800 image: 0x0007ac00

I have not yet figured out how to concatenate two uf2 files so that flash can seamlessly be used.

Issues/PRs references

depends on #16276

@fjmolinas fjmolinas added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation State: waiting for other PR State: The PR requires another PR to be merged first Area: boards Area: Board ports labels Apr 13, 2021
@fjmolinas fjmolinas requested a review from benpicco April 13, 2021 12:33
@fjmolinas
Copy link
Contributor Author

fjmolinas commented Jun 15, 2021

How about I don't set it as the default programmer can we go ahead with this one @miri64 @benpicco? ups wrong PR

@fjmolinas fjmolinas force-pushed the pr_uf2_riotboot_initial branch from 3d85e13 to 8090fb7 Compare June 15, 2021 08:53
@github-actions github-actions bot added Area: build system Area: Build system Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: tools Area: Supplementary tools labels Jun 15, 2021
@miri64
Copy link
Member

miri64 commented Jun 15, 2021

depends on #16267

Needs rebase? #16276 got merged (and I think the reference in OP is wrong)

@miri64 miri64 removed the State: waiting for other PR State: The PR requires another PR to be merged first label Jun 15, 2021
@fjmolinas fjmolinas force-pushed the pr_uf2_riotboot_initial branch from 8090fb7 to fd2c69a Compare June 15, 2021 10:08
@github-actions github-actions bot removed Area: Kconfig Area: Kconfig integration Area: boards Area: Board ports Area: doc Area: Documentation labels Jun 15, 2021
@fjmolinas
Copy link
Contributor Author

fjmolinas commented Jun 15, 2021

With the last push FEATURES_REQUIRED=riotboot make -C <someapp> also works... but still no combined or extended...

@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Mar 2, 2022
@fjmolinas fjmolinas added State: don't stale State: Tell state-bot to ignore this issue and removed State: stale State: The issue / PR has no activity for >185 days labels Mar 2, 2022
Individual files need to be converted to uf2 format, targets
flashing individual slots or the bootloader will work:

- riotboot/flash-slot%
- riotboot/flash-bootloader

'flash' also works by flashing both the bootloader and slot0
independently.

But not targets flashing combined/extended versions since conversion
of the blob is not possible with the uf2conv.py script.
@fjmolinas fjmolinas force-pushed the pr_uf2_riotboot_initial branch from fd2c69a to a945ea1 Compare June 1, 2022 09:01
@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 1, 2022
@fjmolinas
Copy link
Contributor Author

Can we get this one in as is? I does not cover all cases, but at least allows for some basic riotboot flash support with uf2

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks innocent enough and should only affect uf2conv

@benpicco benpicco merged commit 25d7234 into RIOT-OS:master Jun 2, 2022
@fjmolinas fjmolinas deleted the pr_uf2_riotboot_initial branch June 2, 2022 08:13
@fjmolinas
Copy link
Contributor Author

Thanks!

@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: don't stale State: Tell state-bot to ignore this issue Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants