compiler errors as mbed-cli only generates "-D" macros only for
"macros" defined in targets.json
TF-M task link: https://developer.trustedfirmware.org/T396
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
As the build tool in mbed-os 5.13 cannot appropriately deal with a segmented
bootloader when combining it with an application, this commit adjusts the
size reserved for interrupts (via the linker file) to avoid a bootloader
segmentation due to an unpopulated ROM area.
The microcontroller has a total of 60 vector interrupts + 16 exception
handlers. The allocated ROM flash for interrupts should be (60 + 16) x word
size in bytes = 76 x 4 = 304 = 0x130.
This commit changes the interrupt reserved space from 0x140 to 0x130.
In Mbed OS, there are configuration options with Mbed TLS that we
are more comfortable allowing than we do with Mbed TLS on its own.
Add a check-config adjusting script to enable removing or changing
options in check_config.h
Unwind previous commit and restore original behaviour for binding,
pending further investigation.
Some functions like `EventQueue::call` require precisely matching
argument types to get the correct overload, as before.
Others like `EventQueue::event` permit compatible types for binding, and
those handle the 0-5 bound arguments non-variadically in order to
correctly locate the free arguments in deduction.
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Use a SERIAL_FLUSH_TIME_MS value consistent with other tests.
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Remove explicit calls to sleep.
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Previous commit just replaced instances of "class B0, class B1, class
C0, class C1" with "class... BoundArgs, class... ContextArgs".
This loses the requirement that the numbers must match.
Now, the original code was also inconsistent as to whether it used
separate types for the target function and the call input parameters.
Some forms just used B0, B1 as parameters rather than separate C0, C1.
I believe the separate parameters would have been primarily to avoid
template deduction confusion - eg if int was supplied to a B0 parameter
but the function took char as B0, there would be an ambiguity. But the
fix didn't seem to be fully applied.
Rewritten all templates parameterising on function pointer type and
input arguments so that they use `type_identity_t<BoundArgTs>...` as
input parameters to match the target function.
This has the subtle effect that any conversion happens at invocation,
before storing to the context, rather than when the context calls the
target.
Variadic templates can reduce Event.h from 4,100 lines to 300, and
EventQueue.h from 3,400 to 1,000, so 6,000 lines saved total.
End result isn't totally variadic, as we still need specialisations
for storing 0-5 values in contexts, but that specialisation is now
in exactly one place.
Only change other from switching to variadic templates is using
delegating constructors instead of the `new (this)` trick. That trick is
still used in the assignment operator.
Minor documentation correction. It's possible that the separate
simplified variadic Doxygen version not be needed now, but I've left it.
The bulk of Callback.h was auto-generated as 6 specialisations, handling
zero to five arguments.
This can now be handled without specialisation using C++11 variadic
templates, reducing the file from 4,900 lines to 900 lines.
This should reduce compilation time, and offset potential increases from
use of `<type_traits>` or a local `mbed_cxxsupport.h` equivalent.
Several other improvents to `Callback` are possible and/or desirable
with C++11, such as the ability to store lambdas, but this commit is
purely the variadic simplification.