Commit graph

46787 commits

Author SHA1 Message Date
Joakim Andersson
9205fe0a3a Bluetooth: host: Return error code if disconnect has invalid parameters
Return the error code from the disconnect command to the application
when an invalid disconnect reason has been provided.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-12-15 11:20:34 +01:00
Joakim Andersson
068af16e18 tests: bluetooth: Use a valid disconnect reason
Update test_connect1 test case to use a valid disconnect reason.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-12-15 11:20:34 +01:00
Joakim Andersson
353bfc0fc1 west.yml: Update EDTT version to include disconnect reason fixes
Update EDTT version to include disconnect reason fixes.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-12-15 11:20:34 +01:00
Øyvind Rønningstad
0cb6c409be west.yml: Update TFM module SHA to bring in TFM MCUboot update.
Turn on import, so tfm's west.yml is processed.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-15 11:19:39 +01:00
Peter Bigot
11c923cfc8 boards: efr32mg_sltb004a: rework sensor power enable infrastructure
There are three groups of sensors on this board, each of which
requires a different I2C bus configuration and a different power
supply.  Currently only the CCS811 is supported.

Change the board configuration to pull the necessary information about
the CCS811 supply switch from devicetree, and to supply power based on
whether the device is enabled in devicetree (rather than whether a
driver is selected).  The implementation is designed to support
additional supply switches (there are at least six on the board, most
of which are dedicated).

Also document the I2C configuration necessary for the other sensors.
There is currently no way to select alternative configurations without
editing the devicetree binding, but at least they're available for use
in overlays.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-15 11:19:26 +01:00
Peter Bigot
c70cc93833 drivers: i2c_gecko: refactor to unify device definition
Switch to iterated definition based on indexes.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-15 11:19:26 +01:00
Peter Bigot
ade3ef3ef7 devicetree: fix base power supply-gpios
This should have been a phandle-array since it's a full GPIO specifier
including pin and flags.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-15 11:19:26 +01:00
Fabio Utzig
76bfc02345 doc: add initial mcumgr documentation
Add an initial mcumgr documentation to the device management guide,
avoiding the need to redirect a user to the upstream documentation.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-12-15 11:19:01 +01:00
Meng xianglin
04d8d485e8 test: fs: improve code coverage for file system core
Refine test cases to improve code coverage

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2020-12-15 11:17:54 +01:00
Jukka Rissanen
9080a46e68 net: tcp2: Use mutex instead of irq_lock
When needing to lock non-connection related access, use k_mutex
instead of locking irq. There is really no reason to prevent the
system from generating interrupts.

Fixes #30636

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-12-15 12:16:19 +02:00
Alexander Wachter
2331d10d4b include: sys: thread_stack add missing extern "C" on C++
Add C linkage for compiling with C++

Signed-off-by: Alexander Wachter <alexander.wachter@leica-geosystems.com>
2020-12-15 11:13:41 +01:00
Daniel Leung
55df308025 Revert "boards/x86: Enable Intel VT-D for up_squared"
This reverts commit 7492841dd1.

Enabling CONFIG_INTEL_VTD_ICTL on UP Squared board results
in tests and apps hanging. So revert this for now.

Relates to #30574

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-12-14 23:21:41 -05:00
Marcin Niestroj
94be9b387a drivers: pwm: nrf_sw: use Nordic HAL to configure GPIO
Use Nordic HAL to configure GPIO output. This adds support for P1 GPIOs,
when pin numbers above 31 are used.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-14 20:23:43 -05:00
Maciej Perkowski
5bb0d9877c ci: Rename leftover Sanitycheck occurances
Rename leftovers in buildkite script

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2020-12-14 16:46:44 -05:00
Anas Nashif
7883eedfde doc: rename sanitycheck -> twister
Replace leftover sanitycheck mentions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 14:13:16 -05:00
Anas Nashif
17b09c2761 ci: rename sanitycheck -> twister
Replace leftover sanitycheck mentions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 14:13:16 -05:00
Anas Nashif
4594370b46 twister: remove some leftover sanitycheck mentions
Few leftover mentions of Sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 14:13:16 -05:00
Thomas Stranger
86c872dbc5 tests: i2c: i2c_slave_api add nucleo_g071
Adds necessary overlays for nucleo_g071 in i2c_slave_api test case
and enables the board.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2020-12-14 13:17:46 -05:00
Thomas Stranger
03923ce9de boards: nucleo_g071rb enable i2c
Enables I2C on nucleo_g071rb board.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2020-12-14 13:17:46 -05:00
Yestin Sun
f7d866735e boards: stm32l562e_dk: Enable SPI and BLE
Enable spi1 interface that connects to STM module SPBTLE-RFTR on the
stm32l562e_dk board.

