@adbridge adbridge released this Jun 13, 2018 · 4676 commits to master since this release

Assets 2

We are pleased to announce the mbed OS 5.9.0 release is now available.

Summary

Mbed OS 5.9 is releasing device statistics APIs, which allow you to gather critical device information. This is a first step toward giving you power to remotely diagnose the health of IoT devices deployed in the field. Mbed OS 5.9 focuses on mainlining and increasing adoption of low power features, such as the microsecond ticker, low power timer, sleep manager and real time clock APIs. Power consumption is one of the most important design requirements for IoT devices. Meeting the power budget is becoming challenging as the systems today include more sensors, faster responses and more connectivity. With the introduction of and improvements to key low power features, such as the microsecond ticker, low power timer, sleep and real time clock APIs, meeting tight power requirements and designing low power systems becomes straightforward.

This release also continues our efforts to add comprehensive documentation for Mbed OS. Our ongoing efforts in this area include adding documentation to our connectivity, RTOS and storage APIs, as well as information about our configuration system.

In addition, this release contains many minor fixes and enhancements and brings support for 135 target development boards. In the release note below, we summarize some of the key updates to Mbed OS that are part of the Mbed OS 5.9.0 release.

Core OS

Device statistics APIs

A major challenge in deploying and managing remote IoT devices is monitoring the overall health of the system. Identifying individual mis-performing devices can be challenging when many devices are deployed, and the cost of sending a technician to test devices in the field is very high. We are releasing device statistics APIs in Mbed OS 5.9 to enable device analytics on Mbed OS platforms. Our vision is to continue developing the APIs that provide information about the device and system health and to develop APIs that enable transmission of device health information over the network, so you can remotely monitor the health of your IoT device. The device statistics APIs in the Mbed OS 5.9 release are well-defined APIs that you can use to retrieve OS statistics and device information, such as memory usage, Thread information, stack usage data and runtime CPU load information. The implementation of these APIs is modularized, and it provides multiple APIs for each category. You can enable these separately using build time configuration. For more information, please visit https://os.mbed.com/docs/v5.9/reference/mbed-statistics.html.

Low power features

The Mbed OS 5.9.0 release mainlines several low power features to enable long battery life and reduces power consumption to solve key challenges for embedded devices. The low power features were developed over the past few Mbed OS releases and adopted by Mbed Partners. Many platforms now support these features.

  • Tickless RTOS scheduler: In tickless operation, you don’t have to make the tradeoff between the high frequency timing interval, which consumes more power, and the low frequency timing interval, which results in suboptimal time keeping. The scheduler schedules the next timer tick in response to the next event rather than the fixed timer tick. For more information, please visit https://os.mbed.com/docs/v5.9/reference/tickless.html.

  • Improvements to the microsecond ticker and low power timer: Tickers or timers are hardware timers that track small amounts of time​. Mbed OS supports two types of tickers, the high-resolution microsecond ticker​ and the low power ticker​. We have made several improvements to tickers. For example, our ticker now returns native value and configuration data, and the Mbed OS driver is responsible for frequency conversion. For more information, please visit https://os.mbed.com/docs/v5.9/reference/microsecond-ticker.html.

  • Improvements to sleep modes: To save power, Mbed OS goes in sleep modes during idle loop. The sleep modes turn off the system clock when peripherals relying on it are not in use and saves power. We are making several improvements to sleep modes to enhance their functionality. We have APIs to demonstrate the peripheral status during sleep mode. The device must be able to wake up from specified sources. For sleep mode, it is any interrupt, and for deep sleep mode, it is watchdog, low power ticker or GPIO. For more information, please visit https://os.mbed.com/docs/v5.9/reference/power-management.html​.

  • Real time clock: The phrase "real time" differentiates this clock from a ​typical digital clock, which generates electrical pulses but doesn’t keep track of seconds or minutes. The real time clock enables the system to track time in human units​. Usually, it continues to count over system resets, and the date and time remain correct even after you reset the system​. RTC is often supplied with a dedicated battery to keep track of time during power loss. We have improved the real time clock support in Mbed OS. It now continues to keep counting during ​software reset, sleep modes and shutdown mode​. Also, the improved accuracy is now below 100 ms. ​Please visit https://os.mbed.com/docs/development/v5.9/rtc.html for more information.

