Commit Graph

102364 Commits

Author SHA1 Message Date
Fabio Baltieri
56dcafece8 cmake: use the warnings_as_errors flag for cpp files
C++ file compilation is actually missing the warning-as-error handling,
causing warnings in build files to be unnoticed in CI. Add a flag to
handle them as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
1a2d74adab device_mmio: use explicit unsigned literals for addresses
Add an explicit unsigned literal suffix (U) for addresses obtained from
devicetree, this is to work around a specific warning:

zephyrproject/zephyr/include/zephyr/arch/arm/cortex_a_r/timer.h:40:2:
warning: this decimal constant is unsigned only in ISO C90

When compling

west build -p -b qemu_cortex_a9 -T tests/lib/cpp/cxx/cpp.main.cpp98

Argueably all devicetree addresses and sizes should be unsigned but this
is enough to make CI pass, may look into changing the device.h macro as
a followup.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
e428a52a28 tests: i2c_emul: drop the array designators
Drop the array dasignators as they generate a

warning: array designators are a C99 extension

warning when compiling with clang. Not too sure if this is an actual
problem or if the warning should be disabled instead but since it's just
a test it should be fine to just drop them.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
b094167114 tests: cpp: add a pm device reference
On some architecture (qemu_x86) this tests generate an unused reference
warning for the PM device structure, as nothing in the structure macro
definition is referencing itself.

Reference the struct in the device define, keep the compiler happy.

Also change one of the device priority to dodge a

'__device_dts_ord_8' causes a section type conflict with
'__device_dts_ord_9'

error with llvm.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
c51df533b5 tests: i2c_emul: fix sign comparison warning
Fix the compiler error:

comparison of integer expressions of different signedness: ‘const int’
and ‘unsigned int’

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
068ed1851b mspi: add a dummy byte to struct mspi_timing_cfg
Add a dummy byte to struct mspi_timing_cfg, for C++ compatibility, same
as what's done in include/zephyr/arch/structs.h,
include/zephyr/arch/arm/structs.h, include/zephyr/kernel/thread.h and
others.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
23f37a5901 tests: lib: cbprintf_package: fix compiler warning
Fix a type mismatch compiler warning in the c++ tests.

Signed-off-by: Yuval Peress <peress@google.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Jacob Winther
dcc1d0e49c boards: nrf52840 common uf2 partition
Common uf2 partition configurations to avoid duplication in boards.

There appears to be a bit of confusion about exactly what a proper
UF2 partition map looks like for the nrf52840, so common dts
configurations should help to avoid confusion.

Configuration for SoftDevice v6 and v7 provided as thats what was
fouond in use in tree already.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-09-23 18:10:08 -04:00
Pieter De Gendt
0d95e2e9e8 clang-format: add more whitespace sensitive macros
An issue with some macros is that a space is added to conditional
expansions. Prevent some of these macros to get formatted.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-23 18:09:53 -04:00
Jamie McCrae
44973d8974 boards: enclustra: mercury_xu: Do not select PINCTRL
This should not be selected by boards

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 18:09:38 -04:00
Jamie McCrae
cc8d646987 boards: digilent: zybo: Do not select PINCTRL
This should not be selected by boards

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 18:09:38 -04:00
TOKITA Hiroshi
efc7c7dacc tests: build_all: sensor: add wsen-pads trigger
Add trigger support for wsen-pads build all sensor tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
TOKITA Hiroshi
8dce43bfc1 drivers: sensor: wsen: wsen_pads: Fix variable type mismatch
Fix to eliminate warnings caused by type mismatch.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
TOKITA Hiroshi
51c5f46f0e tests: build_all: sensor: add iis328dq trigger
Add trigger support for iis328dq build all sensor tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
TOKITA Hiroshi
90fb012db7 drivers: sensor: st: iis328dq: Avoiding declaring unused variables
Separating declarations of variables not referenced with #ifdef
when CONFIG_IIS328DQ_THRESHOLD is disabled.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
Emil Gydesen
4e4971b25d Bluetooth: GATT: Fix issue with 0/NULL for bt_gatt_attr_read
The bt_gatt_attr_read function did not properly handle cases
where value is NULL and/or value_len is 0, or bad mixes of the
two.

