Commit graph

101251 commits

Author SHA1 Message Date
Emil Gydesen
94e548120b Bluetooth: BAP: SD: Added missing bad code when using mod_src
When the encrypt state was changed via
bt_bap_scan_delegator_mod_src then we didn't set the bad
broadcast code correctly.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:34 +01:00
Emil Gydesen
34fa014682 tests: Bluetooth: Add test for incorrect bcode as assistant
Add a bsim test that verifies the behavior when the
assistant provides an incorrect code to the broadcast
sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:34 +01:00
Emil Gydesen
c49a058b9b Bluetooth: TBS: Fix type of uri in call_alloc
The function had marked the type as char *, but it was in fact
not a string but rather a uint8_t array.

Marked the type properly and added a cast when using it with
bt_tbs_remote_incoming.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:25 +01:00
Emil Gydesen
f500f7c22f Bluetooth: CAP: Fix dependency on BT_BAP_STREAM
The CAP commander used bt_audio_valid_ltv which required
BT_BAP_STREAM to be enabled, but the CAP Commander does not
need BT_BAP_STREAM to be enabled.

Moved the function to audio.c which is always compiled for
the CAP Commander, thus removing the requirement for
BT_BAP_STREAM and the accompanying bt_bap_stream.c file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:16 +01:00
Emil Gydesen
fff9c326c6 Bluetooth: TBS: Add UTF8 requirement to Kconfigs
The UTF8 implementions for both client and server
both use the utf8 API which require CONFIG_UTF8.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:07 +01:00
Emil Gydesen
b250754f5b Bluetooth: TBS: Fix type of uri in bt_tbs_valid_uri
The function had marked the type as char *, but it was in fact
not a string but rather a uint8_t array.

Marked the type properly and added a cast when using it with
strings.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:23:24 +01:00
Carles Cufi
9c23effb66 modules: hal_nordic: Enforce nrf-regtool exact version match
Require the presence of the nrf-regtool package as well as its exact
version, failing the build whenever the required version is not found in
the system.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-09-05 12:23:08 +01:00
John Sanpe
0cd3f56f0d board: add support for VCC-GND STM32H750VB
YD-STM23H750VB board has 128 Kbytes of flash memory, 1 Mbytes of SRAM
and 16 Mbytes onboard SPI norflash.

Signed-off-by: John Sanpe <sanpeqf@gmail.com>
2024-09-05 09:50:14 +02:00
Chris Desjardins
84572a6532 drivers: i2s: Do not ignore the return value from queue_put.
If failure occurs the caller can free the buffer.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2024-09-05 09:50:08 +02:00
Chris Desjardins
34f09e3bd5 drivers: i2s: Fix I2S channel count.
Fixes incorrect channel count in case of I2S format.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2024-09-05 09:50:08 +02:00
Emil Gydesen
c37a48acbc Bluetooth: CAP: Revert order of CAP stream callbacks
Modify the CAP stream callbacks so that the application
callbacks are called before the CAP initiator.

