Commit graph

85352 commits

Author SHA1 Message Date
Andrzej Kuros
c4e53dabf7 nrf53: fix RTC pretick power usage for events on RTC0
For RTC0 events the RTC1 pretick event was not cleared what caused the
WDT to be not stopped. This resulted in increased power usage.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-10-11 11:09:29 +02:00
Erwan Gouriou
1c2d326579 drivers: serial: stm32: Make it compatible with runtime PM on console
Since #53979, runtime PM can be applied on serial device used by console.
While it should be transparent on serial driver side as the application
(console in this case) is driving the PM runtime requests, on STM32
it requires some modification on serial driver as UART interrupts are
generated to handle internal power management house cleaning.
When these interrupts are generated, PM runtime should also be driven
to ensure clock availability when treating the uart ISR.
On STM32, some additional changes are required

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-11 11:12:03 +03:00
Daniel Leung
2d25fae42e kernel: remove deprecated STACK EXTERN macros
These macros have been deprecated since v3.2.0. So remove them.

() K_KERNEL_STACK_EXTERN
   Use K_KERNEL_STACK_DECLARE instead.

() K_KERNEL_STACK_ARRAY_EXTERN
   Use K_KERNEL_STACK_ARRAY_DECLARE instead.

() K_KERNEL_PINNED_STACK_ARRAY_EXTERN
   Use K_KERNEL_PINNED_STACK_ARRAY_DECLARE instead.

() K_THREAD_STACK_EXTERN
   Use K_THREAD_STACK_DECLARE instead.

() K_THREAD_STACK_ARRAY_EXTERN
   Use K_THREAD_STACK_ARRAY_DECLARE instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-11 11:05:45 +03:00
Martin Jäger
b1cc4e9a14 doc: releases: release-notes-3.5: update CAN ISO-TP
Add sections for CAN ISO-TP changes in this release and describe API
changes in migration guide.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-10-11 09:38:08 +03:00
Erwan Gouriou
e0192e1287 doc: release note 3.5: Document Shields additions
Document shields added in V3.5 release.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-11 00:20:45 +03:00
Erwan Gouriou
dc3295608a doc: migration guide 3.5: Document STM32 changes
Document STM32 breaking or not backward compatible changes made on V3.5
release.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-11 00:20:45 +03:00
Erwan Gouriou
01c31f2dc5 doc: release note 3.5: Document STM32 changes
Document STM32 related changes made on V3.5 release.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-11 00:20:45 +03:00
Keith Packard
e7126b5d84 libc/common: Place malloc data structures in libc partition
Leave the malloc partition so that it only contains the heap itself; this
lets the initialization code adjust the address range when configuring the
arena at startup.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-10 23:39:40 +03:00
Keith Packard
eb024b655f libc: Control Z_LIBC_PARTITION_EXISTS from Kconfig
Instead of adding every possible subsystem which places variables in the C
library memory partition in libc-hooks.h, place those conditions in the
related Kconfig files and simplify the libc-hooks.h to just looking at
CONFIG_NEED_LIBC_MEM_PARTITION.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-10 23:39:40 +03:00
Martin Jäger
13e0abf4a5 doc: releases: release-notes v3.5: update DAC driver
Add section for added DAC drivers in this release.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-10-10 21:24:03 +01:00
Flavio Ceolin
cd291e5c98 doc: release: 3.5: Add info about CVE-2023-4259
Add CVE-2023-4259 info to release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 21:11:33 +03:00
Flavio Ceolin
b1fdce6336 doc: vuln: Add information about CVE-2023-4259
Information about CVE-2023-4259

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 21:11:33 +03:00
Gerard Marull-Paretas
a19c7f2294 tests: lib: hash_map: fix libc heap size setting
The malloc arena/heap size setting can be adjusted using different
Kconfig options, depending on the libc implementation. This means
prj.conf can't be used to set this value on projects that can be built
for multiple libcs without generating a Kconfig warning.