The important part is here is that we do not perform the pointer
arithmetic on NULL and/or call memcpy with a NULL src with a
non-0 length.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 18:09:13 -04:00
Daniel Leung
b7541e8f1a west: update hal_xtensa to latest commit
This updates the hal_xtensa commit to latest, including:

* Adds intel_adsp_ace30_ptl SoC
* Adds sample_controller32 for MPU

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-23 18:08:45 -04:00
Raffael Rostagno
d392e9b345 drivers: mbox: esp32: IRQ priority and flags from dts
Get IRQ priority and flags from device tree, allowing for
custom configuration.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-23 18:08:36 -04:00
Bill Waters
eb19d32588 drivers: Remove CONFIG_PINCTRL in defconfig files
The CONFIG_PINCTRL setting is removed from the board
_defconfig files.  And "select PINCTRL" is added to
the appropriate driver files.

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2024-09-23 18:08:14 -04:00
Derek Snell
11623eb1e4 soc: nxp: rt116x: Fix bus clocking
Reverts bus clock settings.  Follows MCUXpresso SDK clock settings, and
sets to output of SysPLL2 PFD3 at 198 MHz.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-09-23 18:07:59 -04:00
Declan Snyder
daa6d3a668 dts: nxp: Fix lpspi node names on mcxn
Spi bus controller node names should follow recommended naming
convention from DT spec otherwise DTC will report a warning.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-23 18:07:29 -04:00
Ioannis Damigos
ea50b18e37 doc: twister: Document binaries keyword under testing
Document binaries keyword under testing keyword
in board's yaml.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-09-23 18:06:39 -04:00
Armando Visconti
3508994ac6 boards: arm: sensortile_box_pro: add bluenrg-lp chip description
Extend sensortile_box_pro document adding BlueNRG-LP chip description.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-09-23 13:24:00 -05:00
TOKITA Hiroshi
aa23112828 tests: drivers: build_all: led: Add i2c devices build test
Add build tests for following devices.

- issi,is31fl3194
- issi,is31fl3216a
- issi,is31fl3733

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 13:23:28 -05:00
Fabian Blatz
11c83c80fc west: commands: runners: canopen: add download-buffer-size option
Adds a --download-buffer-size option to the canopen runner to allow
specifying the buffer size of the SDO download.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-23 13:21:52 -05:00
Martin Jäger
46922b51ce drivers: dac: dac_shell: consider buffered and internal options
The buffered and internal options were not assigned in the channel_cfg,
so they would end up at a random state.

The cfg struct is now properly zero-initialized and both options can
be set using optional parameters -b and -i.

Fixes #75884

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-09-23 13:21:11 -05:00
Gerard Marull-Paretas
bdad3fd17a doc: extensions: link-roles: missing module not critical
External projects building the documentation may not clone all modules, as
they have manifest filtering. Therefore, not having access to a module
should not produce a fatal documentation build error. Convert the error to
a debug log, so it is at least traced.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-23 13:20:41 -05:00
Jeroen Broersen
cf837dd371 drivers: gpio: stm32: keep track of clock enabling per pin
The driver enables the clock of a gpio-port if any of the
pins use the port. This is done by calling pm_device_runtime_get
when a pin is used and pm_device_runtime_put when the pin is not
used anymore.
These calls needs to be balanced. But if a single pin was configured
as GPIO_DISCONNECTED multiple times, every time pm_device_runtime_put
was called.
This caused the clock of the port to be stopped and therefore also
other pins on the same port stopped working.

This commit fixes this by keeping track of which pin on a port
has requested the clock and only call pm_device_runtime_get or
pm_device_runtime_put when the clock-request for the specific pin
changes.