This allows the application to abort/cancel a procedure
before we send out any future request.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 09:50:01 +02:00
Benjamin Cabé
55d9d1c6ba samples: led: consolidate LED samples under same directory
With over a dozen LED samples, grouping them in a common drivers/led/
folder helps keep things tidy and lays the groundwork for further
improvements in the way samples are showing up in the docs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 09:49:52 +02:00
Tomi Fontanilles
b9b166c7f8 manifest: mbedtls: update to 3.6.1
Brings in Mbed TLS 3.6.1.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-05 09:49:42 +02:00
Daniel Mangum
126e3ee6c3 driver: wifi: esp_at: fix typo in CIPDINFO option
Fixes typo in the CIPDINFO option description.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-09-05 09:49:33 +02:00
Marc Herbert
c1cc11891c cmake: remove spurious parenthese just added to xt-ld/linker_flags
Fixes commit 9a9e252d16 ("cmake: linker: move toolchain_ld_<base|cpp>
to linker flag property")

Fixes failure:

```
CMake Error at zephyr/cmake/linker/xt-ld/linker_flags.cmake:32:
  Parse error.  Expected a command name, got right paren with text ")".

Call Stack (most recent call first):
  zephyr/cmake/target_toolchain_flags.cmake:42 (include)
  zephyr/cmake/modules/kernel.cmake:148 (include)
  zephyr/cmake/modules/zephyr_default.cmake:142 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boi
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-05 09:49:27 +02:00
Anas Nashif
82613fba11 doc: fix trivial typo
fix 'be build' and replace with 'be built'.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-05 09:49:18 +02:00
Tomi Fontanilles
17545c17a5 dts: arm: st: h7: fix flash on M4 board targets
The flash controller is nowadays supported on the M4 core.
Add the bank2-flash-size property to the board definitions as required
by the STM32 H7 flash driver.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 19:10:19 -04:00
Andriy Gelman
3a4f868084 drivers: uart_xmc4xxx: Forward DMA overrun errors to user
Currently DMA overrun errors are ignored. Forward the error
to the user using the UART_RX_STOPPED with UART_ERROR_OVERRUN
reason.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 19:09:49 -04:00
Andriy Gelman
e9fd49f180 drivers: dma_xmc4xxx: Clear request before callback when overrun happens
If an overrun happens the user may decide to stop the dma which
unsets the DMA line. Currently, the line is always re-enabled after the
callback.

Switch the order around to fix the problem. Also, always reset the line
even if the user doesn't provide a callback.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 19:09:49 -04:00
Xudong Zheng
30c96a9943 logging: fix color for shell log backend
This allows CONFIG_LOG_BACKEND_SHOW_COLOR to be configured when logging
to shell.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-09-04 19:07:27 -04:00
Piotr Kosycarz
f0bfaa4c19 scripts: pylib: twister: fix missing newlines at handler.log
Keep new lines at handler.log.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-09-04 19:07:19 -04:00
Emanuele Di Santo
fb7c2a79c5 boards: nordic: nrf9280pdk: correct board documentation
Remove parts of the documentation for the nrf9280pdk board
that were copy-pasted and added by mistake.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-09-04 19:07:00 -04:00
Rick Tsao
e9ff0dc35e kernel: userspace: Fix dynamic thread stack allocation for RISC-V
RISC-V use the same logic for dynamic thread stacks allocation as ARM.
This fixup reuses ARM code.

Signed-off-by: Rick Tsao <rick592@andestech.com>
2024-09-04 21:28:36 +02:00
Yuval Peress
8974c248cf rtio: Add default i2c submit handler
Use the RTIO work queue to fake the i2c submit calls for drivers which
haven't yet implemented the API. Applications can change the size of
the work queue pool depending on how much traffic they have on the buses.

Signed-off-by: Yuval Peress <peress@google.com>
2024-09-04 21:28:26 +02:00
Duy Phuong Hoang. Nguyen
bec9952ce8 driver: spi: Add initial support for spi driver on ra8
Add initial SPI driver support for RA8 MCUs

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-09-04 21:28:19 +02:00
Tahsin Mutlugun
4d5bf29315 tests: drivers: adc: Add MAX32680EVKIT overlay file
Add board overlay file for the MAX32680EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
24610e2f06 tests: drivers: adc: Add MAX32 boards overlay files
Add board overlay files for the MAX32655EVKIT, MAX32655FTHR
MAX32662EVKIT, MAX32666EVKIT, MAX32666FTHR, MAX32672EVKIT
MAX32672FTHR and MAX32690EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-04 21:28:08 +02:00
Tahsin Mutlugun
e2b0012120 boards: adi: Enable ADC driver for MAX32680EVKIT
ADC enabled for MAX32680EVKIT

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
168c717afb boards: adi: Enable ADC driver for MAX32 boards
ADC enabled for MAX32655EVKIT, MAX32655FTHR, MAX32662EVKIT
MAX32666EVKIT, MAX32666FTHR, MAX32672EVKIT, MAX32672FTHR and
MAX32690EVKIT boards

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
d7f92d0869 dts: arm: adi: Add ADC inside devicetree
Add ADC peripheral definiton inside device tree file
Add devicetree bindings for MAX32 ADC driver.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
11a172a610 drivers: adc: Add ADC driver for MAX32xxx MCUs
Added ADC driver for MAX32xxx MCUs

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
ac3f4c8dce manifest: Update hal_adi to fix ADC build warnings
Fixed build warnings of ADC for MAX32662 and MAX32672 SoCs on
hal_adi size, this commit fetches it.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-04 21:28:08 +02:00
Anuj Pathak
645beff897 drivers: led: lp5562: reuse engine already linked
Right now "lp5562_led_blink" unconditionally find and assign a engine
that is not executing at the moment. This is an issue, if 3 "led" are
already using an engine. That is a call to "lp5562_led_blink" could
terminate with error, even if the "led" is already using an engine.
This commit fixes this issue by adding a check to see if engine is
linked and reuse it, otherwise assign a free engine.

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-04 21:27:53 +02:00
Bartosz Miller
7f3c08b232 tests: drivers: Allow configurable i2c speed for bme688 test
Configure the I2C test speed with K-config
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-04 21:27:45 +02:00
Anas Nashif
8538c4ae33 sample: uart passthrough: fix filtering and twister file
sample.yml is wrong and was not scanned. Also fix filters in the file so
it can build.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Anas Nashif
bbb63d8aca sample: sip_svc: fix filter and printk formatting
Rename sample.yml and fix build and filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Lucien Zhao
c5dd2c2a84 samples: sensor: mcux_acmp: add case support for RT1180-EVK
Use gpio_ad_01_acmp1_in2 as ACMP1_IN2, test case can be captured
in J45-13.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Lucien Zhao
62e5805c57 drivers: sensor: mcux_acmp: update mcux_acmp drivers
add MCUX_ACMP_HAS_HYSTCTR macro to adapt feature if IP
don't exist HYSTCTR bit

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Lucien Zhao
2680c7d020 dts: arm: nxp: nxp_rt118x: add acmp instances
enable acmp clock in rt118x/soc.c file

add instances and enable clock for rt118x

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Florian Grandel
21481dd31c doc: net: qemu: minor fixes
Adds missing preliminaries and recommends to start persistent commands
in the background.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-04 21:27:20 +02:00
Torsten Rasmussen
5db1f1ae8f cmake: deprecate toolchain_ld_<base|baremetal|cpp> macros
Remove the toolchain_ld_<base|baremetal|cpp> macro as all the macro
handling is now done through the use of linker properties.

Keep support for calling the old macros for out of tree toolchains
which have not been updated to the new property approach.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
5badbfe2a2 cmake: move toolchain_ld_baremetal to linker properties.
Move linker flag setting from toolchain_ld_baremetal() to linker flag
properties as to follow the principle used in previos commits and from
PR#24851.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
9a9e252d16 cmake: linker: move toolchain_ld_<base|cpp> to linker flag property
Transition the linker flag for the toolchain_ld_base and
toolchain_ld_cpp macros to linker flag properties.
This work follows the toolchain abstraction started in PR#24851.

toolchain_ld_base() was intended for base linker flags, but has slowly
become a 'set-any-linker-flag-here' and thus having several
`if(<check>)` or `<func>_ifdef(<check> ...)`.

Move the check to the top-level Zephyr CMakeLists.txt file, so that it
becomes cleaner which part is responsible for setting a value, and then
move the actual value (the linker flag) definition to the linker flag
property location.

It also helps adding support for new linkers, as it becomes clearer
which linker flags Zephyr always expects, for example `base` and
`cpp_base`, as well as those settings which are targeting for a given
purpose, such as linker sort alignment.

It also makes it clearer when those are used, for example in top-level
CMakeLists.txt with CONFIG_LINKER_SORT_BY_ALIGNMENT compared to this
information being buried in a linker support macro.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
d63489195f cmake: support PROPERTY argument on zephyr_link_libraries.
To ease the use of linker flag properties and to simplify the use of
generator expression then an optional PROPERTY argument has been added
to the zephyr_link_libraries() function.

This means a call such as:
zephyr_link_libraries($<TARGET_PROPERTY:linker,<property-name>)
can instead be simplified to:
zephyr_link_libraries(PROPERTY <property-name>)

Thus making intention clearer and keeping the complexity and minimizes
the risk of typos when writing generator expressions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
1728e04b8c cmake: fix check_set_linker_property() function
Fix check_set_linker_property() to correctly handle multiple linker
flags passed on function call.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
22c45c9234 cmake: remove llvm runtime library selection from target_base.cmake
The selection of the runtime library when using LLVM has already been
done in llvm/target.cmake and passed to the toolchain_ld_base() function
through the global TOOLCHAIN_LD_FLAGS setting.

The only reason this haven't been noticed is because of CMake's built-in
symbol de-duplication feature.

Remove the redundant runtime library handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
9bb0140522 cmake: remove the use of PROPERTY_LINKER_SCRIPT_DEFINES
The support of PROPERTY_LINKER_SCRIPT_DEFINES has been broken since
the transition to CMake in 12f8f76165.

The intention was probably to allow users / projects to adjust
PROPERTY_LINKER_SCRIPT_DEFINES by setting a CMake cache variable.

The implementation tests for the CMake variable (local scope or cache)
PROPERTY_LINKER_SCRIPT_DEFINES, but it never uses such CMake variable.

Instead it uses a CMake global property named
PROPERTY_LINKER_SCRIPT_DEFINES. CMake variables and CMake global
properties are two very different things, and therefore the current
implementation has never worked. The fact that no one has never noticed
this flaw, means that the feature has never been used as intended.

Simplify the code by removing the use of the global CMake property and
instead set the value of the property on the linker script
pre-processing invocation.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
048ceb3a64 cmake: toolchain: remove obsolete and unused macros
The macro `toolchain_cc_nostdinc` were made obsolete with PR#24851 and
are no longer invoked.

Remove the macro implementations.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
ce0ab067e6 cmake: cleanup newlib CMakeLists.txt file
Commit 282f77e732f0a4bc859f559bc5a748f953a8140c removed the only place
defining LIBC_INCLUDE_DIR. Remove the corresponding use of
LIBC_INCLUDE_DIR from newlib/CMakeLists.txt as this setting is no longer
being defined anywhere.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Benjamin Cabé
ee77704715 samples: sensor: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 21:26:50 +02:00