Improvements in error codes and error handling

We are improving our error codes and error reporting infrastructure to ease development by enabling a standard way to describe, debug and communicate error scenarios. Improved error handling implementation provides features such as standardized error code and error status definitions, error handling APIs for error construction, error reporting with thread context, the ability to retrieve previous errors and the ability to save errors to the file system. We designed the error reporting APIs to be used from any context, such as ISR or Threads. The implementation also provides mechanisms for extending the error status definitions to report application specific errors and to extract information from error status values. For more information, please visit https://os.mbed.com/docs/v5.9/reference/error-handling.html.

Connectivity

Ethernet MAC API (EMAC)

We have introduced a new EMAC API to bring unified support for Wi-Fi and Ethernet interfaces and make drivers independent of underlying network stacks. The new changes make it possible to use the same driver with both Nanostack and LWIP Stack. Working closely with our Silicon partners, the new EMAC feature is already available on boards and modules from Nuvoton, NXP, Realtek, Renesas, ST and u-blox.

Security

Update to Mbed TLS 2.10.0

Mbed TLS 2.10.0 provides support for the ARIA cipher and cipher suite for TLS (RFC-6209). Mbed TLS also contains optimizations to reduce code size or RAM, including an option for smaller AES tables. In addition, it contains many security and bug fixes over Mbed TLS 2.7.1, which was included with Mbed OS 5.8. You can access the Mbed TLS feature at https://github.com/ARMmbed/mbed-os/tree/master/features/mbedtls.

Targets and tools

Thanks to our Partners’ hard work, Mbed OS 5.9 added 14 new target platforms and now supports 135 target platforms. We’ll continue to add targets in our biweekly patch releases as Partners work with us on support.

Mbed CLI update and Python 3 support

We have updated all Mbed OS tools to be compatible with both Python 2 and Python 3 environments. This gives greater flexibility on system requirements because previous installations of Mbed OS required the use of Python 2. You can now choose which Python environment fits your needs. Our tools are backward compatible with all current and previous versions of Mbed OS for Python 2. It is only compatible with Mbed OS 5.9 and later for Python 3.

We have also added a built-in serial terminal feature to Mbed CLI. You can invoke the serial terminal using the “mbed sterm” command. For more information, please visit https://os.mbed.com/docs/v5.9/tools/debugging.html#serial-terminal

Known issues

We publish Mbed OS as a collection of modules on GitHub. Issues are raised in the specific repositories and then tracked internally. The purpose of this document is to provide a single view of the outstanding key issues that have not been addressed for this release. As such, it is a filtered and reviewed list based on priority and potential effect. Each item summarizes the problem and includes any known workarounds, along with a link to the GitHub issue (if applicable). We welcome any comments or proposed solutions.

For more information about an issue, contact us on the forum.

Handshake Messages are not fragmented as per MaxFragmentLength Extension Negotiation.

  • Description: "Once a maximum fragment length other than 2^14 has been successfully
    negotiated, the client and server MUST immediately begin fragmenting
    messages (including handshake messages) to ensure that no fragment
    larger than the negotiated length is sent. " In Mbed TLS only the application data is fragmented and the handshake messages are not.
  • Workaround: Disable MaxFragmentLength Extension Negotiation.
  • Reported Issue: ARMmbed/mbedtls#387
  • Priority: MAJOR

IP addresses in the X.509 certificate subjectAltNames

  • Description: Parsing IP addresses in the X.509 certificate subjectAltNames is not supported yet. In certificate chains relying on IP addresses in subjectAltNames a BADCERT_CN_MISMATCH error is returned.
  • Workaround: merge branch https://github.com/ARMmbed/mbedtls/tree/iotssl-602-san-ip into your copy of Mbed TLS before building the application. It is still in EXPERIMENTAL stage, use it on your own responsibility!
  • Reported Issue: Issue reported by a customer in email.
  • Priority: MAJOR

Mismatch of root CA and issuer of CRL not caught

  • Description: The x509_crt_verifycrl() function ignores the CRL, when the CRL has an issuer different from the subject of root CA certificate.
  • Workaround: Make sure that the issuer of the CRL and the root CA certificate's subject are the same before passing them to x509_crt_verifycrl().
  • Reported Issue: Reported by a partner.
  • Priority: MAJOR

