Commit Graph

99090 Commits

Author SHA1 Message Date
Sylvio Alves
296983709a linker: esp32: fix cpp rom region
cplusplus-rom linker initialization was wrongly placed
in RAM area when it should be in ROM area.

Fixes #75853

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
(cherry picked from commit c374d3147b)
2024-08-07 08:26:49 -04:00
Armando Visconti
3cd429f0e0 drivers/sensor: lis2dux12: fix mode when setting odr
In lis2dux12_set_odr(), the call to stmemsc module lis2dux12_mode_set()
API is done with the .fs field left uninitialized, so setting the
underlying device regs in an unproper way.

Suggested-by: Luis Ubieda <luisf@croxel.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 8bc00e1420)
2024-08-07 08:26:13 -04:00
Thales Bacelar
b8010bf19d logging: Trigger logging thread when we start to drop messages
Wake up logging thread when we start to drop messages.

Signed-off-by: Thales Bacelar <thalesbacelar@duck.com>
(cherry picked from commit d6429431d6)
2024-08-07 08:25:49 -04:00
Yong Cong Sin
2600eaf6de tests: gdbstub: add build-only test
Add build-only test for existing boards.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 58f66623aa)
2024-08-06 13:04:37 -04:00
Yong Cong Sin
f9770bd48e tests: gdbstub: minor refactor to the testcase.yaml
Change the `platform_allow` to multi-line format so that newly
supported archs/boards can be added as a new line.

Refactor the tags out to `common`, and add
`CONFIG_ARCH_HAS_GDBSTUB` filter

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit b97d97ff17)
2024-08-06 13:04:37 -04:00
Yong Cong Sin
0299538a11 arm: debug: gdbstub: fix header
`exc.h` should be `exception.h` now, fix  it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 79ed64909f)
2024-08-06 13:04:37 -04:00
Jukka Rissanen
5470dc3f62 net: context: Check null pointer in V6ONLY getsockopt
Make sure we are not accessing NULL pointer when checking
if the IPv4 mapping to IPv6 is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit cf552905f4)
2024-08-06 13:02:10 -04:00
Rubin Gerritsen
a58e039b6a Bluetooth: Host: Fix compiling PAwR Sync without PAST RX
The function `bt_hci_le_past_received_v2()` is not compiled
in for this configuration, so the reference needs to be removed.

Fixes #76268.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
(cherry picked from commit e23345b4d1)
2024-08-06 13:01:44 -04:00
Jamie McCrae
37e5eb997e samples: tfm_integration: psa_crypto: Disable sample
Disables running this sample as doing so requires qcbor, which
is not apache licensed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit db5a5fa109)
2024-08-06 13:01:05 -04:00
Daniel Berlin
ff02673d6e bl5340_dvk: Move MIPI_DBI interface back to spi4
Commit 3dbbb73 accidentally changed the MIPI_DBI spi interface from
spi4 to spi2 for this board during conversion to use the MIPI_DBI wrapper.

This does not work, and this change reverts it back to spi4.

Tested on actual boards (bl5340, bl5340pa).
Before this change LVGL demo displays nothing, after this change it works
fine again.

Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
(cherry picked from commit 08e44f9dae)
2024-08-06 13:00:40 -04:00
Robert Lubos
4ac4795945 net: tcp: Keep track of recv window size change since last ACK
Windows TCP stack has a peculiar behavior - when running iperf, it will
fill out the RX window almost entirely, but will not set PSH flag on
packets. In result, our stack would delay the ACK and thus window
update, affecting throughputs heavily.

In order to avoid that, keep track of the most recent window size
reported to the peer, and reduce it when receiving new data. In case the
RX window, as seen from the peer perspective, drops below certain
threshold, and the real RX window is currently empty, send an ACK
immediately when updating window, so that peer can continue
with sending data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 349bf81e00)
2024-08-06 13:00:21 -04:00
Chris Friedt
905f22b018 tests: posix: net: open native_sim in c++,posix,net,native case
Prior to the fixes in the previous commits, combining a build
for native_sim with

CONFIG_CPP=y
CONFIG_POSIX_API=y
CONFIG_STD_CPP20=y
CONFIG_REQUIRES_FULL_LIBCPP=y

would fail.

