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.
ARMC6's assert macro does not work in C++14 constexpr context as it should.
By defining __DO_NOT_LINK_PROMISE_WITH_ASSERT, we deactivate the
extension that breaks it (having `__promise` inside `assert` - see the
compiler manual).
The extension does not appear to be useful - we have no code using
ARMC6's `__promise` directly, and putting a `__promise` inside the
assert does not appear to affect code generation in my tests.
Avoid surprising users. Use the Mbed OS default baud rate. Applications
that want to see TF-M debug prints can both enable and set their baud
rate at the application level. Mbed OS should not turn on TF-M debug
prints nor surprise the user with a non-default baud rate.
Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
Remove all PSA S-mode only code, as it is unused. Only PSA S targets
would use the code, and we've removed those targets in a previous
commit.
Ensure all tests for S-mode code we are deleting is also removed, even
if that code would run in NS-mode. Keep any tests that also test our PSA
emulation support (for single v7-M targets).
Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
* Timer test - handle removal of Timer(ticker_data_t *)
* Timer test - use Chrono, don't test deprecated methods
* Kernel tick count test - TEST_ASSERT_WITHIN -> TEST_ASSERT_INT_WITHIN
* Mutex test - fix up Chrono changes
* SysTimer test - adapt to SysTimer Chrono changes
* Thread test - use Chrono
* SysTimer - devirtualize destructor
Return the correct filehandle based on the mode requested. The mode is used
as the pathname is always the default one (":tt") for Microlib. The
previous implementation relied on three successive calls to open the std
I/O device handles, this was not the case.
mbed_minimal_putchar assumed that buffer being NULL meant that it
should print to a file. This caused a system crash when calling
snprintf with both buffer and stream set to NULL.
It is valid to call snprintf with a NULL buffer; nothing should
be outputted, but the string length should be measured.
* Optimise clearing by adding `nullptr` overload. This overload means
`Callback(NULL)` or `Callback(0)` will no longer work; users must
use `Callback(nullptr)` or `Callback()`.
* 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.
Define copy operators public and deleted rather declaring them private
and undefined. Will give immediate compilation errors rather than
delayed linking errors.