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

Add bootloader support for NXP FRDM-KW24D #4968

Merged
merged 1 commit into from
Sep 22, 2017
Merged

Conversation

dlfryar-zz
Copy link
Contributor

@dlfryar-zz dlfryar-zz commented Aug 24, 2017

Description

Adds support for building the Mbed bootloader for the FRDM-KW24D platform. The bootloader provides the mechanism to do firmware updates.

Status

Review

Related PRs

27 and 217

Steps to test or reproduce

In bootloader project
mbed compile -m PLATFORM -t TOOLCHAIN
Copy compiled bootloader to FRDM-KW24D
Attach a ci-test-shield with a FAT32 formatted SD card inserted to the FRDM-KW24D
Connect the serial terminal, reset the board, and observer the bootloader initialization

@theotherjimmy
Copy link
Contributor

@dlfryar Could you fill out the pull request template?

@theotherjimmy
Copy link
Contributor

@dlfryar Could you rebase to remove the conflicts. you should force push after the rebase.

@dlfryar-zz
Copy link
Contributor Author

@theotherjimmy rebase and template completed.

@maclobdell please review

@bentcooke related to your porting efforts as well

@maclobdell
Copy link
Contributor

@dlfryar - please confirm you ran the flash iap test and if it passed.

cc @mmahadevan108

@dlfryar-zz
Copy link
Contributor Author

mbed --version

1.2.0

arm-none-eabi-gcc -v

gcc version 6.2.1 20161205 (release) [ARM/embedded-6-branch revision 243739] (GNU Tools for ARM Embedded Processors)

mbedls


+---------------+----------------------+------------------+-----------------------+--------------------------------------------------+-----------------+
| platform_name | platform_name_unique | mount_point      | serial_port           | target_id                                        | daplink_version |
+---------------+----------------------+------------------+-----------------------+--------------------------------------------------+-----------------+
| KW24D         | KW24D[0]             | /Volumes/DAPLINK | /dev/tty.usbmodem1422 | 0250000033514e45003e5015846c00476cb1000097969900 | 0242            |
+---------------+----------------------+------------------+-----------------------+--------------------------------------------------+-----------------+

mbed test -m kw24d -t gcc_arm -n tests-mbed_hal-flash

+---------------+---------------+----------------------+-------------------------------+--------+--------+--------+--------------------+
| target        | platform_name | test suite           | test case                     | passed | failed | result | elapsed_time (sec) |
+---------------+---------------+----------------------+-------------------------------+--------+--------+--------+--------------------+
| KW24D-GCC_ARM | KW24D         | tests-mbed_hal-flash | Flash - buffer alignment test | 1      | 0      | OK     | 0.07               |
| KW24D-GCC_ARM | KW24D         | tests-mbed_hal-flash | Flash - clock and cache test  | 1      | 0      | OK     | 0.12               |
| KW24D-GCC_ARM | KW24D         | tests-mbed_hal-flash | Flash - erase sector          | 1      | 0      | OK     | 0.05               |
| KW24D-GCC_ARM | KW24D         | tests-mbed_hal-flash | Flash - init                  | 1      | 0      | OK     | 0.11               |
| KW24D-GCC_ARM | KW24D         | tests-mbed_hal-flash | Flash - mapping alignment     | 1      | 0      | OK     | 0.06               |
| KW24D-GCC_ARM | KW24D         | tests-mbed_hal-flash | Flash - program page          | 1      | 0      | OK     | 0.05               |
+---------------+---------------+----------------------+-------------------------------+--------+--------+--------+--------------------+

mbed test -m kw24d -t gcc_arm -n tests-mbed_drivers-flashiap

+---------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| target        | platform_name | test suite                  | test case                 | passed | failed | result | elapsed_time (sec) |
+---------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| KW24D-GCC_ARM | KW24D         | tests-mbed_drivers-flashiap | FlashIAP - init           | 1      | 0      | OK     | 0.05               |
| KW24D-GCC_ARM | KW24D         | tests-mbed_drivers-flashiap | FlashIAP - program        | 1      | 0      | OK     | 0.16               |
| KW24D-GCC_ARM | KW24D         | tests-mbed_drivers-flashiap | FlashIAP - program errors | 1      | 0      | OK     | 0.05               |
+---------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+

@mmahadevan108
Copy link
Contributor

Do we need changes to the linker scripts to add MBED_APP_START and MBED_APP_SIZE defines?

@maclobdell
Copy link
Contributor

@dlfryar I agree with Mahesh that the MBED_APP_START, etc are needed. Please try it out and either push extra commits to the branch for this PR (preferred, I think) or submit another pull request. I can help test if you want. Use mbed-os-example-bootloader and mbed-os-example blinky to test out the bootloader.

@studavekar
Copy link
Contributor

/morph test

@mbed-bot
Copy link

mbed-bot commented Sep 4, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1190

All builds and test passed!

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

#4968 (comment) - can you add those please

@dlfryar-zz
Copy link
Contributor Author

@mmahadevan108 @maclobdell @0xc0170 PR updated with linker script additions. Please review.

@theotherjimmy
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1355

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants