boards/pba-d-01-kw2x: add riotboot support#11642
Merged
cladmi merged 2 commits intoRIOT-OS:masterfrom Jun 6, 2019
Merged
Conversation
- Minimum required RIOBOOT_HDR_LEN or kW2xD is 0x200 to respect vector table alignment
9825e33 to
9f43d63
Compare
cladmi
approved these changes
Jun 6, 2019
Contributor
cladmi
left a comment
There was a problem hiding this comment.
I agree with the changes, the commits and description for the vector alignments required. There is enough information for understanding in the future.
I successfully tested tests/xtimer_usleep and tests/riotboot with the board using:
BOARD=pba-d-01-kw2x FEATURES_REQUIRED+=riotboot APP_VER=$(date +%s) make -C tests/xtimer_usleep clean riotboot/flash-extended-slot0 term
# I get the terminal output without crash
2019-06-06 14:25:23,443 - INFO # Slept for 98780 us (expected: 98765 us) Offset: 15 us
2019-06-06 14:25:23,522 - INFO # Slept for 75016 us (expected: 75000 us) Offset: 16 us
2019-06-06 14:25:23,537 - INFO # Slept for 10016 us (expected: 10000 us) Offset: 16 us
2019-06-06 14:25:23,592 - INFO # Slept for 50016 us (expected: 50000 us) Offset: 16 us
2019-06-06 14:25:23,606 - INFO # Slept for 10249 us (expected: 10234 us) Offset: 15 us
2019-06-06 14:25:23,668 - INFO # Slept for 56795 us (expected: 56780 us) Offset: 15 us
2019-06-06 14:25:23,685 - INFO # Slept for 12137 us (expected: 12122 us) Offset: 15 us
2019-06-06 14:25:23,788 - INFO # Slept for 98780 us (expected: 98765 us) Offset: 15 us
2019-06-06 14:25:23,868 - INFO # Slept for 75016 us (expected: 75000 us) Offset: 16 us
2019-06-06 14:25:23,870 - INFO # Test ran for 1727087 us
2019-06-06 14:27:00,991 - INFO # Exiting Pyterm
BOARD=pba-d-01-kw2x APP_VER=$(date +%s) make -C tests/riotboot riotboot/flash-slot1 test
# Test succeed
2019-06-06 14:27:15,629 - INFO # Hello riotboot!
2019-06-06 14:27:15,633 - INFO # You are running RIOT on a(n) pba-d-01-kw2x board.
2019-06-06 14:27:15,636 - INFO # This board features a(n) kinetis MCU.
2019-06-06 14:27:15,639 - INFO # riotboot_test: running from slot 1
2019-06-06 14:27:15,642 - INFO # Image magic_number: 0x544f4952
2019-06-06 14:27:15,644 - INFO # Image Version: 0x5cf9069e
2019-06-06 14:27:15,647 - INFO # Image start address: 0x00020a00
2019-06-06 14:27:15,649 - INFO # Header chksum: 0xa2e00b3b
2019-06-06 14:27:15,650 - INFO #
> 2019-06-06 14:27:15,805 - INFO # curslotnr
2019-06-06 14:27:15,806 - INFO # Current slot=1
> curslothdr
2019-06-06 14:27:15,860 - INFO # curslothdr
2019-06-06 14:27:15,863 - INFO # Image magic_number: 0x544f4952
2019-06-06 14:27:15,865 - INFO # Image Version: 0x5cf9069e
2019-06-06 14:27:15,868 - INFO # Image start address: 0x00020a00
2019-06-06 14:27:15,870 - INFO # Header chksum: 0xa2e00b3b
2019-06-06 14:27:15,870 - INFO #
> getslotaddr 0
2019-06-06 14:27:15,924 - INFO # getslotaddr 0
2019-06-06 14:27:15,927 - INFO # Slot 0 address=0x00001200
> dumpaddrs
2019-06-06 14:27:15,981 - INFO # dumpaddrs
2019-06-06 14:27:15,984 - INFO # slot 0: metadata: 0x1000 image: 0x00001200
2019-06-06 14:27:15,988 - INFO # slot 1: metadata: 0x20800 image: 0x00020a00
>
# Reset app version on second slot
BOARD=pba-d-01-kw2x FEATURES_REQUIRED+=riotboot APP_VER=1 make -C tests/riotboot riotboot/flash-slot1 term
# I get the terminal output again
2019-06-06 14:27:33,498 - INFO # Slept for 98780 us (expected: 98765 us) Offset: 15 us
2019-06-06 14:27:33,499 - INFO # Slept for 75016 us (expected: 75000 us) Offset: 16 us
2019-06-06 14:27:33,499 - INFO # Slept for 10016 us (expected: 10000 us) Offset: 16 us
2019-06-06 14:27:33,500 - INFO # Slept for 50016 us (expected: 50000 us) Offset: 16 us
2019-06-06 14:27:33,501 - INFO # Slept for 10250 us (expected: 10234 us) Offset: 16 us
2019-06-06 14:27:33,513 - INFO # Slept for 56795 us (expected: 56780 us) Offset: 15 us
2019-06-06 14:27:33,530 - INFO # Slept for 12137 us (expected: 12122 us) Offset: 15 us
2019-06-06 14:27:33,634 - INFO # Slept for 98780 us (expected: 98765 us) Offset: 15 us
2019-06-06 14:27:33,713 - INFO # Slept for 75016 us (expected: 75000 us) Offset: 16 us
2019-06-06 14:27:33,728 - INFO # Slept for 10016 us (expected: 10000 us) Offset: 16 us
2019-06-06 14:27:33,782 - INFO # Slept for 50016 us (expected: 50000 us) Offset: 16 us
2019-06-06 14:27:33,797 - INFO # Slept for 10250 us (expected: 10234 us) Offset: 16 us
2019-06-06 14:27:33,859 - INFO # Slept for 56795 us (expected: 56780 us) Offset: 15 us
2019-06-06 14:27:33,876 - INFO # Slept for 12137 us (expected: 12122 us) Offset: 15 us
2019-06-06 14:27:33,979 - INFO # Slept for 98780 us (expected: 98765 us) Offset: 15 us
2019-06-06 14:27:34,059 - INFO # Slept for 75016 us (expected: 75000 us) Offset: 16 us
2019-06-06 14:27:34,061 - INFO # Test ran for 1727080 us
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR adds riotboot support or pba-d-01-kw2x.
Testing procedure
Run riotboot tests and everything should work as expected.
BOARD=pba-d-01-kw2xFEATURES_REQUIRED+=riotboot make -C tests/xtimer_usleep riotboot/flash-extended-slot0 termBOARD=pba-d-01-kw2x FEATURES_REQUIRED+=riotboot make -C tests/xtimer_usleep riotboot/flash-slot1 termIssues/PRs references
Related to #11641