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.
Mbed TLS 2.24.0 has added a new function mbedtls_ecp_write_key()
which is the reverse of the existing mbedtls_ecp_read_key(). This
function should be platform agnostic, but needs to be copied into
Cypress's hardware-accelerated ECP driver as part of the updated
API.
The Mbed TLS importer accidentally imports Makefile and .gitignore
from Mbed TLS's `library/` directory. This commit restricts the
pattern to .h and .c files only, and removes the unnecessary files.
Files have been automatically imported by setting MBED_TLS_RELEASE to
mbedtls-2.24.0 in connectivity/mbedtls/tools/importer/Makefile and
running `make` in that directory.
- Make packet trace optional, can be enabled by enabling macro
STM32xx_DEEP_TRACE
- Shorten traces during driver initialisation to avoid problems with
driver startup when soft reset is used.
Refactor all Cypress targets to be CMake buildsystem targets. This removes
the need for checking MBED_TARGET_LABELS repeatedly and allows us to be
more flexible in the way we include MBED_TARGET source in the build.
A side effect of this is it will allow us to support custom targets
without breaking the build for 'standard' targets, as we use CMake's
standard mechanism for adding build rules to the build system, rather
than implementing our own layer of logic to exclude files not needed for
the target being built. Using this approach, if an MBED_TARGET is not
linked to using target_link_libraries its source files will not be
added to the build. This means custom target source can be added to the
user's application CMakeLists.txt without polluting the build system
when trying to compile for a standard MBED_TARGET.
The PSA crypto tests in
connectivity/mbedtls/tests/TESTS/mbedtls/sanity/main.cpp are only
supported for Arm-v7M PSA targets. For Arm-v8M PSA targets, crypto
regression tests provided by TF-M are used. Refer to
https://github.com/ARMmbed/mbed-os-tf-m-regression-tests for more
information.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
The test `test_crypto_asymmetric_encrypt_decrypt` was incorrectly
setting the key usage flags. The key usage is updated to support both
encryption and decryption.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>