Commit Graph

730 Commits (refactor_mbed_host_tests)

Author SHA1 Message Date
Rajkumar Kanagaraj ba04c1cf76 CMake: Add add_subdirectory of unittests
- add every libraries unittest directory into respective CMake
  which allows to include unittest source into build based on
  MBED_BUILD_UNITTESTS flag
2021-05-11 02:29:56 -07:00
Martin Kojtal b80128ff77
Merge pull request #14626 from jeromecoutant/DEV_STM32WB_1_11_1
STM32WB update drivers version to CUBE V1.11.1
2021-05-11 10:55:14 +02:00
Debdeep Saha d963a9af4a Added API to get Wi-SUN Neighbor Table 2021-05-10 20:00:32 +05:30
Martin Kojtal 26c6b75d3b
Merge pull request #14625 from paul-szczepanek-arm/fix-read-auth
BLE: Fix overwriting attribute data from read auth callback
2021-05-10 11:25:55 +02:00
Martin Kojtal acb43441bb
Merge pull request #14627 from pan-/fix-stop-periodic-advertising
Dispatch Gap::stopPeriodicAdvertising to the right function.
2021-05-07 12:41:29 +02:00
Martin Kojtal b7b4ca72cc
Merge pull request #14605 from paul-szczepanek-arm/tracix
BLE: Fix traces
2021-05-07 11:44:25 +02:00
pennam 5475c0995d CMake add network subdirectory 2021-05-06 15:39:57 +02:00
pennam 665c83b3eb Moved targets/TARGET_Cypress/TARGET_PSOC6/common/COMPONENT_WHD in connectivity/drivers/wifi/COMPONENT_WHD/network 2021-05-06 15:39:42 +02:00
pennam 6a4fd9d5e6 CMake add COMPONENT_WHD folder 2021-05-06 15:39:42 +02:00
pennam a29ca0724c COMPONENT_WHD moved into connectivity/drivers/wifi 2021-05-06 15:39:19 +02:00
Martino Facchin 9686fb6ac2 Patch add #include "cy_utlis.h" 2021-05-06 14:45:26 +02:00
Martino Facchin ebbbcabb05 Patch add rtos namespace 2021-05-06 14:45:15 +02:00
pennam 7cdf97492a CMake remove COMPONENT_WHD from emac/TARGET_Cypress 2021-05-06 14:44:58 +02:00
pennam 0db6218dc6 CMake add COMPONENT_WHD in emac 2021-05-06 14:44:41 +02:00
Martino Facchin ead29d6b83 WHD EMAC moved out of TARGET_Cypress 2021-05-06 14:44:23 +02:00
Jarkko Paso 37e42fb1b7 Mesh API: Functions to set/get/validate FAN v1.1 domain configuration. 2021-05-06 09:27:04 +03:00
Jarkko Paso 6c7789e31e Fixed astyle issue 2021-05-06 09:24:33 +03:00
Jarkko Paso 2f4b3426cb Mesh api: Added PHY mode and channel plan IDs 2021-05-06 09:11:20 +03:00
Paul Szczepanek 2041cc6b57 don't copy data into attr if size too big 2021-05-05 19:01:13 +01:00
Paul Szczepanek 0155bce867 allow zero length attribute reads 2021-05-05 18:58:24 +01:00
Paul Szczepanek 17bf70989d ignore offset, replace whole value of attr in auth callback 2021-05-05 18:40:59 +01:00
Vincent Coubard cec8a9dc8c Dispatch Gap::stopPeriodicAdvertising to the right function. 2021-05-05 18:32:47 +01:00
jeromecoutant f904d10bd6 STM32WB : BLE update from STM32Cube_FW_WB_V1.11.1 2021-05-05 17:22:54 +02:00
Paul Szczepanek 55ffb176d5 Copy data from read auth callback 2021-05-05 14:31:35 +01:00
Jaeden Amero 2300a56863 mbedtls: Don't attempt to use default_random_seed
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"
2021-05-04 13:56:54 +01:00
Martin Kojtal 6330299ac5
Merge pull request #14578 from jeromecoutant/PR_WB55MMG
STM32 : new DISCO_WB5MMG target
2021-05-04 10:48:26 +02:00
Martin Kojtal dace32aef6
Merge pull request #14602 from paul-szczepanek-arm/conf
Deprecate indications event onConfirmationReceived
2021-05-03 09:55:08 +02:00
Martin Kojtal 31d638dc1a
Merge pull request #14603 from paul-szczepanek-arm/compat
Avoid init class definition for compatibility
2021-05-03 09:54:54 +02:00
Martin Kojtal 1f57702d79
Merge pull request #14571 from boraozgen/bugfix/cmake-stm32-emac-init
CMake: STM32: Add missing emac init files
2021-04-30 15:40:05 +01:00
Martin Kojtal 64eb60e4cc
Merge pull request #14573 from artokin/nanostack_release_13_0_0_for_master
Nanostack release v13.0.0
2021-04-30 15:39:41 +01:00
Paul Szczepanek f872dfa5ca convert bitfield to bools 2021-04-29 19:07:31 +01:00
Paul Szczepanek 7211cd3e77 fix sm init trace to print string 2021-04-29 16:09:04 +01:00
Paul Szczepanek 52bc9e9f51 fix misleading privacy trace 2021-04-29 16:08:52 +01:00
Paul Szczepanek 172e9697da avoid init in header for compatibility 2021-04-28 16:29:26 +01:00
jeromecoutant ebc0035afd STM32 : new DISCO_WB5MMG target 2021-04-28 16:46:52 +02:00
Paul Szczepanek b61fc6b639 Deprecate indications event onConfirmationReceived 2021-04-28 14:02:56 +01:00
Martin Kojtal 331473a706
Merge pull request #14589 from plan-do-break-fix/Typo-corrections
fix(docs): corrects various typos in project documentation
2021-04-28 13:36:37 +01:00
Martin Kojtal 6f43f03657
Merge pull request #14553 from debdeep-arm/reset-ws-stats-master
Added API to reset MAC statistics and Wi-SUN statistics
2021-04-28 12:35:07 +01:00
plan-do-break-fix 915b45af23 fix(docs): corrects various typos in project documentation 2021-04-23 23:31:11 -05:00
Peter B 40c7914c64
add #include "wsf_os.h" into hci_drv_apollo3.h
Inclusion of wsf_os.h resolves unknown type errors in hci_drv_apollo3.h
2021-04-23 12:19:54 +02:00
Arto Kinnunen 2773394947 Merge commit 'fb72e8eba714116d3578e4f53010b104f48459f0' into nanostack_release_13_0_master
* commit 'fb72e8eba714116d3578e4f53010b104f48459f0':
  Squashed 'connectivity/nanostack/sal-stack-nanostack/' changes from 3183d87e41..0903b819c5