Mbed TLS causes stack overflow in Mbed OS targets

  • Description: The stack memory usage of some Mbed TLS features is higher than 4 KB, which may cause stack overflow errors when running in constrained embedded environments with mbed OS which are particularly limited in RAM.
  • Workaround: The amount of stack required is very dependent on the application, and what features of the library it chooses to use. Obviously more intensive, demanding tasks may not be possible on more limited, constrained devices, so we recommend designing for the limitations of the target device, or choosing a device suitable for your application.
  • Reported Issue: ARMmbed/mbed-os-example-tls#14
  • Priority: MAJOR

Commissioner does not retransmit message when it receives retransmission

  • Description: There are two issues with DTLS handshake retransmission. Firstly, the joiner fails to correctly parse received records because it does not correctly handle queued retransmissions received. Secondly, the commissioner may cause a deadlock as it does not retransmit certain records after it receives retransmission as instructed in RFC6347 Section 4.2.4.
  • Workaround: There is no known workaround.
  • Reported Issue: openthread/openthread#1207
  • Priority: MAJOR

Self Test Failure with Some Hardware Accelerators

  • Description: Most HW acceleration engines (if not all) require the parameters to be from contiguous memory.
    All the self tests use test vectors that are defined in the .bss section, which means these are not contiguous. This causes the self test to possibly fail, when implementing HW accelerted engines.
  • Workaround: There are no known workarounds
  • Reported Issue: Reported by the development team.
  • Priority: MAJOR

uVisor does not support nested interrupts

  • Description: When running an application with uVisor enabled, nested interrupts are not supported.
  • Workaround: There is no available workaround at the moment.
  • Reported Issue: ARMmbed/uvisor#345
  • Priority: Major

On ARMv7-M targets supporting uVisor, the RTOS runs with the same privilege of uVisor

  • Description: The current architecture of uVisor and of RTX require the RTOS to run with the same privilege of uVisor. As such, the RTOS is considered as trusted.
  • Workaround: There is no available workaround at the moment.
  • Reported Issue: ARMmbed/uvisor#235
  • Priority: Major

Realtek RTL8195AM does not define flash algorithms for uvision

  • Description: No flashing support in uvision for Realtek RTL8195AM
  • Workaround: Use drag-n-drop programming
  • Reported Issue: #4651
  • Priority: Minor

Traceback occurs when ran with factory default firmware on Realtek RTL8195AM

  • Description: When running mbed-ls on the Realtek board a traceback happens
  • Workaround: Version of mbedls in Mbed OS does not have this fix. Workaround is to install mbedls from master until a release is made.
  • Reported Issue: ARMmbed/mbed-ls#276
  • Priority: Major

Export project to Keil - device not present

  • Description: cmsis-pack-manager assumes that all information is stored in a device tag. According to the official CMSIS Pack specification however this is not the case. cmsis-pack-manager needs to be updated to index by variant as well as device. We currently do not know how many devices are affected by this issue.
  • Workaround: In this case manual selection of the device and flash programming algorithm may be required.
  • Reported Issue: ARMmbed/mbed-os-example-cellular#41
  • Priority: Major

OnboardCellularInterface used incorrectly

  • Description: This example invokes methods on OnboardCellularInterface that are not part of the CellularBase abstract class. This means it may not work if OnboardCellularInterface is not a PPPCellularInterface.
  • Workaround: None
  • Reported Issue: ARMmbed/mbed-os-example-cellular#54
  • Priority: Major

WiFi connection fails with client compiled by IAR IDE

  • Description: Mbed connector client example programs do not connect to api.connector.mbed.com when built in the IAR Embedded Workbench IDE. It works when you build using Mbed CLI.
  • Workaround: Do not export mbed connector example for IAR Embedded Workbench.
  • Reported Issue: ARMmbed/mbed-os-example-client#355
  • Priority: Major

Client fails to connect via UDP when binary is compiled by Online Compiler

  • Description: using UDP fails when binary is compiled with Online compiler but works if compiled with mbed-cli GCC_ARM .
  • Workaround: Use TCP based connections
  • Reported Issue: ARMmbed/mbed-os-example-client#357
  • Priority: Major

