Don't attempt to use default_random_seed unless both PSA and Experimental API
support are enabled. This prevents errors when the Mbed TLS NV Seed feature is
being used on platforms that have PSA enabled by default, but not Experimental
API support by default.
[DEBUG] Output: compilation terminated.
[ERROR] In file included from ./mbed-os/connectivity/mbedtls/include/mbedtls/config.h:31,
from ./mbed-os/connectivity/mbedtls/include/mbedtls/entropy.h:28,
./mbed-os/connectivity/mbedtls/platform/inc/platform_mbed.h:26:10: fatal error: default_random_seed.h: No such file or directory
26 | #include "default_random_seed.h"
Due to a known issue in Mbed TLS's architecture determination
(ARMmbed/mbedtls#1077), we get the error
error: inline assembly requires more registers than available
when compiling `bignum.c` for Cortex-M0/0+/1/M23 which do not have
the macro `__thumb2__` set by the compiler.
The workaround is to define the macro `MULADDC_CANNOT_USE_R7` which
is already defined by Mbed CLI 1 but missing in our CMake support.
FixesARMmbed/mbed-os-example-lorawan#220
mbed-nanostack should depend on mbed-802.15.4-rf to avoid a linker error
with an undefined reference to `NanostackRfPhy::get_default_instance()`.
The error occurs when `device_has: 802_15_4_PHY` is defined and the
consumer depends on mbed-nanostack in their CMakeLists.txt. Previously
we linked mbed-nanostack to mbed-802.15.4-rf, so mbed-802.15.4-rf's
usage requirements weren't forwarded to consumers who depended on
mbed-nanostack.
With the previous configuration, the consumer would have to depend on
mbed-802.15.4-rf directly to avoid an issue. This seems like a layering
violation: it appears that mbed-nanostack is "the API" and
mbed-802.15.4-rf is one of several possible implementations which are
selected based on configuration macros.
This commit changes the flow of dependencies so that mbed-nanostack ends
up with the correct symbol definitions.
Previously WisunBorderRouter start() used NetworkInterface type for mesh interface, although only
WisunInterface type is possible for the call. Added a new overloads of the start with the
WisunInterface as mesh interface type and deprecated the old ones. This makes the calls stricter
about the interface type and safer. It also allows to remove the reinterpret_cast that causes
compiler warning on ARM compiler.
Duplicate status callbacks don't bring any value and can cause
memory leaks if caller calls for this function multiple times with
same status_cb. Also remove all the instances of the status_cb when
removing event listener.
Add mbed_lib.json in the Ambiq target folder of FEATURE_BLE to make sure
the library is excluded in the baremetal build profile unless explicitly
added in `mbed_app.json`.
The CMake target mbed-mbedtls-cryptocell310 was not linked by
default, resulting in a compilation error on targets that use
Mbed TLS:
fatal error: mbedtls_device.h: No such file or directory
Other Mbed TLS drivers simply add themselve to mbed-mbedtls, so this
commits does the alignment to fix the build error.
Note: the driver and the core Mbed TLS have mutual dependency, so
they need to be one CMake target.
* Add traces to GattServerImpl.cpp
* Update BLGS traces
* Add context to BLGS traces
* Set value of TRACE_WRITE_VALUES to 0
* Add param logs to BLGS traces
* Apply changes from code review
* Add trace helper for UUIDs
* C++ string library is not needed
* Update to_string function for UUIDs
The previous implementation had a memory leak and did not format 128-bit UUIDs
* Possibly faster ternary
* Add more context to adding/inserting of services/characteristic
* Add trace to events and event path
* Refactor to_string helper for UUIDs
* Add traces to GapImpl.cpp
* Add helpers and param logs
* Update GapImpl.cpp
* Move helpers to ble_trace_helpers.h
* Add traces to whitelist setter & getter functions
* Prepend parent dir. to ble_trace_helpers.h include line
* Resolve portability issue by using PRI* macro in place of %lu
* Add traces to PalGapImpl.cpp
* Complete PAL GAP traces
* Remove stray include
* Make 'echo' traces in PAL configurable
Some of the tr_info traces at the beginning of PAL functions are duplicates ('echoes') of those in GAP functions. This commit enables including/excluding of these traces in mbed_app.json by writing 1/0, respectively to the MBED_CONF_CORDIO_TRACE_PAL_ECHOES config macro. The default is to exclude 'echo' traces.
* Add missing spaces in tr_info traces
* Clean-up param log for set_extended_advertising_parameters
* Remove "Failed: " from every tr_error trace
* Apply changes from PalGapImpl.cpp review
* Apply changes from GapImpl.cpp review
* Use binary for channel map trace
B0: ADVERTISING_CHANNEL_37
B1: ADVERTISING_CHANNEL_38
B2: ADVERTISING_CHANNEL_39
We're assuming that the user understands the above. This could be documented somewhere.
* Replace more %lu w/PRIu32
* Add tr_info to terminateSync for user call
* Make trace group for PAL traces BLDM
* Remove [PAL] prefix from every PAL trace
* Add trace to setPeripheralPrivacyConfiguration
* Make set scan params tr_info dependent on selected PHY
* Add trace to GAP events
* Other GAP events required traces
* add traces to gatt client
* add files to cmakelists
Co-Authored-By: Vincent Coubard <vincent.coubard@arm.com>
* fixed tracing variable name
Co-Authored-By: Vincent Coubard <vincent.coubard@arm.com>
* add pal tracing
* add more traces for successfull actions
* put write and read as tr_debug in pal
Co-authored-by: Vincent Coubard <vincent.coubard@arm.com>
* ble HCI tracing
* fix typo in SM trace
* add BLE instance tracing
* route wsf traces to mbed tr_debug
* Update connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp
Co-authored-by: Vincent Coubard <vincent.coubard@arm.com>
* print hci on cordio side
* trace controller supported features
* log reset sequence
* include config for printing enums
* remove duplicate trace
* add tracing to security db
* workaround for macro error on use outside trace
Co-authored-by: Vincent Coubard <vincent.coubard@arm.com>
Add traces to the Bluetooth Security Manager and Privacy controller.
The traces are made to be comprehensive to improve the ux when users submit bugs.
A centralized set of helpers has been created to convert BLE types to string.
* BLE: Add SM traces
* BLE: Add traces to Security Manager PAL
* BLE: Make SM traces consistent.
- Prefix with Connection <id> - when appropriate.
- Display parameters after `:`.
- If multiple parameters should be displayed name then and print the value after =. They are separated by a `,`.
* BLE: Fix SM random number generation.
Only the first 8 bytes were generated from the stack.
* BLE: Regenerate CSRK if it is all zeroes.
* BLE: Add trace into privacy modules
Address resolution is set at the debug level as it is a very common operation and may clutter the output.
* Address trace review for SM:
- Put privacy traces in BLPR
- Add missing traces in PALSecurityManagerImpl.cpp
- Add missing EventHandler null pointer check
- Typo and parameters order fix.