Skip to content

mbed-os-6.0.0

Compare
Choose a tag to compare
@adbridge adbridge released this 04 Jun 09:30
· 4680 commits to master since this release
165be79

We are pleased to announce the Mbed OS 6.0.0 release is now available.

Summary

The Arm Mbed team is delighted to announce the release of Mbed OS 6, our first major release in almost four years. We have invested heavily to add the features required for today’s IoT devices, and to back those features up with state of the art tooling to simplify development of IoT and embedded products.

This release includes:

  • Stable and mature APIs, alongside the introduction of the 'Experimental' tag to indicate new APIs that are subject to change.
  • Board support for the most popular boards.
  • The ability to support custom hardware.
  • The option of adding a community supported board.
  • Further enhancements to the Bare Metal Profile.
  • Integration with the AWS SDK, with other major cloud integrations to follow.

There have also been some significant changes to our BLE offering, as summarised below.

BLE changes

#12674, #12676, #12742, #12730

We have removed all deprecated APIs in BLE and adjusted other APIs to resolve dependencies on the deprecated ones. We have also removed target-specific stacks that are incompatible with the latest APIs.

Item Change Migration
SoftDevice stack Superseded/Removed * For nRF52* targets, please use the Cordio stack, which is already enabled by default.
* nRF51* targets will be unsupported in future Mbed OS releases.
Maxim stack Removed BLE feature on Maxim targets is disabled until an updated version becomes available.
Non-SIG services based on third-party standard:
DFUService
UARTService
EddystoneConfigService
EddystoneService
URIBeaconConfigService
iBeacon
Removed If needed, you can take services from Mbed OS 5.15 and update the code, or implement your own based on specifications.
Legacy APIs in BLE.h Superseded See functions marked with MBED_DEPRECATED() in Mbed OS 5.15's BLE.h for migration advice in comments.
Legacy APIs in GattCharacteristic.h Superseded See functions marked with MBED_DEPRECATED_SINCE() in Mbed OS 5.15's GattCharacteristic.h for migration advice in comments.
Legacy APIs in GattClient.h Superseded See functions marked with MBED_DEPRECATED() in Mbed OS 5.15's GattClient.h for migration advice in comments.
Legacy APIs in SecurityManager.h Superseded See functions marked with @deprecated in Mbed OS 5.15's SecurityManager.h. Applications should implement the SecurityManager::EventHandler interface and register it with SecurityManager::setSecurityManagerEventHandler(...).
Legacy APIs in Gap.h Superseded See functions marked with MBED_DEPRECATED_SINCE() in Mbed OS 5.15's Gap.h for migration advice in comments.
Gap::getMinAdvertisingInterval()
Gap::getMinNonConnectableAdvertisingInterval()
Gap::getMaxAdvertisingInterval()
Removed The values are constant and target-agnostic. Use ble::adv_interval_t::min() and ble::adv_interval_t::max().
Gap::getDeviceName()
Gap::getAppearance()
Removed Device Name and Appearance are set by the application, which should already know the values.
Gap::setDeviceName()
Gap::setAppearance()
Superceded Use AdvertisingDataBuilder to add Device Name and Appearance to the payload, then apply the payload with Gap::setAdvertisingPayload().
Gap::getPreferredConnectionParams()
Gap::setPreferredConnectionParams()
Removed (temporarily) We plan to move them to GattServer in the future.
BLEProtocol::AddressType_t
BLEProtocol::AddressBytes_t
Superseded Replaced by
ble::peer_address_type_t
ble::own_address_type_t
ble::address_t
To decide which ones to use, see the functions you want to call.
Gap::Whitelist_t
BLEProtocol::Address_t
Changed Replaced by ble::whitelist_t where each item on a whitelist is ble::whitelist_t::entry_t.
This is used by
Gap::setWhitelist()
SecurityManager::generateWhitelistFromBondTable().
Gap::ConnectionParams_t Superseded The latest GAP API requires full-fleged ble::ConnectionParameters.
ble::central_privay_configuration_t Typo fixed Renamed to ble::central_privacy_configuration_t.

Supported compilers

This release has been tested and is known to fully support the following compilers:

  • ARMC v6.13
  • GCC v9

Other versions of the compilers may not work as expected.

Migration Guide

This section lists specific changes in this release that may need special attention.

DeviceKey Root of Trust generation refactored

12385

Summary of changes

Removed automatic creation of the Root of Trust when DeviceKey::generate_derived_key(...) API is used.
You must generate or inject the key before the first use of the DeviceKey API.

Impact of changes

DeviceKey is not automatically generated anymore. This might impact test application that expect the key to be present, but do not explicitly generate it.

Migration actions required

Application developers must be aware that if their device does not have Root of Trust permanently injected, which is usually true in the development phase, they must generate a key before the first use of the DeviceKey API. Two options exist for key generation:

  • Generate a key using TRNG sources by calling DeviceKey::device_generate_root_of_trust()
  • If the device does not have a TRNG available, inject a secure key by calling DeviceKey::device_inject_root_of_trust(...)

Cellular: Move string_to_pdp_type method to CellularContext

12214

Summary of changes

string_to_pdp_type is only used in CellularContext classes, and having the conversion method in CellularContext means it can also be used to check the non-standard Non-IP PDP type string.

Impact of changes

None, if the application uses existing cellular classes. If you have implemented your own CellularContext class, then see Migration actions required below.

Migration actions required

Classes deriving from CellularContext must implement a new function:

virtual const char *get_nonip_context_type_str() = 0;

This API has already been implemented in AT_CellularContext though, so the current code does not change.

Blockdevice config changes to make it possible to run littlefs filesystem tests

12143

Summary of changes

Moves BlockDevice configurations used by SystemStorage as BlockDevice defaults. This makes it possible to use the defaults to execute littlefs filesystem tests.

Adds SPIF/QSPIF/SPIFReduced- and SDBlockDevice specific app configs for making it possible to run the aforementioned tests.

Thread: remove constructors deprecated in 5.1

12141

Summary of changes

Remove the immediate-start constructors deprecated in Mbed OS 5.1.

Impact of changes

Code using the old constructors will no longer compile.

Migration actions required

Code using immediate-start Thread constructors must be changed to use the Thread::start method.

Remove unsupported folder

12128

Summary of changes

Mbed OS has been carrying the unsupported directory for a long time, to give users a form of USB stack. This is no longer needed, since Mbed OS has its own implementation of USB.

Impact of changes

As the name suggest the 'unsupported' directory was not supported, but as it was there the community was free to use any of the functionality in it. So in theory it is a breaking change, even if the code was never properly supported.

Migration actions required

Removed functionality was never supported and its use was not recommended. If you used USB device mode, please port your code to use the supported version from the Drivers directory. If you need any other features please consider contributing them to Mbed.

Cellular: Refactor cellular variable visibilities

12123

Summary of changes

Cellular: Refactor cellular variable visibilities:

  • Some variables were public despite being used only internally.
  • Refactored variables to the end of class definitions.
  • Removed duplicate _property_array from CellularDevice
  • Changed _impl methods to protected.

Impact of changes

This can potentially be a breaking change, but none of the existing Mbed OS cellular targets required any changes.

Migration actions required

If you want to use a cellular variable marked as private, inform @ARMmbed/mbed-os-wan and we can review the case.

ATHandler refactoring

12122

Summary of changes

  • ATHandler is part of Cellular's public API, so we moved it to the /API folder.
  • Some functions and variables are refactored to be private/protected where applicable.
  • Virtual cmd_start() (and destructor) method(s) devirtualised because it was not needed.
  • Unittests updated to reflect changes.

Impact of changes

  • ATHandler is part of Cellular's public API, so we moved it to the /API folder.
  • Some functions and variables are refactored to be private/protected where applicable.
  • Virtual cmd_start() (and destructor) method(s) devirtualised because it was not needed.

Migration actions required