Fixes #77698

Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
2024-09-23 13:20:23 -05:00
Dong Wang
f61b8f9fd2 tests/kernel/context: correct the way to get IRQ number of APIC TSC Timer
This case fails to build on boards having APIC TSC timer enabled.
This change is needed after moving APIC TSC timer support from
apic_timer.c to apic_tsc.c.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-09-23 14:10:27 +01:00
Jukka Rissanen
8aab3ca39d net: shell: Allow user to disable not used commands
User can set CONFIG_NET_SHELL_SHOW_DISABLED_COMMANDS=n to prevent
unused net-shell commands from showing. This can save flash as
the disabled commands will not be shown in net-shell listing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
9d9398f42d net: shell: iface: Add DHCPv6 status prints
It is useful to know the currect status of DHCPv6 client when
printing the interface information.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
e459191ace net: shell: dhcpv6: Add cmd to start/stop DHCPv6 client
Allow user to use the net-shell to start or stop DHCPv6 client.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
bc003db998 net: shell: dhcpv4: Add cmd to start/stop DHCPv4 client
Allow user to use the net-shell to start or stop DHCPv4 client.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
7e4a2c6d46 net: shell: virtual: Add attach/detach commands
Allow "net virtual" command to attach or detach virtual
interfaces. This is useful for device management.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Yangbo Lu
21558df2c3 boards: nxp: imx95_evk: enable i2c5/i2c7 for M7
Enabled i2c5/i2c7 for M7.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-23 14:10:03 +01:00
Yangbo Lu
abb475df09 boards: nxp: imx95_evk: add i2c5/i2c7 pinmux
Added i2c5/i2c7 pinmux in dtsi file.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-23 14:10:03 +01:00
Yangbo Lu
e5f477064e dts: arm: nxp_imx95_m7: add all I2C device nodes
Added all I2C device nodes for nxp_imx95_m7.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-23 14:10:03 +01:00
Krzysztof Chruściński
701beecb5c drivers: serial: nrfx_uarte: Split async control block structure
Split async control block structure into tx and rx structures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-23 14:09:54 +01:00
Emil Gydesen
72829b3b77 Bluetooth: ISO: Added missing NULL checks for API functions
Add missing NULL check for public API function, so that the
function will return -EINVAL rather than crashing.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 14:08:52 +01:00
Arkadiusz Cholewinski
0b370bc4d5 Tests: Ztest_params fix.
- Add CONFIG_SHELL_PROMPT_UART to the prj.conf file.
- Ensure the ztest_params test is flashed/run only once per Pytest session.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-09-23 14:08:41 +01:00
Robert Lubos
c377017146 net: shell: Enable IPv4/6 and iface commands if NET_NATIVE is disabled
Some commands can be executed and some statuses can be printed even if
native IP is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Robert Lubos
4595295028 test: net: offloaded_netdev: Add tests for IPv4/6 address registration
Make sure it's possible to register IPv4/6 addresses on an offloaded
interface. Add an extra build configuration to make sure it's also
possible when native IP stack is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Robert Lubos
8d296ba8fe net: iface: Don't require native networking to register IP address
It shouldn't be needed to enable native networking to be able to
add/delete IP addresses on network interfaces.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Robert Lubos
5d085b49a9 net: ipv4: Make native IPv4 options dependent on NET_NATIVE_IPV4
IPv4 Kconfig options which only affect native IPv4 stack should be
dependent on NET_NATIVE_IPV4, similarly as it's done for IPv6.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Jamie McCrae
ddad1e6fb0 mgmt: mcumgr: grp: os_mgmt: Fix invalid return
Fixes wrongly returning an SMP version 2 error code as an SMP
version 1 error code instead of adding it as an error

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 14:08:03 +01:00
Jamie McCrae
c6c00e13b8 mgmt: mcumgr: grp: os_mgmt: Allow bootloader info without MCUboot
Allows enabling the bootloader info functionality without MCUboot
being enabled, so that other bootloaders can add hooks with their
own responses

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 14:08:03 +01:00
Fabio Baltieri
61f4ba27ad drivers: i2c: add an option to skip auto-sending stop on last message
The I2C transfer API has been recently changed to always automatically
set a STOP on the last message, which was well documented but
implemented only by few drivers.

Unfortunately, while documented, this is a change in the current
behavior and it turns out that some applications depended on it for some
complex operations.

Add a flag to temporarily restore the old behavior, buying time to fix
the application code depending on this.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 14:07:49 +01:00
Matt Rodgers
93356447ad doc: http_server: Document response_ctx used for dynamic resources
Update documentation to describe the method of returning response data
to the HTTP server using the response_ctx callback parameter.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Matt Rodgers
bc9eee4286 tests: net: http_server: Add tests for long GET/POST data
Add test cases for dynamic GET/POST, where the payload is transferred
across more than one call to the dynamic resource callback.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Matt Rodgers
f2d8766b5d net: lib: http_server: remove dynamic resource data buffer
After introduction of struct http_response_ctx, the dynamic resource
data buffer is no longer needed for transferring data between the
application callback and the server. It is therefore removed to avoid
unnecessary copying of data.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00