It succeeds now.

This change adds a testcase to monitor that scenario in CI.

Note: this was partially necessary because the deprecation of
CONFIG_NET_SOCKETS_POSIX_NAMES is not yet complete, so there
is a dependency cycle, and also because <sys/types.h> was
pulling in the host <sys/types.h> instead of Zephyr's or one
of the embedded OSes we support.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit d0808473f2)
2024-08-06 13:00:03 -04:00
Chris Friedt
fe0b5ab37b posix: posix_types.h: simplify conditions on pthread types
Simplify the conditions for pthread type declaration

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 6cf557d64a)
2024-08-06 13:00:03 -04:00
Chris Friedt
ab836482f0 posix: sys/stat.h: move declarations to posix_types.h
A number of types such as uid_t, gitd_t, etc, were defined in
sys/stat.h to workaround compatibility issues many years ago.

Since posix_types.h is slated to become equivalent to
sys/types.h in terms of standard headers, move these types
to where they belong.

For more information, please see

https://pubs.opengroup.org/onlinepubs/9699919799/\
 basedefs/sys_types.h.html

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 6667b500c6)
2024-08-06 13:00:03 -04:00
Chris Friedt
117fb6c27f net + posix: avoid host includes when building for native_sim
A corner case involving C++, posix, networking, and native_sim
was causing problems.

Even though C and C++ builds should include zephyr/posix/.. in
the default search path with `CONFIG_POSIX_API=y`, for some
reason, the native compiler pulls in /usr/include first anyway.

The stat.h header pulled in <sys/types.h> (which is normally
fine) but due to the native build, it was pulling in
/usr/include/sys/types.h, from the host toolchain.

Explicitly include <zephyr/posix/posix_types.h> instead of
<sys/types.h> from stat.h, and continue using the workarounds
for native builds (explicitly including zephyr/posix/arpa/net.h
from net/sockets.h .

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 81f5205006)
2024-08-06 13:00:03 -04:00
Chris Friedt
8fff3c24a4 Revert "net: socket: fix sys/_timespec.h not found error"
This reverts commit 269729a5db.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 6a0593d554)
2024-08-06 13:00:03 -04:00
Tim Sørensen
13a8b9dcd3 bluetooth: avoid USB starvation in bap_broadcast_sink
fix to ensure that USB audio interface is not starved when
no audio data is received over bluetooth.

Signed-off-by: Tim Sørensen <tims@demant.com>
(cherry picked from commit 86032bcf85)
2024-08-06 12:59:25 -04:00
Declan Snyder
b8c126abfc drivers: mdio: Clear interrupt signal in ISR
Apparently, disabling the intterupt is not enough,
because without clearing the flag, some errors are occurring.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
(cherry picked from commit 9f56ff5d64)
2024-08-06 12:58:47 -04:00
Tom Burdick
79b78b8201 icm42688: Fix divide by zero potential
There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
(cherry picked from commit 5474b611cb)
2024-08-06 12:58:25 -04:00
Armando Visconti
29c3fc13db boards: st: sensortile_box_pro: remove hts221 sensor
Remove HTS221 sensor support from sensortile_box_pro as it has been ruled
out from final version. In fact, HTS221 is in the process of being
terminated and is not recommended for new design. The candidate replacement
is SHT40 from Sensirion, which is available also as a DIL24 adapter, which
can be plugged on sensortile_box_pro board.

See SENSEVAL-SHT4XV1:
https://www.st.com/en/partner-products-and-services/senseval-sht4xv1.html

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit cdce68e4c8)
2024-08-06 12:57:51 -04:00
Francois Ramu
8a98c84647 drivers: usb: stm32 udc driver get the global otg interrupt
The global otg interrupt hs/fs is enabled by the udc_stm32
driver. Get it in the list of interrupts of the OTG node.
Use UDC_STM32_IRQ naming.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
(cherry picked from commit 9ec7697bdb)
2024-08-06 12:57:35 -04:00
Martin Stumpf
bb65669a94 dts: fix warnings in nxp_rt11xx.dtsi
Caused by a simple typo.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
(cherry picked from commit 706ba43bb5)
2024-08-06 12:56:40 -04:00
Jose Alberto Meza
4744f569ef drivers: i3c: common: Do not tread GETCAPS failure as error for 1.0 device
If it's a I3C v1.0 device without any HDR modes do not treat as an error
if GETCAPS gives no valid response.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
(cherry picked from commit c76e776b67)
2024-08-06 12:50:58 -04:00
Armando Visconti
ee6c00843a drivers/sensor: lis2dux12: fix temperature conversion
Return to sensor_api i/f the temperature in Celsius instead
of the register raw value in LSB.