Visibility of some methods has been changed in ATHandler. This should not cause any issues if they were not used (as they shouldn't have been).

If the include path has been used correctly for ATHandler.h there are no cahnges needed.

ONME-4433 SocketAddress::operator== should also check port

12120

Summary of changes

SocketAddress::operator== did not check the port number. Adding this check can be considered as a breaking change. All greentests and unitests were checked and fixed.

Expose target_offset and header_offset parameters in targets.json

12081

Summary of changes

The app_offset and header_offset parameters have always been a part of the target configuration parameters. However, they were intercepted by the tools and never exposed to the application. The new FOTA (update client next generation) functionality requires these parameters in the code as well. So this PR adds them to the targets.json file. The only result of this PR is the addition of these two macros into the code.

Note that the tools already expose the macros APPLICATION_ADDR and HEADER_ADDR having the same values. However, these macros are only available when the application is built with the bootloader. If it isn't, these macros aren't available, hence this PR.

This change is required for new FOTA client.

Enabling small C library option and deprecating uARM toolchain

12068

Summary of changes

  1. In Mbed OS 2-region memory model, ARM Std and Microlib scatter files are common
    more info on https://github.com/ARMmbed/mbed-os/blob/master/docs/design-documents/platform/memory-model/ram_memory_model.md,
    so replaced ARM Std scatter file 1-region memory model with Microlib scatter file 2 region memory model.
  2. Moved the "__aeabi_assert" function from Microlib boot code file to mbed_retarget file so that it can be available for both RTOS Microlib and bare metal to resolve the undefined symbol linker issue.
  3. Copied ARM Microlib boot code into ARM std boot code and guarded with __MICROLIB. This is required in order to build an RTOS application with Microlib.
  4. Added a new target config "supported_c_libs" in targets.json and build tools to check if the selected "default_lib" is supported for the selected toolchain. If not, the build tool will raise an exception.
  5. Added the new test suite for testing the build tool changes for default_lib and supported_c_libs.
  6. PR changes tested with blinky and blinky bare metal examples and greentea bare metal tests run locally.

Impact of changes

These changes deprecate the uARM toolchain.

Migration actions required

As uARM toolchain is deprecated, you need to redefine a supported_c_libs configuration with "small" for arm toolchain on the target in targets.json to enable Microlib support, for example:

"supported_c_libs": {
"arm": ["std", "small"],
"gcc_arm": ["std", "small"],
"iar": ["std"]
}

You also need to change the scatter file to the 2-region memory model see more info.

Instead of -t uARM, use default_lib with "small" in mbed_app.json configuration for ARMC6 toolchain.

cmsis: remove arm math

12055

Summary of changes

This file was not needed; should be part of DSP. The functionality is part of the library provided
by CMSIS.

I would like to test this, for all devices. This header file should be removed in 6.0.0 as we do not provide DSP library. Thus I set this as Major update.

Fixes #12054

Impact of changes

Applications should use CMSIS DSP package. As the order of includes is not defined in our tools, this might cause an error - hard to tell which CMSIS math header was actually included. The removed math header we used in this code base was an older version.

Migration actions required

Use CMSIS DSP release (not part of Mbed OS at the moment) - the header file CMSIS math is included there.

SharedPtr: add nullptr constructor

12048

Summary of changes

For consistency with std::shared_ptr, and mbed::Callback, and as a
potential optimisation aid, give SharedPtr a distinct constructor for
nullptr.

Impact of changes

Optimise clearing by adding nullptr overload.

Migration actions required

The added nullptr overload means SharedPtr(NULL) or SharedPtr(0) will no longer work; you must use SharedPtr(nullptr) or SharedPtr().

Add MBED_FALLTHROUGH attribute

12032

Summary of changes

C++17 standardised [[fallthrough]] for switch statements to suppress compiler warnings. Provide access to it, or compiler-specific alternatives.

Impact of changes

MBED_FALLTHROUGH attribute added to mbed_toolchain.h - a portable equivalent for C++17's [[fallthrough]].

Migration actions required

None

NVStore: already deprecated implementation removed

12017

Summary of changes

NVStore: already deprecated implementation removal.

Impact of changes

People are advised to use KVStore.

Migration actions required

No migration path available.

Remove deprecated FunctionPointer class

11997

Summary of changes

  • Deprecated class FunctionPointer has been removed.

Impact of changes

  • Any code using FunctionPointer will no longer compile.

Migration actions required

  • Any remaining FunctionPointer users should switch to Callback.

CellularBase/AT_CellularBase removal

11996

Summary of changes

Removed CellularBase and AT_CellularBase from cellular stack and updated both code and unittests accordingly. Cellular drivers in Mbed OS have been updated.

APN lookup and SMS features are now disabled by default.

Impact of changes

Earlier cellular device properties were handled in AT_CellularBase class. After this change, they are correctly handled in the AT_CellularDevice class. The properties are always modem specific and must therefore be handled in the AT_CellularDevice class, which is common for all contexts using it.

CellularBase has been completely removed so those using it must now switch to use CellularInterface instead.
Disabling SMS will save ~4,5kB and APN lookup about ~2kB

Migration actions required

Cellular modem drivers must be updated (done for targets in Mbed OS) by removing references to CellularBase.

CellularBase must be changed to CellularInterface if still in use. (It was already typedef'ed so no other changes needed)

If the application needs SMS or APN lookup, they need to be enabled in mbed_app.json
(cellular.use-apn-lookup: true or cellular.use-sms: true).

TDBStore refactoring

11987

Summary of changes

TDBStore no longer requires Flash based block device.

Storage related test improvements and small fixes

11986

Summary of changes

SlicingBlockDevice does no longer accepts both parameters as zero, or size as zero. SlicingBlockDevice(block, 0,0) used to create a block device that took up the whole block device. There is no sense in doing this, and it has most probably been a programming error if used. Therefore, the constructor now does MBED_ASSERT() if both parameters, start and stop point to the same value. Effectively this prevents creating a slice that has size of zero, or takes the full block device.

Impact of changes

You can no longer create a SlicingBlockDevice that has size of zero, or take the full size of the underlying block device.

Migration actions required

No migration required for code that uses SlicingBlockDevice as intended.

UnbufferedSerial: Introduce the class to replace RawSerial

11961

Summary of changes

Add the UnbufferedSerial class to provide unbuffered I/O access.

Use it instead of RawSerial. See documentation section for more details.

MbedCRC and CRC HAL revisions (6.0 redo)

11957

Summary of changes

The MbedCRC class has been improved and optimised.

Impact of changes

We've added a global JSON configuration drivers.crc-table-size controlling table usage, and individual uses can be size-optimised via template parameters. However, some changes are backwards-incompatible.

Migration actions required

  • The special-case handling of POLY_32BIT_REV_ANSI has been removed - the same result can be obtained via POLY_32BIT_ANSI.
  • CRCs smaller than 8 bits now return results in the standard position at the bottom of the register - previously they were shifted with random bits at the bottom.
  • The previous precomputed table for POLY_16BIT_IBM had errors - this has been corrected, but CRC results will be different from the previous software calculation (but will match any hardware calculation)

minimal-printf: Enable using a target configuration parameter

11891

Summary of changes

Add ability to enable Minimal printf using configuration parameter.

A new configuration parameter target.printf_lib has been added to enable it.

Impact of changes

Convenient and familiar way to configure Mbed OS.

Remove deprecated Callback methods

11880

Summary of changes

Deprecated methods in Callback removed.

Impact of changes

Some code that was generating deprecation warnings will no longer compile at all.

Migration actions required

  • Replace construction using Callback(arg, func) with the reversed Callback(func, arg)
  • Replace use of attach with simple assignment, such as callback = func; or callback = { func, arg };

Add Getaddrinfo interface for multiple DNS adresses

11653

Summary of changes

Added getaddrinfo interface for multiple DNS addresses. It uses the existing nsapi_dns_query_multiple functions.

Sync and async versions added to the interface, so dependent libraries need to be rebuilt.

Impact of changes

New members are added to the network interface:
-getaddrinfo
-getaddrinfo_async
Both of them allocate space for results.

The function gethostbyname is unchanged, but the gethostbyname_async/getaddrinfo_async callback result parameter now contains the number of DNS records found instead of NSAPI_ERROR_OK =0, so a definition of a new callback for getaddrinfo_async is not needed.

Test cases for sync/async added added to DNS test folder.

SYNCHRONOUS_DNS_MULTI_IP
ASYNCHRONOUS_DNS_MULTI_IP

Add an exception for ARMC5 toolchain build

12400

Summary of changes

The Arm Compiler 5 is no longer supported, so we removed the deprecate warning and added the exception in the build tool to stop building with ARM compiler 5.

Impact of changes

With these changes, Arm compiler 5 build fails.

Migration actions required

Upgrade the environment to use Arm Compiler 6 see documentation

BLE driver set random static address

12321

Summary of changes

This PR adds the function set_random_address to the HCIDriver class. It allows drivers writer to set the Random Static Address of the controller without using the deprecated API Gap:: setAddress .

This PR supersedes #12235 .

Cellular: Remove support for multiple ATHandlers

12305

Summary of changes

This commit removes multi ATHandler support from cellular. This has not been used and causes unnecessary complexity and memory consumption.

Memory statistics of mbed-os-example-cellular with NRF52840_DK + BG96:
GCC:
Total Static RAM memory (data + bss): 29360(+296) bytes
Total Flash memory (text + data): 130660(-832) bytes

ARM:
Total Static RAM memory (data + bss): 261554(+8) bytes
Total Flash memory (text + data): 127573(-1193) bytes

IAR:
Total Static RAM memory (data + bss): 25479(+296) bytes
Total Flash memory (text + data): 102418(-527) bytes

The RAM increase is because ATHandler is no longer created with a new -operator, and is instead a member of AT_CellularDevice, so the image tool is able to count it. Actual total RAM consumption has decreased thanks to removing the variables.

Impact of changes

Major changes:

  • Dependency to FileHandle removed from base classes.
  • AT_CellularDevice owns the default FileHandle and shares it with AT -classes.
  • Controlling hang-up -detection moved as CellularContext::configure_hup(). It can no longer be configured via CellularDevice.

Migration actions required

  • Enabling hang-up detection is now configured using CellularContext::configure_hup(). CellularDevice::enable_hup() and context creation with BufferedSerial handle removed. Cellular will now automatically enable and disable HUP when switching between AT and PPP mode.
  • CellularDevice::create_context() no longer takes FileHandle as parameter
  • CellularDevice::get_file_handle() removed. ATHandler::get_file_handle() can be used instead.

Cellular: Remove API's empty default implemetations

12293

Summary of changes

Cleanup the Cellular API by removing empty default implementations and making them pure virtual.

Targeted for release-version 6.0.0.

Impact of changes

  • Classes inheriting CellularDevice will have to have implementation for the new pure virtual methods:
  • clear()
  • get_context_list()

  • Classes inheriting CellularContext do not have to have implementation for:
  • get_netmask()
  • get_gateway()

if they do not differ from the NetworkInterface's default implemetations:
nsapi_error_t NetworkInterface::get_netmask(SocketAddress *)
{
return NSAPI_ERROR_UNSUPPORTED;
}

nsapi_error_t NetworkInterface::get_gateway(SocketAddress *)
{
return NSAPI_ERROR_UNSUPPORTED;
}

Migration actions required

See Impact of changes section.

Rename "default_lib" to "c_lib".

12278

Summary of changes

  • Rename target.default_lib to target.c_lib as it is more meaningful. These changes are done only for MBED OS 5 targets and in the build tool.

Impact of changes

With these changes, target.default_lib attribute is no longer being supported.

Migration actions required

  • The target.c_lib is the new attribute used for C library selection. The choice remains unchanged("std" or "small")

unittests: disable coverage report filtering

12273

Summary of changes

Disable coverage report filtering because of poor results.

e.g. mbed test --unittests -r Socket --coverage htmlg
This command will run all unittests with names containing Socket and then create coverage report with the same scheme, filtering all source files with names containing Socket.

The problem is that coverage report will be correct only when filtered test name will be the same as corresponding source file name (to be covered) - the same (-r) pattern is used to filter both test names and source file names used in coverage report

Due to described problems it was decided to disable coverage report filtering.
-r will only filter test names and pattern won't be passed to coverage report generator.

storage_abstraction: deprecated since Mbed OS 5.5 and now removed

12253

Summary of changes

Removes deprecated API's under hal/storage_abstraction and the folder itself. Only target which had implemented the functionality was K64F and the implementation gets removed with this PR.

Impact of changes

Removes deprecated storage_abstraction API.

Migration actions required

Migration not possible. Developers who were relying on this API should study Mbed OS Storage documentation.

Cellular: Remove friend definitions from cellular state machine

12251

Summary of changes

Instead of defining which classes can access state machine, CellularStateMachine
class is now "a normal" CPP class with public API.

Impact of changes

This is potentially a breaking change but as CellularStateMachine is only used internally there shouldn't be any impact.

Migration actions required

None, internal change

Cellular: Remove deprecated CellularDevice::stop()

12249

Summary of changes

Cellular: Remove deprecated CellularDevice::stop()

Impact of changes

Removed method CellularDevice::stop()

Migration actions required

CellularDevice::shutdown() should be used instead.

ESP8266: Add built-in hostname resolution handling (disabled by default)

12234

Summary of changes

Fixes #11982 (some routers fail to work with the UDPSocket-approach, but are proved to work when ESP uses its embedded hostname resolution AT command).

The feature is disabled by default and can be enabled in mbed_app.json with "esp8266.built-in-dns": true. When enabled then the synchronous hostname resolution will use the ESP's CIPDOMAIN AT command, but asynchronous resolution will keep on using the UDPSockets as before (no point rewriting the nsapi_dns). Also caching does not work.

I tested with the netsocket-dns testsuite. Obviously caching tests often fail, but if lucky I can get 15/16 passes.

@zhiyong80, please verify if this works with your router.

Impact of changes

None, until user enables the esp8266.built-in-dns option.

Add BufferedSerial class to replace UARTSerial

12207

Summary of changes

Implement the BufferedSerial class to replace UARTSerial. BufferedSerial is UARTSerial renamed to convey the original purpose of the class. Also remove usage of UARTSerial in Mbed OS Core diretories

Update Mbed TLS and Mbed Crypto to latest as of 2019-12-20

12150

Summary of changes

Upgrade to Mbed TLS 2.20.0d1 and Mbed Crypto 3.0.0d0.

Impact of changes

What behavior changes are being made?
For security and NIST SP 800-90A compliance reasons, CTR DRBG now grabs a nonce from the entropy source if needed to provide the maximum security strength. A previously unused-before-seeding member of the CTR DRBG context, mbedtls_ctr_drbg_context::reseed_counter, is used to hold the number of bytes the user has requested to include from the nonce via mbedtls_ctr_drbg_set_nonce_len(), or -1 to indicate that the entropy nonce length was not set explicitly. This means applications that were depending on a reseed_counter value of 0 to mean "not yet seeded" will need to instead handle errors from calls to mbedtls_ctr_drbg_seed().

What is being deprecated?
A few PSA Crypto asymmetric cryptography functions and macros, key usage definitions, and error code definitions have been renamed to better reflect their operation and to improve readability.

Why is this being deprecated?
The PSA Crypto API continues to develop as it heads towards its 1.0 release. Mbed Crypto 3.0.0d0 implements more of PSA Crypto 1.0b3 than was implemented in Mbed Crypto 2.x, and this brings along some API deprecations.

Mbed Crypto includes backwards compatibility macros (by way of psa/crypto_compat.h) to provide source-level backwards compatibility, although it's recommended to stop using the deprecated APIs as soon as you are able to.

Migration actions required

To avoid using deprecated APIs, users of PSA Crypto should update to the new version of API.

Old New
psa_asymmetric_sign() psa_sign_hash()
psa_asymmetric_verify() psa_verify_hash()
PSA_ASYMMETRIC_SIGNATURE_MAX_SIZE() PSA_SIGNATURE_MAX_SIZE()
PSA_ASYMMETRIC_SIGN_OUTPUT_SIZE() PSA_SIGN_OUTPUT_SIZE()
PSA_KEY_USAGE_SIGN PSA_KEY_USAGE_SIGN_HASH
PSA_KEY_USAGE_VERIFY PSA_KEY_USAGE_VERIFY_HASH
PSA_ERROR_UNKNOWN_ERROR PSA_ERROR_GENERIC_ERROR
PSA_ERROR_OCCUPIED_SLOT PSA_ERROR_ALREADY_EXISTS
PSA_ERROR_EMPTY_SLOT PSA_ERROR_DOES_NOT_EXIST
PSA_ERROR_INSUFFICIENT_CAPACITY PSA_ERROR_INSUFFICIENT_DATA
PSA_ERROR_TAMPERING_DETECTED PSA_ERROR_CORRUPTION_DETECTED

Thread: remove methods deprecated in 5.10

12142

Summary of changes

Remove various Thread methods that were deprecated in Mbed OS 5.10

Impact of changes

Code using the old methods will no longer compile

Migration actions required

Uses of the following removed Thread methods need to be replaced:

  • Thread::signal_set -> Thread::flags_set
  • Thread::signal_clr -> ThisThread::flags_clear
  • Thread::signal_wait -> ThisThread::flags_wait_xxx
  • Thread::wait -> ThisThread::sleep_for
  • Thread::wait_until -> ThisThread::sleep_until
  • Thread::yield -> ThisThread::yield
  • Thread::gettid -> Thread::get_id or ThisThread::get_id
  • Thread::attach_idle_hook -> Kernel::attach_idle_hook
  • Thread::attach_terminate_hook -> Kernel::attach_thread_terminate_hook

HAL: Add a get_capabilities() function to ResetReason API

12139

Summary of changes

Add the hal_reset_reason_get_capabilities() function to the ResetReason HAL API to skip the unsupported reason values during HAL & driver tests.

Fixes #11792.

Updated tests:

  • tests-mbed_hal-reset_reason,
  • tests-mbed_drivers-reset_reason.

Impact of changes

Extend the ResetReason HAL API with the hal_reset_reason_get_capabilities() function. Unsupported reason values are skipped during the greentea tests.

Migration actions required

A default, weak implementation is provided. Every target has to override this weak implementation to provide the correct reset_reason_capabilities_t.

GCC: remove -fno-delete-null-pointer-checks

12023

Summary of changes

For GCC we're being cautious by passing the -fno-delete-null-pointer-checks. This option prevents some optimisation opportunities, so removing it can reduce code size.

One particular optimisation loss occurs in Callback where a test similar to this occurs:

extern void myfunc();

inline void foo(void (*fnptr)())
{
if (fnptr) {
do A;
} else {
do B;
}
};

foo(myfunc);

With -fno-delete-null-pointer-checks, the compiler does not assume that &myfunc is non-null, and inserts the "null check" - seeing if the address is 0. But performing that test of the address is incorrect anyway - if myfunc actually could be at address 0, we'd still want to doA.

Anyway, we do not have an equivalent option enabled for either Clang or IAR, and we have performed clean-ups avoiding issues with apparently-null vector tables in Clang already, for example #10534.

Therefore it should(TM) be safe to remove the option for GCC. We do not have general data or code at address 0, only vectors are likely to be there, so it does not make sense to be globally restricting code generation for that.

Impact of changes

Will reduce image size. Particularly when Callback is in use. Increased optimisation may require code adjustments, exposing undefined behaviour

Migration actions required

If code fails, address undefined behaviour. Eg this null check may now be removed:

int foo(int *ptr)
{
int a = ptr[0];
if (!ptr) { // may be optimised out - compiler can assume non-null because already accessed
return -1;
}
return bar(a);
}

Correct to:

int foo(int *ptr)
{
if (!ptr) {
return -1;
}
int a = ptr[0];
return bar(a);
}

ARMC6: Add a build profile extension with the link-time optimizer enabled

11874

Summary of changes

Added an lto build profile extension for ARMC6 toolchain.

  • added -flto to common flags,
  • added --lto & --lto_level=Oz to ld flags.
Results

Product: ARM Compiler 6.11 Professional Component: ARM Compiler 6.11 Tool: armclang [5d3b4200]

[email protected]

Mbed OS branch commit SHA RAM (data + bss) Flash (text + data) build time details
mbed-os-5.14.1 679d248 206047 39168 739.53 blinky-679d248.txt
armc6_build-enable_lto_for_release c6a655f 205848 36601 610.81 blinky-c6a655f.txt

[email protected]

Mbed OS branch commit SHA RAM (data + bss) Flash (text + data) build time details
mbed-os-5.14.1 679d248 252457 361038 828.68 ccexample-679d248.txt
armc6_build-enable_lto_for_release c6a655f 251580 329505 835.21 ccexample-c6a655f.txt
Build commands used to produce the above results

mbed-os-example-blinky

cd $(mktemp -d)
git clone [email protected]:ARMmbed/mbed-os-example-blinky.git
cd mbed-os-example-blinky/
git checkout mbed-os-5.14.1
git clean -dxff && git reset --hard

# Define Mbed OS rev
# 1. mbed-os-5.14.1
echo 'https://github.com/ARMmbed/mbed-os/#679d24833acf0a0b5b0d528576bb37c70863bc4e' > mbed-os.lib
# 2. LTO branch on top of mbed-os-5.14.1
echo 'https://github.com/fkjagodzinski/mbed-os/#d7df3e673144232d3e162de19ec13f0472d725c6' > mbed-os.lib

mbed deploy
cd mbed-os/ && git log --oneline -1 && cd ..
time -p mbed compile -t ARM -m K64F --profile mbed-os/tools/profiles/release.json

# More details
mbed compile -t ARM -m K64F --profile mbed-os/tools/profiles/release.json --stats-depth=100

mbed-cloud-client-example

cd $(mktemp -d)
git clone [email protected]:ARMmbed/mbed-cloud-client-example.git
cd mbed-cloud-client-example/
git checkout 4.0.0
git clean -dxff && git reset --hard
cp ../mbed_cloud_dev_credentials.c .

# Define Mbed OS rev
# 1. mbed-os-5.14.1
echo 'https://github.com/ARMmbed/mbed-os/#679d24833acf0a0b5b0d528576bb37c70863bc4e' > mbed-os.lib
# 2. LTO branch on top of mbed-os-5.14.1
echo 'https://github.com/fkjagodzinski/mbed-os/#d7df3e673144232d3e162de19ec13f0472d725c6' > mbed-os.lib

mbed deploy
cd mbed-os/ && git log --oneline -1 && cd ..
time -p mbed compile -t ARM -m K64F --profile mbed-os/tools/profiles/release.json

# More details
mbed compile -t ARM -m K64F --profile mbed-os/tools/profiles/release.json --stats-depth=100

Remove RtosTimer deprecated class

12601

Summary of changes

Removed RtosTimer deprecated class.

Impact of changes

Breaking change: RtosTimer has been deprecated since Mbed OS 5.2 and it is removed now.

Migration actions required

Use EverntQueue as it provides similar functionality with the additional features to handle deferring other events to multiple contexts.

Change Mutex lock and unlock APIs return value to void

12598

Summary of changes

Modified Mutex lock() and unlock() APIs to returnvoid as return status value deprecated.

Impact of changes

Breaking change: Mutex lock() and unlock() methods return status value have been deprecated since Mbed OS 5.9, so changed the return value to void.

Migration actions required

Use Mutex void lock(), void unlock() methods.

Remove Mutex deprecated API

12596

Summary of changes

Removed Mutex deprecated API.

Impact of changes

Breaking change: Mutex lock(uint32_t millisec) method have been deprecated since Mbed OS 5.10 and its removed now.

Migration actions required

Use Mutex lock, trylock, trylock_for methods.

crypto: Update to Mbed Crypto 3.0.1

12560

Summary of changes

Update the version of Mbed Crypto provided by Mbed OS to version 3.0.1.

For details of this update see the documentation here:
https://github.com/ARMmbed/mbed-crypto/releases/tag/mbedcrypto-3.0.1

Remove FileSystemLike deprecated APIs

12554

Summary of changes

Removed FileSystemLike deprecated APIs.

Impact of changes

Breaking change: FileSystemLike opendir and open methods have been deprecated since Mbed OS 5.5 and they are removed now.

Migration actions required

Use open(FileHandle **file, const char *filename, int flags) and open(DirHandle **dir, const char *path) methods.

Remove DirHandle deprecated APIs

12553

Summary of changes

Removed DirHandle deprecated APIs.

Impact of changes

Breaking change: DirHandle closedir, readdir, rewinddir, telldir and seekdir methods have been deprecated since Mbed OS 5.4 and they are removed now.

Migration actions required

Use DirHandle close, read, rewind, tell and seek methods.

Remove mbed power management deprecated API

12551

Summary of changes

Removed mbed power management deprecated API.

Impact of changes

Breaking change: deepsleep API has been deprecated since Mbed OS 5.6 and it is removed now.

Migration actions required

Use sleep()

Remove mbed interface deprecated API

12550

Summary of changes

Removed mbed interface deprecated API.

Impact of changes

Breaking change: mbed_error_vfprintf API has been deprecated since Mbed OS 5.11 and it is removed now.

Migration actions required

Use mbed_error_vprintf().

Remove FileHandle deprecated APIs

12549

Summary of changes

Removed FileHandle deprecated APIs.

Impact of changes

Breaking change: FileHandle lseek, fsync, and flen methods have been deprecated since Mbed OS 5.4 and they are removed now.

Migration actions required

Use FileHandle seek(), sync(), and size() methods.

Remove the deprecated CallChain class and its APIs

12534

Summary of changes

CallChain is never intended for public use and its no longer used in Mbed OS, therefore, it is removed.

Impact of changes

Breaking change: CallChain class and its methods have been deprecated since Mbed OS 5.6 and they are removed now.

Migration actions required

None

Remove CriticalSectionLock deprecated APIs

12533

Summary of changes

Removed the CriticalSectionLock deprecated APIs.

Impact of changes

Breaking change: CriticalSectionLock lock and unlock methods have been deprecated since Mbed OS 5.8 and they are removed now.

Migration actions required

Use the static methods CriticalSectionLock::enable() and CriticalSectionLock::disable().

Remove the deprecated ATCmdParser APIs.

12527

Summary of changes

Removed ATCmdParser deprecated APIs.

Impact of changes

Breaking change: ATCmdParser setTimeout, setDelimiter, and dubugOn methods have been deprecated since Mbed OS 5.5.0 and they are removed now.

Migration actions required

Use set_timeout(), set_delimiter(), and debug_on()

Remove the deprecated Ticker APIs

12525

Summary of changes

  • Removed the Ticker deprecated APIs
  • Updated the async greentea test to use attach with callback API

Impact of changes

Breaking change: Ticker attach and attach_us methods with cv-qualifiers have been deprecated since Mbed OS 5.1 and they are removed now.

Migration actions required

Use attach(callback(obj, method), t) and attach_us(callback(obj, method), t)

Remove InterruptIn deprecated APIs

12518

Summary of changes

Removed InterruptIn deprecated APIs.

Impact of changes

Breaking change: InterruptIn rise and fall methods with cv-qualifiers have been deprecated since Mbed OS 5.1 and they are removed now.

Migration actions required

Use rise(callback(obj, method)) and fall(callback(obj, method))

Remove the deprecated the InterruptManager APIs

12501

Summary of changes

Removed InterruptManager class as it was deprecated since Mbed 5.6.

Impact of changes

All users of InterruptManager class will need to modify their application.

Migration actions required

The interrupt handlers need to be attached directly using specific drivers, for example, Application handler can use one of the Ticker/Timer/Timeout classes for clock-related interrupts.

Remove the deprecated ethernet APIs

12500

Summary of changes

The Ethernet is no longer supported, so removed header and cpp files and its dependency.

Impact of changes

Breaking change: The Ethernet object is removed as it has been deprecated in the previous feature releases.

Migration actions required

Use NetworkInterface instead, for more details have a look at our documentation here

C++11-ify virtualisation in lwIP classes

12489

Summary of changes

Use override and final where appropriate, and eliminate unnecessary
virtual.

Fix up get_ip_address following string-based API removal (#11942).

Some other C++11 simplifications.

Marking as breaking change as it fixes up a previous breaking change.

Impact of changes

No new impact.

Migration actions required

No new migrations

C++11-ify virtualisation in netsocket

12487

Summary of changes

Use override and final where appropriate, and eliminate unnecessary
virtual.

Fixes some mismatches in string-based API removal (#11942)

Some other C++11 simplifications.

Reduces code size.

Marking as breaking change because it fixes up some work in a previous breaking change.

Impact of changes

No new implications.

Migration actions required

No new actions.

HAL: Add a get_capabilities() function to GPIO API

12477

Summary of changes

Add the gpio_get_capabilities() function to the GPIO HAL API to skip the unsupported input pull modes when testing with the FPGA-CI-test-shield.

Updated tests:

  • tests-mbed_hal_fpga_ci_test_shield-gpio.

Impact of changes

Extend the GPIO HAL API with the gpio_get_capabilities() function. Unsupported input pull modes are skipped during the greentea tests.

Migration actions required

A default, weak implementation is provided. Every target has to override this weak implementation to provide the correct gpio_capabilities_t.

Proposal to remove SPIFReducedBlockDevice

12475

Summary of changes

The blockdevice is not needed by the bootloader. Removes SPIFReducedBlockDevice fully.

Impact of changes

Applications relying to SPIFReducedBlockDevice are forced to switch to SPIFBlockDevice. This comes at a cost of ROM and RAM usage.

Migration actions required

Applications need to switch on SPIFBlockDevice

Add Eight-Bit-Addressing mode to I2CEEBlockDevice.

12446

Summary of changes

When dealing with EEPROMs without a 16 bit adressing, the current
implementation does not work, as it writes a 16 bit address to the chip.
This may cause undefined behaviour.
This change adds a new constructor argument to enable this new eight-bit
mode. It defaults to false to not break existing code.
This constructor argument should actually never be necessary to manually
set, except when dealing with cheap devices.

An example for such a device is the Hua Hong NEC K24C02. Datasheet.

Impact of changes

Added a new optional argument at the end of all existing constructors.

Migration actions required

None, as the new constructor argument is optional and at the end.
The default value does not change functionality in existing code.

Remove the deprecated CAN APIs.

12420

Summary of changes

Removed CAN deprecated APIs.

Impact of changes

With these changes, CAN attach APIs with cv-qualifiers sources are removed and this is the breaking changes for the user

Migration actions required

Use attach(callback(obj, method), type)

Enable minimal-printf by default for all builds

12233

Summary of changes

This PR enables minimal-printf library for all builds. That means that all calls to printf family (including snprintf) will be handled by the minimal-printf library. Main reason for the change are substantial ROM savings that can reach up to 20k. The below table shows result for simple RTOS blinky example in two variants (explicitly calling printf and without) for two boards and three profiles:

Screenshot 2020-01-09 at 18 49 11

Impact of changes

Minimal-printf library supports most of the basic usecases:

* %d: signed integer [h, hh, (none), l, ll, z, j, t].
* %i: signed integer [h, hh, (none), l, ll, z, j, t].
* %u: unsigned integer [h, hh, (none), l, ll, z, j, t].
* %x: unsigned integer [h, hh, (none), l, ll, z, j, t], printed as hexadecimal number (e.g., ff).
* %X: unsigned integer [h, hh, (none), l, ll, z, j, t], printed as hexadecimal number (e.g., FF).
* %f: floating point (enabled by default).
* %F: floating point (enabled by default, treated as %f).
* %g: floating point (enabled by default, treated as %f).
* %G: floating point (enabled by default, treated as %f).
* %c: character.
* %s: string.
* %p: pointer (e.g. 0x00123456).

If your application requires more advanced functionality you'll have to revert to using standard library version.

Migration actions required

If your application requires advance features of printf family calls, you'll either simplify it or switch to the standard C library version. To do so modify your application configuration in mbed_app.json file to override the parameter target.printf_lib with the value std as shown below:

"target_overrides": {
"*": {
"target.printf_lib": "std"
}
}

IPCore String-based API removal

11942

Summary of changes

Remove the deprecated string-based APIs. This is a breaking change, targeted for mbed-os-6.0.
The APIs were deperecated in mbed-os-5.15, see #11914. Their internal usage was given up in #11941.

The following API functions are being removed:

TCPServer (whole class is deprecated already)
TCPSocket::connect(const char *host, uint16_t port);
TLSSocket::connect(const char *host, uint16_t port);
DTLSSocket::connect(const char *host, uint16_t port)
InternetDatagramSocket::sendto(const char *host, uint16_t port, data, size);
InternetSocket::bind(const char *address, uint16_t port);
L3IP:add_ipv4_multicast_group(const char *address);
L3IP:add_ipv6_multicast_group(const char *address)
L3IP:remove_ipv4_multicast_group(const char *address);
L3IP:remove_ipv6_multicast_group(const char *address)
NetworkInterface::get_ip_address()
NetworkInterface::get_netmask()
NetworkInterface::get_gateway()
NetworkInterface::set_network(const char *ip_address, const char *netmask, const char *gateway)
NetworkStack::get_ip_address()
NetworkStack::get_ip_address_if()

Impact of changes

Applications using the old APIs will not compile.

Migration actions required

Users are expected to use their SocketAddress-based counterparts and explicitly call gethostbyname() if DNS address resolution is needed.

GCC: Add a build profile extension with the link-time optimizer enabled

11856

Summary of changes

Add a build profile extension with the link-time optimizer enabled for GCC_ARM toolchain.

Impact of changes

Migration actions required

  • The minimal required version of the GCC_ARM is now the GNU Arm Embedded Toolchain Version 9-2019-q4-major. Earlier GCC_ARMversions can cause various issues when the -flto flag is used, e.g. a platform specific error during the final link stage on Windows hosts with GCC8.

  • The noinline attribute has to be used for every function that must be placed into a specific section (specified with a section(".section_name") attribute). In general, when a function is considered for inlining, the section attribute is always ignored. However, with the link-time optimizer enabled, the chances for inlining are much higher because the inliner works across multiple translation units. As a result, the output sections' sizes change compared to a non-lto build. This may lead to a section ".section_name" will not fit in region "region_name" type errors.

  • The common flags defined for the GCC_ARM toolchain are now appended to the ld flags during a mbed-cli build. Previously, the common flags were appended only to asm, c and cxx flags. Having the same flags for the compiler and the linker is required when using the link-time optimizer (which is the case for the lto build profile extension). Any options unrecognized by the linker should be moved from common to asm, c or cxx.

Correct Timeout rescheduling

12941

Summary of changes

Chrono changes "optimised" Timeout::handler in a way that broke users who rescheduled the timeout during their attached callback.

Attempted optimisation is less necessary now that platform.callback-nontrivial is set to false by default - that setting reduces overhead of copying the Callback to almost nothing.

Fixes #12940.

Impact of changes

Migration actions required

Correct core RTOS sleep routine timing

12938

Summary of changes

Chrono conversions inadvertantly changed the core timed sleep routine used by the RTOS idle to use OsTimer::update_and_get_tick() instead of OsTimer::get_tick().

Correct this, and expand/clarify documentation and naming to try to prevent recurrence.

Another minor fix observed while inspecting code - OsClock can't just use milliseconds, it should match the period of OsTimer, which theoretically can be different.

Fixes #12920.

Remove unsupported targets

12935

Summary of changes

This is another of a series of PRs (others #12775, #12810, #12864) to remove targets that are not supported or retired as explained in recent blog post.

There are individual commits to remove targets from targets.json and files/folders for the corresponding targets.

Impact of changes

The following targets are being removed:

  • NXP: KL82Z (wasn't removed correctly here #12864)
  • Advantech ADV_WISE_1510 (renamed)
  • Ublox (all)
  • ARM_IOTSS_BEID

Migration actions required

  • The targets listed above continue to be available in the 5.15 branch.

Convert newlines on all terminal (tty) devices by default

12889

Summary of changes

Applications can reduce their ROM usage by replacing
"\r\n" by "\n".

Impact of changes

Breaks compatibility with applications built with Mbed 2.

Migration actions required

Update to the latest version of Mbed OS (possibly using the bare metal profile for ultra-constrained devices).

Bare metal profile: USB class device support

12873

Summary of changes

USBCDC_ECM class device uses RTOS thread APIs, so added MBED_CONF_RTOS_PRESENT conditional check to disable that class device in bare metal profile.

Impact of changes

With these changes, except USBCDC_ECM, all the below list of USB class devices can build and works in bare metal profile.

  • USBAudio
  • USBHID
  • USBKeyboard
  • USBMIDI
  • USBMouse
  • USBMouseKeyboard
  • USBMSD
  • USBSerial

Migration actions required

None.

Remove unsupported targets

12864

Summary of changes

This is the third of a series of PRs (others #12775, #12810) to remove targets that are not supported or retired as explained in recent blog post.

There are individual commits to remove targets from targets.json and files/folders for the corresponding targets.

Impact of changes

The following targets are being removed:

  • Delta: DELTA_DFBM_NQ620, DELTA_DFCM_NNN50, DELTA_DFCM_NNN40
  • NXP: LPC4088, LPC1124, LPC1347, LPC1769, LPC1549, XBED_1768
  • NXP: LPC810, LPC1800, LPC4330, LPC4337, LPC11U37H_401
  • NXP: KL26Z, KW24D, KL20D50, KL82Z, KL05Z
  • Silabs EFM32LG, EFM32WG, EFM32HG, EFM32ZG, EFM32PG, EFM32PG12, EFR32MG1
  • Advantech MTB_ADV_WISE_1570, 1510 (renamed)
  • WALLBOT_BLE, NRF51_DONGLE, NRF51822_Y5_MBUG
  • Maxim: MAXWSNENV, MAX32625NEXPAQ
  • Multitech: MTS_MDOT_F405RG, MTS_GAMBIT
  • Onsemi: NCS36510
  • Switch Science: HRM1017, TY51822R3, SSCI824 (PR #12697)
  • Ublox EVK_NINA_B1, EVA_NINA, HI2110
  • Other: RBLAB, SDT51822, RAPIDIOT, MTM_MTCONNECT04S

Migration actions required

  • The targets listed above continue to be available in the 5.15 branch.

ARCH_PRO: Remove uARM tooolchain support

12853

Summary of changes

  • Update scatter file for the ARM toolchain to use 2 region memory model.
    The scatter file changes affect the following boards:
  • LPC1768, ARCH_PRO, UBLOX_C027, XBED_LPC1768 (LPC1768.sct)
  • Remove the TOOLCHAIN_ARM_MICRO directory.
  • Remove release_version as not necessary and as the target can also run
    Mbed OS 6.
  • Remove uARM toolchain in the list of supported toolchains for the target.
  • Indicate that the target supports the small ARM toolchain C library.

Impact of changes

It is no longer possible to use the uARM toolchain to build binaries for the ARCH_PRO board.

Migration actions required

Set the "target.c_lib" configuration option to "small" to build binaries using Microlib with the ARM toolchain.

Allow Devicekey::generate_root_of_trust() to define key size.

12823

Summary of changes

Allow Devicekey::generate_root_of_trust() to define key size.

By default, generate 16 byte keys, to be compatible with bootloader.
But allow user to generate 32 byte keys as well.

This fixes #12821

Impact of changes

Default key, generated by Devicekey::generate_root_of_trust() is now 16 bytes,
instead of 32 bytes.

Migration actions required

If you want to generate 32 byte keys with Devicekey::generate_root_of_trust(),
you need to explicitly supply key size as a parameter.

Remove deprecated Platform header files

12811

Summary of changes

Remove the deprecated header files as part of the Mbed 6 cleanup.

Impact of changes

Breaking change: Applications that include the removed files will no longer successfully build.

Migration actions required

Include the header files recommended in each removed header file:

platform/critical.h -> platform/mbed_critical.h
platform/mbed_sleep.h -> platform/platform/mbed_power_mgmt.h
platform/rtc_time.h -> platform/mbed_rtc_time.h
platform/semihost_api.h -> platform/mbed_semihost_api.h
platform/sleep.h -> platform/mbed_power_mgmt.h
platform/toolchain.h -> platform/mbed_toolchain.h
platform/wait_api.h -> platform/mbed_wait_api.h

Remove unsupported targets

12810

Summary of changes

This is the second of a series of PRs (first #12775) to remove targets that are not supported or retired as explained in recent blog post.

There are individual commits to remove targets from targets.json and files/folders for the corresponding targets.

Impact of changes

The following targets are being removed:

  • MTBs (most)
  • nRF51/52
  • Ublox NINA B1
  • LAIRD_BL600, BL652, BL654
  • OSHCHIP
  • ACONNO_ACN52832
  • MURATA_WSM_BL241
  • LPC11u (most)
  • Misc unsupported

Migration actions required

  • The targets listed above continue to be available in the 5.15 branch.

Seeed: Removing unsupported Seeed targets for OS 6

12792

Summary of changes

Removing targets: Seeed Arch Link, Seeed Arch-RO359B, Seeed Arch BLE, Seeed Tiny BLE, Seeed Arch GPRS V2,Seeed Xadow M0

Impact of changes

These targets will no longer be supported.

LittleFSv2: Bring in v2.2

12783

Summary of changes

Introduces LittleFSv2.2 developed by @geky. Mbed OS adaption (LittleFSv1 -> LittleFSv2) is based on work done by @pilotak. The only thing the undersigned has done was to create this PR.

Impact of changes

No additional impact

Migration actions required

Brings in LittleFSv2 which will coexist with LittleFSv1 already found from Mbed OS. If you already a v1 filesystem you might try converting it to v2, but this isn't guaranteed to succeed. You should preferably create a new v2 filesystem instead.

Remove unsupported targets

12775

Summary of changes

This is the first of a series of PRs to remove targets that are not supported or retired as explained in recent blog post.

There are individual commits to remove targets from targets.json and files/folders for the corresponding targets.

Impact of changes

The following targets are being removed:

  • Thundersoft (all)
  • Realtek RTL8195A
  • Ublox ODIN and related (OKDO, MTB)
  • RDA (all)
  • Gigadevice GD32_E103VB
  • Atmel (all)
  • TI (all)
  • Etteplan Elmo
  • Wiznet (all)
  • Silica
  • Renesas VK_RZ_A1H
  • Rename MTB_MXCHIP_EMW3166 to WIO_EMW3166
  • VBLUNO51 and VBLUNO52

Migration actions required

  • The targets listed above continue to be available in the 5.15 branch.

Callback: Trivial default

12761

Summary of changes

Turn off callback.non-trivial by default to save ROM space.

Follow-up to #12036. Will need at least one example changed to turn the option back on.

Impact of changes

  • If application code uses Callback with a non-trivial functor, they will get a compilation error directing them to turn on platform.callback-nontrivial.

Migration actions required

  • Add "platform.callback-nontrivial": true to your mbed_app.json if a build error indicates that it is required - or change your code to only use trivial functors in Callback.

BLE: remove deprecated APIs from Gatt and SecurityManager

12742

Summary of changes

  • Remove deprecated APIs from Gatt
  • Remove deprecated APIs from SecurityManager

Impact of changes

Deprecated APIs from Gatt and SecurityManager do not exist anymore, applications that use them will not compile until updated with current APIs.

Migration actions required

Applications that compile without deprecation warnings on mbed-os-5.15 will continue to work. Otherwise, please fix any deprecated API usages, for example by referring to compilation warnings from mbed-os-5.15.

Add Semtech Lora radio drivers

12741

Summary of changes

Add Semtech Lora radio drivers for SX1272, SX1276 and SX126x radios.
Added as subtree from original repository: https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers

Impact of changes

Enable using Lora with no additional repositories, all of them part of Mbed OS.

Migration actions required

None

Remove Mbed SPM

12738

Summary of changes

Remove FUTURE_SEQUANA and FUTURE_SEQUANA_M0 targets. These are not supported in Mbed 6.

After the removal of FUTURE_SEQUANA targets, there are no targets remaining that use Mbed SPM. Remove Mbed SPM as well, as it is unused.

Impact of changes

The following targets are being removed in Mbed 6:

  • FUTURE_SEQUANA
  • FUTURE_SEQUANA_M0

Migration actions required

Please use a version of Mbed OS 5 if you require support for FUTURE_SEQUANA or FUTURE_SEQUANA_M0

Remove PSA implementation for v8-M and dual CPU targets

12737

Summary of changes

With Mbed 6, TrustedFirmware-M (TF-M) is the source of Mbed's implementation of PSA. This means Mbed 6 doesn't need to contain any code or tooling to build the v8-M or dual CPU secure binaries.

This patch set removes tooling, code, and targets that would have been used to make PSA secure binaries for v8-M or dual CPU platforms.

Impact of changes

  • NXP LPC55S69 and Numaker M2351 support is temporarily dropped as compared to Mbed 5, as those targets are not supported in TF-M upstream.
  • Exporters for v8-M and dual CPU PSA targets are not supported, due to TF-M limitations.
  • It is no longer possible to use Mbed to build v8-M or dual CPU secure binaries.
  • The following targets are removed compared to Mbed 5:
  • ARM_MUSCA_A1_S
  • ARM_MUSCA_B1_S
  • LPC55S69_NS
  • LPC55S69_S
  • HANI_IOT
  • NU_PFM_M2351_NS
  • NU_PFM_M2351_S

Migration actions required

Use Mbed 5.15 if you require PSA targets with exporter support, or one of the removed targets. LPC55S69 and Numaker M2351 will be supported in Mbed 6 at a later date, after the targets are supported by TF-M.

rtos: Improve CMSIS-RTOSv2 app compatibility

12736

Summary of changes

Some non-Mbed-OS, pre-existing CMSIS-RTOSv2 applications depend on
CMSIS-RTOSv2 Automatic Dynamic Allocation, also known as Object-specific
memory pools. Mbed OS doesn't by default provide any memory to the
CMSIS-RTOSv2 Automatic Dynamic Allocation pool, as doing so would waste
memory if the feature is not used; even if the feature is used, as a
platform, Mbed OS can't know how many objects of which types will be
created by an application and therefore will either waste memory or not
provide enough memory in a hard to debug manner. Portable CMSIS-RTOSv2
applications depending on CMSIS-RTOSv2 Automatic Dynamic Allocation
should instead configure the memory pools themselves, as applications
know best their memory requirements.

Add Mbed configuration options which can be used by applications to
control the amounts of memory available to the CMSIS-RTOSv2 Automatic
Dynamic Allocation subsystem. This enables portable CMSIS-RTOSv2
applications, which can run on any CMSIS-RTOSv2 OS, to be able to run on
Mbed OS as well.

Signed-off-by: Devaraj Ranganna [email protected]
Signed-off-by: Jaeden Amero [email protected]

Impact of changes

Applications written for CMSIS-RTOSv2 that use CMSIS-RTOSv2 Automatic Dynamic Allocation can now also run on Mbed OS, when the application specifies how much memory to use in their mbed_app.json. CMSIS-RTOSv2 docs claim that Automatic Dynamic Allocation is "fully portable", and now that's at least more true than before where Mbed is concerned.

The TF-M regression tests are a concrete example of an application written making use of CMSIS-RTOSv2 Automatic Dynamic Allocation. We have an incredibly easier time running (and maintaining) those tests with Mbed OS, validating the TF-M integration with Mbed OS does not break TF-M functionality, when Mbed OS supports application-configured CMSIS-RTOSv2 Automatic Dynamic Allocation.

Migration actions required

None

odin targets: remove release version

12733

Summary of changes

This is a preparation for more upcoming changes. The latest master updates removed deprecated functionality and these targets do not compile anymore.

Impact of changes

Boards based on the ODIN module won't compile in Mbed OS 6.0.0.

Migration actions required

Staying with Mbed OS version up to 5.15.x.

BLE Gap deprecation cleanup/rework

12730

Summary of changes

  • Remove BLE LegacyGap class and implementations. Map ble::Gap to global Gap.
  • Add non-deprecated APIs (originally found in LegacyGap) to Gap and implementations into GenericGap.
  • Remove/replace legacy BLE event signalling (callback chains) in favour of EventHandler, where possible.
  • Remove BLEProtocol:: and replace AddressType_t with own_address_type_t/peer_address_type_t, AddressByte_t with address_t, etc.
  • Replace BLE::Address_t (for accessing address types + values in whitelists) with the new equivalent whitelist_t::entry_t.
  • Rename ConnectionParams_t -> PreferredConnectionParams_t and use it only for Generic Access Service.
  • Fix misspelt central_privay_configuration_t -> central_privacy_configuration_t
  • Remove legacy type definitions and replace internal usages with new types, e.g. address types, disconnection reason, etc.

Notes:

  • setDeviceName(), getDeviceName(), setAppearance(), getAppearance() from LegacyGap are removed, as device name and appearance can be set via AdvertisingDataBuilder and saved by the application. But there were previously no deprecation warnings for them.
  • get/setPreferredConnectionParams() are dropped from Gap - updated versions will be added to Gatt where they should belong to.

Impact of changes

Legacy BLE Gap APIs and related type definitions are no longer available.
Some APIs have been updated to take parameters of new type definitions of address types + values.

Migration actions required

  • Applications based on up-to-date BLE APIs should be able to make most BLE function calls as before.
  • However as mentioned above some deprecated types (e.g. address) were not warned previously - their usages need to be replaced with corresponding new types. The best clue is compilation errors which can be manually fixed. The PR to update mbed-os-example-ble is an example of how to do this: ARMmbed/mbed-os-example-ble#289
  • Applications should set device name and appearance using AdvertisingDataBuilder and internally remember their values as needed, since APIs to get/set them are removed as explained above.

RZ_A1H remove usage of ethernet hal API

12715

Summary of changes

  • Removed ethernet_api from targets\TARGET_RENESAS\TARGET_RZ_A1XX.
  • Modified features\netsocket\emac-drivers\TARGET_RZ_A1_EMAC not to use ethernet_api.

Remove compatibility for Arm Compiler versions prior to 6.01.0050

12708

Summary of changes

Removed the pre-processor directive __ARMCC_VERSION >= 6010050 and the code added for versions before 6.01.0050.

Impact of changes

Breaking change: The binary generated from ARM Compiler 5 cannot be relied on as support has been dropped.

Migration actions required

Use Arm Compiler 6

Tests: Remove support for ARM Compiler 5

12706

Summary of changes

ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.

Impact of changes

Breaking change: The binary generated from ARM Compiler 5 cannot be relied on as support has been dropped.

Migration actions required

Use Arm Compiler 6.

mbed-client-cli: Remove support for ARM Compiler 5

12705

Summary of changes

ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.

Impact of changes

Breaking change: The binary generated from ARM Compiler 5 cannot be relied on as support has been dropped.

Migration actions required

Use Arm Compiler 6.

TFM: Remove ARM Compiler 5 considerations

12702

Summary of changes

ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.

Impact of changes

Breaking change: The binary generated from ARM Compiler 5 cannot be relied on as support has been dropped.

Migration actions required

Use Arm Compiler 6.

Storage: Remove support for ARM Compiler 5

12699

Summary of changes

ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.

Impact of changes

Breaking change: The binary generated from ARM Compiler 5 cannot be relied on as support has been dropped.

Migration actions required

Use Arm Compiler 6.

Drivers: Remove support for ARM Compiler 5

12698

Summary of changes

ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.

Impact of changes

Breaking change: The binary generated from ARM Compiler 5 cannot be relied on as support has been dropped.

Migration actions required

Use Arm Compiler 6.

Remove netsocket icetea tests and TCPServer

12694

Summary of changes

Remove deprecated Netsocket Icetea tests and TCPServer class.

Impact of changes

  • Netsocket Icetea tests are removed
  • TCPServer class removed

Migration actions required

  • Use Netsocket Greentea tests (TESTS/netsocket)
  • TCPSocket can be used instead of TCPServer

Remove deprecated netsocket methods

12685

Summary of changes

Remove deprecated methods from netsocket

Impact of changes

Deprecated methods in netsocket (since Mbed OS 5.1) are removed.

Migration actions required

InternetSocket::attach -> Use Socket::sigio
TCPSocket(S *stack) -> Use default TCPSocket constructor and call open separately
UDPSocket(S *stack) -> Use default UDPSocket constructor and call open separately

SocketAddress rework

12683

Summary of changes

Original work: #12468 . This PR contains also the UT fix.

  • Add optimised constexpr default constructor. Default construction was previously by a heavyweight defaulted nsapi_addr_t parameter.
  • Remove deprecated resolving constructor.
  • Take nsapi_addr_t inputs by constant reference rather than value.
  • Inline the trivial getters and setters.
  • Use unique_ptr to manage the text buffer.
  • Make operator bool explicit.
  • Optimise some methods.
  • Update to C++11 style (default initialisers, nullptr etc)

Impact of changes

  • Constructor deprecated in Mbed OS 5.1 removed.
  • Code size reductions, particularly on default initialisation.
  • Implicit assignments to bool or int or others no longer possible - any existing code which does not compile is most likely an error. (if (sockaddr) is still fine - such "contextual conversions to bool" can use the explicit operator).

Migration actions required

  • Code attempting resolution by passing a hostname to SocketAddress's constructor must be modified to use NetworkInterface::gethostbyname or NetworkStack::gethostbyname.
  • Code failing due to the now-explicit bool operator should be reviewed to check intent.

Remove deprecated BLE:: APIs and unsupported services

12676

Summary of changes

  • Remove deprecated APIs from BLE namespace.
  • Remove DFUService, UARTService and beacon-related services (iBeacon, EddyStone) whose standards/stacks are externally maintained.

Impact of changes

  • Legacy APIs in BLE namespace are no longer available.
  • DFUService, UARTService and beacon-related services (iBeacon, EddyStone) are no longer available.

Migration actions required

  • Applications that use legacy APIs in BLE namespace need to be updated to use up-to-date APIs.
  • Applications based on removed services can copy the service definitions over from previous mbed-os releases (with deprecated API usages manually fixed), or provide their own implementations.

Remove Maxim and SoftDevice BLE stacks which do not support the latest APIs

12674

Summary of changes

  • Remove Nordic SoftDevice stack (used by nRF51* targets). Notes: nRF52* targets are unaffected as they use Cordio stack.
  • Remove the current Maxim BLE stack (until a newer version based on up-to-date Cordio stack becomes available).
  • Disable BLE features of affected targets from targets.json.

Note: Some references/macros for SoftDevice are still present in the Nordic SDK (targets/TARGET_NORDIC/*) and not cleanly separated with other components.

Impact of changes

  • BLE feature will be unavailable on nRF51* targets and temporarily unavailable on Maxim targets until the driver gets updated in the future.

Migration actions required

  • For nRF51* targets, use Mbed OS release 5.15 - future support for those targets are under review.
  • For nRF52* targets, ensure the default BLE configurations that enable Cordio stack is used.
  • For Maxim targets, use Mbed OS release 5.15 until the BLE driver gets updated.

Remove deprecated ARMC5 reference from mbed compile -S output

12672

Summary of changes

Removed deprecated ARMC5 reference from mbed compile -S command output.

Impact of changes

With these changes, mbed compile -S will not produce any ARMC5 reference.

Migration actions required

None.

Netsocket/lwIP Stack: Remove support for ARM Compiler 5

12671

Summary of changes

ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.

Impact of changes

Breaking change: The binary generated from ARM Compiler 5 cannot be relied on as support has been dropped.

Migration actions required

Use Arm Compiler 6.

Remove ARMC5 reference from Mbed OS platform

12655

Summary of changes

Removed ARMC5 reference from Mbed OS platform.

Impact of changes

Breaking change: The ARMC5 references are removed from platform as they have been deprecated in a previous Mbed OS release.

Migration actions required

Use Arm Compiler 6

Removed all references to __CC_ARM

12654

Summary of changes

Removed ARMC5 reference from FEATURE_BLE.
ARM Compiler 5 is no longer supported in Mbed OS and is superseded by ARM Compiler 6

Impact of changes

Breaking change: The ARMC5 references are removed from platform as they have been deprecated in a previous Mbed OS release.

Migration actions required

Use Arm Compiler 6

Remove minimal-printf extension profile

12640

Summary of changes

Removed minimal-printf extension profile. Usage of minimal-printf library is enabled via the target.printf_lib configuration parameter as described in minimal-printf README, see https://github.com/ARMmbed/mbed-os/tree/master/platform/source/minimal-printf#usage for more details.

Impact of changes

Applications can no longer use the obsolete minimal-printf extension profile.

Migration actions required

Usage of minimal-printf library is enabled via the target.printf_lib configuration parameter, see https://github.com/ARMmbed/mbed-os/tree/master/platform/source/minimal-printf#usage for more details.

Remove the deprecated ethernet hal APIs

12639

Summary of changes

Removed ethernet hal deprecated APIs.

Impact of changes

Breaking change: The Ethernet hal APIs are removed as they have been deprecated in a previous Mbed OS release.

Migration actions required

  • EthInterface is now the preferred way to get an Ethernet object.
  • Alternatively, use NetworkInterface to get an instance of an appropriate network interface (WiFi or Ethernet).

Add "rtos-api" to bare metal

12629

Summary of changes

Added the bare metal form of the RTOS API since it doesn't add any overhead (except for a little extra compilation time) and has the benefit of minimising differences between RTOS and bare metal modes.

Impact of changes

RTOS APIs are available in bare metal mode.

Migration actions required

None

Remove Semaphore deprecated APIs

12609

Summary of changes

Removed Semaphore deprecated APIs.

Impact of changes

Breaking change: Semaphore wait and wait_until methods have been deprecated since Mbed OS 5.13 and are removed now.

Migration actions required

Use Semaphore acquire, try_acquire, try_acquire_for and try_acquire_until methods.

Netsocket: Introduce set_ip_address and get_dns_server APIs

12606

Summary of changes

set_ip_address API can be used to set a static IPv4 address or IPv6 link-local address to network stack. This is needed for example in cellular use cases where device gets multiple IP addresses from cellular context.

With get_dns_server DNS servers can be queried from NetworkInterface object

Fully enforce NonCopyable

12581

Summary of changes

Make NonCopyable fully operational so it gives compile errors in all build profiles.

This removes the deprecated copy operators which let code compile with a warning.

Impact of changes

Code that copies non-copyable classes will now not compile in any profile - previously a link error would have been generated in debug profile, but other profiles would have only generated a "deprecated" warning at compile time and a debug message at runtime.

Migration actions required

Modify code to not copy non-copyable objects. Any code doing so would have likely led to problems such as memory leaks.

Remove mbed wait deprecated APIs

12572

Summary of changes

Removed mbed wait deprecated APIs.

Impact of changes

Breaking change: wait and wait_ms APIs have been deprecated since Mbed OS 5.14 and they are removed now.

Migration actions required

If you wish to sleep, use ThisThread::sleep_for (C++) or thread_sleep_for (C). If you wish to wait (without sleeping), call wait_us. wait_us is safe to call from ISR context.

Replace with weak mbed_error_hook implementation (deprecate the hook function)

12569

Summary of changes

mbed_set_error_hook() can only be called inside the application. Therefore it is not possible in the application to catch errors before calling mbed_set_error_hook().
I thought it would be simpler to create a mbed_error_hook() function which is weak and the application can catch errors at any time.

Impact of changes

Replace mbed_set_error_hook() with an application specific mbed_error_hook() implementation.

Migration actions required

Add property API to InternetSocket

12522

Summary of changes

Add new API to network interface.

Property API allows application to ask network specific properties
from the InternetSocket . Queried information can be used to avoid
network congestion by adjusting transmission jitter and retry
timeouts.

C++ Chrono support

12425

Summary of changes

Add Chronos versions of time-related APIs to RTOS classes, Ticker-related classes and EventQueue.

Kernel::Clock, HighResClock, LowPowerClock and RealTimeClock act as the Chrono clocks. (C++ standard clocks system_clock, steady_clock and high_resolution_clock are not supported, due to difficulty in consistent retargetting across toolchains).

Deprecate old non-Chrono APIs.

Impact of changes

Existing timing code will generate deprecation warnings, but there should be no functional change.

A follow-up PR will clean-up warnings in rest of code base.

Migration actions required

Users should migrate to use Chrono-based APIs as directed by the deprecation messages

Remove the deprecated RawSerial, UARTSerial, Serial

12410

Summary of changes

  • Removed RawSerial, Serial, UARTSerial deprecated classes.
  • Removed SerialBase deprecated APIs.

Impact of changes

Breaking change: RawSerial, Serial, UARTSerial classes have been deprecated since Mbed OS 6.0.0 and they are all removed now.

Migration actions required

Use BufferedSerial and UnbufferedSerial for serial communication.

Add get_time function to ESP8266

12300

Summary of changes

Fixes #12192.

get_time() function allows access to (S)NTP functionalities of ESP8266 module.

I considered using std::chrono instead of ctime's std::tm, but then - to convert to chrono::time_point we'd have to go through std::tm anyway or write our own parser, which I just managed to avoid.

Side note: using std:: introduces some warnings due to -D_LIBCPP_EXTERN_TEMPLATE(...)= flag being used in all our compilation profiles. This flag seems obsolete and I hope I will get it removed soon.

I cannot really add any tests, as they are using WifiInterface::get_instance() to get the interface and there is no RTTI, that would allow casting to ESP8266Interface to call get_time(), but I tested the function locally and it works fine.

Impact of changes

None, other than user can check time with ESP8266Interface.

Migration actions required

None

Make cypress psoc64 TFM ready and also add TF-M initialization

12271

Summary of changes

Non-secure core IPC, Mailbox and Interface init for TFM_DUALCPU and TFM_V8M targets

These changes concentrate on getting mbed-os(Non-secure) working with TF-M(secure)
Changes reflect towards any Cypress based TFM_DUALCPU targets and TFM_V8M targets at the moment and making it more generic in the near future.

Key changes:

  • Init IPC, Mailbox and Non-secure Interface.
    These changes are for TFM_DUALCPU and TFM_V8M platforms.
    The initialization happens after mbed-os kernel is kicked off and
    when the thread is up and running.

We are initializing the following for TFM_DUALCPU platforms:

  • IPC Interrupts for syncing multi-core platforms.
  • NS Mailbox to receive messages.
  • NS interface.

We are only initializing a Non-secure interface for TFM_V8M platforms.

  • Cypress: CY8CKIT_064S2_4343W: Reserve timer channels used by TF-M.
  • Make CY8CKIT_064S2_4343W Cypress target TF-M compatible.

Impact of changes

This impacts CY8CKIT_064S2_4343W, TFM_V8M and TFM_DUALCPU targets.

Callback extension and optimisation

12036

Summary of changes

Extend Callback, and optimise it.

Impact of changes

  • Optimise clearing by adding nullptr overload.
  • Optimise clearing by not clearing storage - increases code size of comparison, but that is extremely rare.
  • Reduce ROM used by trivial functors - share copy/destroy code.
  • Config option to force trivial functors - major ROM saving by eliminating the "operations" table.
  • Config option to eliminate comparison altogether - minor ROM saving by eliminating zero padding.
  • Conform more to std::function API.
  • Force trivial functors by default to get major ROM saving. (now in #12761)

Migration actions required

  • The added nullptr overload means Callback(NULL) or Callback(0) will no longer work; users must use Callback(nullptr) or Callback().
  • If application code uses Callback with a non-trivial functor, they will get a compilation error directing them to turn on platform.callback-nontrivial.

Disable mbed 2 and unsupported targets

12984

Summary of changes

Mbed 2 targets are not expected to be supported on master and for the Mbed OS 6 release.
The following changes are introduced:

  • Remove "2" from release_versions as there is no Mbed 2 and these targets won't work as such
  • Remove LPC11U68 and KL27Z from targets.json as these are Mbed 2 only. They require migration to Mbed OS 6 Baremetal and can be introduced in the future.
  • Remove MAX32620HSP as there is no release_versions and is considered unsupported - see #11233

Impact of changes

These targets continue to be available in the 5.15 branch.
Mbed OS 6 won't support these targets unless are re-introduced.

Migration actions required

none

build api: fix release version

12982

Summary of changes

This is non trivial fix as the function is being used outside of this repository.
Tools rely on it to return list of targets for 2 or 5. As we removed release_version from many targets,
this broke the logic. To keep the logic as it was, without updating all tools out there now,
lets just return full set of targets - all are supported.

In case for Mbed 2, returning all targets does not make sense, but rather raise an exception here. Not supported. This avoids suprised. If you look at build api functions there are many checks for 2 or 5 so more
clean up needed to actually get release_version out of the tools.

Remove nRF51 targets

12961

Summary of changes

This is another of a series of PRs (others #12775, #12810, #12864, #12935) to remove targets that are not supported or retired as explained in recent blog post.

Impact of changes

The following public nRF51 targets are being removed:

  • NRF51822
  • NRF51_DK
  • NRF51_MICROBIT

Migration actions required

  • The targets listed above continue to be available in the 5.15 branch.

STM32 code cleaning for MBED-OS6

12960

Summary of changes

This is following discussions with @MarceloSalazar

All ST targets are:

  • either keep as full MBED-OS6 target => these targets inherit then from "MCU_STM32"
  • either keep as constrained target => these targets inherit then from "MCU_STM32_BAREMETAL"
  • either removed (board is too constrained, no more available, or was not officially supported)

@ARMmbed/team-st-mcd

Impact of changes

Several targets are no more available in MBED-OS6

If you are still using it,
please use mbed-os-5.15 branch

Clean-up S2LP driver configuration

12951

Summary of changes

This PR adds the ability to configure the pins of the S2LP driver for any target (inside Mbed OS or custom target) using the standard mbed_lib.json and mbed_app.json config files.

Additionally, the MTB_STM_S2LP and MTB_STM_S2LP_CT targets are removed as are not supported in Mbed OS 6, and thus making the S2LP driver independent of targets.

Impact of changes

Note users can continue to use the 5.15 branch.
For Mbed OS 6, it should be possible to use the default pin config without changes (apart from MTBs).
Custom pin configuration can be done as shown next.

Migration actions required

Developers need to create a mbed_app.json (or other json config) including the pin configuration for their target.

An example of application configuration for the S2LP driver is shown here:
https://github.com/MarceloSalazar/mbed-os-example-mesh-minimal/blob/S2LP_cleanup/configs/mesh_wisun_S2LP.json#L34-L50

"NUCLEO_F429ZI":  {
"LED": "LED_RED",
"BUTTON": "USER_BUTTON",
"BUTTON_MODE": "PullDown",
"s2lp.SPI_SDI"           : "PA_7",
"s2lp.SPI_SDO"           : "PA_6",
"s2lp.SPI_SCLK"          : "PA_5",
"s2lp.SPI_CS"            : "PC_0",
"s2lp.SPI_SDN"           : "PF_13",
"s2lp.SPI_GPIO0"         : "PA_3",
"s2lp.SPI_GPIO1"         : "PC_3",
"s2lp.SPI_GPIO2"         : "PF_3",
"s2lp.SPI_GPIO3"         : "PF_10",
"s2lp.I2C_SDA"           : "PB_7",
"s2lp.I2C_SCL"           : "PB_6",
"s2lp.provide-default"   : true
}

The driver can be initialized as follow:

NanostackRfPhys2lp rf_phy(MBED_CONF_S2LP_SPI_SDI
,MBED_CONF_S2LP_SPI_SDO
,MBED_CONF_S2LP_SPI_SCLK
,MBED_CONF_S2LP_SPI_CS
,MBED_CONF_S2LP_SPI_SDN
,MBED_CONF_S2LP_SPI_GPIO0
,MBED_CONF_S2LP_SPI_GPIO1
,MBED_CONF_S2LP_SPI_GPIO2
,MBED_CONF_S2LP_SPI_GPIO3);

Add Timeout rescheduling test

12942

Summary of changes

The Timeout drift test uses rescheduling inside a callback, but it is currently disabled due to lack of stability. Rescheduling using relative timeouts inside the callback is a bad technique as it leads to drift, so I understand the test being disabled. It is better to use Ticker for a periodic callback or to use Timeout::attach_absolute.

Add a simpler test that just ensures the callback is called repeatedly - this test would detect issue #12940, and should not have stability problems.

Convert Timeout test to Chrono

Now tests only the Chrono attach(duration) method, not the deprecated attach and attach_us calls.

Cypress: Misc target updates

12909

Summary of changes

  • Fix incorrect ADC range (was 0-2.4V, is now 0 - VDDA) (af39f05)
  • Remove CY8CPROTO_063_BLE (96f9915) and CYW943012P6EVB_01 (d058586) targets
  • Disable QSPIF on CY8CPROTO_062S3_4343W. It is incompatible with the XIP mode currently used for storing wifi firmware in external flash; instantiating a QSPIFBlockDevice would break Wifi firmware download. (a63fe7d)

Impact of changes

  • ADC range is changed for PSoC targets to align with documented API behavior.
  • CY8CPROTO_063_BLE and CYW943012P6EVB_01 targets are no longer available
  • QSPIF component is removed on CY8CPROTO_062S3_4343W

Migration actions required

  • Applications which utilize the analogin driver should update to handle the new range.
  • Applications which target CY8CPROTO_063_BLE or CYW943012P6EVB_01 should migrate to a new, still supported target, or remain on the mbed-os-5.15 release.
  • Applications on CY8CPROTO_062S3_4343W which need QSPIF and do not use wifi functionality can re-enable the QSPIF component in mbed_app.json.

Work around C++14 assert problem

12906

Summary of changes

During testing of #12425, a problem in ARM Compiler 6.13's assert was identified. This adds a general workaround and restores original code from that PR.

(Problem will ultimately be fixed in ARM Compiler 6.15, but the workaround seems to have no downside)

SDBlockDevice: Convert to Chrono

12904

Summary of changes

Convert SDBlockDevice to use new APIs from #12425.

Impact of changes

Eliminate use of deprecated APIs

Migration actions required

n/a

Nanostack HAL: Convert to Chrono

12903

Summary of changes

Convert Nanostack HAL to use new APIs from #12425.

Impact of changes

Eliminate use of deprecated APIs

Migration actions required

n/a

USB: Convert to Chrono

12902

Summary of changes

Convert ESP8266 driver wrapper to use new APIs from #12425.

Impact of changes

Eliminate use of deprecated APIs

Migration actions required

n/a

Rationalise Mail/Queue/MemoryPool timing APIs

12901

Summary of changes

Follow-up adjusting #12425 , improving (in my opinion, at least) the timing for Mail, Queue and MemoryPool. I think 12425 was too conservative at cleaning up the unsatisfactory state of their timing.

alloc APIs were generally inconsistent - take the opportunity to align with other APIs like Semaphore.

alloc -> try_alloc
alloc_for -> try_alloc_for
alloc_until -> try_alloc_until

In future the name alloc can be used for an untimed blocking allocation.

To line up with MemoryPool/Mail alloc, rework naming of get/put

Queue::get -> try_get, try_get_for
Queue::put -> try_put, try_put_for
Mail::get -> try_get, try_get_for
Mail::put (no change, but assert that it works)

In the future the names get and put can be used for untimed blocking operations. In the interim, you have to use try_get_for(Kernel::wait_for_u32_forever).

Mail::put differs in that it has always been a non-blocking call, but it can be assumed to always succeed when used correctly, because the Queue has enough room to store a pointer to every block in the MemoryPool. It could in future be made a void return, similar to the change made to Mutex::lock.

Impact of changes

Existing timing code will generate deprecation warnings, but there should be no functional change.

Migration actions required

Users should migrate to use Chrono-based APIs as directed by the deprecation messages

ESP8266: static address configuration and dhcp enable/disable added

12721

Summary of changes

Fixes #12552
I implemented the set_network function, which configures static network address and set_dhcp function.
This function is optional, so no greentea tests are available. I only tested on RAAS, but had no way of really allowing static IP address setting. @star297 , would you please check if this PR works for you?

Impact of changes

New functionalities of ESP8266 are now available.

Migration actions required

None.

ESP8266: Convert to Chrono

12433

Summary of changes

Convert ESP8266 driver wrapper to use new APIs from #12425.

Impact of changes

Eliminate use of deprecated APIs

Migration actions required

n/a

NFC: Convert to Chrono

12432

Summary of changes

Convert NFC code to use new APIs from #12425.

Impact of changes

Eliminate use of deprecated APIs

This work originally revealed off-by-1000 error on timing, but that has already been fixed in #12401, so no functional change.

Migration actions required

n/a

Cellular: Convert to Chrono

12430

Summary of changes

Covert cellular code to use new Chrono APIs from #12142

Note that documentation for random_max_start_delay config setting has
been changed to indicate that the setting is in seconds, and always has
been. No functional change.

Impact of changes

Eliminate use of deprecated core APIs.

Some public cellular APIs now have dual Chrono and non-Chrono forms - non-Chrono not yet deprecated.

DTLSSocketWrapper: Convert to Chrono

12429

Summary of changes

Convert DTLS wrapper to use new APIs from #12425.

Impact of changes

Eliminate use of deprecated APIs

Migration actions required

n/a

nsapi_dns: Convert to Chrono

12428

Summary of changes

Convert DNS client code to use new APIs from #12425.

Impact of changes

Eliminate use of deprecated APIs

Migration actions required

n/a

Mark PSA as an experimental API

13003

Summary of changes

This PR moves PSA to a FEATURE_EXPERIMENTAL_API folder. No change to feature in this folder will be considered breaking, so they can be changed in any release type.

Impact of changes

Migration actions required

The EXPERIMENTAL_API feature will need to be enabled after this PR to enable PSA.

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 section 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.

TLS: 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

TLS: 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

TLS: 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 accelerated engines.
  • Workaround: There are no known workarounds.
  • Reported Issue: Reported by the development team.
  • Priority: MAJOR

TLS: Hardware-accelerated hash creates CBC padding oracle in TLS

  • Description: The current countermeasures against CBC padding oracle attacks in Mbed TLS call a low level internal API. The implementation of this API might not be possible with the hardware accelerator API and even if it is, the timing might still have detectable differences. The lower level API is called out of sequence and accelerators that are not aware of this might crash.
  • Workaround: Keep MBEDTLS_SSL_ENCRYPT_THEN_MAC enabled in mbedtls/config.h and enable the Encrypt-then-MAC extension (RFC7366) on the peers side.
  • Reported Issue: Reported by the development team.
  • Priority: MAJOR

Crypto: Mbed OS ATECC608A example fails to build with IAR

  • Description: The current ATECC608A secure element example fails to build with the IAR toolchain. The Microchip-provided cryptoauthlib library does not build with IAR.
  • Workaround: Use a different toolchain, like GCC_ARM.
  • Reported Issue: MicrochipTech/cryptoauthlib#116
  • Priority: Minor

Tools: Error when running mbed test --compile/run list

  • Description: The error, "pkg_resources.DistributionNotFound: The 'mbed-ls==1.*,>=1.5.1' distribution was not found and is required by icetea, mbed-flasher" is observed when running the command "mbed test -m K64F -t ARM --icetea --compile-list -vv".
  • Workaround: None
  • Reported Issues: #8064
  • Priority: Major

Wi-SUN Hardfaults with IAR compiled image with Mbed OS 5.15.0

  • Description: Mesh Wi-SUN FAN may HardFault in rare occasions with IAR8 compiled binaries during initial network connection.
  • Workaround: The workaround is to use other compilers.
  • Reported Issue: IOTTHD-3898
  • Priority: Major

Test Report

Release automated CI test

In addition to regular Pull Request test and Nightly test, We also ran a branch test on mbed-os 6.0.0-RC2

Results for the tests we run on CI (PR, Nightly, Branch):

  • Compilation tests: ARMC6 - SOME FAILS
  • Compilation tests: GCC_ARM - ALL PASSED
  • Unittest - ALL PASSED
  • Greentea Test - SOME FAILS
  • Example Test - ALL PASSED
  • Exporter Test - ALL PASSED
  • Cloud Client integration Test - SOME FAILS
  • Memory Usage Test - ALL PASSED
  • Wisun Mesh Test - ALL PASSED

We have the following issues on the test jobs:

  • LTO failed on ARM compiler compile tests ---- Tracked by defect MBEDOSTEST-1083 - ARMC6 Failed to build mbed OS with LTO options Open
  • NUCLEO_F767ZI failed on storage tests ---- Tracked by defect IOTSTOR-1032 - NUCLEO_F767ZI failed with features-storage-tests-kvstore-general_tests_phase_1&2 Open
  • CY8CPROTO_62_4343W failed on sleep/deepSleep tests ---- Tracked by defect IOTHAL-560 - CY8CPROTO_062_4343W target failed at sleep/deep sleep test Open
  • NUCLEO_F303 and NUCLEO_F411 failed on client example compile tests

Test Numbers

  • Greentea test number 1486 (+65 )
  • Unittest number 735 (+27 )

Toolchain Coverage

In mbed OS 6.0.0 release. we are testing following toolchains:

  • ARM compiler 6.13
  • GCC_ARM 9-2019-q4-major

The following toolchains have been dropped from the mbed OS 5.15.0 release

  • ARM compiler 5.06 update 6
  • IAR 8.42

Targets Coverage

In mbed OS 6, the compilation test targets scope has not changed, remains all mbed OS enabled targets.

Greentea test targets have been changed slightly:

At the time of the mbed-os 6.0.0 release, we run the greentea tests on the following 9 targets:

  • NRF52840_DK
  • DISCO_L457VG_IOT01A
  • K64F
  • K66F
  • NUCLEO_F303RE
  • NUCLEO_F411RE
  • NUCLEO_F429ZI
  • NUCLEO_F767ZI
  • CY8CPROTO_062_4343W

Compared to mbed-os 5.15.0, the following targets been removed as they are not supported in mbed-os-6

  • LPC55S69
  • UBLOX_C030_U201
  • UBLOX_EVK_ODIN_W2

Coverity

In mbed OS 6.0.0 release, coverity issues increased from 49 to 94 .

Code Coverage

Test Code Coverage been tracked and information is published on COVERALLS

Memory Monitoring

mbed-OS ROM size improved for around 16K and static RAM size improved 1.5K compare to mbed OS 5.15 release. The main reason for the improvements is because we are enabled using minimal-printf by default.

Contents

Ports for Upcoming Targets

12338
STM32L5 : add DISCO-L562QE board support

12286
Add new target: NUCLEO_L452RE-P

12597
Cellular: Add ALT1250 PPP cellular target

12458
Add Musca B1 target

12787
Cypress: Add CYESKIT-064B0S2-4343W

12603
Add target CYSBSYSKIT_01

12576
M487: Support custom board

12801
Add base support for STM32H745

Fixes and Changes

12385
DeviceKey Root of Trust generation refactored.

12256
Update psa binaries for 6.0.0-alpha1

12238
Minimal-printf: Fix wrapping of printf functions for the ARM compiler

12236
Fix baremetal build failures

12218
tests tickers: adapt ticker_interrupt_test() test case for high frequency tickers

12217
Nuvoton: Add DEVICE_USBDEVICE detection in usbd implementation

12216
Fix dl_channel tests

12215
Cellular: Implementation of virtual get_ip_address funtion in ublox-api

12214
Cellular: Move string_to_pdp_type method to CellularContext

12202
Increase MSI clock frequency when exiting deep sleep

12200
Minor fixes for peripheral pins on Dragonfly Nano

12196
LWIP: don't pbuf_free(NULL) on socket close

12195
Corrected PPP debug trace flagging

12194
Nanostack Socket event handler fix

12193
Cellular: Move cellular event queue thread ownership to CellularDevice

12189
Removed hardcoded CY8CPROTO_062_4343W bt baudrate limit.

12188
Greentea test :Added the print in the exception handler

12186
STM serial init: Set pin function only if pin is defined (not NC)

12185
BLE: fix pointer not set to null on delete

12182
Update watchdog tests to run with bare metal profile

12181
Add DTLS in Connectivity's design document

12179
TESTS: Update testing of examples in mbed-os

12178
Fixes for LPC55S69_NS TLS tests

12176
Nuvoton: Support usbd

12175
Minimal-printf: Fix documentation as floating point is disabled by default

12173
Change size embedded in the temp_ram_page_data

12170
Nuvoton: Support dynamic heap configuration on IAR

12169
syntax error corrections - rm unnecessary semicolons

12162
CMSIS-pack update for STM32WB-family

12155
LPC11U24: Fix baremetal build and runtime error

12151
NRF5x: Fix baremetal linker error

12144
NRF52840: Use 2 region memory model for the ARM toolchain

12143
Blockdevice config changes to make it possible to run littlefs filesystem tests

12141
Thread: remove constructors deprecated in 5.1

12138
TESTS-MBED_HAL-COMMON_TICKERS no more executed

12133
Cellular: Suppress long AT traces

12132
LWIP: Remove unused MBOX configs

12131
Cellular: Fix Gemalto/Cinterion driver

12128
Remove unsupported folder

12123
Cellular: Refactor cellular variable visibilities

12122
ATHandler refactoring

12121
Serial: Deprecate the class and promote UnbufferedSerial instead

12120
ONME-4433 SocketAddress::operator== should also check port

12118
Fixed Serial ambiguity for enable_input and enable_output

12114
Cellular: Fix to not use all zero address for DNS

12113
Fix for issue #12104 (STM32 can_init_freq() ignores frequency)

12111
Microlib: Disable feof function usage in general filesystem test

12110
Moved CP Max recv len into mbed_lib.json

12109
Replace RawSerial as it has been deprecated

12108
Wi-sun network event handler update

12101
Bare metal: Retrieve error context after crash

12099
Implemented recommended fix from https://github.com/STMicroelectronic

12098
Wrong order of code fixed

12097
cypress target: fix iar warnings

12095
Update MXRT1050 to SDK 6.0

12092
Refactored away onboard_modem_api because it is not needed at all

12089
Update offloaded TLSSocket to TLSSocket design

12086
TARGET_STM: fix flash api 64bit address alignment on L4 and WB

12085
PSA setup template changes.

12083
Cellular: Add check for network congestion in BC95 driver

12081
Expose target_offset and header_offset parameters in targets.json

12080
Unittest cleanup made

12079
Coverity fixes

12078
Cellular: Add PPP/IP config flags in CellularInterface.json

12073
Unittests: fix for PRs 12051 and 11996

12071
Minimal Console: Use static pin map

12069
STM32: astyle update

12068
Enabling small C library option and deprecating uARM toolchain

12067
STM32 GPIO IRQ : add a critical section in gpio_irq_init

12065
Non-IP socket implementation for NIDD over CP

12064
Valgrind support added for unittests

12063
Move get_ip_address_if() to NetworkStack and include it in multihoming test

12061
NANO130: Support dynamic heap configuration on IAR

12057
NUC472/M487: Limit EMAC receive frame length as 1518

12055
cmsis: remove arm math

12052
fpga tests: clear uart fix

12051
Unittest configuration mechanism improved

12050
Fix TDBStore sizes for SecureStore tests

12048
SharedPtr: add nullptr constructor

12045
Netsocket test adjusted to Wisun

12044
increased qspi size for cypress integration fs tests

12043
Modify itm_api.c for EFM32 targets

12041
Add QSPI and relevant test support for target EP_AGORA

12038
Cypress: Remove qspi_frequency() call.

12037
SharedPtr: add move operations

12034
SysTimer: Suppress implicit virtual warning

12032
Add MBED_FALLTHROUGH attribute

12029
STM32F0: create STM32F091xC target

12027
Modify nsapi_dns tests to be module tests

12026
Update HAL file to Toshiba's TMPM4G9

12025
Platform: Delete an unused astyle output file

12024
ONME-4366 - Fix UBLOX_EVK_ODIN_W2 fails in emac tests due to heap mem

12020
Fix issues in setting radio access technology

12019
Cypress: rework lptimer hal

12018
STM32_EMAC cleanup

12017
NVStore: already deprecated implementation removed

12013
Add UDP ECHOTEST with connect/send/recv calls

12012
USB device HID test: remove duplicated define

12011
STMOD_CELLULAR: improve debug print

12008
Cellular: Fix ATHandler string handling

11997
Remove deprecated FunctionPointer class

11996
CellularBase/AT_CellularBase removal

11995
MCU_NRF52840 target configuration fixes

11988
Small fixes for SecureStore

11987
TDBStore refactoring

11986
Storage related test improvements and small fixes

11980
DISCO_L4R9I: update clock configuration for all clock sources

11976
LWIP system mailbox overflow fix

11975
PPPinterface: remove faulty address getter check for invalid pointer

11962
Bug in mbed_alloc_wrappers.cpp

11961
UnbufferedSerial: Introduce the class to replace RawSerial

11957
MbedCRC and CRC HAL revisions (6.0 redo)

11952
Fix for Dragonfly nano and registration for LTE-M plans

11927
Speed up unittests by not limitting Make to spawn more processes

11920
Simplify pull request template headers and instructions

11897
MbedCRC: improve init value handling and tests

11891
minimal-printf: Enable using a target configuration parameter

11880
Remove deprecated Callback methods

11878
Improve API documentation and test coverage

...

Read more