Note: similar fix was applied for the hash_map sample, see
7ef8911e8c

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-10-10 12:26:15 -04:00
Fabian Blatz
c5064cf708 doc: release-notes: Add 3.5.0 release notes for LVGL
Added section for LVGL changes done for release 3.5.0.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-10-10 17:44:24 +03:00
Robert Lubos
fdaba20b2c doc: net: Add page for net_time
So that the type is visible and "referencable" in the documentation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-10-10 16:27:32 +03:00
Robert Lubos
ae109c6ea5 doc: release-notes: Add 3.5.0 release notes for networking
Add 3.5.0 release notes for networking.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-10-10 16:27:32 +03:00
Jamie McCrae
365a6f5da0 doc: retention: Add note on mutex configuration
Adds a note on how to configure and what to beware of when
disabling mutex support in a multithreading application

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-10 16:27:10 +03:00
Jamie McCrae
9ea9c85f00 doc: retained_mem: Add note on mutex configuration
Adds a note on how to configure and what to beware of when
disabling mutex support in a multithreading application

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-10 16:27:10 +03:00
Stefan Petersen
416dde7dd1 drivers: ethernet: eth_stm32_hal.c Fix mixup of DMA error and MAC error
There seems to be a copy-paste error where GetDMAError() et al is used
twice. The comment states that it is actually getMACError() et al that
should be used in the second instance.

Signed-off-by: Stefan Petersen <spe@ciellt.se>
2023-10-10 15:26:52 +02:00
Andrej Butok
86d606ba2d flash: nxp: fix lpc55s36 flash read
Add additional check if page is erased,
to avoid a possible fault exception.
Fixes #63087

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-10-10 15:26:18 +02:00
Alberto Escolar Piedras
b1515ac364 boards nrf_bsim: Set native_gdb as debug runner
Set native_gdb as the runner for the debug build target

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-10 15:26:09 +02:00
Alberto Escolar Piedras
9ce33d7512 native sim: Set native_gdb as debug runner
Set native_gdb as the runner for the debug build target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-10 15:26:09 +02:00
Alberto Escolar Piedras
07e88a9fba west native_gdb runner: Fix to use exe instead of elf
The runnable output from the build system is the
exe file. In native_posix the elf happend to also be
runnable, but this is not the case in general,
and not for native_sim or the nrf5*bsim boards.

So lets use the exe instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-10 15:26:09 +02:00
Alberto Escolar Piedras
f8455b410e west runner: Add exe file to configuration
Add the exe fle to the runnerconfiguration class,
so we can use it from runners which will need it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-10 15:26:09 +02:00
Anas Nashif
22042e7b4e ci: tags: include wifi/net drivers in the net group
Changes to networking and wifi drivers should trigger networking tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-10 16:22:54 +03:00
Lukasz Mrugala
eeb142d409 .github: workflows: Workflow for build_helpers
PR #63195 has managed to change code under test without
triggering those tests.

This change should remedy that by creating a new workflow,
based on twister_tests.yaml, that runs tests in
scripts/tests/build_helpers if build_helpers are modified.

Such a workflow should be easily extendable if we ever have more
non-Twister things to test in scripts/pylib.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-10 15:55:58 +03:00
Lukasz Mrugala
76f9a024c3 scripts: tests: twister: Domains tests fix
PR #63195 has changed how Domains work without
triggering necessary tests, thus breaking them.
This commit fixes the domains tests.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-10 15:55:58 +03:00
Lukasz Mrugala
2fcf4e3499 scripts: pylib: build_helpers: flash_order fix
If flash_order were to be missing from the YAML, the Domains init
would crash instead of substituting an empty list.
This commit fixes that.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-10 15:55:58 +03:00
Jukka Rissanen
493fe169a8 drivers: eswifi: Fix the SSID copying
The wrong ssid_len was used which causes build error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-10 15:50:22 +03:00
Mariusz Skamra
916df03e7a Bluetooth: ascs: Fix Source ASE link loss state transition
According to the ASCS_v1.0 the ASE in Streaming state shall transit to
QoS Configured state when link loss happen.

Relates: ES-24215 (errata)
Fixes: BAP/USR/SCC/BV-168-C
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-10-10 15:18:37 +03:00
Emil Lindqvist
97d608b98f display: stm32: fix bug where missing backlight pin causes crash
When backlight pin is not defined, a display suspend will cause
a crash since it looks at the wrong pin when deciding if
it exists.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2023-10-10 15:16:59 +03:00
Flavio Ceolin
e7bd10ae71 random: Rename random header
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.

Rename it to random.h and get consistently with other
subsystems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 14:23:50 +03:00
Jordan Yates
c928e3b125 doc: release-notes: Add 3.5.0 notes for LoRaWAN
Document the upgrade from v4.6.0 to v4.7.0.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-10-10 14:04:44 +03:00
Szymon Janc
4f57614cbd tests: bluetooth: tester: Fix GATT read multiple
Pass only speficied number of handler to read_params for GATT read
multiple. This is to avoid sending invalid (zeros) handles in
ATT_READ_MULTIPLE_REQ.

