Commit graph

64633 commits

Author SHA1 Message Date
Fabio Baltieri 838dbaae7f doc: fix building documentation when PYTHONPATH is set
Re-add the SEP setting in the documentation CMakeLists. This was dropped
in:

fc942ef7d3 doc: use new kconfig extension

And currently prevents building the documentation locally if a
PYTHONPATH is set.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-25 17:16:55 -07:00
Dominik Ermel 1bd5665b89 mgmt/mcumgr/lib: Fix usage of MGMT_ERR_ENOMEM
The commit replaces MGMT_ERR_ENOMEM with MGMT_ERR_EMSGSIZE where it
was used to indicate that SMP response does not fit in response
buffer.

Fixes #44535

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-05-25 13:56:03 -07:00
Dominik Ermel 1d6b275c2a samples/mgmt/mcumgr: Fix CDC ACM sample build information
The commit adds missing info on required usb.overlay.

Fixes: #45834

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-05-25 13:51:32 -07:00
Gerson Fernando Budke 5b7734c926 drivers: adc: sam0: Fix adc_reference implementation
The current sam0 adc driver not implement correctly the adc_reference
enum values. This try homonize adc input referece by tracking VDDANA
at ADC_REF_VDD_1. The ADC_REF_VDD_1_2 were fixed with correct INTVCCx
channel selection.

Fixes #45443

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-05-25 13:36:10 -07:00
Flavio Ceolin 9d5bd09980 doc: releases: 3.1: Add security related release notes
Add information about vulnerabilities fixed for Zephyr v3.1.0

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-05-25 13:34:52 -07:00
Flavio Ceolin 5b8cc4f6f3 vulnerabilities: Add vulnerabilities under embargo
Add entries for vulnerabilities under embargo.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-05-25 13:34:52 -07:00
Trent Piepho 094345629b drivers/sensor: lsm6dso: Add support for lsm6dso32
This sensor is virtually identical to the lsm6dso.  The only difference
is the accelerometer ranges are double those of the lsm6dso.

Use the same driver.  The difference is detected by using "st,lsm6dso32"
as the first compatible entry, followed by "st,lsm6dso".

An bit flag in the existing accel_range config field is used to check if
the chip is the doubled range or not.

Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
2022-05-25 13:16:04 -07:00
Trent Piepho 5edd4221ad drivers/sensor: lsm6dso: Refactor common config out of I2C/SPI macros
Move common settings out of the SPI and I2C instantiation macros and
into a common macro, which the aforementioned two macros can then use.

Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
2022-05-25 13:16:04 -07:00
Trent Piepho c269692b1d drivers/sensor: lsm6dso: Remove LE to CPU conversions
In ST HAL v2.00, the functions to get the raw sensors values, e.g.
lsm6dso_acceleration_raw_get(), convert from little-endian to CPU.

Previous versions of ST HAL didn't do this.

The conversion here in the driver is converting a second time.  It's not
an issue on a LE system, the conversion is a no-op, but on a BE system
it would be broken.

Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
2022-05-25 13:16:04 -07:00
Janco Kock d611284271 drivers: ethernet: w5500: Check W5500 int pin after processing interrupt
Check if W5500 int pin is still active after processing the interrupt.
If not doing correctly, the W5500 driver can deadlock because it is not
receiving any more interrupts.

