Commit Graph

32810 Commits (9d0bd3abd9cadca4b4fa97473e1dbd862495079d)

Author SHA1 Message Date
George Psimenos a28a8684c9 Remove ownership in QSPI driver 2021-03-17 13:26:25 +00:00
Lingkai Dong 6c405d2492 USB: use fully-qualified RTOS include paths
The Arm Compiler is case sensitive and unable to distinguish
between `Thread.h` from Mbed OS RTOS and `thread.h` from TF-M's
OS wrapper, for example. This resolves compilation failures due to
wrong includes.

To resolve this, use the fully-qualified include paths for the
RTOS API.
2021-03-17 09:41:56 +00:00
Lingkai Dong eeae3d73dd Import OS wrapper from the vanilla TF-M
Previous, we patched TF-M to replace its OS wrapper with CMSIS RTOS
to resolve manage management issue when integrated with Mbed OS. But
as of TF-M v1.2, the OS wrapper has been reworked in the vanilla TF-M,
and now it makes identical calls to its underlying CMSIS RTOS as our
patches do. So, we remove our patches and use vanilla TF-M's OS
wrapper instead to avoid extra maintenance overhead.

This commit re-imports TF-M files associated with the OS wrapper.
2021-03-17 09:41:56 +00:00
Martin Kojtal a0ee432279 CMake Freescale: add freescale prefix to avoid conflict with NXP 2021-03-16 17:30:09 +00:00
jeromecoutant 34f02ff573 STM32 I2C : correct deinit
Set port mode back to Analog (reset value)
2021-03-16 15:05:37 +01: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 f572e5d5a5 Update .github/issue_template.md
Reword traces addition.

Co-authored-by: Paul Szczepanek <pawel.szczepanek@arm.com>
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 f515c41a76 Github template: Recommend to join traces to connectivity issue. 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
Hugues Kamba ff0756d338 CMake: Fix STM target build failures
Ensure the linker and startup files listed match
with the correct letter case as some host systems
are case sensitive.
2021-03-15 14:11:23 +00:00
mbedmain c73413893f Update Mbed version block 2021-03-15 12:45:41 +00:00
Martin Kojtal ad8b9f651e CMake targets: remove labels usage, not required anymore 2021-03-15 11:46:15 +00:00
Martin Kojtal 68fb11e912
Merge pull request #14418 from hugueskamba/hk_cmake_fix_ep_atlas
EP_ATLAS: Fix mbedtools build errors
2021-03-15 10:06:59 +01:00
Martin Kojtal 9d48bfecb7
Merge pull request #14411 from hugueskamba/hk_cmake_fix_cortex_a9_warning
CMake: Fix Cortex-A9 flags for GCC_ARM toolchain
2021-03-12 15:12:05 +00:00
Bora Özgen 257e466d6c Add RTC clock source selection to targets.json 2021-03-12 15:34:13 +01:00
Bora Özgen 25a0aee77e Support RTC from HSE only for STM32F2/3/4 2021-03-12 15:33:28 +01:00
Bora Özgen 4d1161b689 Add HSE support to STM32 RTC 2021-03-12 15:33:27 +01:00
Martin Kojtal 8947e3cbeb
Merge pull request #14403 from saheerb/CY8CKIT064B0S2_4343W-115200
update baud rate of CY8CKIT064B0S2_4343W to 115200
2021-03-12 13:28:21 +00:00
Martin Kojtal a63bd12706
Merge pull request #14416 from hugueskamba/hk_cmake_fix_ff1705-l151cc
CMake: Fix FF1705_L151CC build
2021-03-12 13:26:41 +00:00
Hugues Kamba b193d97532 CMake: Fix Cortex-A9 flags for GCC_ARM toolchain
The -mcpu=cortex-a9 flag conflicts with the march=armv7-a flag.
Opted to keep mcpu=cortex-a9 as it is more specific and
allows GCC to perform better optimization.

The compiler is also changed to use soft-float ABI as it
was necessary to successfully build. Without it the application
appears to be built with soft-float ABI and it conflicts with
the previous setting which was built with hard-float ABI.
This may be related to: https://gitlab.kitware.com/cmake/cmake/-/issues/21173
2021-03-12 13:21:04 +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 09eac13ffb
Merge pull request #14423 from mczerski/stm32_faster_analog_out
STM32: AnalogOut: do not call HAL_DAC_Start in dac_write
2021-03-12 13:14:13 +00:00
Hugues Kamba 811a72af88 EP_ATLAS: Remove requirement for USB library if not required
Move inclusion of USB header file within the existing
conditional pre-processor directive so the USB library
is not required if USB stdio console is disable
2021-03-12 12:19:17 +00:00
Hugues Kamba 2da1972012 CMake: Fix EP_ATLAS build
Enable Onboard TELIT ME310 driver only when cellular library is included.

This allows us to remove the cellular library as a requirement

to build applications that do not require it (i.e Blinky).
2021-03-12 12:19:17 +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
Vincent Coubard 70920d442f Lora: Add LoRaWANTimer::clear in stubs 2021-03-12 09:48:50 +00:00
Marek Czerski f64e64dc9d STM32: AnalogOut: do not call HAL_DAC_Start in dac_write
dac_write (used by AnalogOut.write) calls HAL_DAC_Start
every time. It is required to call HAL_DAC_Start only once.
HAL_DAC_Start uses internally HAL_Delay(1) making AnalogOut
not suitable for use in high speed application.
This change removes call to HAL_DAC_Start in dac_write and
moves it to analogout_init.
2021-03-12 09:56:41 +01: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
Martin Kojtal eec320c991
Merge pull request #14339 from jeromecoutant/PR_F4_1260
STM32F4 update drivers version to CUBE V1.26.0
2021-03-11 17:14:28 +00:00
Martin Kojtal 306172570a
Merge pull request #14379 from OpenNuvoton/nvt_high_res_pwm
Nuvoton: Enlarge NuMaker PWM duty cycle range
2021-03-11 17:12:25 +00:00
Martin Kojtal dd7ca06176
Merge pull request #14346 from harmut01/baremetal_analog
Add bare metal support to Analog Device targets
2021-03-11 16:40:45 +00:00
Martin Kojtal 675754dbfa
Merge pull request #14405 from paul-szczepanek-arm/equeue-fix
Update event queue generation process
2021-03-11 16:40:38 +00:00
Martin Kojtal 9cc1f47c4c
Merge pull request #14410 from hugueskamba/hk_cmake_correct_listing_file_name
CMake: Fix Renesas build error on Linux
2021-03-11 16:39:36 +00:00