mbed-os-6.0.0-alpha-2
Pre-releaseWe are pleased to announce the Mbed OS 6.0.0-alpha-2 release is now available.
Summary
This is the second preview of approaching Mbed OS 6.0 release. We continue our efforts to remove previously deprecated APIs and features. This release intentionally breaks compatibility both with Mbed OS 5 series and previous Mbed OS 6 preview. For details of breaking changes please have a look at the release notes below.
Migration Guide
This section lists specific changes which are part of this release and may
need special attention.
Add an exception for ARMC5 toolchain build
Summary of changes
The Arm Compiler 5 is no longer supported so 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 enviroment to use Arm Compiler 6 refer
Remove CPU usage example from CI build
Summary of changes
- Removed the CPU usage example from the Mbed OS build tool CI configuration as it's deprecated.
Impact of changes
With these changes, Mbed OS CI will no longer build CPU usage example on every PR check.
Ble driver set random static address
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 supersede #12235 .
MXRT1050 Flash support
Summary of changes
Add Flash support for MXRT1050
Cellular: Remove support for multiple ATHandlers
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
RAM increase is because now ATHandler
is no longer created with new -operator but is now member of AT_CellularDevice
, so image tool is able to count it. Actual total RAM consumption has decreased due to removed variables.
Impact of changes
Major changes:
- Dependency to FileHandle removed from base classes
AT_CellularDevice
owns the defaultFileHandle
and shares it with AT -classes- Controlling hang-up -detection moved as
CellularContext::configure_hup()
. Cannot be configured viaCellularDevice
any more.
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 takesFileHandle
as parameterCellularDevice::get_file_handle()
removed.ATHandler::get_file_handle(
) can be used instead.
MIMXRT1050: Add Watchdog support
Summary of changes
Add WatchDog support for MXRT1050 EVK
Cellular: Remove API's empty default implemetations
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".
Summary of changes
- Rename
target.default_lib
totarget.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
Summary of changes
Disable coverage report filtering because of poor results.
e.g. mbed test --unittests -r Socket --coverage html
g
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.
Add KSZ8041 as a supported PHY for the LPC17xx series
Summary of changes
Adds the Microchip KSZ8041 PHY as a supported device for the LPC17xx series.
storage_abstraction: deprecated since Mbed OS 5.5 and now removed
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
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.
Cellular: Remove deprecated CellularDevice::stop()
Summary of changes
Cellular: Remove deprecated CellularDevice::stop()
Impact of changes
Removed method CellularDevice::stop()
Migration actions required
CellularDevice::shutdown()
should be used instead.
Cypress: add SoftAP host tests
Summary of changes
Cypress: Initial commit of SoftAP host tests.
Basic SoftAP test with host as STA.
ESP8266: Add built-in hostname resolution handling (disabled by default)
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
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
Summary of changes
Upgrade to Mbed TLS 2.20.0d1 and Mbed Crypto 3.0.0d0.
Thread: remove methods deprecated in 5.10
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
orThisThread::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
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
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
Summary of changes
Add a build profile extension with the link-time optimizer enabled for ARMC6 toolchain.
Known Issues
There are no new known issues with this release.
Contents
Ports for Upcoming Targets
12338
STM32L5 : add DISCO-L562QE board support
12286
Add new target: NUCLEO_L452RE-P
Fixes and Changes
12424
Nuvoton: Fix GPIO IRQ and RTC
12422
Cypress Asset Update
12419
Fix #12290: crash_log_parser on py3
12411
add FLASHIAP in targets.json for KVStore used in PDMC
12409
FIX: LPUART clock source selection should be left to serial driver
12408
LPC408X: Delete the ethernet_api.c files
12407
Disable restricted uart peripheral for NRF52840
12405
EthernetInterface fix detecting change of connection status on ARCH_MAX
12404
M2351: Update BSP and bugfix
12403
FPGA: Enlarge timeout with mbed_hal_fpga_ci_test_shield-i2c
12401
Remove float symbols from apps that use the NFCController class
12400
Add an exception for ARMC5 toolchain build
12399
Cellular: Delete created context if activation fails
12398
Add BlockDevice unittests and fix issues they revealed
12397
Testing: Fix buffer overflow in ATHandler_read_bytes UT test
12396
PDP Type needs to be IPV4V6
12395
I2CEEBlockdevice: fix i2c read return value
12394
Fix SDIO communication issue on Cypress 1M boards and other minor fixes
12393
Fix Musca-A1 gcc linker
12392
Fix psa_key_management_operations
12391
mergify: CI only if PR is without conflicts
12389
Update InterruptIn.h
12386
TEST: fix a bug in ATCmdParser test
12383
Fix thread_sleep_for with zero wake_delay
12382
Fix BufferedSerial visibility of private base class enum enumerators
12380
DISCO_L475VG_IOT01A: Add a list of restricted GPIO pins for testing
12379
Add STDIO UART as restricted for FPGA testing for all targets and support for restricting GPIO
12378
TEST: Refactor mbedmicro tests to use utest framework
12369
LPC1768: Fix ARM toolchain baremetal by defining 2 memory region
12368
Fix NRF52840_DK UART driver and adapt FPGA test
12366
M2351: Support GCC
12364
MIMXRT1050: Update for deep sleep latency
12363
Mergify: fix release version label
12362
TARGET_STM: L0 CUBE SPI async mode send next byte after previous one is read
12357
TARGET_STM32F1: don't set ADC common register when ADC doesn't support it
12356
Fix NRF51, NRF52 gpio_irq_init() function
12353
M2351: Support IAR
12350
implements i2c_free for STM
12349
Nanostack: Update Wi-SUN configuration
12345
USBMSD; NFCEEPROM; mbed_compat: Fix compiler warnings
12344
Unittests for DNS improvements
12342
LPC55S69: Fix UART & GPIO HAL to pass FPGA CI test shield tests
12341
STM32L4: Fix the UART RX & TX data reg bitmasks
12339
Cellular : add modem version in mbed trace
12338
STM32L5 : add DISCO-L562QE board support
12336
Disable write buffering on debug builds.
12335
Remove CPU usage example from CI build
12334
Update cellular drivers/tests for UBLOX_C030_R412M
12333
UDP echotests fix in case of no memory or device busy.
12332
FIX: Disable Analogin D13(PA_5) on some NUCLEO targets
12331
STM32: enable QSPI test with MX25LM51245G octo SPI
12330
Fix FAT filesystem ferror
greentea test(SD Component)
12329
AT_CellularStack: crash during TCP test
12327
Doxygen: don't extract static members
12326
Correct SysTimer absolute time calculations
12324
Fix inconsistency between mbed crc and psoc6 crc implementations.
12322
minimal-printf: README correction
12321
Ble driver set random static address
12320
ONME-3433 ESP8266 driver support for UDP get - modified ESP8266 drive
12317
MXRT1050 Flash support
12316
Fix general filesystem greentea test
12315
Add check for APPLE & MACH to fix unit tests on macOS
12312
Fix to sending IPV6 UPD packet fails IPv6 enabled in SoftAP intf
12310
Greentea DNS tests workaround.
12308
Tests: add missing mbed_trace.h multihoming header
12307
Fix the missing retrieve error context function call.
12305
Cellular: Remove support for multiple ATHandlers
12304
QSPIF: Enable QPI mode as a second option, if available
12303
Fix ARM compiler warning for microlib
12302
Remove _LIBCPP_EXTERN_TEMPLATE ARMCC compilation flag
12299
MIMXRT1050: Add Watchdog support
12297
Corrected minimal-printf README
12296
FPGA_CI_TEST_SHIELD : force all peripheral to be tested
12295
STM32H7 correct PWMOUT instances
12293
Cellular: Remove API's empty default implemetations
12292
Multiple labels need to be in an array of strings
12291
Minor optimisation to ATCmdParser unit test code
12287
Fix unittests on windows(mingw)
12286
Add new target: NUCLEO_L452RE-P
12282
Fix for issue #12268 (SerialBase.cpp: fix initialization list)
12281
Cellular: Refactor socket_stack_init() from generic to modem specific
12280
EFM32: add UART and LEUART for EFM32GG11
12278
Rename "default_lib" to "c_lib".
12275
Fix call to sorted by providing key to sort on.
12274
mergify: enable for any pull request
12273
unittests: disable coverage report filtering
12270
BUGFIX: SFDP Sector Map Table Parameter ID LSB is 0x81
12269
mergify: add fixes to the conditions
12267
Fix UDP socket test cases
12265
Refactor unnecessary functions from cellular driver
12263
unittest: fix coverage filtering
12262
Test: Increase the UART flush delay
12261
Cellular: Fix compilation fail with APN lookup enabled
12260
Add KSZ8041 as a supported PHY for the LPC17xx series
12258
Disable the cell AUX UART by default on EP_AGORA
12257
psa: Ensure spaces before partition name comment
12254
unittest: fix ATCmdParser test segfault
12253
storage_abstraction: deprecated since Mbed OS 5.5 and now removed
12251
Cellular: Remove friend definitions from cellular state machine
12249
Cellular: Remove deprecated CellularDevice::stop()
12245
NUCLEO_WB55RG - add device name "STM32WB55RGVx"
12243
Add timer shutdown after time stop on deinit
12241
M2351: Remove LPTICKER to spare memory for non-PSA minimal secure build
12240
Cypress: add SoftAP host tests
12239
Fix DNS multiple query hints to perform both IP4 and IP6 tests
12237
STM serial free: Set pin function only if pin is defined (not NC)
12234
ESP8266: Add built-in hostname resolution handling (disabled by default)
12231
Import latest python scripts and MCUBoot image
12230
TEST: use K64F replace DISCO_L475VG_IOT01A to run some example test
12228
Need RAM and ROM size for compilation
12227
Cellular: AT + QICSGP set up APN fix
12226
target_test - assert if sectors keyword missing
12225
Fix baremetal heap and stack initialisation
12223
RZ_A1H and GR_LYCHEE: Enable bootloader support
12220
NRF5x targets: Replace UARTSerial references with BufferedSerial
12213
ESP8266: Replace UARTSerial references with BufferedSerial
12211
Cellular: Replace UARTSerial references with BufferedSerial
12210
Fix for issue #10725: disable lp-ticker for STM targets which uses RTC/LSI for lp-ticker
12209
NXP target: Replace UARTSerial references with BufferedSerial
12208
ST targets: Replace UARTSerial references with BufferedSerial
12207
Add BufferedSerial class to replace UARTSerial
12201
TARGET_STM: FW driver files refactor proposition
12199
Format targets.json
12198
uARM: Fix deprecate warning printing wrongly for GCC_ARM/IAR toolchain build
12166
NRF52840_DK: Fix baremetal linker error
12160
nRF52: Properly configure nRF SDK for nRF52-series targets
12157
ESP8266: Avoid duplicate data sends
12154
NRF51822: Fix baremetal linker error
12153
Hackathon: Increase coverage of the SPI master FPGA test
12152
Updated 113 targets with missing detect_codes
12150
Update Mbed TLS and Mbed Crypto to latest as of 2019-12-20
12142
Thread: remove methods deprecated in 5.10
12139
HAL: Add a get_capabilities() function to ResetReason API
12060
Improve reliability of KVStore general tests
12035
Preparation for Callback changes
12023
GCC: remove -fno-delete-null-pointer-checks
11904
TOOLS: enable build greentea test coverage for HW
11874
ARMC6: Add a build profile extension with the link-time optimizer enabled
11433
FPGA CI shield: Add a watchdog timing test
Using this release
You can fetch this release from the mbed-os GitHub repository, using the tag "mbed-os-6.0.0-alpha-2".
If you need any help with this release please visit our support page, which provides reference links and details of our support channels.