Commit Graph

79201 Commits

Author SHA1 Message Date
Stephanos Ioannidis 90828ae9d4 ci: Use Zephyr SDK 0.16.1
This commit updates the CI workflows to use the Zephyr SDK 0.16.1 for
building and testing Zephyr in the CI.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2023-05-16 01:50:00 +09:00
Stephanos Ioannidis b1588dce60 ci: Switch to CI image v0.26.4
This commit updates the CI workflows to use the CI image v0.26.4, in
order to pull in the Zephyr SDK 0.16.1 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2023-05-16 01:50:00 +09:00
Stephanos Ioannidis 8a655749e0 boards: qemu_x86_tiny: Place Newlib-nano into pinned sections
This commit updates the qemu_x86_tiny linker script to place the
Newlib-nano text and rodata sections into the corresponding pinned
sections so that they are accessible.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2023-05-16 01:50:00 +09:00
Daniel Leung 9fc99928ca soc: intel_adsp/ace: update SOC_TOOLCHAIN_NAME
Update the SOC_TOOLCHAIN_NAME to intel_ace15_mtpm so that
we use the correct overlay in Xtensa HAL module. Note that
ace20_lnl will also be using this as well. That will change
once we have a proper toolchain for ace20_lnl.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-16 01:50:00 +09:00
Daniel Leung 49d0ad5520 soc: intel_adsp: update toolchain for cavs25
This updates the toolchain used for intel_adsp_cavs25 to
the proper toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-16 01:50:00 +09:00
Daniel Leung 00b05f45f1 west.yml: update hal_xtensa for intel_adsp_ace15_mtpm
This udpates the manifest SHA to use the latest Xtensa HAL
commit which is to support building intel_adsp_ace15_mtpm
using Zephyr SDK.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2023-05-16 01:50:00 +09:00
Jordan Yates 6280c9132d tests: lib: devicetree: test `DT_ENUM_HAS_VALUE`
Add tests for the new devicetree macro.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-05-15 09:03:37 -07:00
Jordan Yates b6fb701f89 devicetree: add `DT_ENUM_HAS_VALUE`
Add a macro for checking if an enumeration matches a given value.
This enables code to directly check whether a string enumeration is a
specific value, without needing to construct an intermediate variable,
and without checking against a index value which may change.

```
/* Enables this */
if (DT_INST_ENUM_HAS_VALUE(0, power_amplifier_output, rfo_hp)) {}
/* Instead of this */
if (DT_INST_ENUM_IDX(0, power_amplifier_output) == 0) {}
```

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-05-15 09:03:37 -07:00
Jordan Yates 59167e1888 scripts: dts: gen_defines: add `ENUM_VAL_<val>_EXISTS` define
Add a define of the form
`DT_N_<node-id>_P_<prop-id>_ENUM_VAL_<val>_EXISTS` for enumerated
devicetree properties. This enables the devicetree API to check whether
an enum is a given value directly, without resorting to error-prone
checks against the enum index.

Example generated defines (int and string):
	`#define DT_N_S_test_S_enum_4_P_val_ENUM_VAL_5_EXISTS 1`
	`#define DT_N_S_test_S_enum_6_P_val_ENUM_VAL_zero_EXISTS 1`

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-05-15 09:03:37 -07:00
Torsten Rasmussen c03e1900ae scripts: adjust WEST_PYTHON to posix path
Adjust WEST_PYTHON to posix path to be consistent with other Python
scripts which passes paths to the Zephyr CMake build system.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-15 08:13:40 -07:00
Yuval Peress 7153157f88 rtio: Add support for multishot reads
- Introduce multishot reads which remain on the SQ until canceled

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-15 10:10:12 -04:00
Yuval Peress 2c30920b40 rtio: add cancel support
- Add a new API `rtio_sqe_cancel` to attempt canceling a queued SQE
- Add a new syscall `rtio_sqe_copy_in_get_handles` which allows getting
  back the SQE handles generated by the copy_in operation so that they
  can be canceled.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-15 10:10:12 -04:00
Yuval Peress 66328f41a7 rtio: Clear sqe data before prep
Add a memset to clear out the sqe prior to running any of the
rtio_sqe_prep_* functions.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-15 10:10:12 -04:00
Mahesh Mahadevan d3a3e54f55 drivers: i3c: Fix Build failure on MCUX I3C
Fix build failure introduced by commits
989d103d53 and
62f22f8d3b

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-15 15:26:32 +02:00
Wojciech Slenska b667f6248c dts: arm: st: stm32h5: adds i2c nodes
Adds i2c instances for stm32h5 MCUs.

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
2023-05-15 15:26:21 +02:00
Emil Gydesen c66f210f6b Bluetooth: BAP: Broadcast source fix idle state
The idle state was never set, thus providing a poorly
implemented state machine. Updated the code so that unused
code was removed and so that the idle state is properly set.