Tested the configuration with st_ble_sensor sample + ST BLE Sensor
app on Android phone.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2020-12-14 13:16:10 -05:00
Yestin Sun
87ff1513fa boards: stm32l562e_dk: Fix inverted GPIO flags for user LEDs
Fix the GPIO configurations for both user LEDs on the stm32l562e_dk
board that shall be active low.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2020-12-14 13:16:10 -05:00
Yestin Sun
6264788f6d soc: arm: st: Add spi to stm32l5 MCUs
Add spi1 interface for stm32l552xx and stm32l562xx microcontrollers

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2020-12-14 13:16:10 -05:00
Anas Nashif
0ce662f29d doc: thread-analyzer: document THREAD_RUNTIME_STATS
Add details about THREAD_RUNTIME_STATS and how it can be used and
document how the feature can be used with an example.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 13:00:47 -05:00
Anas Nashif
802d214582 debug: analyzer: add support for thread runtime stats
Add thread runtime statistics to the thread analyser.

With CONFIG_THREAD_RUNTIME_STATS enabled:

Booting from ROM..*** Booting Zephyr OS build zephyr-v2.4.0-2330-g77be0e93e65b  ***
thread_a: Hello World from cpu 0 on qemu_x86!
Thread analyze:
 thread_b            : STACK: unused 740 usage 284 / 1024 (27 %); CPU: 0 %
 thread_analyzer     : STACK: unused 8 usage 504 / 512 (98 %); CPU: 0 %
 thread_a            : STACK: unused 648 usage 376 / 1024 (36 %); CPU: 98 %
 idle 00             : STACK: unused 204 usage 116 / 320 (36 %); CPU: 0 %
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
Thread analyze:
 thread_b            : STACK: unused 648 usage 376 / 1024 (36 %); CPU: 7 %
 thread_analyzer     : STACK: unused 8 usage 504 / 512 (98 %); CPU: 0 %
 thread_a            : STACK: unused 648 usage 376 / 1024 (36 %); CPU: 9 %
 idle 00             : STACK: unused 204 usage 116 / 320 (36 %); CPU: 82 %
thread_b: Hello World from cpu 0 on qemu_x86!

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 13:00:47 -05:00
Anas Nashif
7009012d67 samples: shell: enable thread runtime stats
Enable runtime stats in the shell sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 13:00:47 -05:00
Torsten Rasmussen
f73da678a4 cmake: use the toolchain path, id and version as extended signature.
Fixes: #30531

Now using MD5 sum of CMAKE_C_COMPILER (path), CMAKE_C_COMPILER_ID and
CMAKE_C_COMPILER_VERSION variables as part of the TOOLCHAIN_SIGNATURE.

Moved MD5 calculation of executable into
cmake/target_toolchain_flags.cmake to have common location, as
CMAKE_C_COMPILER_ID and CMAKE_C_COMPILER_VERSION are not available until
project() has executed.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-12-14 11:56:00 -05:00
Marcin Niestroj
1b680c8234 drivers: modem: wncm14a2a: set NET_CONTEXT_CONNECTED state
Set NET_CONTEXT_CONNECTED when stream socket got connected. This fixes
TCP connection when using wncm14a2a modem driver, which got broken after
sockets layer started to validate net_context connection state before
allowing to receive any data.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-14 18:15:49 +02:00
Marcin Niestroj
27b268f350 drivers: wifi: eswifi: set NET_CONTEXT_CONNECTED state
Set NET_CONTEXT_CONNECTED when stream socket got connected. This fixes
TCP connection when using eswifi WiFi driver, which got broken after
sockets layer started to validate net_context connection state before
allowing to receive any data.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-14 18:15:49 +02:00
Marcin Niestroj
65dd0f47ed drivers: wifi: winc1500: set NET_CONTEXT_CONNECTED state
Set NET_CONTEXT_CONNECTED when stream socket got connected. This fixes
TCP connection when using winc1500 WiFi driver, which got broken after
sockets layer started to validate net_context connection state before
allowing to receive any data.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-14 18:15:49 +02:00
Marcin Niestroj
9af6b9ed62 drivers: wifi: esp: set NET_CONTEXT_CONNECTED state
Set NET_CONTEXT_CONNECTED when stream socket got connected. This fixes
TCP connection when using ESP WiFi driver, which got broken after
sockets layer started to validate net_context connection state before
allowing to receive any data.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-14 18:15:49 +02:00
Erwan Gouriou
905f496603 dts: stm32h7: Remove zephyr,flash-controller support on M4 core
Flash controller support is not yet ready on M4 core.
Remove the chosen declaration to make it clear.