This was affecting GATT/CL/GAR/BI-18-C and GATT/CL/GAR/BI-19-C
qualification test cases.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-10-10 12:48:11 +03:00
Flavio Ceolin
5f53d4977f doc: relnotes: 3.5: Random subsys release notes
Information about the removal of a deprecated symbol.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 12:42:58 +03:00
Flavio Ceolin
0c040501e6 doc: relnotes: 3.5: Entropy drivers release notes
Add relevant information about entropy drivers.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 12:42:58 +03:00
Daniel Leung
54c7cdb6a1 doc: release/3.5: add bits about UART drivers
This adds some bits on additions and changes for UART drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-10 10:42:41 +01:00
Daniel Leung
73acdbbcaf doc: release/3.5: add bits about shadow variable warning
This adds bits about partially enabling warnings on shadow
variables for a subset of in-tree code.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-10 10:42:41 +01:00
Daniel Leung
e28a80d42b doc: release/3.5: add bits about userspace and syscalls
This adds bits about changes related to userspace and syscalls.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-10 10:42:41 +01:00
Daniel Leung
61f939da30 doc: release/3.5: added bits on I3C driver changes
This adds some bits about changes to the I3C CDNS driver.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-10 10:42:41 +01:00
Daniel Leung
83a6223da2 doc: release/3.5: add bits for PCIe
This adds some bits about changes on PCIe subsystem.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-10 10:42:41 +01:00
Daniel Leung
f0d71f54d9 doc: release/3.5: add some bits on Xtensa
This adds some bits on added Xtensa MMU support, refactoring of
ESP32 folder, and various board additions/removals.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-10 10:42:41 +01:00
Flavio Ceolin
ea109f6a20 drivers: eswifi: shell: Fix possible overflow
Limit the copied data to the buffer's size.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 11:41:49 +02:00
Flavio Ceolin
2504329b76 drivers: eswifi: Fix possible buffer overflow
Limit the number of the copied ssid to WIFI_SSID_MAX_LEN
and avoid a possible one byte overflow.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 11:41:49 +02:00
Daniel DeGrasse
daf6de7b99 drivers: flash: flexspi_mx25um513: enforce write size limit in DTR mode
Per the MX25UM51325G datasheet, all page programs in OPI DTR mode need to
start at an even address, and be of even length. Update the minimum
write size reported by the driver and check all writes when OPI DTR mode
is enabled, so that subsystems using the flash driver can align to this
requirement.

Fixes #63639

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-10 11:18:57 +02:00
Erwan Gouriou
1a00636895 samples: tfm_regression_test: Provide a working partition for nucleo_l5
This partition is designed to work regression TFM configuration.

Fixes #59794

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-10 11:18:48 +02:00
Szymon Janc
4c269d0d61 tests: bluetooth: tester: Increase BT RX thread stack
Default stack size if not enought and was causing MPU faults.
This was affecting GATT/SR/GAW/BV-14-C qualification test case.

<dbg> bttester_gatt: gatt_db_add: handle 0x0000
<err> os: ***** MPU FAULT *****
<err> os:   Stacking error (context area might be not valid)
<err> os:   Data Access Violation
<err> os:   MMFAR Address: 0x2000aa38
<err> os: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x00000000
<err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x00000000
<err> os:  xpsr:  0x00000000
<err> os: Faulting instruction address (r15/pc): 0x00000000
<err> os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
<err> os: Current thread: 0x20002d28 (BT RX)
<err> os: Halting system

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-10-10 11:18:11 +02:00
Jukka Rissanen
d52cb2202f doc: release: 3.5: Add Ethernet and Wi-Fi info
Add changes to Ethernet and Wi-Fi drivers for v3.5.
Also add information about generic Ethernet and Wi-Fi changes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-10 11:18:04 +02:00
Fabio Baltieri
cf75c88a61 tests: newlib/thread_safety: exclude acrn_ehl_crb from more tests
This was already excluded from
libraries.libc.newlib_nano.thread_safety.userspace.stress and it's now
failing in libraries.libc.newlib.thread_safety.userspace.stress as well.

The issue is being rootcaused to a toolchain issue but a proper fix has
not been identified yet, exclude that test as well in the meantime.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/61129
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-10 09:05:02 +01:00
Henrik Brix Andersen
fc078f9d02 drivers: can: sja1000: do not attempt to sleep in IRQ context
The can_sja1000_handle_error_warning_irq() function should only attempt to
start bus-off recovery, but not wait for the result.

Fixes: #63712

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-09 23:54:47 +03:00