Optimized the way that a state is set for all endpoints
for a broadcast source with a new function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-15 15:26:14 +02:00
Emil Gydesen 23b4105b9a tests: Bluetooth: Broadcast Sink test resync
After stopping the sync, try to sync again to see
that the broadcast sink can be restarted.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-15 15:26:04 +02:00
Emil Gydesen a16dbbc76c tests: Bluetooth: BAP Broadcast Sink invalid testing
Add invalid parameter testing for the BAP Broadcast Sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-15 15:26:04 +02:00
Sjors Hettinga a28a656aa0 net: tcp: Avoid double acknowlegding retransmitted data
In the FIN_WAIT_1 any incoming data is dropped, but anknowledged. Add a
check to see if the data is already acknowleged to prevent double
acknowledging of the data and bringing the acknowlegde counter out of
sync. When the acknowledge counter gets out of sync, the connection will
never properly terminate any more.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-05-15 15:25:51 +02:00
Sjors Hettinga fd9e7b4e52 net: tcp: test: Implement correct sequence number feeding around FIN
Due to more strict checking of the sequence numbering in the FIN_WAIT_1
state in the tcp stack, the test broke. Fix the sequence numbering
for sending the FIN and FIN ACK messages.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-05-15 15:25:51 +02:00
Jaroslaw Stelter 9c0dd7e3be intel_adsp: ace20_lnl: Change LNL core count to 5
The ACE 2.0 LNL platform has 5 HIFI4 cores. Change number
of cores to enable 5th core on the platform.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-05-15 08:00:11 -04:00
Jaroslaw Stelter edaac6d8d2 ace20_lnl: dts: Add d-cache and i-cache line size
Added i-cache-line-size and d-cache-line-size values
to device tree for ace20_lnl platforms. These values
are used by sys_cache_instr_line_size_get and
sys_cache_data_line_size_get functions.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-05-15 08:00:11 -04:00
Vinayak Kariappa Chettimada 354226022e Bluetooth: Controller: Fix peer ISO feature support check
Fix peer ISO feature support check, by using feature support
bit instead of whether locally supported bit value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-05-15 13:38:38 +02:00
Vinayak Kariappa Chettimada 0249006813 Bluetooth: Controller: Use swapped role specific features bit
Use swapped role specific features bit to calculate features
usable by local device, on feature exchange procedure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-05-15 13:38:38 +02:00
Vinayak Kariappa Chettimada fe53891788 Bluetooth: Controller: Fix Central ISO establish assertion failure
Fix Central ISO assetion failure on being established due to
regression in commit a53d89450a ("Bluetooth: controller:
fixing CIS establish flow for refactored LLCP") that
required changes due to Create CIS LLCP being refactored.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-05-15 13:38:38 +02:00
Herman Berget 93f36d4bff Bluetooth: Host: Fix double conversion of phy
The phy was converted both when reading from the event
and when reading from the sync, leading to incorrect
value in the synced callback.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2023-05-15 13:10:29 +02:00
Francois Ramu a0725f039c tests: drivers: clock_control of the stm32h5 core
Adapt the clock scheme for testing the clock on the stm32h573i_dk.
By default the HSI is 32MHz (div-by-2).
Only scheme for pll sourced by HSI is useful at max freq of 240MHz.
Configure the usart1-console clock to be csi  to always get
a valid clock source in any usecase.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-15 13:09:46 +02:00
Filip Kokosinski a4902b1c35 boards/arm/efr32xg24_dk2601b: add BLE support
This commit adds BLE support to the `efr32xg24_dk2601b` board. It also
modifies the SiLabs BT HCI driver to accomodate the EFR32xG24 SoC
series.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-15 13:09:34 +02:00
Emil Gydesen 6862884f87 Bluetooth: BAP: Broadcast sink fix interval to timeout calc
The calculation in interval_to_sync_timeout did not take into
account that the periodic advertising sync interval was in units
of 1.25ms, and not ms.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-15 10:53:54 +00:00
Sylvio Alves 631dff0889 west.yml: hal_espressif: use common shared source
This fixes an issue related to SPIRAM and DRAM_1 region
access. It is possible that the application crashes due to
invalid pointer value.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-05-15 10:53:35 +00:00
Marcin Niestroj a387f893d2 boards: arm: xiao_ble: increase regulator startup to 3ms
900us regulator startup time was chosen based on tests with single board,
when used directly after 'jlink' flash runner.

It seems that this is not enough when board is reset using RESET button.
Additionally some boards require even more startup time in order to
successfully communicate with LSM6DS3TR-C IMU.

Increase regulator startup time from 900us to 3ms, which seems to be good
enough.

Reported-by: Matthew MacGregor <matthew.macgregor.g@gmail.com>
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-05-15 10:52:04 +00:00
Oliver King a13858e132 soc: stm32wl: Added logging declaration to soc.c
Added logging declaration to soc.c of stm32wl, which resolves build
errors when using this SOC with DEBUG logging level

Fixes: #57655

Signed-off-by: Oliver King <oliver.king@steadconnect.com>
2023-05-15 09:59:22 +00:00
Gerard Marull-Paretas a8b36ffb4d bluetooth: mesh: use STRUCT_SECTION_ITERABLE_ARRAY
STRUCT_SECTION_ITERABLE cannot be used with arrays, because of
preprocessor tokenization issues.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-15 18:52:07 +09:00
Gerard Marull-Paretas 5dd1e8d145 toolchain: add STRUCT_SECTION_ITERABLE_ARRAY
Add a new utility macro to define an array of structs that should be
part of an iterable section.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-15 18:52:07 +09:00
Kay P c48422f523 drivers: clock_control: stm32f3: Enable PWR clock to access BDCR and PWR_CR
BDCR and PWR_CR could be required for LSE or RTC for instance.
Enable it here as for now, no sophisticated PM handling is available
on F0 and F3 series.

Fixes #56449
Fixup for #56505

Signed-off-by: Kay P <kayo@illumium.org>
2023-05-15 09:15:30 +00:00
Savent Gate e2c39313ac drivers: pwm: pwm_stm32: Add 6-PWM support
User can use 6-PWM motor driver in dts like this below:
```dts
pwms =
 // ch1,ch2,ch3,ch1n,ch2n,ch3n
 <&pwm 1 PWM_USEC(50) PWM_POLARITY_NORMAL>, // ch1
 <&pwm 2 PWM_USEC(50) PWM_POLARITY_NORMAL>, // ch2
 <&pwm 3 PWM_USEC(50) PWM_POLARITY_NORMAL>, // ch3
 <&pwm 1 PWM_USEC(50) (PWM_POLARITY_NORMAL|STM32_PWM_COMPLEMENTARY)>,
 <&pwm 2 PWM_USEC(50) (PWM_POLARITY_NORMAL|STM32_PWM_COMPLEMENTARY)>,
 <&pwm 3 PWM_USEC(50) (PWM_POLARITY_NORMAL|STM32_PWM_COMPLEMENTARY)>;
```

Signed-off-by: Savent Gate <savent_gate@outlook.com>
2023-05-15 09:15:01 +00:00
Jamie McCrae c54b71d3b0 doc: release: 3.4: Add note on MCUmgr SMP transport changes
Adds a note that transports now need to set up the struct
themselves prior to calling the registration function.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 10:23:35 +02:00
Jamie McCrae f59b857f6a mgmt: mcumgr: smp: Convert functions to function pointer array
Converts the list of functions for registering an MCUmgr SMP
transport from function arguments to a single list which contains
the function pointers.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 10:23:35 +02:00
Andrei Emeltchenko 7119cc1605 drivers: adc: adc_ads114s0x: Fix missing assignment
Fixes assignment before error check.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-05-15 09:58:28 +02:00
Jamie McCrae 1c70aebb86 tests: mgmt: mcumgr: all_options: Fix Kconfig options
Fixes an issue with missing depdency Kconfig selections.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 09:27:16 +02:00
Jamie McCrae 0e1a1f4899 doc: release: 3.4: Add note on new SMP MCUmgr protocol version
Adds a note on the new version of the SMP MCUmgr protocol.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 09:27:16 +02:00
Jamie McCrae 794f3df08e doc: services: device_mgmt: Add version field
Adds the SMP version field to the diagram and description.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 09:27:16 +02:00
Jamie McCrae 1e1507f480 tests: mgmt: mcumgr: os_mgmt_info: Update callback format
Updates the format of the MCUmgr callback to use the new style.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 09:27:16 +02:00
Jamie McCrae 3d6035d37e tests: mgmt: mcumgr: cb_notifications: Update callback format
Updates the format of the MCUmgr callback to use the new style.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 09:27:16 +02:00
Jamie McCrae 6f5b974949 mgmt: mcumgr: Add command result codes (ret)
Adds a new map to responses that command handlers can use to
return result codes of functions themselves, unrelated to SMP
error codes. This is achieved by adding an optional "ret" map
which contains a 16-bit "group" and 16-bit "rc" error code,
this map will not be included if the "ret rc" is 0 (which
implies success).

In order to allow this, a new version of the protocol has been
which can be indicated for use by setting a bit in the header.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 09:27:16 +02:00
Lukas Woodtli fb924e2b62 net: lwm2m: Handle CONTINUE in registration message
The continue code is not considered an error in case of
block-wise transfer.

Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
2023-05-15 09:18:09 +02:00
Lukas Woodtli 73fb4e73a8 net: lwm2m: Handle CONTINUE response and send new block
After sending a CoAP block and receiving the CONTINUE response
code the next block is sent.

Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
2023-05-15 09:18:09 +02:00
Lukas Woodtli 92ad3c1d6d tests: net: lwm2m: Add tests for block transfer
The tests check that a message is correctly split into
multiple blocks.

Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
2023-05-15 09:18:09 +02:00
Lukas Woodtli 49f8d08f98 net: lwm2m: Split message into blocks for sending
Add functionality that creates blocks from a big payload body.

Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
2023-05-15 09:18:09 +02:00
Lukas Woodtli 3707a0d229 net: lwm2m: Provide buffer for block transfer
Allow to use a buffer for the complete message body if block transfer is
enabled. This buffer is used when serializing the message. For sending
the message the body is split into blocks.

Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
2023-05-15 09:18:09 +02:00