Additionally, generate a build error if this driver is compiled
on M4 core.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-14 16:47:05 +01:00
Erwan Gouriou
5664dddf53 drivers/flash: stm32h7: Cache handling is limited to M7 core
There is no cache management on M4 side of the flash controller.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-14 16:47:05 +01:00
Erwan Gouriou
5bc01c3614 dts: stm32h745: Define M4 flash controller
Define erase and write block size for M4 side flash controller.
Additionally move compatible definition from package to soc file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-14 16:47:05 +01:00
Nicolas VINCENT
f1a205093a boards: define flash partitions for nucleo_h743zi
Defines partitions that can be used by mcuboot on nucleo_h743zi board.
Please note that mcuboot is not yet supported on stm32 h7 family as the
write-block-size is greater than 8.

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2020-12-14 16:47:05 +01:00
Nicolas VINCENT
0dc3153e50 soc: stm32h7: define rom offset when using mcuboot
Set rom offset to 0x400 if application is compiled with
CONFIG_BOOTLOADER_MCUBOOT.
Please note that mcuboot is not yet supported on stm32h7 devices

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2020-12-14 16:47:05 +01:00
Nicolas VINCENT
5b463353d7 drivers/flash: add support for stm32h7 devices
Fixes #29831: Implements flash driver for stm32h7 devices.
The driver is independant from the other stm32 families (flash_stm32.c),
only the header interface is (mainly) common.

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2020-12-14 16:47:05 +01:00
Nicolas VINCENT
f7078da707 dts: flash: write/erase block size to stm32h7 devs
Define write and erase block size for supported stm32h7 devices
Use a specific compatible string for stm32h7 devices for the flash
driver

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2020-12-14 16:47:05 +01:00
Erwan Gouriou
fe3613d90e dts: stm32h7: Set stm32h747 as a stm32h745 superset
Simplify stm32h7 dts series dts description by defining stm32h747
as a stm32h475 superset.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-14 16:47:05 +01:00
Sylvio Alves
6d8fe6eae9 drivers: gpio: esp32: fix DT device macro
ESP32 build fails due to missing underline.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2020-12-14 08:21:03 -06:00
Alberto Escolar Piedras
fe516b93a9 board: native_posix: Add test for k_busy_wait and cpu_hold
Add a new test for k_busy_wait and cpu_hold

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2020-12-14 12:32:11 +01:00
Alberto Escolar Piedras
6d3476117b posix: Add cpu_hold() function to better emulate code delay
In native_posix and nrf52_bsim add the cpu_hold() function,
which can be used to emulate the time it takes for code
to execute.
It is very similar to arch_busy_wait(), but while
arch_busy_wait() returns when the requested time has passed,
cpu_hold() ensures that the time passes in the callers
context independently of how much time may pass in some
other context.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-12-14 12:32:11 +01:00
Alberto Escolar Piedras
570a84c3cd board: native_posix: Fix timer for k_busy_wait()
The timer update was not triggering an immediate update of
the top HW models timer,
which meant a call to k_busy_wait() may have waited for a much
longer time than requested (up to 1 OS tick).
=> Fix it.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-12-14 12:32:11 +01:00
Marcin Niestroj
0e769c1a36 dfu: mcuboot: add shell module
Add new shell module for mcuboot enabled application. It provides
information about image slots and allows to perform such operations as:
confirm, erase and request upgrade.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-14 11:24:57 +01:00
Øyvind Rønningstad
7356cb2e45 tfm_integration.rst: Document executable file target properties
Add a section about executable files produced by the build, as well as
how to access them.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-14 11:24:16 +01:00
Øyvind Rønningstad
3f9d277bdc boards: Use tfm target properties for executable paths
for the signing procedures for boards an521, nrf5340, nrf9160,
nucleo_l552ze_q, and musca_b1.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-14 11:24:16 +01:00
Martin Åberg
226f918289 logging: Reduce missinglog_strdup() on SPARC
is_rodata() can now determine if an object is the rodata section
on SPARC. This eliminates spurious run-time error messages about
"missinglog_strdup()".

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-12-14 11:23:34 +01:00
Piotr Pryga
c705970011 tests: bluetooth: Add unit tests for set connectionless CTE parameters
Add unit tests for Direction Finding set of connectionless TX
CTE parameters. Enable DF in nrf52_bsim board.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2020-12-14 11:23:26 +01:00
Vinayak Kariappa Chettimada
62cb9aedc4 Bluetooth: controller: Clean up direction finding Kconfig
Simplify selection of direction finding related Kconfig.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-12-14 11:23:26 +01:00
Piotr Pryga
1283b136e7 Bluetooth: controller: ull_df: Fix compilation warnings
Remove unused functions to fix compilation warninigs.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2020-12-14 11:23:26 +01:00
Piotr Pryga
307ac64374 Bluetooth: controller: Add set connectionless CTE TX parameters
Add implementation of HCI_LE_Set_Connectionless_CTE_-
Transmit_Parameters command in HCI.
Add implementation of command handling in controller.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2020-12-14 11:23:26 +01:00