Realtek RTL8195AM - CMSIS-RTOS error: ISR Queue overflow

  • Description: Realtek RTL8195AM does not maintain a long running connection to Mbed device connector. The error manifests as an ISR Queue overflow.
  • Workaround: None
  • Reported Issue: #5640
  • Priority: Major

Makefile export fails to build larger project in Windows

Online exports of projects overriding mbed-os configuration fail

  • Description: Exports from the online compiler of projects that override mbed-os configuration do not work
  • Workaround: Export offline using Mbed CLI
  • Reported Issue: #6428
  • Priority: Major

NXP LPC17xx targets do not have Ethernet driver

  • Description: Ethernet driver interface was refactored for Mbed OS 5.9. LPC17xx is not yet ported.
  • Workaround: Wait for Mbed OS 5.9.1
  • Reported Issue: ARMmbed/mbed-os-example-sockets#12
  • Priority: Major

ARM_CM3DS_MPS2 targets do not have Ethernet driver

  • Description: Ethernet driver interface was refactored for Mbed OS 5.9. ARM_CM3DS is not yet ported.
  • Workaround: no
  • Reported Issue: -
  • Priority: Major

Nanostack Border router does not build for Nucleo F429ZI

  • Description: Ethernet driver interface was refactored for Mbed OS 5.9. Nanostack border router was not refactored, so new versions of F429ZI drivers are not yet in use.
  • Workaround: wait for fix in the Border Router application
  • Reported Issue: ARMmbed/nanostack-border-router#113
  • Priority: Major

BLE Security Manager initializes cryptographic hardware on NRF52840

  • Description: The CC310 Cryptocell hardware is initialized when using the BLE Security Manager on NRF52840; if the application is already using mbedTLS prior to this initialization it might yield undefined behaviour
  • Workaround: Do not use the BLE Security Manager on NRF52840 if mbedTLS should be used by the application, or make sure it is initialized first and that mbedtls_platform_setup()/mbedtls_platform_teardown() are not called subsequentially
  • Reported Issue: #7069
  • Priority: Major

Exporting to GCC in Windows does not work with Python 3

  • Description: Exporting projects to GCC makefiles in Windows does not work when using Python 3.
  • Workaround: Wait for Mbed OS 5.9.1
  • Reported Issue: ARMmbed/mbed-cli#694
  • Priority: Major

Ublox ODIN W2 crashing with latest client

  • Description: Ublox ODIN W2 board is often crashing when using Mbed Cloud Client. Root cause unclear.
  • Workaround: Wait for fix
  • Reported Issue: Internal issues: ONME-3665, ONME-3672, ONME-3692
  • Priority: Major