Fixes #75686

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit a1f9793e0e)
2024-08-06 12:49:31 -04:00
Armando Visconti
a6cbc326e3 drivers/sensor: lis2dux12: fix odr and range
The current implementation assumes that sensor odr and range are
always configured in the Device Tree at compile time which might
not be the case.

Instead, application can set odr and range either at compile time
through the DT or using SENSOR_ATTR_SAMPLING_FREQUENCY and
SENSOR_ATTR_FULL_SCALE attributes at runtime, so each driver instance
must keep trace of the latest values set and use them in the sensor
APIs which require them (e.g. lis2dux12_mode_set).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit cf20aa050d)
2024-08-06 12:49:31 -04:00
Armando Visconti
81e8c6dc5c sensor: lis2dux12: fix SENSOR_ATTR_FULL_SCALE case
When setting the full scale through SENSOR_ATTR_FULL_SCALE the
driver must convert the g value (i.e. one of 2g/4g/8g/16g) to
the corrispondent sensor fs raw value.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 2eaec8b779)
2024-08-06 12:49:31 -04:00
Armando Visconti
57ef4996f5 samples/shields: x-nucleo-iks4a1: Add lsm6dsv16x temp display
Extended the x-nucleo-iks4a1 shield standard sample adding lsm6dsv16x
sensor die temperature display.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 878b5a9d2e)
2024-08-06 12:49:31 -04:00
Anas Nashif
085bf35912 device: remove const qualifier from node label copy
k_usermode_string_copy does not accept const in its arguements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit 2a39132645)
2024-08-06 12:47:58 -04:00
Anas Nashif
508d402aad tests: device: test CONFIG_DEVICE_DT_METADATA=y
Looks like this option is not tested with userspace enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit c5e6416a65)
2024-08-06 12:47:58 -04:00
Alessandro Manganaro
d947fbb378 drivers: bluetooth: hci: Fix stm32wb BLE behavior
Enabling BT_HCI_SETUP for STM32WB55 to have a
correct and proper initialization procedure to fix
#75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
(cherry picked from commit 4fc77248de)
2024-08-06 12:45:25 -04:00
Alessandro Manganaro
d698d40bb7 drivers: bluetooth: hci: Fix stm32wb BLE behavior
Implementing HCI setup function to have a correct and proper
initialization procedure to fix #75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
(cherry picked from commit 7ca2072ed0)
2024-08-06 12:45:25 -04:00
Robert Lubos
67a6217906 doc: migration-guide-3.7: Add entry about CoAP block API change
Add entry about the coap_get_block1_option() and
coap_get_block2_option() API change.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-06 12:44:17 -04:00
Robert Lubos
0807227653 net: coap: Parse more flag in coap_get_block2_option()
Parse the more flag in coap_get_block2_option(), so that the function
can be used not only with requests but also with replies (where the more
flag should not be ignored).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-06 12:44:17 -04:00
Robert Lubos
bc1c81bc00 net: coap: Fix underlying type for block number
The block number in block1/2 options can be encoded on up to 20 bits
according to RFC 7959, therefore the underlying type used in helper
functions to retrieve the block number should be large enough to hold
the result. Therefore, replace the container for block number with
uint32_t instead of uint8_t.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-06 12:44:17 -04:00
Julia Azziz
c5472feea3 drivers: adc: fix missing ref_internal in adc_sam0
The .ref_internal field in the adc_driver_api
struct was previously unset.
Now it's set to the proper value, 1 V.

Signed-off-by: Julia Azziz <juliaazziz7@gmail.com>
(cherry picked from commit e7cfb05c72)
2024-08-06 12:42:22 -04:00
Georges Oates_Larsen
c5de8ab5d1 net: net_if: fix net_if_send_data for offloaded ifaces
Some offloaded ifaces have an L2, but lack support for
net_l2->send. This edge case is not handled by
net_if_send_data, resulting in a NULL dereference under
rare circumstances.