2021-04-21 10:20:07 +03:00
Arto Kinnunen 776d5db357 Merge commit '95ea4d93f31371978f0c6d969963fc6b3f58ce81' into nanostack_release_13_0_master
* commit '95ea4d93f31371978f0c6d969963fc6b3f58ce81':
  Squashed 'connectivity/libraries/nanostack-libservice/' changes from a526cc3f41..260d80f42d
2021-04-21 10:17:34 +03:00
Arto Kinnunen 6ad0cff2c8 802.15.4 STM S2LP driver update
Update STM S2LP driver to version v1.0.8
2021-04-21 10:14:04 +03:00
Arto Kinnunen 327ea8fa0f 802.15.4 Atmel RF driver update
Sync with master version v3.3.5
2021-04-21 10:11:52 +03:00
Bora Özgen f365860f3e CMake: STM32: Add missing emac init files 2021-04-20 16:31:02 +02:00
Martin Kojtal 216965e7e1
Merge pull request #14463 from mikaleppanen/start_wisun_if
Wisun: Add new start methods to Wi-SUN BR with WisunInterface parameter and deprecated the old ones
2021-04-15 17:30:22 +02:00
Debdeep Saha 83844f0fd4 Added API to reset MAC statistics and Wi-SUN statistics. 2021-04-15 18:28:44 +05:30
Martin Kojtal 7f42511673
Merge pull request #14529 from LDong-Arm/cmake_MULADDC
CMake: Fix Mbed TLS compilation on Cortex-M0/0+/1/M23
2021-04-15 14:29:27 +02:00
Lingkai Dong 86e7bc559b CMake: Fix Mbed TLS compilation for Cortex-M0/0+/1/M23
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.