All NRF52832 based devices (e.g. NRF52_DK) have sleep/deepsleep functionality disabled.

  • Description: sleep/deepsleep functionality will be enabled in Mbed OS 5.9.1 release
  • Workaround: Wait for Mbed OS 5.9.1 (fix available here #7073)
  • Reported Issue: #7168
  • Priority: Major

Cortex-A release and develop profiles for ARMCC build fail

  • Description: Bug in CMSIS ARMCC header file causing ARMCC builds with -O3 to fail (release and develop profiles are affected)
  • Workaround: use develop profile for ARMCC or wait for Mbed OS 5.9.1
  • Reported Issue: #7065
  • Priority: Major

Fixes and changes

7030
Fix lwIP PPP glue

7023
Add new examples to example list for CI.

7019
Made lwip memory configuration more specific for NXP targets

7015
Fix build for MBT_ODIN_W2 and MBED_CONNECT_ODIN when using WiFi

7012
Enable DeviceKey class reference for Doxygen

7009
Bring in improved HAL APIs to master

7003
Add devicekey example to examples list

7000
Add warning about FEATURE_UVISOR being deprecated

6993
CPU Stats test - Increased wait time to allow device to sleep

6983
Standardized Error Handling and Error Codes

6981
Remove ns_event_loop_thread_start() from NDInterface and ThreadInterface connect()

6960
LoRaWAN: Message flags correction

6959
Remove unused ITM implementation from NRF51 series

6932
BLE privacy, signing, persistent security database

6927
Cellular: AT debugging improved

6917
Travis: Quick name-fix for warnings reported by Astyle

6910
LoRaWAN: Adding acquisition of metadata, backoff and a cancel_send() API

6905
Lora: Remove obsolete FEATURE_COMMON_PAL flags

6901
events: Introduce API to query how much time is left for delayed event

6892
LoRaWAN: Wrong type of message check

6886
Corrected iteritems py2/3 compatability in test_api.py

6882
lwIP: Enable TCP out-of-order processing

6878
Add low power timer fallback for platforms without RTC

6876
Nanostack release for Mbed OS 5.9

6875
Lora: Fix battery_level callback

6866
fatfs: Add erase disk to format

6863
Update Mbed TLS to version 2.9.0

6862
Fastmodels support: add FVP_MPS2 targets to mbed os

6857
CPU Statistics

6847
Merge feature-emac branch into master

6839
Lora: fix AU915 build

6833
mbed test: add argument --ignore to allow passing in mbedignore patterns

6826
Reorganize SoftDevices for NRF52 series

6823
tools: Remove long-deprecated build_everything.py

6821
System stats - API addition

6819
Remove example update scripting from tools

6808
LoRa: State machine work

6800
Lora: Fix LoRaMacCrypto asserts

6798
Fix bug in MBR for NRF52 series

6796
Fix us_ticker for NRF52 series

6795
Thread stats API

6794
Cryptocell 310 support

6792
Cellular: Add dynamic alloc and destruction to easycellular

6791
Add POSIX fcntl flag support

6784
Add common define MBED_ALL_STATS_ENABLED to enable all statistics

6781
tools: Refactor notification API

6779
[MAX32625PICO] Add new platform

6772
littlefs: Map LFS_ERR_CORRUPT to EILSEQ

6771
Fix UART initialization for NRF52

6765
Cellular: Fix AT Handler compile warning

6757
Implement BufferedBlockDevice

6750
LoRaWAN: Memory corruption due to band mishandling

6749
Add platform setup and teardown calls to mbedtls tests

6748
nrf5x: Fix assert test on SERIAL_RESERVED_CHAR_MATCH

6747
Support RTOS-less secure image build with Cortex-M23/M33

6746
Fix vector table relocation for NRF52

6744
Cellular: Changed ATHandler yield to wait

6741
Lora: Split add_mac_command() into separate methods

6721
Fix bug in Nordic SDK 14.2 I2C driver

6720
Fix bug in Nordic SDK 14.2 SPI driver

6717
Fix NRF52 SPI pin initialization

6711
Cleanup TARGET_NRF5 and TARGET_NRF5x

6708
Add Hardware CRC HAL API specification

6702
Cellular: Fix to prefer IPv6 single stack with fallback to IPv4

6700
mbr: Added assertions for overlapping partitions

6698
Make poll() use RTOS tick count

6696
CM3DS Maintenance Pull Request: Cleaning

6693
Make event queue use RTOS tick count

6692
Lora: Remove singleton pattern

6691
Cellular fixes

6682
Fixed cellular unittests

6677
Cellular: fixed null pointer bug in cellular fsm

6665
Greentea netsocket more tests

6663
Use SingletonPtr in Nanostack HAL

6657
add ncs36510 fib and trim generation

6654
Add missing carriage returns to fault handler

6653
Stop lwIP using us_ticker

6642
Device key implementation

6632
cellular: Error messages

6630
Support secure/non-secure flash IAP for Cortex-M23/M33

6629
Cellular: add plmn for CellularConnectionFSM

6628
Lora: Make automatic uplink message configurable

6627
Nanostack hal timer shortcut

6626
Cellular: Separated context activation in CellularConnectionFSM.

6595
Fix typo with NVStore

6592
Updates tools to be runnable in Python 3

6590
AStyle addition to travis

6588
[IOTCELL-741] Separating public data structures

6587
LoRa: Internal include paths corrected

6586
Lora: Introduce new receive API which returns port and flags

6577
Get rid of FEATURE_COMMON_PAL and FEATURE_NANOSTACK

6570
Cellular: add detach from the network

6569
Lora: small fixes

6566
LoRa: Stack cleanup

6559
Implement FlashSimBlockDevice - flash simulated block device over RAM

6547
Update Nordic NRF52 based targets to SDK 14.2

6536
Add handling for synchronized low power tickers

6534
Update idle loop to reduce calls to suspend

6530
Exclude files like .main.cpp from builds

6496
standard non-blocking NetworkInterface::connect

6486
Thread class tz

6483
CMSIS: Add TrustZone functions

6480
NVStore: add the allocate_key API (instead of set_alloc_key)

6441
Disable all deprecated exporters

6440
Remove supertarget

6433
Enabl-able Python 3 tools testing in Travis CI

6427
Added SerialWireOutput to mbed namespace

6418
Add an option to use LowPowerTimer for poll

6411
Stack refactoring

6408
Add overloaded get_erase_size API with address parameter to BlockDevice

6402
Renaming Ublox library for mbed cellular framework

6388
NVStore: key management enhancements

6336
fatfs: Update error code mapping

6309
Peek API to view data of buffer without popping

6279
LoRa refactoring

6273
Update cmsis/rtx to version 5.3

6270
Add parameter in tools settings to show error/warning as Link

6239
Interrupt in pin mode

6238
Remove windup behavior from break_dispatch

7132
Tool: Use TerminalNotifier in Mbed 2 release

7092
Additional fixes for running Python 3 in Windows

7089
BLE fixes (SM whitelist creation, Nordic scatter file fix, missing TLS initialisation)

7078
Windows pytest fixes

7074
Remove redundant Cryptocell libraries

7072
Edit warning about FEATURE_UVISOR being deprecated

7070
set the tolerance to 5% if NO_SYSTICK is enabled

7060
UBLOX_C027: init us_ticker in the target initialization

7059
OS version not update in mbed_stats

7053
Fix RTOS-less build failed with cmsis/RTE_Components.h

7050
Fix for filename capture not working

7035
tests-mbed_hal-common_tickers: Fix increment test case implementation

6914
build: fix notifier typo and passing to builds API

7144
Add configuration options to enable CMAC in mbedtls by default

7135
Update Mbed TLS to version 2.10.0

Testing

We designed Mbed OS to significantly reduce cost and time for embedded software development by providing a production-quality toolset and code. We are committed to delivering high-quality code working across all supported boards and platforms. To ensure all the features of code meet our quality control requirements, we have built an automated testing environment and processes that perform rigorous testing on every line of code. The continuous integration framework is a highlight of our testing framework.

Continuous integration framework:

The continuous integration framework ensures that every new feature and change in Mbed OS is tested, so that:

  • For every new feature, we create tests that we then deliver to our partners. For every board to be Mbed Enabled, we need our partners to successfully conduct these tests.
  • Partners must test the changes on their boards before submitting pull requests (PRs) on GitHub.
  • Once the PR is submitted, the Mbed OS gatekeepers manually review the code to ensure it meets the coding guidelines and code standards.
  • Once approved by gatekeepers, the code goes through the automated test infrastructure, which tests the submitted code across multiple platforms using three toolchains: IAR, ARM and GCC.
  • During the testing phase, we select the combination of boards and devices that support a variety of peripherals, MCU cores and features for maximum coverage.
  • To ensure the Mbed OS code is compatible with all the IDEs, we test that the code is exporting properly to all the compilers.
  • We merge the PRs only if the all the above procedures are successful.

Below are the summary results for testing conducted for Mbed OS 5.9.0:

  • Total test time is 28,182 hours on actual development boards.

  • We have added 208 new test cases since the Mbed OS 5.8.0 release to test new and existing features on Mbed OS. The number of total test cases is 1,024.

  • The total number of binaries built since the Mbed OS 5.8.0 release is 40,561,560.

We plan to share more details about testing processes, such as our out-of-box testing coverage and system testing, in upcoming release blogs.

Using the release

Arm Mbed CLI

When you create a new program, Mbed CLI automatically imports the latest Mbed OS release. Each release includes all the components: code, build tools and IDE exporters. If you want to update your Mbed OS version or existing program to Mbed OS 5.9.0, run the CLI command mbed update mbed-os-5.9

Arm Mbed Online Compiler

When you create a new program, the Mbed Online Compiler automatically uses the latest Mbed OS release. If you want to update your Mbed OS version, right click on mbed-os library, and press update.

You can also fetch the latest version of the Mbed OS 5.9 release from the mbed-os GitHub repository using the branch “mbed-os-5.9”.