Skip to content

Release candidate for mbed-os-5.13.0-rc3 #10818

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 13 commits into from
Jun 19, 2019
Merged

Conversation

adbridge
Copy link
Contributor

No description provided.

Patater and others added 13 commits June 12, 2019 16:15
The BLE stack from SoftDevice is not actively maintained and
has issues when used with Nordic SDK v15.
APP interrupts are masked on SoftDevice BLE stack only, but we
have switched to Cordio stack on NRF52 targets.
The config "cryptocell310-acceleration" is set by MCU_NRF52840
but individual targets may have crytocell310 feature disabled.
Minor tweaks to fix ARM C 5 compatibility.

Pushing "ns_list.h" include to first makes sure "ns_types.h" is included
first, meaning it gets to define `__STDC_LIMIT_MACROS` before the first
include of <stdint.h>, which ensures that UINT8_MAX etc are defined.
Prevent compilation issues when someone has included <stdint.h> before
a header file that needs to include <ns_list.h>.

Some toolchains like ARM C 5 will not provide UINT_FAST8_MAX in C++
unless __STDC_LIMIT_MACROS is defined, and if this was not defined the
first time <stdint.h> was included, it's too late.

We can get the maximum value for our unsigned list offset by casting -1
to it, thanks to modulo arithmetic.
When using Mbed Crypto's PSA Entropy Injection feature on Mbed OS, it is
not required to opt out of having entropy sources added to your entropy
contexts by default (via MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES).

As integrated in Mbed OS, MBEDTLS_PSA_INJECT_ENTROPY is compatible with
actual entropy sources. PSA entropy injection is implemented using the
standard Mbed TLS NV Seed feature, and is as compatible with other
entropy sources as the standard Mbed TLS NV Seed feature which does
support entropy mixing.
Mbed TLS now enables PSA APIs by default on all targets. It's not
necessary to explicitly enable MBEDTLS_PSA_CRYPTO_C, as that can be
gotten from the Mbed TLS config.h.

However, many PSA targets depend on `-DMBEDTLS_PSA_CRYPTO_C` being
defined by the Mbed OS json configuration system and are not yet
properly including the Mbed TLS configuration; for these PSA targets,
warnings may remain until this issue is fixed.

Avoiding re-definition will eliminate warnings like the following, when
building mbed-os-example-blinky:

    Compile [ 14.5%]: pal_client_api_empty_intf.c
    [Warning] pal_client_api_intf.h@35,0: "PSA_SUCCESS" redefined
    Compile [ 14.6%]: pal_client_api_intf.c
    Compile [ 14.7%]: DeviceKey.cpp
    Compile [ 14.9%]: pal_internal_trusted_storage_intf.c
    [Warning] pal_internal_trusted_storage_intf.c@45,9: 'psa_its_set' is deprecated: PS specific types should not be used [-Wdeprecated-declarations]
    Compile [ 15.3%]: val_attestation.c
    [Warning] client.h@40,0: "PSA_VERSION_NONE" redefined
    <..>
    Compile [ 33.3%]: asn1parse.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.5%]: aes.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.6%]: asn1write.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.7%]: psa_crypto.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.8%]: blowfish.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.9%]: camellia.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.0%]: base64.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.2%]: ccm.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.3%]: chacha20.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.4%]: chachapoly.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.5%]: cipher_wrap.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.6%]: cmac.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.7%]: cipher.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.9%]: bignum.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 35.0%]: des.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 35.1%]: dhm.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 35.2%]: ctr_drbg.c
    <..>
    Compile [ 70.9%]: EthernetInterface.cpp
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 71.0%]: InternetSocket.cpp
    Compile [ 71.1%]: L3IPInterface.cpp
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 71.2%]: NetworkInterface.cpp
@adbridge adbridge requested a review from 0xc0170 June 12, 2019 15:28
@adbridge
Copy link
Contributor Author

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 12, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 13, 2019

restarted test job

@softagram-bot
Copy link

This impact report was requested by @TommiTallgren - get yours at https://softagram.com/pull-request-bot

Softagram Impact Report for pull/10818 (head commit: bf676c1)

Target: K64F

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

⭐ Details of Dependency Changes

details of dependency changes - click for full size
(Open in Softagram Desktop for full details)

📄 Full report

Give feedback on this report to [email protected]

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 13, 2019

@LDong-Arm the only nrf52 change here is uart enablement, could this affect lpticker? Can you retest quickly the lpticker test (can also fetch the binaries from this PR). It's only ARMCC6

The retest failed as well the same test case :/

@LDong-Arm
Copy link
Contributor

@LDong-Arm the only nrf52 change here is uart enablement, could this affect lpticker? Can you retest quickly the lpticker test (can also fetch the binaries from this PR). It's only ARMCC6
The retest failed as well the same test case :/

Yes the failure can be reproduced locally on NRF52_DK and NRF52840_DK with ARMC6

@LDong-Arm
Copy link
Contributor

@0xc0170 Yes, the issue is gone when the UART change (#10753) is reverted. I'm trying to figure out the reason.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 14, 2019

@desmond-blue Any updates?

@desmond-blue
Copy link
Contributor

I am able to reproduce it, but have no idea so far...still investigating.

@adbridge
Copy link
Contributor Author

@desmond-blue any progress?

@kimlep01
Copy link

kimlep01 commented Jun 14, 2019

I tested locally with NRF52840_DK and ARMC6:
with latest master test passes
with this release-candidate branch test fails

@desmond-blue
Copy link
Contributor

Tried adding timer.reset() before start the timer and the test passes on my local test. It looks like not related to UART configuration, still digging.

@desmond-blue
Copy link
Contributor

I changed the alignment bytes of delay_loop_code refer here, and the test passes locally.
Since the comments say "Timing seems to depend on alignment", would anyone know if this change is acceptable and how this affects the timing, thanks.

@adbridge
Copy link
Contributor Author

Restarted ci

@OPpuolitaival
Copy link
Contributor

I needed to restart the greentea test

@mbed-ci
Copy link

mbed-ci commented Jun 18, 2019

Test run: FAILED

Summary: 2 of 11 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter
  • jenkins-ci/mbed-os-ci_greentea-test

@adbridge
Copy link
Contributor Author

Restarted exporters

@ARMmbed ARMmbed deleted a comment from OPpuolitaival Jun 19, 2019
@adbridge
Copy link
Contributor Author

Note: Test results for this PR contain one issue #10849 .
This will be taken as a known issue for the release. CI results have been updated accordingly to allow this PR to be merged.

@adbridge adbridge merged commit 92a58df into mbed-os-5.13 Jun 19, 2019
@0xc0170 0xc0170 removed the needs: CI label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.