Signed-off-by: Janco Kock <jancokock@gmail.com>
2022-05-25 21:46:17 +02:00
Francois Ramu 9488727292 tests: drivers: uart stm32 run uart_async api on f746 nucleo
This sets the dts of dma for using the uart 6 asynch api.
The stm32f746 has a dma V1 with request 5 for Tx/Rx usart6
The Tx&Rx pins (PG14, PG9) of the usart6 are connected
on the nucleo_f746zg board to pass the test
The CONFIG_DCACHE=n must also be set to disable Dcache.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-25 11:38:05 -07:00
Francois Ramu 169bf0f612 tests: drivers: uart stm32 run uart_async api on f767 nucleo
This sets the dts of dma for using the uart 6 asynch api.
The stm32f767 has a dma V1 with request 5 for Tx/Rx usart6
The Tx&Rx pins (PG14, PG9) of the usart6 are connected
on the nucleo_f767zi board to pass the test
The CONFIG_DCACHE=n must also be set to disable Dcache.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-25 11:38:05 -07:00
Francois Ramu 39c8ba32ff soc: arm: stm32f7 soc without Dcache
The stm32f7 (like stm32H7) should be able to disable
the Dcache when using the DMA. This is to avoid any
pb of cache coherency on the DMA buffers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-25 11:38:05 -07:00
Erwan Gouriou 97d989910e doc: release-notes 3.1: Update with stm32f1 pin node names changes
This information is worthy to provide in release notes

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-25 11:20:21 -07:00
Erwan Gouriou 352969bfa3 boards: stm32f1: Use new pin nodes names which include remap information
Pin nodes names for stm32f1 devices now hold the remap information.
Convert existing users.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-25 11:20:21 -07:00
Erwan Gouriou ce0b918b50 west.yml: hal_stm32: Use remap info in stm32f1 pinctrl nodes names
Fixes #45916

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-25 11:20:21 -07:00
Gerard Marull-Paretas ef98b767e7 drivers: adc: add instance versions of the ADC_DT_SPEC* helpers
The instance based version macros were not added when the new
ADC_DT_SPEC* helpers were introduced. This means drivers are forced to
make usage of DT_DRV_INST(inst) macro to obtain a node identifier, the
parameter required by existing macros. Following other driver classes,
provide the ADC_DT_SPEC_INST* family of macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-25 10:40:55 -07:00
Gerard Marull-Paretas ef3d5e0461 drivers: pwm: add instance versions of the PWM_DT_SPEC* helpers
The instance based version macros were not added when the new
PWM_DT_SPEC* helpers were introduced. This means drivers are forced to
make usage of DT_DRV_INST(inst) macro to obtain a node identifier, what
is required by existing macros. Following other driver classes, provide
the PWM_DT_SPEC_INST* family of macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-25 10:40:42 -07:00
Erik Brockhoff 25e6279493 Bluetooth: controller: llcp: fix for failing LL qualification tests
Fixes issue re. sending packets after sending TERMINATE_IND.
Fixes issue re. erroneous error code on 'timed out' termination (ie
when peer does not ack terminate_ind)

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-05-25 16:29:24 +02:00
Erik Brockhoff 7daba33f2d Bluetooth: controller: llcp: update max dle times on feature exchange
On a completion of feature exchange the max DLE times needs to be
updated if Coded PHY has become supported.
For this now also keep a separate store of the default_tx_octets/time
for the sake of re-calculation of local versions of DLE values

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-05-25 16:29:18 +02:00
Dominik Ermel 550f1b096d mgmt/mcumgr/lib: Fix OS taskstat passing incorrect value
The commit fixes incorrect value being passed as used stack
information and also prevents compilation error when
CONFIG_INIT_STACKS is n.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-05-25 16:09:12 +02:00
Achatzi Julian 90236b0650 fs: fcb: Make FCB work with sectors larger than 16K
Enhance FCB to also work with sectors larger than 16K and
to handle larger flash alignment constraints correctly.

use fcb_len_in_flash when setting the offset of the data
and use buffers sizes of at least the alignment value.

The test in fcb_test_append_to_big has been altered, as it
would otherwise not come to a data length which fits the
fcb on sectors larger than 16K.

Closes: https://github.com/zephyrproject-rtos/zephyr/issues/45345

Signed-off-by: Achatzi Julian <jachatzi@baumer.com>
2022-05-25 14:57:45 +02:00
Casper Bonde e2dad8fa11 Bluetooth: Broadcast: Fix codec and meta data encoding
Length filed was 1 off.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2022-05-25 14:57:33 +02:00
Stephanos Ioannidis c2db0c5a86 libc: minimal: Add strstr implementation
This commit adds the strstr function implementation that is licensed
BSD-3-Clause, which is an OSI-approved license, with the modifications
necessary for adoption into the Zephyr minimal C library.

Note that this implementation is based on the size optimised version of
the newlib strcasestr function.

Origin: Newlib
License: BSD 3-Clause
URL: git://sourceware.org/git/newlib-cygwin.git
Commit: 9087163804df8af6dc2ec1f675a2341c25f7795f
Purpose: strstr function support in the minimal C library

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis 8c086d5791 libc: minimal: Remove incompatibly licensed strstr function
This commit removes the strstr function implementation that is
licensed BSD-4-Clause-UC, which is not an OSI-approved license.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis c96f15ecf3 libc: minimal: Add strtoull implementation
This commit adds the strtoull function implementation that is licensed
BSD-3-Clause, which is an OSI-approved license, with the modifications
necessary for adoption into the Zephyr minimal C library.

