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

Enable low-power ticker and Sleep for FastModels #10124

Merged
merged 6 commits into from Apr 9, 2019

Conversation

Projects
None yet
7 participants
@jamesbeyond
Copy link
Contributor

commented Mar 15, 2019

Description

This PR enabled low-power ticker and Sleep HAL API for FastModels.
with enabling of low-power and Sleep API would allow FastModels run more greentea tests.

Pull request type

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
@@ -74,9 +74,10 @@ Case cases[] = {
Case("1 s delay during deepsleep (attach_us)", test_deepsleep<AttachUSTester<LowPowerTimeout>, 1000000, LONG_DELTA_US>,
greentea_failure_handler),
#endif

#if !defined(__ARM_FM) //FastModels not support time drifting test

This comment has been minimized.

Copy link
@jeromecoutant

jeromecoutant Mar 15, 2019

Contributor

Is it OK to remove some tests because they are not passing....?

This comment has been minimized.

Copy link
@0xc0170

0xc0170 Mar 15, 2019

Member

Not sure how is it not supported?

@ARMmbed/mbed-os-hal to review

This comment has been minimized.

Copy link
@jamesbeyond

jamesbeyond Mar 15, 2019

Author Contributor

It is same story as #10030

For partner's targets/platforms, which will be used real life production. we are not allow them to skip tests, if they can't make them pass. The tests are mean to check that all platform comply with mbed HAL API.

FastModel it is a software simulator for Arm platform/cores. mean to be used as a tool for testing or early stage development. It is will never be used for any real IoT products.
They can simulator how ARM core works. One of issue for software simulator is they running on your host PC, they can't grantee the timing accuracy as microelectronics.

So the exception is just for the software models

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Mar 15, 2019

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Mar 15, 2019

@jamesbeyond

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2019

Attched the GreenTea test results:

| target          | platform_name | test suite                                                                   | result | elapsed_time (sec) | copy_method |
|-----------------|---------------|------------------------------------------------------------------------------|--------|--------------------|-------------|
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-basic_test                        | OK     | 9.75               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-basic_test_default                | OK     | 9.33               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_async_validate               | OK     | 9.55               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_control_async                | OK     | 9.75               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK     | 9.62               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_selection                    | OK     | 10.84              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK     | 9.46               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK     | 10.27              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-control_type                      | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK     | 9.74               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK     | 10.64              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK     | 9.56               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK     | 9.36               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK     | 10.34              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_skip                         | OK     | 9.4                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-nvstore-tests-nvstore-functionality                         | OK     | 16.16              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-buffered_block_device                     | OK     | 9.38               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-flashsim_block_device                     | OK     | 9.55               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-general_block_device                      | OK     | 9.52               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-heap_block_device                         | OK     | 9.47               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-mbr_block_device                          | OK     | 9.91               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-util_block_device                         | OK     | 9.62               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-kvstore-static_tests                                  | OK     | 10.22              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-kvstore-tdbstore_whitebox                             | OK     | 9.49               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-events-queue                                                           | OK     | 9.84               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-events-timing                                                          | OK     | 38.64              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-integration-basic                                                      | OK     | 9.97               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-c_strings                                                 | OK     | 9.97               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-crc                                                       | OK     | 9.74               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-dev_null                                                  | OK     | 11.56              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-echo                                                      | OK     | 20.47              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-flashiap                                                  | OK     | 9.7                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-generic_tests                                             | OK     | 9.32               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-lp_ticker                                                 | OK     | 9.86               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-lp_timeout                                                | OK     | 10.2               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-lp_timer                                                  | OK     | 9.84               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-race_test                                                 | OK     | 9.7                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-sleep_lock                                                | OK     | 9.49               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-stl_features                                              | OK     | 9.59               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-ticker                                                    | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-timeout                                                   | OK     | 10.35              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-timer                                                     | OK     | 9.82               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-timerevent                                                | OK     | 9.74               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-callback                                               | OK     | 10.53              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-callback_big                                           | OK     | 9.43               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-callback_small                                         | OK     | 9.75               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-functionpointer                                        | OK     | 9.54               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-common_tickers                                                | OK     | 9.9                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-critical_section                                              | OK     | 10.42              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-flash                                                         | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-lp_ticker                                                     | OK     | 9.37               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-minimum_requirements                                          | OK     | 10.93              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-mpu                                                           | OK     | 9.71               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-pinmap                                                        | OK     | 9.59               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-rtc_time                                                      | OK     | 9.93               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-rtc_time_conv                                                 | OK     | 119.01             | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-sleep                                                         | OK     | 9.45               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-sleep_manager                                                 | OK     | 9.9                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-sleep_manager_racecondition                                   | OK     | 11.88              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-stack_size_unification                                        | OK     | 10.06              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-ticker                                                        | OK     | 10.23              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-us_ticker                                                     | OK     | 9.53               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-circularbuffer                                           | OK     | 9.49               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-critical_section                                         | OK     | 9.86               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-error_handling                                           | OK     | 9.43               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-filehandle                                               | OK     | 9.62               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-sharedptr                                                | OK     | 9.34               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-singletonptr                                             | OK     | 10.4               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-stream                                                   | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-system_reset                                             | OK     | 10.91              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-transaction                                              | OK     | 9.55               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-attributes                                              | OK     | 9.46               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-call_before_main                                        | OK     | 9.39               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-cpp                                                     | OK     | 9.39               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-div                                                     | OK     | 10.32              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-static_assert                                           | OK     | 9.44               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-condition_variable                                 | OK     | 9.38               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-event_flags                                        | OK     | 9.41               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-heap_and_stack                                     | OK     | 9.93               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-kernel_tick_count                                  | OK     | 9.67               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-mail                                               | OK     | 9.94               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-malloc                                             | OK     | 10.49              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-memorypool                                         | OK     | 9.72               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-mutex                                              | OK     | 9.6                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-queue                                              | OK     | 9.51               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-rtostimer                                          | OK     | 10.09              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-semaphore                                          | OK     | 9.73               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-signals                                            | OK     | 10.09              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-threads                                            | OK     | 9.63               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedtls-multi                                                          | OK     | 10.28              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedtls-selftest                                                       | OK     | 15.46              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-network-l3ip                                                           | OK     | 10.6               | default     |
mbedgt: test suite results: 92 OK
@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2019

@jamesbeyond I really liked the response for why the test is being skipped for this target (#10124 (comment))

Would you mind ammending the commit that adds that line so that the commit history has that information?

@cmonr cmonr added needs: work and removed needs: review labels Mar 27, 2019

@cmonr

cmonr approved these changes Mar 27, 2019

Copy link
Contributor

left a comment

Awaiting commit update

jamesbeyond added some commits Mar 15, 2019

FastModel: refactor us_ticker code, make names intuitive
 - reanme US_TICKER_TIMER1 to US_TICKER_COUNTER
 - reanme US_TICKER_TIMER2 to US_TICKER_INTERRUPT
FastModel: Skip low-power ticker time drifting test for models
FastModels are a software simulator for Arm platform/cores.
They mean to be used as a tool for testing or early prototype stage development.
Due to the nature of software simulator can't grantee the timing accuracy like HW.
So time drifting test is skipped for software models.

@jamesbeyond jamesbeyond force-pushed the jamesbeyond:fm_sleep branch from aff545b to 229e30a Apr 3, 2019

@jamesbeyond

This comment has been minimized.

Copy link
Contributor Author

commented Apr 3, 2019

Hi, the commits been updated. Could you review again?
@cmonr @0xc0170 @ARMmbed/mbed-os-test

@0xc0170
Copy link
Member

left a comment

One small addition - SPDX identifier to new files (sleep_api.c file). Otherwise LGTM

WIll schedule CI as soon as license is fixed in two files

@jamesbeyond

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

@0xc0170
SPDX identifier license added, Cheers!

@0xc0170

0xc0170 approved these changes Apr 8, 2019

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Apr 8, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 8, 2019

Test run: FAILED

Summary: 1 of 13 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter
@jamesbeyond

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

Checking the failed exporter test, it failed at UBLOX_EVK_ODIN_W2_make_armc6, which is not related to the changes I bring in. Digging a little deeper into the log, I found it failed due to license issue:

armclang: error: Failed to check out a license.
Unable to connect to the license server. Check that ARMLMD_LICENSE_FILE is set correctly, and the license server is available.
armclang: note: 
Information about this error is available at: http://ds.arm.com/support/lic56/m96
 General licensing information is available at: http://ds.arm.com/support/licensing/
 If you need further help, provide this complete error report to your supplier or license.support@arm.com.
 - ARMLMD_LICENSE_FILE: '8225@armcc.licenses.mbedcloudtesting.com'
 - LM_LICENSE_FILE: unset
 - ARM_TOOL_VARIANT: unset
 - ARM_PRODUCT_PATH: unset
 - Product location: /usr/local/ARMCompiler6.11/sw/mappings
 - Toolchain location: /usr/local/ARMCompiler6.11/lib/tt_default/bin
 - Selected tool variant: sitelicense
armclang: note: 
 - Checkout feature: rvct_site5
 - Feature version: 5.0201810
 - Flex error code: -96
Product: ARM Compiler 6.11 Sitelicense
Component: ARM Compiler 6.11
Tool: armclang [5d3b4200]

make[1]: *** [mbed-os/targets/TARGET_STM/sleep.o] Error 1
make[1]: *** Waiting for unfinished jobs....
armclang: error: Failed to check out a license.
@cmonr

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

CI job restarted: jenkins-ci/mbed-os-ci_exporter

ARMc6 license issue.

@0xc0170 0xc0170 merged commit 3a4f591 into ARMmbed:master Apr 9, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9131 cycles (-880 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Apr 9, 2019

@jamesbeyond jamesbeyond deleted the jamesbeyond:fm_sleep branch Apr 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.