Fixes ARMmbed/mbed-os-example-lorawan#220
2021-04-15 11:04:40 +01:00
Martin Kojtal 076cf3557a
Merge pull request #14546 from rwalton-arm/dev/rwalton-arm/fix-connectivity-driver
CMake: Fix mbed-802.15.4-rf driver
2021-04-15 11:43:30 +02:00
Martin Kojtal bedd5727af
Merge pull request #14486 from jeromecoutant/PR_CLI2_BLE
CMake COMPONENT_BlueNRG_MS: fix mbed-ble
2021-04-14 16:27:25 +02:00
Robert Walton c7c2580f9e CMake: Fix mbed-802.15.4-rf driver
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.
2021-04-14 12:30:35 +01:00
Martin Kojtal c5f28e6037
Merge pull request #14481 from jeromecoutant/PR_LORA_ERROR
STM32WL: update "lora.max-sys-rx-error"
2021-04-14 09:54:53 +02:00
Martin Kojtal 06a33d37f8
Merge pull request #14436 from paul-szczepanek-arm/remove-services
BLE: replace obsolete services with the new services repo
2021-04-13 16:00:58 +02:00
Martin Kojtal b1e26c6f35
Merge pull request #14435 from LDong-Arm/CRYPTOCELL310_linking
Fix missing linkage of mbed-mbedtls-cryptocell310 to mbed-mbedtls
2021-04-13 16:00:43 +02:00
jeromecoutant 57ce710119 [CMAKE] COMPONENT_BlueNRG_MS: fix mbed-ble 2021-04-12 11:33:57 +02:00
Paul Szczepanek d594aa2d4b add MBED_DEPRECATED comment for maintainers to find it 2021-04-08 09:53:23 +01:00
Martin Kojtal 9bbc8c914c
Merge pull request #14506 from noonfom/value-handle
Add GattUpdatesEnabledCallbackParams struct
2021-04-08 09:53:04 +02:00
Abbas Bracken Ziad 52483f3e30 Wrap call to value handle getter in MBED_ASSERT 2021-04-07 18:05:01 +01:00
Paul Szczepanek cc478b3896 add deprecation warning 2021-04-07 17:15:09 +01:00
Paul Szczepanek f34d31f350 remember if BLE scan paremeters are set 2021-04-07 16:40:46 +01:00
Abbas Bracken Ziad aaf9435f87 Use general name for POD 2021-04-07 12:34:25 +01:00
Mika Leppänen 989c8e85eb Added new start methods to Wi-SUN BR with WisunInterface parameter and deprecated the old ones
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.
2021-04-07 11:34:33 +03:00
Abbas Bracken Ziad d42c0a7269 Add value handle field to callback params 2021-04-06 17:39:10 +01:00
Abbas Bracken Ziad 8b07e97e50 Add value handle getter to Gatt Server 2021-04-06 17:24:08 +01:00
jarlamsa bc747dce09 Check for duplicate status callbacks before adding to the list
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.
2021-04-01 13:22:07 +03:00
Anna Bridge d2941186eb
Merge pull request #14460 from harmut01/baremetal_ambiq
Ambiq: Fix baremetal build profile when using CLI 1
2021-03-31 11:29:25 +01:00
Anna Bridge cbc6209a11
Merge pull request #14442 from artokin/update_set_network_size_doc_master
Improve WisunInterface set_network_size docs
2021-03-29 11:22:36 +01:00
jeromecoutant b63ca7c800 STM32WL: update "lora.max-sys-rx-error" 2021-03-29 09:25:25 +02:00
harmut01 8d502d4af3 Ambiq: Fix baremetal build profile using CLI 1
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`.
2021-03-24 09:22:21 +00:00
Arto Kinnunen e91f9cb6a1 Review corrections
Updated based on review comments.
2021-03-23 13:50:58 +02:00
Martin Kojtal 1fdb1c18e8
Merge pull request #14198 from ARMmbed/feature-bluetooth-traces
Feature bluetooth traces
2021-03-22 10:59:44 +01:00
jeromecoutant eca714c93f [STD-PIN] update tests and components 2021-03-18 17:01:50 +00:00
Lingkai Dong 4c6f8867d4 Make CryptoCell 310 part of mbed-mbedtls on supported targets
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.
2021-03-18 12:10:11 +00:00
Paul Szczepanek d43d4a0e7e fix cordio include path 2021-03-18 11:30:43 +00:00
Paul Szczepanek 1afbbebc96 fix include path for dm_api.h 2021-03-18 11:27:42 +00:00
Arto Kinnunen 06e5db993f Improve WisunInterface set_network_size docs
Clarify set_network_size usage and possible parameter values.
Clarify wisun-network-size help text in mbed-mesh-api/mbed_lib.json
2021-03-18 11:50:54 +02:00
Paul Szczepanek c6d2ca17d5 remove obsolete services and add information about the services repo 2021-03-17 13:05:25 +00:00
Paul Szczepanek dc6e9db067 add tracing to scan state (#14225) 2021-03-15 15:35:52 +00:00
Paul Szczepanek a62c1e1228 add missing include 2021-03-15 15:35:52 +00:00
Vincent Coubard cf33ed0668 BLE: Add MemorySecurityDb.cpp and SecurityDb.cpp to CMake. 2021-03-15 15:35:52 +00:00
Vincent Coubard d1672aaa64 BLE: Update level of traces in GattServer 2021-03-15 15:35:52 +00:00
Vincent Coubard 957486e0eb BLE: Move traces out of header file to avoid collisions.
This change required the creation of the implementation files of SecurityDb classes.
2021-03-15 15:35:52 +00:00
Vincent Coubard 6adaefd9f3 BLE: Fix traces parameter warnings 2021-03-15 15:35:52 +00:00
Vincent Coubard 65c61a1ca9 BLE: Remove uses of tr_as_array in favour of to_string. 2021-03-15 15:35:52 +00:00
Vincent Coubard c674990820 BLE: Fix sprintf overflow in trace helpers. 2021-03-15 15:35:52 +00:00
Vincent Coubard 52a3de6657 BLE: Move tracing helpers into implementation file. 2021-03-15 15:35:52 +00:00
Vincent Coubard c13e590723 BLE: Refactor UUID string helper to match mbed-os coding style. 2021-03-15 15:35:52 +00:00
Vincent Coubard e001098699 BLE: Fix out of range memory access in trace helper. 2021-03-15 15:35:52 +00:00
Abbas Bracken Ziad db9428f18f Add tracing to BLE Gatt Server (#14107)
* 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
2021-03-15 15:35:52 +00:00
Abbas Bracken Ziad f4febdcb9d Add tracing to BLE GAP (#14117)
* 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
2021-03-15 15:35:52 +00:00
Paul Szczepanek 91d4b48989 BLE: add traces to gatt client (#14165)
* 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>
2021-03-15 15:35:52 +00:00
Paul Szczepanek 7b08388be6 Add traces to HCI, BLE instance, Security DB and WSF cordio traces (#14138)
* 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>
2021-03-15 15:35:52 +00:00
Vincent Coubard 5aa76e566a BLE: Add privacy trace (#14127)
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.
2021-03-15 15:34:34 +00:00
Martin Kojtal b4abfe6709
Merge pull request #14422 from pan-/lora-cancellation
Fix Lora timer cancellation
2021-03-12 13:17:21 +00:00
Martin Kojtal 1cb25da7ae
Merge pull request #14419 from jeromecoutant/PR_MBEDH
STM32: remove mbed.h include in connectivity
2021-03-12 10:55:32 +00:00
Martin Kojtal 6aef1af9e0
Merge pull request #14342 from JojoS62/fix-lwIP-add_dns_server
use calloc for new_interface_server
2021-03-12 08:44:50 +00:00
Martin Kojtal 9e0495a770
LoRaWANTimer: add new line at the end of the file 2021-03-12 08:24:16 +00:00
Vincent Coubard 9781418e31 Lora: Clear callback ID when timer callback is executed. 2021-03-11 21:00:43 +00:00
Vincent Coubard 4885739c4e Lora: Add clear method to LoRaWANTimer.
This function must be called by the callback registered in init.
It clears the timer_id to prevent abusive use of the stop methods on expired timer.
2021-03-11 20:59:45 +00:00