Origin: Newlib
License: BSD 3-Clause
URL: git://sourceware.org/git/newlib-cygwin.git
Commit: 9042d0ce65533a26fc3264206db5828d5692332c
Purpose: strtoull function support in the minimal C library

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis c6b75cd4cd libc: minimal: Remove incompatibly licensed strtoull function
This commit removes the strtoull function implementation that is
licensed BSD-4-Clause-UC, which is not an OSI-approved license.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis 25b903cec1 libc: minimal: Add strtoll implementation
This commit adds the strtoll function implementation that is licensed
BSD-3-Clause, which is an OSI-approved license, with the modifications
necessary for adoption into the Zephyr minimal C library.

Origin: Newlib
License: BSD 3-Clause
URL: git://sourceware.org/git/newlib-cygwin.git
Commit: 9042d0ce65533a26fc3264206db5828d5692332c
Purpose: strtoll function support in the minimal C library

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis 570ed08221 libc: minimal: Remove incompatibly licensed strtoll function
This commit removes the strtoll function implementation that is
licensed BSD-4-Clause-UC, which is not an OSI-approved license.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis 4c78607618 libc: minimal: Add strtoul implementation
This commit adds the strtoul function implementation that is licensed
BSD-3-Clause, which is an OSI-approved license, with the modifications
necessary for adoption into the Zephyr minimal C library.

Origin: Newlib
License: BSD 3-Clause
URL: git://sourceware.org/git/newlib-cygwin.git
Commit: 9042d0ce65533a26fc3264206db5828d5692332c
Purpose: strtoul function support in the minimal C library

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis b6b1edbf91 libc: minimal: Remove incompatibly licensed strtoul function
This commit removes the strtoul function implementation that is
licensed BSD-4-Clause-UC, which is not an OSI-approved license.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis f1563751b3 libc: minimal: Add strtol implementation
This commit adds the strtol function implementation that is licensed
BSD-3-Clause, which is an OSI-approved license, with the modifications
necessary for adoption into the Zephyr minimal C library.

Origin: Newlib
License: BSD 3-Clause
URL: git://sourceware.org/git/newlib-cygwin.git
Commit: 9042d0ce65533a26fc3264206db5828d5692332c
Purpose: strtol function support in the minimal C library

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Stephanos Ioannidis 35caf38ce7 libc: minimal: Remove incompatibly licensed strtol function
This commit removes the strtol function implementation that is
licensed BSD-4-Clause-UC, which is not an OSI-approved license.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-25 14:52:29 +02:00
Vinayak Kariappa Chettimada 742173c314 Bluetooth: Controller: Fix prepare pipeline stall
Fix prepare pipeline from not resuming non-resume events
in pipeline when more than one resume events are present
before a non-resume event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-05-25 14:38:18 +02:00
Azizah Ibrahim e11ff7df48 bluetooth: host: Avoid sending duplicate device to resolving list.
Core v5.3, Vol 4, Part E, 7.8.38
Controller has the option to accept or reject when the same device
is added to RL.
If a remote device has been added to RL before, then local device
change it's advertsing address, and the remote device tries to pair
with the new address, we could end up trying to add the same data to RL.
If a remote device's public/static address is known, this patch deletes
the old entry from RL before adding it.

Signed-off-by: Azizah Ibrahim <azizah.ibrahim@nordicsemi.no>
2022-05-25 14:25:14 +02:00
Damian Krolik 7e02e8c9f4 mcumgr: fix invalid condition for calling img_mgmt_dfu_stopped
In other places, img_mgmt_dfu_stopped() is called when
a failure occurs and the DFU cannot be continued. In this
place, however, the function is called on success which
does not seem to be correct.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2022-05-25 14:21:19 +02:00
Michael Schmitz 043a31a1c6 drivers: pwm: esp32: rename internal channel to avoid redeclaration
Unifying the method signature introduced a redeclaration of variables,
fixes redeclaration of variables by renaming the inner ones

Signed-off-by: Michael Schmitz <michaelschmitz@live.de>
2022-05-25 14:21:12 +02:00
Fabio Baltieri 67a0f95aed dts: fix a bunch of odd partition values dts entries
Fix various board fixed-partition definitions where the devicetree cell
has been defined oddly, such as 9 nibbles (which makes no sense since
the cells are 32 bit) or 7 nibbles where all the others are 8.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-25 14:21:04 +02:00
Daniel DeGrasse 75513ba632 dts: nxp: fix PM minimum residency and exit latency for rt11xx
Fix PM minimum residency time and exit latency for rt11xx to reflect
actual delays when entering and exiting low power modes.

Fixes #45750

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-25 14:20:27 +02:00
Szymon Janc b3de861d15 Bluetooth: Controller: Fix not clearing Static Random Address on reset
When host issue HCI Reset controller should clear LE Static Random
address. Otherwise controller may incorrectly use one from before
HCI reset insread of rejecting HCI commands.