This patch expands the offloaded iface guard in
net_if_send_data to handle this edge case.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
(cherry picked from commit 1c79445059)
2024-08-06 12:41:41 -04:00
Benjamin Cabé
c394cdb0fa net: ptp: Properly handle second overflow/underflow
Fixes issues with net_ptp_time arithmetic where second
overflow/underflow would not be handled properly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
(cherry picked from commit 43b948f9a8)
2024-08-06 12:41:07 -04:00
Benjamin Cabé
ec8dc79124 net: ptp: Adjust clock using correct offset
Offset should be *subtracted* from current clock value, not added.
This was causing clock to accumulate error instead of actually
"converging".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit dff19c3ac6)
2024-08-06 12:41:07 -04:00
Maochen Wang
642b308bfc net: wifi: Fix the nm type check error
Fix the NM iface type check error, should use (1 << WIFI_TYPE_STA),
instead of WIFI_TYPE_STA. Same for WIFI_TYPE_SAP.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
(cherry picked from commit bf42164084)
2024-08-02 22:11:51 -05:00
Robert Lubos
3a6653a7a9 net: sockets: tls: Fix poll update event check
In case POLLIN is set, and no new application data has been detected,
the ztls_poll_update_ctx() should only return -EAGAIN if no other events
are available for the socket. Otherwise, the function may end up
busy-looping, in case for example POLLOUT is also monitored for the
socket.

Current check verifying that was wrong, as it caused to function to
return -EAGAIN even if some other events could've been reported for the
socket.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit bfe958a7f1)
2024-08-02 22:11:03 -05:00
Manuel Argüelles
7d59805274 soc: s32k3: fix RAM retention
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes #75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
(cherry picked from commit ec7289039b)
2024-08-02 22:10:45 -05:00
Yong Cong Sin
57c1f22178 arch: riscv: stacktrace: fix user thread stack bound check
According to the riscv's `arch.h`:

 +------------+ <- thread.arch.priv_stack_start
 | Guard      | } Z_RISCV_STACK_GUARD_SIZE
 +------------+
 | Priv Stack | } CONFIG_PRIVILEGED_STACK_SIZE
 +------------+ <- thread.arch.priv_stack_start +
                   CONFIG_PRIVILEGED_STACK_SIZE +
                   Z_RISCV_STACK_GUARD_SIZE

The start of the privilege stack should be:

  `thread.arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE`

Instead of

  `thread.arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE`

For the `end`, use the same equation of `top_of_priv_stack` in
the `arch_user_mode_enter()`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
(cherry picked from commit 7db18ab721)
2024-08-02 22:10:08 -05:00
Benjamin Cabé
dc7129bd20 boards: disco_l475_iot1: fix arduino_i2c config
disco l475 board exposes I2C3 on standard Arduino Uno pins A4/A5,
not I2C1.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit 0f05f58bf5)
2024-08-02 22:09:41 -05:00
Alberto Escolar Piedras
36940db938 release: Zephyr v3.7.0
Set the version to v3.7.0

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Alberto Escolar Piedras
07ed4b04e3 doc: release: Finalize v3.7.0 release notes and migration guide
Remove working draft status from the v3.7.0 release notes and migration
guide.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Alberto Escolar Piedras
0483685642 doc: release: Add v3.7.0 to the list of supported releases
Adds v3.7.0 to the list of supported releases.
The EOL data is currently set as 2.5 years after release
which is the minimum support period we claim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Jan Kowalewski
51c39d7d3f doc: release-notes-3.7: add ctcc/nrf52840
Add ctcc/nrf52840 entry to newly added boards.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-07-26 10:01:28 +02:00
Jan Kowalewski
58f3714d01 boards: ct: ctcc: add M.2 picture and fix pictures quality
Provides a picture of M.2 version of a card and fixes quality
mPCIe version.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-07-26 10:01:28 +02:00
Alberto Escolar Piedras
257f9dcb09 doc: 3.7 migration guide: Remove empty headings
Remove headings without content

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
4b26e2698d doc: 3.7 migration guide: Minor fixes
Minor fixes to the migration guide

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00