Skip to content

Add nRf52840 target #3841

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

Merged
merged 31 commits into from
Mar 23, 2017
Merged

Add nRf52840 target #3841

merged 31 commits into from
Mar 23, 2017

Conversation

nvlsianpu
Copy link
Contributor

@nvlsianpu nvlsianpu commented Feb 27, 2017

Description

Introduce NRF52840_DK target. It include support for nRF52840 SoC basing on nRF5 SDK v 13. Source codes of new target are on path https://github.com/nvlsianpu/mbed/tree/nRF52840_target/targets/TARGET_NORDIC/TARGET_NRF5_SDK13 and https://github.com/nvlsianpu/mbed/tree/nRF52840_target/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5_SDK13. Code was developed on base (driver implementation, BLE port) of previous targets/TARGET_NORDIC/TARGET_NRF5 (so it's planed to move at last nRF52832 target to introduced code base).

target board web: http://www.nordicsemi.com/eng/Products/nRF52840-Preview-DK

requested mbedls support: ARMmbed/mbed-ls#160

Status

READY

Code review recommendations:

Be aware of that is based on the copy of the [NRF5] ports (on path https://github.com/nvlsianpu/mbed/tree/nRF52840_target/targets/TARGET_NORDIC/TARGET_NRF5). It is recommended rather to review differences between both implementation than only pulled code.

@nvlsianpu
Copy link
Contributor Author

nvlsianpu commented Feb 27, 2017

test results IAR:

+-----------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| target          | platform_name | test suite                                                                           | result | elapsed_time (sec) | copy_method |
+-----------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test                        | OK     | 15.7               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test_default                | OK     | 13.67              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate               | OK     | 15.26              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async                | OK     | 21.61              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK     | 17.97              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_selection                    | OK     | 15.06              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK     | 13.9               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK     | 14.87              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-control_type                      | OK     | 16.91              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK     | 14.49              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK     | 15.58              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK     | 13.43              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK     | 16.07              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK     | 15.7               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-rtos-rtx-target_cortex_m-tests-memory-heap_and_stack                         | OK     | 12.91              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-events-queue                                                           | OK     | 20.78              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-integration-basic                                                      | OK     | 12.66              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-c_strings                                                 | OK     | 15.3               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-dev_null                                                  | OK     | 14.88              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-echo                                                      | OK     | 26.38              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-generic_tests                                             | OK     | 13.86              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-lp_timeout                                                | OK     | 22.62              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-race_test                                                 | OK     | 14.77              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-rtc                                                       | OK     | 24.1               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-stl_features                                              | OK     | 14.57              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-ticker                                                    | OK     | 46.67              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-timeout                                                   | OK     | 24.27              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_drivers-wait_us                                                   | OK     | 24.32              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_functional-callback                                               | OK     | 15.12              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_functional-callback_big                                           | OK     | 15.28              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_functional-callback_small                                         | OK     | 15.0               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_functional-functionpointer                                        | OK     | 13.72              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbed_hal-lp_ticker                                                     | OK     | 22.3               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-attributes                                              | OK     | 15.93              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-call_before_main                                        | OK     | 15.88              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-cpp                                                     | OK     | 15.3               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-div                                                     | OK     | 14.21              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-static_assert                                           | OK     | 15.46              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-basic                                              | OK     | 25.88              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-isr                                                | OK     | 18.02              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-mail                                               | OK     | 14.2               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-malloc                                             | OK     | 28.03              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-mutex                                              | OK     | 23.1               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-queue                                              | OK     | 16.5               | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-semaphore                                          | OK     | 22.59              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-signals                                            | OK     | 17.91              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-threads                                            | OK     | 18.98              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-timer                                              | OK     | 23.72              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-mbedtls-selftest                                                       | OK     | 19.16              | shell       |
| NRF52840_DK-IAR | NRF52840_DK   | mbed-os-tests-netsocket-ip_parsing                                                   | OK     | 15.33              | shell       |
+-----------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 50 OK

test results ARMCC:

+-----------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| target          | platform_name | test suite                                                                           | result | elapsed_time (sec) | copy_method |
+-----------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test                        | OK     | 15.53              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test_default                | OK     | 13.37              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate               | OK     | 15.09              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async                | OK     | 21.36              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK     | 17.8               | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_selection                    | OK     | 13.6               | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK     | 14.05              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK     | 14.06              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-control_type                      | OK     | 16.73              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK     | 16.59              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK     | 15.32              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK     | 13.16              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK     | 15.61              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK     | 15.36              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-rtos-rtx-target_cortex_m-tests-memory-heap_and_stack                         | OK     | 12.72              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-events-queue                                                           | OK     | 20.4               | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-integration-basic                                                      | OK     | 12.34              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-c_strings                                                 | OK     | 15.03              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-dev_null                                                  | OK     | 14.42              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-echo                                                      | OK     | 26.77              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-generic_tests                                             | OK     | 13.63              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-lp_timeout                                                | OK     | 22.4               | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-race_test                                                 | OK     | 14.68              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-rtc                                                       | OK     | 23.81              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-stl_features                                              | OK     | 14.18              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-ticker                                                    | OK     | 46.51              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-timeout                                                   | OK     | 23.98              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-wait_us                                                   | OK     | 24.06              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-callback                                               | OK     | 14.79              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-callback_big                                           | OK     | 15.08              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-callback_small                                         | OK     | 14.76              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-functionpointer                                        | OK     | 13.56              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbed_hal-lp_ticker                                                     | OK     | 24.42              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-attributes                                              | OK     | 15.11              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-call_before_main                                        | OK     | 14.78              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-cpp                                                     | OK     | 14.98              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-div                                                     | OK     | 12.5               | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-static_assert                                           | OK     | 12.86              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-basic                                              | OK     | 25.5               | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-isr                                                | OK     | 17.81              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-mail                                               | OK     | 13.98              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-malloc                                             | OK     | 27.3               | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-mutex                                              | OK     | 22.81              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-queue                                              | OK     | 16.18              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-semaphore                                          | OK     | 19.81              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-signals                                            | OK     | 17.68              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-threads                                            | OK     | 18.67              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-timer                                              | OK     | 23.34              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-mbedtls-selftest                                                       | OK     | 18.82              | shell       |
| NRF52840_DK-ARM | NRF52840_DK   | mbed-os-tests-netsocket-ip_parsing                                                   | OK     | 14.92              | shell       |
+-----------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+

test results GCC_ARM (4.9 and 5.4):

+---------------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| target              | platform_name | test suite                                                                           | result | elapsed_time (sec) | copy_method |
+---------------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test                        | OK     | 15.93              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test_default                | OK     | 13.66              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate               | OK     | 15.37              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async                | OK     | 21.68              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK     | 18.06              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_selection                    | OK     | 13.88              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK     | 13.97              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK     | 14.35              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-control_type                      | OK     | 16.7               | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK     | 17.47              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK     | 15.3               | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK     | 13.43              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK     | 15.93              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK     | 16.07              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-rtos-rtx-target_cortex_m-tests-memory-heap_and_stack                         | OK     | 13.26              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-events-queue                                                           | OK     | 20.62              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-integration-basic                                                      | OK     | 12.69              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-c_strings                                                 | OK     | 15.46              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-dev_null                                                  | OK     | 15.49              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-echo                                                      | OK     | 25.87              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-generic_tests                                             | OK     | 14.16              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-lp_timeout                                                | OK     | 22.63              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-race_test                                                 | OK     | 14.89              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-rtc                                                       | OK     | 23.92              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-stl_features                                              | OK     | 14.69              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-ticker                                                    | OK     | 46.8               | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-timeout                                                   | OK     | 24.35              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_drivers-wait_us                                                   | OK     | 24.47              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-callback                                               | OK     | 15.07              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-callback_big                                           | OK     | 15.37              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-callback_small                                         | OK     | 15.13              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_functional-functionpointer                                        | OK     | 13.76              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbed_hal-lp_ticker                                                     | OK     | 24.69              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-attributes                                              | OK     | 15.33              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-call_before_main                                        | OK     | 15.63              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-cpp                                                     | OK     | 15.37              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-div                                                     | OK     | 13.11              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-mbed-static_assert                                           | OK     | 13.26              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-basic                                              | OK     | 26.16              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-isr                                                | OK     | 18.22              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-mail                                               | OK     | 14.46              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-malloc                                             | OK     | 27.59              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-mutex                                              | OK     | 23.1               | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-queue                                              | OK     | 16.69              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-semaphore                                          | OK     | 21.15              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-signals                                            | OK     | 18.1               | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-threads                                            | OK     | 19.08              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedmicro-rtos-mbed-timer                                              | OK     | 23.78              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-mbedtls-selftest                                                       | OK     | 20.76              | shell       |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | mbed-os-tests-netsocket-ip_parsing                                                   | OK     | 15.57              | shell       |
+---------------------+---------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 50 OK



@nvlsianpu
Copy link
Contributor Author

@anangl @pan- @0xc0170 @screamerbg

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2017

"./mbed-client/mbed-client/m2mbase.h", line 470: Error: #20: identifier "sn_nsdl_dynamic_resource_parameters_s" is undefined

@JanneKiiskila Client broken for this PR? Can you have a look? or tag someone who could help

@JanneKiiskila
Copy link
Contributor

For mbed-os 5.4 you must use the oob-branch for the client - available in; ARMmbed/mbed-os-example-client#190.

Yes, the mbed-client-c / coap / NSSDL re-structuring causes a break.

/**
* Register the next tick.
*/
static void register_next_tick() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix formatting in the HAL files if its similar to this one.

should be:

static void register_next_tick() 
{
    \\body
}

// the RTC1 keeps running.
// This code is very short 20-38 cycles in the worst case, it shouldn't
// disturb softdevice.
__disable_irq();
Copy link
Contributor

Choose a reason for hiding this comment

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

can't use here critical section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's inherited form [NRF5] port. I do not want to change this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please update this for all nRF hal integrations to use mbed_critical_section_enter ... mbed_critical_section_exit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you mean core_util_critical_section_enter instead of mbed_critical...?

@@ -0,0 +1,537 @@
/*
* Copyright (c) 2013 Nordic Semiconductor ASA
Copy link
Contributor

Choose a reason for hiding this comment

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

2017 in the new fileS or 2016 as I noticed some files were commited in that year?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is based on the copy of the [NRF5] ports which was committed in such dates.

PinName mosi, PinName miso, PinName sclk, PinName ssel)
{
int i;
for (i = 0; i < SPI_COUNT; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is here an intention to init all spi ? Should not be just to init the one that is being invoked on (obj argument) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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


nrf_uart_int_disable(UART_INSTANCE, NRF_UART_INT_MASK_RXDRDY |
NRF_UART_INT_MASK_TXDRDY);
#if DEVICE_SERIAL_ASYNCH
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be:

// preprocessor in the line beginning
#if AAAAA
   //code here
#endif

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2017

Look at travis failure please :


  File "tools/test/targets/target_test.py", line 40, in test_device_name

    (target.name, target.device_name))

AssertionError: Target NRF52840_DK contains invalid device_name nRF52840_xxAA ```

@nvlsianpu
Copy link
Contributor Author

What is tested by mentioned target_test.py? It looks like I have to add a description to:
.\tools\export\iar\iar_definitions.json
.\tools\arm_pack_manager\aliases.json
Em I right?

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2017

What is tested by mentioned target_test.py? It looks like I have to add a description to:
.\tools\export\iar\iar_definitions.json
.\tools\arm_pack_manager\aliases.json
Em I right?

To make exporters work, yes please add them. To answer the question about this script file target_test.py, it checks if device_name is correctly set (that device is in the cmsis packs).

@tommikas
Copy link
Contributor

tommikas commented Mar 1, 2017

@0xc0170 Client isn't compiling because /features/FEATURE_COMMON_PAL in the PR branch is much too old. The mbed-client-testapp pr-head build currently doesn't do the auto-merge between target and PR branches.

@nvlsianpu
Copy link
Contributor Author

I''ll rebase it onto latest master.

@nvlsianpu
Copy link
Contributor Author

nvlsianpu commented Mar 1, 2017

@0xc0170

.\tools\export\iar\iar_definitions.json
.\tools\arm_pack_manager\aliases.json

To make exporters work, yes please add them. To answer the question about this script file target_test.py, it checks if device_name is correctly set (that device is in the cmsis packs).

What with .\tools\arm_pack_manager\index.json . Was it generated automatically? I'm sure that It's needed to add nRF52840_xxAA device inside it (incorporated in https://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.11.1.pack)

Propose of update this: nvlsianpu#2

@theotherjimmy
Copy link
Contributor

@nvlsianpu Try mbed export --update-packs. That should pick up the new device name by re-creating the index.json and aliases.json from scratch.

@theotherjimmy
Copy link
Contributor

@nvlsianpu When was that pack published?

@nvlsianpu
Copy link
Contributor Author

nvlsianpu commented Mar 2, 2017

@theotherjimmy The pack was published around week 50, 2016.

On my machine attempt to update indicates errors and hangs:

Exception in thread Thread-33:
Traceback (most recent call last):
  File "c:\python27_11\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 50, in run
    self.func(url)
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 222, in _generate_index_helper
    pack = self.pdsc_to_pack(d)
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 117, in pdsc_to_pack
    largest_version(content) + ".pack")
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 30, in largest_version
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 30, in <lambda>
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
ValueError: invalid literal for int() with base 10: '1-1'
...
Exception in thread Thread-39:
Traceback (most recent call last):
  File "c:\python27_11\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 50, in run
    self.func(url)
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 222, in _generate_index_helper
    pack = self.pdsc_to_pack(d)
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 117, in pdsc_to_pack
    largest_version(content) + ".pack")
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 30, in largest_version
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 30, in <lambda>
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
ValueError: invalid literal for int() with base 10: '0-2'

[ ERROR ] file http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/mspkeil/latest/exports/TexasInstruments.MSP432P4xx_DFP.pdsc
'NoneType' object has no attribute 'url'
Exception in thread Thread-29:
Traceback (most recent call last):
  File "c:\python27_11\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 50, in run
    self.func(url)
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 222, in _generate_index_helper
    pack = self.pdsc_to_pack(d)
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 117, in pdsc_to_pack
    largest_version(content) + ".pack")
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 30, in largest_version
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
  File "C:\mbed\mbed-os-example-blinky\mbed-os\tools\arm_pack_manager\__init__.py", line 30, in <lambda>
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
ValueError: invalid literal for int() with base 10: '0-dev5'

Generating Index 146/164

#endif

gpio_mask_t m_gpio_initialized;
gpio_cfg_t m_gpio_cfg[GPIO_PIN_COUNT];
Copy link
Contributor

Choose a reason for hiding this comment

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

These two could be marked as "static".


static gpio_irq_handler m_irq_handler;
static uint32_t m_channel_ids[GPIO_PIN_COUNT] = {0};
gpio_mask_t m_gpio_irq_enabled;
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be marked as "static".


void gpio_mode(gpio_t *obj, PinMode mode)
{
MBED_ASSERT(obj->pin <= GPIO_PIN_COUNT);
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be <, not <=. But since the pin number is checked in gpio_init(), perhaps it would be better to replace this line with MBED_ASSERT(obj->pin != (PinName)NC); to keep consistency with gpio_read() and gpio_write().


void gpio_dir(gpio_t *obj, PinDirection direction)
{
MBED_ASSERT(obj->pin <= GPIO_PIN_COUNT);
Copy link
Contributor

Choose a reason for hiding this comment

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

see gpio_mode()


#include "port_api.h"
#include "pinmap.h"
#include "gpio_api.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be unnecessary here.

}
break;
case PIN_OUTPUT:
for (i = 0; i<31; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

see PIN_INPUT case


#define FPU_EXCEPTION_MASK 0x0000009F

void sleep(void)
Copy link
Contributor

Choose a reason for hiding this comment

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

This function should be renamed to hal_sleep() to reflect the recent changes in sleep_api.h.

}
}

void deepsleep(void)
Copy link
Contributor

Choose a reason for hiding this comment

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

This function should be renamed to hal_deepsleep() to reflect the recent changes in sleep_api.h.


void deepsleep(void)
{
sleep();
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be hal_sleep().

// alternative source of RTOS ticks.
#if defined(TARGET_MCU_NRF51822)

#include "toolchain.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be updated to mbed_toolchain.h.

@nvlsianpu
Copy link
Contributor Author

nvlsianpu commented Mar 3, 2017

I'm done with changes. @0xc0170 @theotherjimmy : It's possible that you will update index.json & aliases.json?

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 6, 2017

It's possible that you will update index.json & aliases.json?

What's needed?

@nvlsianpu
Copy link
Contributor Author

@0xc0170 What I's needed to update is described in description of nvlsianpu#2

@pan-
Copy link
Member

pan- commented Mar 7, 2017

@theotherjimmy It (mbed export --update-packs) doesn't work on my machine either, I got the following error:

Traceback (most recent call last):
  File "c:\python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Work\core-os\nordic\mbed\tools\arm_pack_manager\__init__.py", line 50, in run
    self.func(url)
  File "C:\Work\core-os\nordic\mbed\tools\arm_pack_manager\__init__.py", line 97, in cache_file
    stderr.write(e.reason)
TypeError: expected a string or other character buffer object

Replacing stderr.write(e.reason) into stderr.write(str(e.reason)) yield the same error observed by @nvlsianpu :

Exception in thread Thread-33:
Traceback (most recent call last):
  File "c:\python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Work\core-os\nordic\mbed\tools\arm_pack_manager\__init__.py", line 50, in run
    self.func(url)
  File "C:\Work\core-os\nordic\mbed\tools\arm_pack_manager\__init__.py", line 222, in _generate_index_helper
    pack = self.pdsc_to_pack(d)
  File "C:\Work\core-os\nordic\mbed\tools\arm_pack_manager\__init__.py", line 117, in pdsc_to_pack
    largest_version(content) + ".pack")
  File "C:\Work\core-os\nordic\mbed\tools\arm_pack_manager\__init__.py", line 30, in largest_version
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
  File "C:\Work\core-os\nordic\mbed\tools\arm_pack_manager\__init__.py", line 30, in <lambda>
    reverse=True, key=lambda v: map(int, v.split(".")))[0]
ValueError: invalid literal for int() with base 10: '1-1'

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 10, 2017

@theotherjimmy Can you help with the above? #3841 (comment)

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 20, 2017

Travis failure, please fix:

======================================================================

FAIL: test_device_name (__main__.TestTargets)

Assert device name is in a pack

----------------------------------------------------------------------

Traceback (most recent call last):

  File "tools/test/targets/target_test.py", line 40, in test_device_name

    (target.name, target.device_name))

AssertionError: Target NRF52840_DK contains invalid device_name nRF52840_xxAA

@nvlsianpu
Copy link
Contributor Author

nvlsianpu commented Mar 21, 2017

@theotherjimmy n Could you fix this problem with mbed export --update-packs (#3841 (comment)). I want add pack for nRF52840 mcu which is brand new for mbed-os.

@theotherjimmy
Copy link
Contributor

#3931 fixed your mbed export --update-packs issue.

@theotherjimmy
Copy link
Contributor

(it's merged)

nvlsianpu and others added 12 commits March 22, 2017 08:38
- bad number of pin from nRF52840 ,
- bad type of mask of gpio for nRF52940
- typo (object.h)
- revert abort func. to spi_master driver
- update twi_master driver to the newest (e8527f65e90eee6a4dd48ca55d3fc051a556320a master SDK nRF5)
- fix typso, renaming, repharse commnets.
- fix alghoritm of white/id lists setup functions in nRF5xGap class.
Gap::setAddress implementation
Gap::getPermittedTxPowerValues implemnetation
- whitelistin setup modifies identitiy flag and omits address' type.
- 128 bits service's UUID discovered by a GATT client was shifted.
- not possible to connect while being scanning.
- not possible to scanning while being connected.
    for sd >= 3 whitelisting is now setups into setWhitelist method
- Gap::setAddress could failed
- Gap::getWhitelist wron implemenation
…d_stack@IAR by

increasing heap size for IAR. Corected initial MSP for ARMCC.
…te reads and writes (the latter are used in I2CEeprom module used in CI tests, and this caused that tests-i2c-api were failing). These operations (single byte transfers) are not possible to achieve with the driver from nrf5 SDK (nrf_drv_twi), so the new implementation uses TWI HAL only.
corrected spi_init() to properly handle re-initialization… ARMmbed#3842
Change path of include from '\' to '/', which works on linux as well.
@nvlsianpu
Copy link
Contributor Author

@theotherjimmy, @c1728p9 thanks. I rebased the PR branch against master. Exporter's patch solves the travis error. cc @0xc0170 @pan-

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 22, 2017

Thanks @nvlsianpu. I restarted jenkins CI as the failure was hw related, waiting now for all CI to complete

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1718

All builds and test passed!

@adbridge adbridge merged commit 12eb5b7 into ARMmbed:master Mar 23, 2017
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets

3841: Add nRf52840 target ARMmbed/mbed-os#3841
3992: Introducing UBLOX_C030 platform. ARMmbed/mbed-os#3992

Fixes and Changes

3951: [NUCLEO_F303ZE] Correct ARDUINO pin ARMmbed/mbed-os#3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK ARMmbed/mbed-os#4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions ARMmbed/mbed-os#3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the  ARMmbed/mbed-os#3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 ARMmbed/mbed-os#4003
4012: STM32: Correct I2C master error handling ARMmbed/mbed-os#4012
4020: NUCLEO_L011K4 remove unsupported tool chain files ARMmbed/mbed-os#4020
4065: K66F: Move bss section to m_data_2 Section ARMmbed/mbed-os#4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file ARMmbed/mbed-os#4014
4030: [STM32L0] reduce IAR heap and stack size for small targets ARMmbed/mbed-os#4030
4109: NUCLEO_L476RG : minor serial pin update ARMmbed/mbed-os#4109
3982: Ticker - kl25z bugfix for handling events in the past ARMmbed/mbed-os#3982
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.

10 participants