This was affecting following qualification test cases:
HCI/CCO/BI-51-C
HCI/CCO/BI-53-C
HCI/CCO/BI-54-C
HCI/CCO/BI-56-C
HCI/DDI/BI-06-C
HCI/DDI/BI-07-C

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-05-25 14:20:21 +02:00
Marcin Niestroj 084aca1aa4 tests: socket: tls: check sendmsg() behavior for datagrams
Datagrams (for DTLS connection) need to be sent using single API call to
mbedTLS and should not result in sending each fragment in a separate
datagram. Check if that is the case, so allow only single fragment data to
be sent and expect an error when multiple fragments were passed to
sendmsg().

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-05-25 14:20:09 +02:00
Marcin Niestroj 900137ef32 net: sockets: tls: prevent sending fragmented datagrams with sendmsg()
Fragmented data passed to sendmsg() should be sent as a single datagram in
case of datagram sockets (i.e. DTLS connection). Right now that is not
happening now, as each fragment is sent separately, which works fine only
for stream sockets.

There is no mbedTLS API for 'gather' write at this moment. This means that
implementing sendmsg() would require allocating contiguous memory area at
Zephyr TLS socket level and copying all data fragments before passing to
mbedTLS library. While this might be a good option for future, let's just
check if data passed to sendmsg() API consists of a single memory region
and can be sent using single send request. Return EMSGSIZE error if there
are more then one data fragments.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-05-25 14:20:09 +02:00
Szymon Janc 42d461d3a2 Bluetooth: Controller: Fix HCI supported commands bitmask
This was affecting HCI/GEV/BV-01-C qualification test case.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-05-25 14:19:59 +02:00
Szymon Janc f0b6774191 Bluetooth: Controller: Fix validating PHY bitmask in HCI
At least one supported PHY bit shall be set and none of
non-supported or RFU bits should be set.

This was affecting HCI/DDI/BI-05-C qualification test case.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-05-25 14:19:41 +02:00
Georgij Cernysiov 3d035a71fe includes: shell: uart: fix legacy includes
Adds `zephyr/...` prefix to `smp_shell.h` include.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-05-25 14:19:28 +02:00
Gerard Marull-Paretas 8b8d7b99ce manifest: update lvgl revision
Latest revision fixes compilation of LVGL when
CONFIG_LEGACY_INCLUDE_PATH=n.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-25 14:19:18 +02:00
Andrzej Głąbek 69e9d977e5 boards: arduino_nano_33_ble: Fix board initialization code
This is a follow-up to commit 1b479d6a8a.

Use the `GPIO_OUTPUT_HIGH` flag instead of `GPIO_OUTPUT_INIT_HIGH`
as the latter does not actually configure the pin as an output
(it does not include `GPIO_OUTPUT`) what causes an assertion in
`gpio_pin_configure()` to fail.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-05-25 14:19:09 +02:00
Aleksander Wasaznik 1c872829f8 Bluetooth: Host: Update doc user_data type in bt_gatt_discover_func_t
Before this change, the doc on `bt_gatt_discover_func_t` gives the
impression that the type of `user_data` depends on `attr->uuid`. That is
partially incorrect. It is more accurate to say that the type depends on
the discovery type because that determines the ATT operation, which in
turn determines if the data is available.

Add documentation on `user_data` for the discovery type
`BT_GATT_DISCOVER_STD_CHAR_DESC`.

Add a hint `bt_gatt_discover_func_t` that `bt_gatt_read` can do a
different kind of attribute lookup, read-by-type, which may be
more convenient in some cases.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-05-25 13:15:54 +02:00
Piotr Pryga f3d460ff5a Bluetooth: Controller: df: Remove experimental for direction finding
Removes label experimental for direction finding feature in
Bluetooth Controller.

The feature stays disabled by default because it requires additional
dedicated hardware to be used. Besides that it significantly enlarges
amount of memory used by the Controller.

End user has to enable the feature explicitly by use of configuration
options.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-05-25 11:48:43 +02:00
Vinayak Kariappa Chettimada 0d7bd277a9 Bluetooth: Controller: Fix preempt timeout not skip first in pipeline
Fix preempt timeout scheduling to not skip first prepare in
pipeline when there are no previous preempt timeout
scheduled already.

Fix related to commit 27b8beaa22 ("Bluetooth: Controller:
Fix to handle relative short preempt timeout").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-05-25 11:14:58 +02:00