Compare commits

...

55 Commits

Author SHA1 Message Date
Chris Friedt
3568e1b6d5 release: Zephyr v4.3.0
Set the version to v4.3.0

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-11-13 17:35:08 +02:00
Chris Friedt
ab4b3553c1 doc: release: 4.3: finalize release notes and migration guide
Remove working draft status from the 4.3.0 release notes and migration
guide.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-13 17:35:08 +02:00
Chris Friedt
1d1dace9a2 doc: release: Add v4.3.0 to the list of supported releases
Add v4.3.0 to the list of supported releases.

Since v4.1.0 is becoming EOL, bump TOC ranges to no longer list v4.1.0
and add (draft) v4.4.0.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-13 17:35:08 +02:00
Pieter De Gendt
6d37434699 LICENSES: Add note to README file
The files in the LICENSES directory are for the reuse tool, and not the
licenses of the Zephyr repository itself.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-11-13 17:34:51 +02:00
Robert Lubos
77d461c4c0 net: tcp: Reduce the log level for active close
The log level was elevated by mistake as a leftover from debugging,
should remain DBG.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-13 15:34:20 +02:00
Gerard Marull-Paretas
6ed584fc78 doc: extensions: domain: fix inventory on incremental builds
Generated objects.inv would not contain e.g. "zephyr:board" entry on
incremental builds, making it impossible to use Intersphinx on other
projects when rebuilding the Zephyr docset.

It can be verified by inspecting inventory like this:

```python
from sphinx.util.inventory import InventoryFile
InventoryFile.loads(open("objects.inv", "rb").read(), uri="")
inv.data.keys()
```

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-11-13 15:34:10 +02:00
Tomi Fontanilles
8b032af664 doc: release-notes-4.2: fix up TF-M version update entry
TF-M had already been updated to 2.2.0 by the time 4.2 was released.
(https://github.com/zephyrproject-rtos/zephyr/pull/91169)

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-11-13 13:24:01 +02:00
Johan Hedberg
f1cd32ec42 doc: migration-guide-4.3: Remove empty Architectures section
There's no content in this section, so just remove it.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-11-13 13:23:50 +02:00
Benjamin Cabé
2a22823fe9 doc: releases: cosmetic/typo fixes to 4.3 release notes & migration guide
Fixes a few minor typos / copy-paste errors / indentation / etc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-11-13 13:23:50 +02:00
Fin Maaß
037af5f324 doc: release: mention default-speeds dt prop
mention default-speeds dt prop

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-11-13 13:23:50 +02:00
Fin Maaß
d13c4d258e doc: migration-guide: move ethernet
move ethernet to the right place.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-11-13 13:23:50 +02:00
Qiang Zhao
9ef73c88f6 test: ram_context_for_isr: exclude imx95 m7
i.MX95 M7 supports multi-level interrupt.
Current ram_context_for_isr test does not cover multi-level interrupt.
So exclude i.MX95 M7.

Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
2025-11-13 12:02:36 +02:00
Daniel Leung
81f5b781aa xtensa: fix Python script formatting via ruff
Uses ruff to format the gen_* python scripts.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-13 12:02:08 +02:00
Daniel Leung
36f7792ea1 xtensa: fix ruff issues in Python scripts
Fix the issues found by ruff.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-13 12:02:08 +02:00
Badr Bacem KAABIA
0719c9eca2 crypto: mbedtls_shim: Fix concurrency and deadlock issues
- **Fix session mutex handling:** Ensure the `mtls_sessions_lock` is
    always released in `mtls_get_unused_session_index` on failure
    to prevent deadlocks.
- **Protect `in_use` flag:** Added mutex protection when setting
    `in_use = false` in free functions.
- **Cleanup on setup failure:** Added calls to `mbedtls_*_free()`
    in `mtls_session_setup()` when key initialization fails.
- **Free logic fix:** Corrected `if/else` structure in
    `mtls_session_free()` to ensure the correct context is freed.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-13 12:01:44 +02:00
Badr Bacem KAABIA
577f60dcd7 crypto: mbedtls_shim: Remove incorrect out_len calculation in AEAD decrypt
Remove erroneous calculation of `apkt->pkt->out_len` in
`mtls_ccm_decrypt_auth` and `mtls_gcm_decrypt_auth`.
The output length should be handled by the caller or the
AEAD decryption process itself.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-13 12:01:44 +02:00
Badr Bacem KAABIA
01b0280bad crypto: mbedtls_shim: Fix typos
Corrected "encrypt" log messages to "decrypt."

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-13 12:01:44 +02:00
Ofir Shemesh
b933bf5e08 net: dhcpv4: fix incorrect RFC2131 section reference to 4.4.1
Corrected the RFC2131 section reference in DHCPv4 comments and help text.
The random delay before sending the initial DHCPDISCOVER message is
defined in Section 4.4.1 of RFC2131, not in 4.1.1 as previously stated.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2025-11-13 12:01:31 +02:00
Robert Lubos
9e6256e853 net: iface: Prevent iface/TCP mutexes deadlock
In rare occasions iface and TCP mutexes could cause a deadlock. As
notifying the interface readiness takes place just before the iface
mutex is released, it should be not harm to release it just before the
TCP is notified about interface going down to avoid the deadlock.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-12 19:00:20 -05:00
Robert Lubos
ba6387fcd6 net: tcp: Close the connection unconditionally on forced close
The current approach was buggy, for example the TCP context could be
unrefed twice in case of forced close. Or in case of a race, when the
application closed the socket first, the TCP context wouldn't be
dereferenced at all.

Calling the tcp_conn_close() unconditionally in case of forced close
solves all those issues.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-12 19:00:20 -05:00
Robert Lubos
7fe33a5d5a net: tcp: Fix error reporting on listening socket on iface down
A listening TCP context has no active connection therefore it has no a
second ref from the TCP stack. Thereby, when shutting down connections
when interface goes down, net_tcp_put() should not be called on a
listening socket to release the ref on the TCP stack behalf.

Instead, report the error via the registered accept_cb callback no
notify the application about the error, which should then close the
socket and release the associated TCP context.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-12 19:00:20 -05:00
Chris Friedt
c9eba65681 doc: kernel: timeutil: remove note about 64-bitness
Remove the note about time_t being 64-bit in Zephyr, since that is
generally not accurate and depends on the configuration of the C library.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-12 18:59:33 -05:00
Jukka Rissanen
25ab312dd7 doc: release-notes: Add wifi information to 4.3
Add information about native wifi stack changes in 4.3.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-12 18:58:51 -05:00
Marek Slowinski
9679395099 tests: drivers: memc: ram: Fix build error on hifive_unmatched
Fix 'RAM_SIZE_SRAM' undeclared error in function 'test_ram_test_ram0'.

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
2025-11-12 17:57:48 +02:00
Yves Wang
4f2f391fc8 doc: contribute: Fixed missing code block new line
dts-linter command was not correctly rendered in doc site.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-12 09:18:39 -05:00
Laurentiu Mihalcea
6a0edac6fb doc: releases: add v4.3 release notes for firmware subsystem
Add v4.3 release notes for the firmware subsystem.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-11-12 09:09:29 -05:00
Flavio Ceolin
8757978f68 doc: release/4.3: CVE-2025-9408 left embargo
Disclose information about CVE that left embargo.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-11-12 09:09:11 -05:00
Flavio Ceolin
b886f82cad doc: security: Disclose CVE-2025-9408
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-11-12 09:09:11 -05:00
Benjamin Cabé
b8bbd5047d MAINTAINERS: add instrumentation documentation path
Add path to Instrumentation documentation to the corresponding area.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-11-12 09:08:45 -05:00
Benjamin Cabé
5d5a907648 doc: releases: update link to instrumentation subsystem documentation
Documentation has been added for the instrumentation subsystem, link to
it in the Zephyr 4.3 release highlights instead of code sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-11-12 09:08:45 -05:00
Benjamin Cabé
dba7304c98 doc: instrumentation: add documentation for the instrumentation subsystem
Add documentation for the instrumentation subsystem as this was missing
from the initial contribution.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-11-12 09:08:45 -05:00
Robert Lubos
efef1f54dc doc: release-notes-4.3: Update release notes for networking
Update release notes for 4.3.0 release with networking subsystem
changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-12 09:06:18 -05:00
Emil Dahl Juhl
598d03c404 dts: arm: st: n6: fixup adc2 missing properties
The added stm32-adc properties in c21cdd8569 ("dts: bindings: adc:
stm32: add new properties to simplify the driver") were missing from adc2
within the stm32n6.dtsi.

Since adc1 and adc2 are almost identical, just copy the missing properties
from adc1 which was fixed up as part of 5f0c63ea35 ("dts: arm: st: fill
out adc nodes with the new properties").

This fixes compilation when using adc2:

```
devicetree error: 'st,adc-internal-regulator' is marked as required in
'properties:' in [...]/zephyr/dts/bindings/adc/st,stm32n6-adc.yaml, but
does not appear in <Node /soc/adc@50022100 in
[...]/zephyr/dts/arm/st/n6/stm32n6.dtsi:456>
```

Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
2025-11-12 09:01:53 -05:00
Valerio Setti
e0fdb87929 manifest: tf-m: align Mbed TLS header files to v3.6.5
Update manifest to align the copy of Mbed TLS header files which lives
in the TF-M repository to what's in Mbed TLS release v3.6.5.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-11-12 09:01:43 -05:00
Anas Nashif
e455e6a39b modbus: fix spdx license identifier
Fix APACHE-2.0 -> Apache 2.0

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-11-12 14:38:32 +02:00
Emil Gydesen
29f097b2c5 tests: Bluetooth: tester: Add info on running with native_sim
Add a few useful commands and information when running the
BT Tester with native_sim, either with or without the
Zephyr controller.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-11-12 14:38:23 +02:00
Robert Lubos
3e537db71e net: lwm2m: Fix SenML CBOR resource instance encoding
Consecutive resource instance name should be encoded regardless of
whether timestamp is present or not.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-12 12:57:30 +02:00
Stoyan Bogdanov
2a9f21482b tests: sensor: Fix fdc2x1x in build_all test suite
Add missing new line before channel entry for fdc2x1x
which was causing CI fail

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-11-12 11:16:59 +02:00
Flavio Ceolin
240960ebdd doc: release/4.3: Add CVE under embargo
Add information about CVE-2025-12899 under embargo.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-11-12 11:14:23 +02:00
Flavio Ceolin
80f4d8427c doc: vuln: Add CVE under embargo
Add an entry to CVE-2025-12899.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-11-12 11:14:23 +02:00
Flavio Ceolin
3cfa7c22f2 doc: security: Disclose CVE-2025-12890
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-11-12 11:14:23 +02:00
Chris Friedt
13daf245a8 tests: drivers: build_all: smbus: add build-all suite for smbus drivers
To ensure that code compiles error (and warning) free, add a build-all
testsuite for smbus drivers.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-11 19:48:27 +02:00
Chris Friedt
e6fcd9e09a drivers: smbus: stm32: add cast to avoid warning
Previously, the function `smbus_stm32_pcall()` implicitly cast
`uint16_t *` to `uint8_t *`. Add an explicit cast to avoid warning.

```shell
..drivers/smbus/smbus_stm32.c:358:32: error: initialization of \
  'uint8_t *' {aka 'unsigned char *'} from incompatible pointer type \
  'uint16_t *' {aka 'short unsigned int *'} \
  [-Werror=incompatible-pointer-types]
  358 |                         .buf = &send_word,
      |                                ^
..drivers/smbus/smbus_stm32.c:358:32: note: (near initialization \
  for 'messages[1].buf')
..drivers/smbus/smbus_stm32.c:363:32: error: initialization of \
  'uint8_t *' {aka 'unsigned char *'} from incompatible pointer type \
  'uint16_t *' {aka 'short unsigned int *'} \
  [-Werror=incompatible-pointer-types]
  363 |                         .buf = recv_word,
      |                                ^~~~~~~~~
```

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-11 19:48:27 +02:00
Chris Friedt
07d29ec96d drivers: smbus: use correct device initialization priority
The smbus driver initialization priority was previously set to
`KERNEL_INIT_PRIORITY_DEFAULT` (which is 40). However, the default init
priority of devices is typically `KERNEL_INIT_PRIORITY_DEVICE` (which is
50).

Since the stm32 smbus driver uses a reference to the underlying i2c
device, and since this driver was not being built in CI, this led to the
discovery that the smbus driver was initialized too early.

```shell
ERROR: Device initialization priority validation failed, the sequence of \
initialization calls does not match the devicetree dependencies.
ERROR: /smbus1 <smbus_stm32_init> is initialized before its dependency \
/soc/i2c@40005400 <i2c_stm32_init> (POST_KERNEL+1 < POST_KERNEL+4)
```

By setting the initialization priority to `KERNEL_INIT_PRIORITY_DEVICE`,
both smbus1 and i2c1 have their priorities evaluated in the same group,
and it becomes possible to determine relative priorities via phandle
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-11 19:48:27 +02:00
Sudan Landge
deb8437d48 tests: fix: skip stack unwind on unsupported platforms
Add ARCH_HAS_STACKWALK as a dependency to the stack unwind test to avoid
running it on 64bit Cortex-R platforms, which do not implement the
arch_stack_walk() api.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-11-11 19:47:47 +02:00
Yves Wang
c46454781a ci: compliance: update dts-linter to 0.3.6
Update dts-linter to 0.3.6 and dts-lsp to 0.6.7

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-11 19:47:38 +02:00
Yves Wang
14bba90725 ci: compliance: call dts linter safely under windows
subprocess run without shell requires npx shim under windows.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-11 19:47:38 +02:00
Yasushi SHOJI
6d6508ae12 scripts: kconfig: gnuconfig: Ignore loc
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but guiconfig.py is left untouched. This make menuconfig to
die with:

  Exception in Tkinter callback
  Traceback (most recent call last):
    File "/usr/lib/python3.13/tkinter/__init__.py", line 2077, in __call__
      return self.func(*args)
             ~~~~~~~~~^^^^^^^
    File ".../scripts/kconfig/guiconfig.py", line 917, in _tree_double_click
      return _tree_enter(event)
    File ".../scripts/kconfig/guiconfig.py", line 942, in _tree_enter
      _change_node(node, tree.winfo_toplevel())
      ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File ".../scripts/kconfig/guiconfig.py", line 1125, in _change_node
      s = _set_val_dialog(node, parent)
    File ".../scripts/kconfig/guiconfig.py", line 1219, in _set_val_dialog
      range_info = _range_info(sym)
    File ".../scripts/kconfig/guiconfig.py", line 1339, in _range_info
      for low, high, cond in sym.ranges:
          ^^^^^^^^^^^^^^^
  ValueError: too many values to unpack (expected 3)

This commit ignores the last element in the tuples.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2025-11-11 12:46:17 -05:00
Yasushi SHOJI
090d294ae0 scripts: kconfig: menuconfig: Ignore loc
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but menuconfig.py is left untouched. This make menuconfig to
die with:

  Traceback (most recent call last):
    File ".../scripts/kconfig/menuconfig.py", line 3284, in <module>
      _main()
      ~~~~~^^
    File ".../scripts/kconfig/menuconfig.py", line 663, in _main
      menuconfig(standard_kconfig(__doc__))
      ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File ".../scripts/kconfig/menuconfig.py", line 732, in menuconfig
      print(curses.wrapper(_menuconfig))
            ~~~~~~~~~~~~~~^^^^^^^^^^^^^
    File "/usr/lib/python3.13/curses/__init__.py", line 94, in wrapper
      return func(stdscr, *args, **kwds)
    File ".../scripts/kconfig/menuconfig.py", line 872, in _menuconfig
      _change_node(sel_node)
      ~~~~~~~~~~~~^^^^^^^^^^
    File ".../scripts/kconfig/menuconfig.py", line 1586, in _change_node
      s, _range_info(sc))
         ~~~~~~~~~~~^^^^
    File ".../scripts/kconfig/menuconfig.py", line 3119, in _range_info
      for low, high, cond in sym.ranges:
          ^^^^^^^^^^^^^^^
  ValueError: too many values to unpack (expected 3)

This commit ignores the last element in the tuples.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2025-11-11 12:46:17 -05:00
Benjamin Cabé
8fa6a3a214 include: drivers: rtc: add missing doxygen docs
document all the RTC Alarm Time Mask macros

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-11-11 16:26:53 +02:00
Josuah Demangeon
f955d541a4 MAINTAINERS: USB: add @josuah as collaborator
Add a 3rd reviewer to USB area.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-11 14:13:30 +02:00
Geoffroy Jabouley
16840cc6bd MAINTAINERS: update hal_tdk maintainers
Add rbuisson-invn and gjabouley-invn as maintainers for hal_tdk.

Signed-off-by: Geoffroy Jabouley <geoffroy.jabouley@tdk.com>
2025-11-11 14:13:21 +02:00
Erwan Gouriou
df8b43d330 boards: st: stm32h7s78_dk: Document use of ext_flash_app variant
As stated, document use of ext_flash_app variant (build, flash and debug).

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-11-10 09:58:28 -05:00
Erwan Gouriou
da571acff4 boards: st: stm32h573i_dk: Document use of ext_flash_app variant
As stated, document use of ext_flash_app variant (build, flash and debug).

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-11-10 09:58:28 -05:00
Arnaud Pouliquen
1db02b373f MAINTAINERS: Add open-amp and libmetal maintainers
- Add Iulia Prodan as she is already a maintainer of the OpenAMP module.
- Add myself as I am maintainer of the openAMP project.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-11-10 09:57:55 -05:00
52 changed files with 1067 additions and 315 deletions

View File

@@ -26,14 +26,6 @@
"SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
]
"./arch/xtensa/core/gen_vectors.py" = [
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
]
"./arch/xtensa/core/gen_zsr.py" = [
"SIM401", # https://docs.astral.sh/ruff/rules/if-else-block-instead-of-dict-get
]
"./boards/microchip/mec172xevb_assy6906/support/mec172x_remote_flasher.py" = [
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
]
@@ -1154,8 +1146,6 @@ exclude = [
"./arch/x86/gen_idt.py",
"./arch/x86/gen_mmu.py",
"./arch/x86/zefi/zefi.py",
"./arch/xtensa/core/gen_vectors.py",
"./arch/xtensa/core/gen_zsr.py",
"./boards/microchip/mec172xevb_assy6906/support/mec172x_remote_flasher.py",
"./doc/_scripts/gen_devicetree_rest.py",
"./doc/_scripts/redirects.py",

10
LICENSES/README.md Normal file
View File

@@ -0,0 +1,10 @@
> [!IMPORTANT]
> The license files in this directory are maintained as per the recommendation
> of the REUSE specification (https://reuse.software/spec-3.3).
> These are licenses that may apply to some components hosted in the source tree
> but that do not end up in built binaries
> (see https://docs.zephyrproject.org/latest/LICENSING.html#zephyr-licensing).
>
> These files do _not_ define the license of the Zephyr project itself.
> Zephyr is licensed under the Apache 2.0 license, as specified in
> the [LICENSE](/LICENSE) file at the root of the repository.

View File

@@ -2920,6 +2920,7 @@ Instrumentation Subsystem:
- fkokosinski
- tgorochowik
files:
- doc/services/instrumentation/
- include/zephyr/instrumentation/
- samples/subsys/instrumentation/
- scripts/instrumentation/
@@ -5088,6 +5089,7 @@ USB:
- jfischer-no
collaborators:
- tmon-nordic
- josuah
files:
- drivers/usb/
- dts/bindings/usb/
@@ -5741,9 +5743,9 @@ West:
status: maintained
maintainers:
- afontaine-invn
collaborators:
- rbuisson-invn
- gjabouley-invn
collaborators:
- sriccardi-invn
files:
- modules/hal_tdk/Kconfig
@@ -5836,9 +5838,10 @@ West:
- "area: MCTP"
"West project: libmetal":
status: odd fixes
collaborators:
status: maintained
maintainers:
- arnopo
- iuliana-prodan
files:
- modules/Kconfig.libmetal
labels:
@@ -5991,10 +5994,12 @@ West:
- "area: Wi-Fi"
"West project: open-amp":
status: odd fixes
status: maintained
maintainers:
- arnopo
- iuliana-prodan
collaborators:
- uLipe
- iuliana-prodan
files:
- modules/Kconfig.open-amp
labels:

View File

@@ -2,4 +2,4 @@ VERSION_MAJOR = 4
VERSION_MINOR = 3
PATCHLEVEL = 0
VERSION_TWEAK = 0
EXTRAVERSION = rc3
EXTRAVERSION =

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env python3
# Copyright 2023 The ChromiumOS Authors
# SPDX-License-Identifier: Apache-2.0
import sys
import re
import sys
# Xtensa Vector Table linker generator
#
@@ -55,10 +55,12 @@ coreisa = sys.argv[1]
debug_level = 0
# Translation for the core-isa.h vs. linker section naming conventions
sect_names = { "DOUBLEEXC" : "DoubleException",
"KERNEL" : "KernelException",
"NMI" : "NMIException",
"USER" : "UserException" }
sect_names = {
"DOUBLEEXC": "DoubleException",
"KERNEL": "KernelException",
"NMI": "NMIException",
"USER": "UserException",
}
offsets = {}
@@ -99,7 +101,7 @@ with open(coreisa) as infile:
if debug_level > 0:
old = f"Level{debug_level}Interrupt"
offsets[f"DebugException"] = offsets[old]
offsets["DebugException"] = offsets[old]
del offsets[old]
sects = list(offsets)
@@ -112,11 +114,11 @@ print("")
# The 1k alignment is experimental, the docs on the Relocatable Vector
# Option doesn't specify an alignment at all, but writes to the
# bottom bits don't take...
print( " .z_xtensa_vectors : ALIGN(1024) {")
print( " z_xtensa_vecbase = .;")
print(f" KEEP(*(.WindowVectors.text));")
print(" .z_xtensa_vectors : ALIGN(1024) {")
print(" z_xtensa_vecbase = .;")
print(" KEEP(*(.WindowVectors.text));")
for s in sects:
print(f" KEEP(*(.{s}Vector.literal));")
print( " . = 0x%3.3x;" % (offsets[s]))
print(f" . = 0x{offsets[s]:x};")
print(f" KEEP(*(.{s}Vector.text));")
print(" }")

View File

@@ -11,22 +11,27 @@ import re
# -dM") core-isa.h file for the current architecture and assigns
# registers to usages.
def parse_args():
parser = argparse.ArgumentParser(allow_abbrev=False)
parser.add_argument("--flush-reg", action="store_true",
help="Enable scratch register ZSR_FLUSH for cache flushing")
parser.add_argument("--mmu", action="store_true",
help="Enable scratch registers for MMU usage")
parser.add_argument("--syscall-scratch", action="store_true",
help="Enable scratch registers for syscalls if needed")
parser.add_argument("coreisa",
help="Path to preprocessed core-isa.h")
parser.add_argument("outfile",
help="Output file")
parser.add_argument(
"--flush-reg",
action="store_true",
help="Enable scratch register ZSR_FLUSH for cache flushing",
)
parser.add_argument("--mmu", action="store_true", help="Enable scratch registers for MMU usage")
parser.add_argument(
"--syscall-scratch",
action="store_true",
help="Enable scratch registers for syscalls if needed",
)
parser.add_argument("coreisa", help="Path to preprocessed core-isa.h")
parser.add_argument("outfile", help="Output file")
return parser.parse_args()
args = parse_args()
NEEDED = ["A0SAVE", "CPU"]
@@ -40,8 +45,10 @@ outfile = args.outfile
syms = {}
def get(s):
return syms[s] if s in syms else 0
return syms.get(s, 0)
with open(coreisa) as infile:
for line in infile.readlines():
@@ -50,7 +57,7 @@ with open(coreisa) as infile:
syms[m.group(1)] = m.group(2)
# Use MISC registers first if available, that's what they're for
regs = [ f"MISC{n}" for n in range(0, int(get("XCHAL_NUM_MISC_REGS"))) ]
regs = [f"MISC{n}" for n in range(0, int(get("XCHAL_NUM_MISC_REGS")))]
if args.syscall_scratch:
# If there is no THREADPTR, we need to use syscall for

View File

@@ -244,8 +244,8 @@ by executing the following commands:
$ pyocd pack --update
$ pyocd pack --install stm32h5
Flashing an application to STM32H573I-DK Discovery
--------------------------------------------------
Application in SoC Flash
========================
Connect the STM32H573I-DK Discovery to your host computer using the USB port.
Then build and flash an application. Here is an example for the
@@ -271,7 +271,7 @@ You should see the following message on the console:
Hello World! stm32h573i_dk
Debugging
=========
---------
Waiting for OpenOCD support, debugging could be performed with pyOCD which
requires to enable "pack" support with the following pyOCD command:
@@ -290,6 +290,97 @@ example for the :zephyr:code-sample:`hello_world` application.
:maybe-skip-config:
:goals: debug
Application in External Flash
=============================
Since an external NOR is available on the board, you may want to use it to store
a large user application, and run it from there. In that case, the MCUboot bootloader
is needed to chainload the application. A dedicated board variant, ``ext_flash_app``, was created
for this usecase.
:ref:`sysbuild` makes it possible to build and flash all necessary images needed to run a user application
from external Flash.
The following example shows how to build :zephyr:code-sample:`hello_world` with Sysbuild enabled:
.. zephyr-app-commands::
:tool: west
:zephyr-app: samples/hello_world
:board: stm32h573i_dk/stm32h573xx/ext_flash_app
:goals: build
:west-args: --sysbuild
By default, Sysbuild creates MCUboot and user application images.
For more information, refer to the :ref:`sysbuild` documentation.
Flashing
--------
Both MCUboot and user application images can be flashed by running:
.. code-block:: console
west flash
You should see the following message in the serial host program:
.. code-block:: console
*** Booting MCUboot v2.2.0-192-g96576b341ee1 ***
*** Using Zephyr OS build v4.3.0-rc2-37-g6cc7bdb58a92 ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x0
I: Image version: v0.0.0
I: Jumping to the first image slot
*** Booting Zephyr OS build v4.3.0-rc2-37-g6cc7bdb58a92 ***
Hello World! stm32h573i_dk/stm32h573xx/ext_flash_app
To only flash the user application in the subsequent builds, Use:
.. code-block:: console
west flash --domain hello_world
With the default configuration, the board uses MCUboot's Swap-using-offset mode.
To get more information about the different MCUboot operating modes and how to
perform application upgrade, refer to `MCUboot design`_.
To learn more about how to secure the application images stored in external Flash,
refer to `MCUboot Encryption`_.
Debugging
---------
You can debug the application in external flash using ``west`` and ``GDB``.
After flashing MCUboot and the app, execute the following command:
.. code-block:: console
west debugserver
Then, open another terminal (don't forget to activate Zephyr's environment) and execute:
.. code-block:: console
west attach
By default, user application symbols are loaded. To debug MCUboot application,
launch:
.. code-block:: console
west attach --domain mcuboot
.. _STM32H573I-DK Discovery website:
https://www.st.com/en/evaluation-tools/stm32h573i-dk.html
@@ -310,3 +401,9 @@ example for the :zephyr:code-sample:`hello_world` application.
.. _STMicroelectronics OpenOCD Github:
https://github.com/STMicroelectronics/OpenOCD/tree/openocd-cubeide-r6
.. _MCUboot design:
https://docs.mcuboot.com/design.html
.. _MCUboot Encryption:
https://docs.mcuboot.com/encrypted_images.html

View File

@@ -207,24 +207,16 @@ Programming and Debugging
STM32H7S78-DK Discovery board includes an ST-LINK/V3E embedded debug tool interface.
Applications for the ``stm32h7s78_dk`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing
========
The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
Flashing an application to STM32H7S78-DK Discovery
--------------------------------------------------
Application in SoC Flash
========================
Connect the STM32H7S78-DK Discovery to your host computer using the USB port.
Then build and flash an application. Here is an example for the
:zephyr:code-sample:`hello_world` application.
Here is an example for the :zephyr:code-sample:`hello_world` application.
Run a serial host program to connect with your Nucleo board:
Connect the STM32H7S78-DK Discovery to your host computer using the USB port,
then run a serial host program to connect with your Nucleo board:
.. code-block:: console
@@ -243,8 +235,12 @@ You should see the following message on the console:
Hello World! stm32h7s78_dk
If the application size is too big to fit in SoC Flash,
Zephyr :ref:`Code and Data Relocation <code_data_relocation>` can be used to relocate
the non-critical and big parts of the application to external Flash.
Debugging
=========
---------
You can debug an application in the usual way. Here is an example for the
:zephyr:code-sample:`hello_world` application.
@@ -255,6 +251,88 @@ You can debug an application in the usual way. Here is an example for the
:maybe-skip-config:
:goals: debug
Application in External Flash
=============================
Because of the limited amount of SoC Flash (64KB), you may want to store the application
in external QSPI Flash instead, and run it from there. In that case, the MCUboot bootloader
is needed to chainload the application. A dedicated board variant, ``ext_flash_app``, was created
for this usecase.
:ref:`sysbuild` makes it possible to build and flash all necessary images needed to run a user application
from external Flash.
The following example shows how to build :zephyr:code-sample:`hello_world` with Sysbuild enabled:
.. zephyr-app-commands::
:tool: west
:zephyr-app: samples/hello_world
:board: stm32h7s78_dk/stm32h7s7xx/ext_flash_app
:goals: build
:west-args: --sysbuild
By default, Sysbuild creates MCUboot and user application images.
For more information, refer to the :ref:`sysbuild` documentation.
Flashing
--------
Both MCUboot and user application images can be flashed by running:
.. code-block:: console
west flash
You should see the following message in the serial host program:
.. code-block:: console
*** Booting MCUboot v2.2.0-192-g96576b341ee1 ***
*** Using Zephyr OS build v4.3.0-rc2-37-g6cc7bdb58a92 ***
I: Starting bootloader
I: Bootloader chainload address offset: 0x0
I: Image version: v0.0.0
I: Jumping to the first image slot
*** Booting Zephyr OS build v4.3.0-rc2-37-g6cc7bdb58a92 ***
Hello World! stm32h7s78_dk/stm32h7s7xx/ext_flash_app
To only flash the user application in the subsequent builds, Use:
.. code-block:: console
west flash --domain hello_world
With the default configuration, the board uses MCUboot's Swap-using-offset mode.
To get more information about the different MCUboot operating modes and how to
perform application upgrade, refer to `MCUboot design`_.
To learn more about how to secure the application images stored in external Flash,
refer to `MCUboot Encryption`_.
Debugging
---------
You can debug the application in external flash using ``west`` and ``GDB``.
After flashing MCUboot and the app, execute the following command:
.. code-block:: console
west debugserver
Then, open another terminal (don't forget to activate Zephyr's environment) and execute:
.. code-block:: console
west attach
By default, user application symbols are loaded. To debug MCUboot application,
launch:
.. code-block:: console
west attach --domain mcuboot
.. _STM32H7S78-DK Discovery website:
https://www.st.com/en/evaluation-tools/stm32h7s78-dk.html
@@ -269,3 +347,9 @@ You can debug an application in the usual way. Here is an example for the
.. _STM32CubeProgrammer:
https://www.st.com/en/development-tools/stm32cubeprog.html
.. _MCUboot design:
https://docs.mcuboot.com/design.html
.. _MCUboot Encryption:
https://docs.mcuboot.com/encrypted_images.html

View File

@@ -1182,6 +1182,13 @@ class ZephyrDomain(Domain):
"has_code_sample_listing": {}, # docname -> bool
"board_catalog_docname": None, # docname of the one page containing the board catalog
"has_board": {}, # docname -> bool
# board catalog data (populated by load_board_catalog_into_domain)
"boards": {},
"shields": {},
"vendors": {},
"socs": {},
"archs": {},
"runners": {},
}
def clear_doc(self, docname: str) -> None:
@@ -1204,6 +1211,11 @@ class ZephyrDomain(Domain):
self.data["board_catalog_docname"] = None
self.data["has_board"].pop(docname, None)
# Clear board docnames for boards documented in this docname
for board_data in self.data.get("boards", {}).values():
if board_data.get("docname") == docname:
board_data.pop("docname", None)
def merge_domaindata(self, docnames: list[str], otherdata: dict) -> None:
self.data["code-samples"].update(otherdata["code-samples"])
self.data["code-samples-categories"].update(otherdata["code-samples-categories"])
@@ -1419,7 +1431,15 @@ def load_board_catalog_into_domain(app: Sphinx) -> None:
),
hw_features_vendor_filter=app.config.zephyr_hw_features_vendor_filter,
)
app.env.domaindata["zephyr"]["boards"] = board_catalog["boards"]
# Preserve existing docnames when reloading the catalog
existing_boards = app.env.domaindata.get("zephyr", {}).get("boards", {})
new_boards = board_catalog["boards"]
for board_name, board_data in new_boards.items():
if board_name in existing_boards and "docname" in existing_boards[board_name]:
board_data["docname"] = existing_boards[board_name]["docname"]
app.env.domaindata["zephyr"]["boards"] = new_boards
app.env.domaindata["zephyr"]["shields"] = board_catalog["shields"]
app.env.domaindata["zephyr"]["vendors"] = board_catalog["vendors"]
app.env.domaindata["zephyr"]["socs"] = board_catalog["socs"]

View File

@@ -209,8 +209,8 @@ html_context = {
"current_version": version,
"versions": (
("latest", "/"),
("4.3.0", "/4.3.0/"),
("4.2.0", "/4.2.0/"),
("4.1.0", "/4.1.0/"),
("3.7.0 (LTS)", "/3.7.0/"),
),
"display_gh_links": True,

View File

@@ -26,28 +26,10 @@ For running with QEMU or :zephyr:board:`native_sim <native_sim>`, see :ref:`blue
Setup Linux
***********
Install nrftools (only required in the actual hardware test mode)
*****************************************************************
Please follow :ref:`getting_started` on how to setup Linux for building and flashing applications.
Download latest nrftools (version >= 10.12.1) from site
https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download.
.. image:: download_nrftools_linux.png
:height: 350
:width: 600
:align: center
After you extract archive, you will see 2 .deb files, e.g.:
- JLink_Linux_V688a_x86_64.deb
- nRF-Command-Line-Tools_10_12_1_Linux-amd64.deb
and README.md. To install the tools, double click on each .deb file or follow
instructions from README.md.
Setup Windows 10 virtual machine
********************************
Setup Windows 10/11 virtual machine
***********************************
Choose and install your hypervisor like VMWare Workstation(preferred) or
VirtualBox. On VirtualBox could be some issues, if your host has fewer than 6 CPU.
@@ -55,7 +37,7 @@ VirtualBox. On VirtualBox could be some issues, if your host has fewer than 6 CP
Create Windows virtual machine instance. Make sure it has at least 2 cores and
installed guest extensions.
Setup tested with VirtualBox 7.1.4 and VMWare Workstation 16.1.1 Pro.
Setup tested with VirtualBox 7.2.4 and VMWare Workstation 16.1.1 Pro.
Update Windows
==============
@@ -186,10 +168,10 @@ consoles. We will use Git Bash as Windows terminal.
:width: 400
:align: center
Install PTS 8
=============
Install PTS
===========
On Windows virtual machine, install latest PTS from https://www.bluetooth.org.
On Windows virtual machine, install the latest PTS from https://pts.bluetooth.com/download.
Remember to install drivers from installation directory
"C:/Program Files (x86)/Bluetooth SIG/Bluetooth PTS/PTS Driver/win64/CSRBlueCoreUSB.inf"
@@ -245,16 +227,6 @@ Connect devices (only required in the actual hardware test mode)
:width: 500
:align: center
Flash board (only required in the actual hardware test mode)
************************************************************
On Linux, go to ~/zephyrproject. There should be already ~/zephyrproject/build
directory. Flash board:
.. code-block::
west flash
Setup auto-pts project
**********************
@@ -279,7 +251,6 @@ Install required python modules:
.. code-block::
cd auto-pts
pip3 install --user wheel
pip3 install --user -r autoptsclient_requirements.txt
Autopts server on Windows virtual machine
@@ -301,9 +272,14 @@ Install required python modules:
Restart virtual machine.
Running AutoPTS
****************
***************
Server and client by default will run on localhost address. Run server:
Please follow the information from
https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/bluetooth/tester on how to build,
flash and run the Bluetooth Tester application.
Server and client by default will run on localhost address.
Run the server in the Windows virtual machine:
.. code-block::
@@ -314,59 +290,89 @@ Server and client by default will run on localhost address. Run server:
:width: 700
:align: center
Testing Zephyr Host Stack on QEMU:
See also https://github.com/auto-pts/auto-pts for additional information on how to run auto-pts.
Testing Zephyr Host Stack on hardware
=====================================
.. code-block::
# A Bluetooth controller needs to be mounted.
# For running with HCI UART, please visit: https://docs.zephyrproject.org/latest/samples/bluetooth/hci_uart/README.html#bluetooth-hci-uart
python ./autoptsclient-zephyr.py zephyr-master -t /dev/ttyACM0 -b BOARD -i SERVER_IP -l LOCAL_IP
python ./autoptsclient-zephyr.py "C:\Users\USER_NAME\Documents\Profile Tuning Suite\PTS_PROJECT\PTS_PROJECT.pqw6" \
~/zephyrproject/build/zephyr/zephyr.elf -i SERVER_IP -l LOCAL_IP
Where ``/dev/ttyACM0`` is the tty for the board,
``BOARD`` is the board to use (e.g. ``nrf53_audio``),
``SERVER_IP`` is the IP of the AutoPTS server,
``LOCAL_IP`` is the local IP of the Linux machine.
Testing Zephyr Host Stack on QEMU
=================================
Testing Zephyr Host Stack on :zephyr:board:`native_sim <native_sim>`:
A Bluetooth controller needs to be mounted.
For running with HCI UART, please visit :zephyr:code-sample:`bluetooth_hci_uart`.
.. code-block::
# A Bluetooth controller needs to be mounted.
# For running with HCI UART, please visit: https://docs.zephyrproject.org/latest/samples/bluetooth/hci_uart/README.html#bluetooth-hci-uart
python ./autoptsclient-zephyr.py zephyr-master BUILD_DIR/zephyr/zephyr.elf -i SERVER_IP -l LOCAL_IP
west build -b native_sim zephyr/tests/bluetooth/tester/ -DEXTRA_CONF_FILE=overlay-native.conf
Where ``BUILD_DIR`` is the build directory,
``SERVER_IP`` is the IP of the AutoPTS server,
``LOCAL_IP`` is the local IP of the Linux machine.
sudo python ./autoptsclient-zephyr.py "C:\Users\USER_NAME\Documents\Profile Tuning Suite\PTS_PROJECT\PTS_PROJECT.pqw6" \
~/zephyrproject/build/zephyr/zephyr.exe -i SERVER_IP -l LOCAL_IP --hci 0
Testing Zephyr Host Stack on :zephyr:board:`native_sim <native_sim>`
====================================================================
When tester application has been built for :zephyr:board:`native_sim <native_sim>` it produces a
``zephyr.exe`` file, that can be run as a native Linux application.
Depending on your system,
you may need to perform the following steps to successfully run ``zephyr.exe``.
Testing Zephyr combined (controller + host) build on nRF52:
Setting capabilities
--------------------
.. note::
If the error "ImportError: No module named pywintypes" appeared after the fresh setup,
uninstall and install the pywin32 module:
.. code-block::
pip install --upgrade --force-reinstall pywin32
Run client:
Since the application will need access to connect to a socket for HCI,
you may need to perform the following
.. code-block::
python ./autoptsclient-zephyr.py zephyr-master ~/zephyrproject/build/zephyr/zephyr.elf -t /dev/ACM0 \
-b nrf52 -l 192.168.2.1 -i 192.168.2.2
setcap cap_net_raw,cap_net_admin,cap_sys_admin+ep zephyr.exe
.. image:: autoptsclient_run_2.png
:height: 100
:width: 800
:align: center
This is not required if you run ``zephyr.exe`` or ``./autoptsclient-zephyr.py`` with e.g. ``sudo``.
At the first run, when Windows asks, enable connection through firewall:
Downing the HCI controller
--------------------------
.. image:: allow_firewall_2.png
:height: 450
:width: 600
:align: center
You may also need to "down" or "power off" the HCI controller before running ``zephyr.exe``.
This can be done either with ``hciconfig`` as
.. code-block::
hciconfig hciX down
Where ``hciX`` is a value like ``hci0``. You may run ``hciconfig`` to get a list of your HCI devices.
Since ``hciconfig`` is deprecated on some systems, you may need to use
.. code-block::
btmgmt -i hciX power off
Similar to ``hciconfig``, ``btmgmt info`` may be used to list current controllers and their states.
Both ``hciconfig`` and ``btmgmt`` may require ``sudo`` when powering down a controller.
Running the client
------------------
The application can be run as
.. code-block::
python ./autoptsclient-zephyr.py zephyr-master --hci HCI BUILD_DIR/zephyr/zephyr.exe -i SERVER_IP -l LOCAL_IP
Where ``HCI`` is the HCI index, e.g. ``0`` or ``1``,
``BUILD_DIR`` is the build directory,
``SERVER_IP`` is the IP of the AutoPTS server,
``LOCAL_IP`` is the local IP of the Linux machine.
Troubleshooting
****************

View File

@@ -96,6 +96,7 @@ to quickly reformat large amounts of devicetree files to our `Coding Style Guide
standards. You can also run it manually like this:
For individual files
.. code-block:: bash
npx --prefix ./scripts/ci dts-linter --format --file board.dts --file board_pinctrl.dtsi --patchFile diff.patch
@@ -106,6 +107,7 @@ has been called. Alternatively ``--cwd`` can also be passed set the base dir whe
should look for files. This option is also used to make the paths relative in the patch file.
You can also fix in place with
.. code-block:: bash
npx --prefix ./scripts/ci dts-linter --formatFixAll

View File

@@ -349,15 +349,6 @@ since C11. The definition of ``struct timespec`` is as shown below.
long tv_nsec; /* nanoseconds */
};
.. _note:
The C standard does not define the size of ``time_t``. However, Zephyr
uses 64-bits for ``time_t``. The ``long`` type is required to be at least
32-bits, but usually matches the word size of the architecture. Both
elements of ``struct timespec`` are signed integers. ``time_t`` is defined
to be 64-bits both for historical reasons and to be robust enough to
represent times in the future.
The ``tv_nsec`` field is only valid with values in the range ``[0, 999999999]``. The
``tv_sec`` field is the number of seconds since the epoch. If ``struct timespec`` is
used to express a difference, the ``tv_sec`` field may fall into a negative range.

View File

@@ -105,9 +105,9 @@ Supported Releases
+------------------------+----------------+---------------+
| Release | Release date | EOL |
+========================+================+===============+
| `Zephyr 4.2.0`_ | 2025-07-18 | 2026-03-20 |
| `Zephyr 4.3.0`_ | 2025-11-14 | 2026-10-15 |
+------------------------+----------------+---------------+
| `Zephyr 4.1.0`_ | 2025-03-07 | 2025-11-14 |
| `Zephyr 4.2.0`_ | 2025-07-18 | 2026-03-20 |
+------------------------+----------------+---------------+
| `Zephyr 3.7.0 (LTS3)`_ | 2024-07-26 | 2029-07-27 |
+------------------------+----------------+---------------+
@@ -143,7 +143,7 @@ with the changes in the project.
:reversed:
release-notes-3.7
release-notes-4.[1-3]
release-notes-4.[2-4]
Migration Guides
****************
@@ -175,7 +175,7 @@ to be able to understand the context of the change.
:reversed:
migration-guide-3.7
migration-guide-4.[1-3]
migration-guide-4.[2-4]
End-of-life Releases
********************
@@ -194,5 +194,5 @@ Release notes and migration guides for end-of-life releases of Zephyr RTOS can b
.. _`Zephyr 1.14.1 (LTS1)`: https://docs.zephyrproject.org/1.14.1/
.. _`Zephyr 2.7.6 (LTS2)`: https://docs.zephyrproject.org/2.7.6/
.. _`Zephyr 3.7.0 (LTS3)`: https://docs.zephyrproject.org/3.7.0/
.. _`Zephyr 4.1.0`: https://docs.zephyrproject.org/4.1.0/
.. _`Zephyr 4.2.0`: https://docs.zephyrproject.org/4.2.0/
.. _`Zephyr 4.3.0`: https://docs.zephyrproject.org/4.3.0/

View File

@@ -7,8 +7,8 @@
.. _migration_4.3:
Migration guide to Zephyr v4.3.0 (Working Draft)
################################################
Migration guide to Zephyr v4.3.0
################################
This document describes the changes required when migrating your application from Zephyr v4.2.0 to
Zephyr v4.3.0.
@@ -58,7 +58,7 @@ Base Libraries
The old Kconfig option still exists, but will be overridden if the custom requirements
are larger. To force the old Kconfig option to be used, even when its value is less
than the indicated custom requirements, a new :kconfig:option:`CONFIG_ZVFS_OPEN_IGNORE_MIN`
option has been introduced (which defaults being disabled).
option has been introduced (which defaults to being disabled).
Boards
******
@@ -83,7 +83,7 @@ Boards
(> v0.12.0) in which the HLA/SWD transport has been deprecated (see
https://review.openocd.org/c/openocd/+/8523 and commit
https://sourceforge.net/p/openocd/code/ci/34ec5536c0ba3315bc5a841244bbf70141ccfbb4/).
Issues may be encountered when connecting to an ST-Link adapter running firmware prior
Issues may be encountered when connecting to an ST-Link adapter running firmware prior to
v2j24 which do not support the new transport. In this case, the ST-Link firmware should
be upgraded or, if not possible, the OpenOCD configuration script should be changed to
source "interface/stlink-hla.cfg" and select the "hla_swd" interface explicitly.
@@ -134,7 +134,36 @@ DMA
* DMA no longer implements user mode syscalls as part of its API. The syscalls were determined to be
too broadly defined in access and impossible to implement the syscall parameter verification step
in another.
in a safe manner.
Ethernet
========
* The :dtcompatible:`microchip,vsc8541` PHY driver now expects the reset-gpios entry to specify
the GPIO_ACTIVE_LOW flag when the reset is being used as active low. Previously the active-low
nature was hard-coded into the driver. (:github:`91726`).
* CRC checksum generation offloading to hardware is now explicitly disabled rather then explicitly
enabled in the Xilinx GEM Ethernet driver (:dtcompatible:`xlnx,gem`). By default, offloading is
now enabled by default to improve performance, however, offloading is always disabled for QEMU
targets due to the checksum generation in hardware not being emulated regardless of whether it
is explicitly disabled via the Devicetree or not. (:github:`95435`)
* Replaced Devicetree property ``rx-checksum-offload`` which enabled RX checksum offloading
``disable-rx-checksum-offload`` which now actively disables it.
* Replaced Devicetree property ``tx-checksum-offload`` which enabled TX checksum offloading
``disable-tx-checksum-offload`` which now actively disables it.
* The Xilinx GEM Ethernet driver (:dtcompatible:`xlnx,gem`) now obtains the AMBA AHB data bus
width matching the current target SoC (either Zynq-7000 or ZynqMP) from a design configuration
register at run-time, making the Devicetree property ``amba-ahb-dbus-width`` obsolete, which
has therefore been removed.
* The :dtcompatible:`nxp,enet-mac` and :dtcompatible:`xlnx,gem` drivers are no longer configuring
the link speed and duplex mode of the phy via :c:func:`phy_configure_link` during initialization.
Instead, the user has to use the ``default-speeds`` Devicetree property of the phy, if they want
to restrict the advertised speeds for auto-negotiation, when the mac only supports a subset of the
phy supported speeds. (:github:`91572`)
MFD
===
@@ -211,11 +240,11 @@ Bluetooth Controller
* The following have been renamed:
* :kconfig:option:`CONFIG_BT_CTRL_ADV_ADI_IN_SCAN_RSP` to
:kconfig:option:`CONFIG_BT_CTLR_ADV_ADI_IN_SCAN_RSP`
* :c:struct:`bt_hci_vs_fata_error_cpu_data_cortex_m` to
:c:struct:`bt_hci_vs_fatal_error_cpu_data_cortex_m` and now contains the program counter
value.
* :kconfig:option:`CONFIG_BT_CTRL_ADV_ADI_IN_SCAN_RSP` to
:kconfig:option:`CONFIG_BT_CTLR_ADV_ADI_IN_SCAN_RSP`
* :c:struct:`bt_hci_vs_fata_error_cpu_data_cortex_m` to
:c:struct:`bt_hci_vs_fatal_error_cpu_data_cortex_m` and now contains the program counter
value.
.. zephyr-keep-sorted-start re(^\w)
@@ -235,7 +264,7 @@ Bluetooth Audio
* The BAP Scan Delegator will no longer automatically update the PA sync state, and
:c:func:`bt_bap_scan_delegator_set_pa_state` must be used to update the state. If the
BAP Scan Delegator is used together with the BAP Broadcast Sink, then the PA state of the
receive state of a :c:struct:`bt_bap_broadcast_sink` will still be automatically updated when the
receive state of a :c:struct:`bt_bap_broadcast_sink` will still be automatically updated when the
PA state changes. (:github:`95453`)
@@ -244,7 +273,7 @@ Bluetooth Audio
Bluetooth HCI
=============
* The deprecated ``ipm`` value was removed from ``bt-hci-bus`` devicetree property.
* The deprecated ``ipm`` value was removed from ``bt-hci-bus`` Devicetree property.
``ipc`` should be used instead.
Bluetooth Mesh
@@ -263,40 +292,17 @@ Bluetooth Host
passkey for pairing, or :c:macro:`BT_PASSKEY_RAND` for the Host to generate a random passkey
instead.
Ethernet
========
* The :dtcompatible:`microchip,vsc8541` PHY driver now expects the reset-gpios entry to specify
the GPIO_ACTIVE_LOW flag when the reset is being used as active low. Previously the active-low
nature was hard-coded into the driver. (:github:`91726`).
* CRC checksum generation offloading to hardware is now explicitly disabled rather then explicitly
enabled in the Xilinx GEM Ethernet driver (:dtcompatible:`xlnx,gem`). By default, offloading is
now enabled by default to improve performance, however, offloading is always disabled for QEMU
targets due to the checksum generation in hardware not being emulated regardless of whether it
is explicitly disabled via the devicetree or not. (:github:`95435`)
* Replaced devicetree property ``rx-checksum-offload`` which enabled RX checksum offloading
``disable-rx-checksum-offload`` which now actively disables it.
* Replaced devicetree property ``tx-checksum-offload`` which enabled TX checksum offloading
``disable-tx-checksum-offload`` which now actively disables it.
* The Xilinx GEM Ethernet driver (:dtcompatible:`xlnx,gem`) now obtains the AMBA AHB data bus
width matching the current target SoC (either Zynq-7000 or ZynqMP) from a design configuration
register at run-time, making the devicetree property ``amba-ahb-dbus-width`` obsolete, which
has therefore been removed.
Power management
****************
* :kconfig:option:`CONFIG_PM_S2RAM` and :kconfig:option:`PM_S2RAM_CUSTOM_MARKING` have been
refactored to be automatically managed by SoCs and the devicetree. Applications shall no
refactored to be automatically managed by SoCs and the Devicetree. Applications shall no
longer enable them directly, instead, enable or disable the "suspend-to-ram" power states
in the devicetree.
in the Devicetree.
* For the NXP RW61x, the devicetree property ``exit-latency-us`` has been updated to reflect more
* For the NXP RW61x, the Devicetree property ``exit-latency-us`` has been updated to reflect more
accurate, measured wake-up times. For applications utilizing Standby mode (PM3), this update and
an increase to the ``min-residency-us`` devicetree property may influence how the system
an increase to the ``min-residency-us`` Devicetree property may influence how the system
transitions between power modes. In some cases, this could lead to changes in power consumption.
Networking
@@ -355,7 +361,7 @@ PTP Clock
*********
* The doc of :c:func:`ptp_clock_rate_adjust` API didn't provide proper and clear function description.
Drivers implemented it to adjust rate ratio relatively based on current frequency.
Drivers implemented it to adjust rate ratio relative to the current frequency.
Now PI servo is introduced in both PTP and gPTP, and this API function is changed to use for rate
ratio adjusting based on nominal frequency. Drivers implementing :c:func:`ptp_clock_rate_adjust`
should be adjusted to account for the new behavior.
@@ -452,7 +458,7 @@ Shell
=====
* The MQTT topics related to :kconfig:option:`SHELL_BACKEND_MQTT` have been renamed. Renamed
``<device_id>_rx`` to ``<device_id>/sh/rx`` and ``<device_id>_tx`` to ``<device_id>/sh/rx``. The
``<device_id>_rx`` to ``<device_id>/sh/rx`` and ``<device_id>_tx`` to ``<device_id>/sh/tx``. The
part after the ``<device_id>`` is now configurable via :kconfig:option:`SHELL_MQTT_TOPIC_RX_ID`
and :kconfig:option:`SHELL_MQTT_TOPIC_TX_ID`. This allows keeping the previous topics for backward
compatibility.
@@ -477,7 +483,7 @@ MCUboot
=======
* The default operating mode for MCUboot has been changed to swap using offset, this provides
faster swap updates needed less overhead and reduces the flash endurance cycles required to
faster swap updates, needs less overhead, and reduces the flash endurance cycles required to
perform an update, the previous default was swap using move. If a board was optimised for swap
using move by having a primary slot that was one sector larger than the secondary then this
needs to change to have the secondary slot one sector larger than the primary (for optimised
@@ -490,14 +496,14 @@ Silabs
* Aligned the name of the Rail options with the other SiSDK related options:
* :kconfig:option:`CONFIG_RAIL_PA_CURVE_HEADER` to
:kconfig:option:`CONFIG_SILABS_SISDK_RAIL_PA_CURVE_HEADER`
* :kconfig:option:`CONFIG_RAIL_PA_CURVE_TYPES_HEADER` to
:kconfig:option:`CONFIG_SILABS_SISDK_RAIL_PA_CURVE_TYPES_HEADER`
* :kconfig:option:`CONFIG_RAIL_PA_ENABLE_CALIBRATION` to
:kconfig:option:`CONFIG_SILABS_SISDK_RAIL_PA_ENABLE_CALIBRATION`
* :kconfig:option:`CONFIG_RAIL_PA_CURVE_HEADER` to
:kconfig:option:`CONFIG_SILABS_SISDK_RAIL_PA_CURVE_HEADER`
* :kconfig:option:`CONFIG_RAIL_PA_CURVE_TYPES_HEADER` to
:kconfig:option:`CONFIG_SILABS_SISDK_RAIL_PA_CURVE_TYPES_HEADER`
* :kconfig:option:`CONFIG_RAIL_PA_ENABLE_CALIBRATION` to
:kconfig:option:`CONFIG_SILABS_SISDK_RAIL_PA_ENABLE_CALIBRATION`
* Fixed name of the :kconfig:option:`CONFIG_SOC_*`. These option contained PART_NUMBER in their
* Fixed name of the :kconfig:option:`CONFIG_SOC_*`. These options contained PART_NUMBER in their
while they shouldn't.
* The separate ``em3`` power state was removed from Series 2 SoCs. The system automatically
@@ -524,19 +530,19 @@ Trusted Firmware-M
TF-M NS and require BL2 must have their flash layout with the flash controller
information. This will ensure that when signing the hex/bin files all the
details will be present in the S and NS images. The image now has the details
to allow the FWU state machine be correct and allow FOTA.
to allow the FWU state machine to be correct and allow FOTA.
(:github:`94470`)
* The ``--align`` parameter was fixed to 1. Now, it's set to the flash DT ``write_block_size``
property, but still provides 1 as a fallback for specific vendors.
* The ``--max-sectors`` value is now calculated based on the number of images, taking into
consideration the largest image size.
* The ``--confirm`` option now confirms both S and NS HEX images, ensuring that any image
that runs is valid for production and development.
* S and NS BIN images are now available. These are the correct images to be used in FOTA. Note
that S and NS images are unconfirmed by default, and the application is responsible for
confirming them with ``psa_fwu_accept()``. Otherwise, the images will roll back on the next
reboot.
* The ``--align`` parameter was fixed to 1. Now, it's set to the flash DT ``write_block_size``
property, but still provides 1 as a fallback for specific vendors.
* The ``--max-sectors`` value is now calculated based on the number of images, taking into
consideration the largest image size.
* The ``--confirm`` option now confirms both S and NS HEX images, ensuring that any image
that runs is valid for production and development.
* S and NS BIN images are now available. These are the correct images to be used in FOTA. Note
that S and NS images are unconfirmed by default, and the application is responsible for
confirming them with ``psa_fwu_accept()``. Otherwise, the images will roll back on the next
reboot.
* A compatibility issue was identified in the TF-M attestation procedure introduced
after the TF-M v2.1.0 release. As a result, systems using TF-M v2.1 cannot be
@@ -553,6 +559,3 @@ Trusted Firmware-M
the in-tree versions of these modules will be used instead. To use custom versions, create a
:ref:`west manifest <west-manifest-files>` which pulls in the desired versions of these
repositories instead.
Architectures
*************

View File

@@ -71,6 +71,8 @@ Security Vulnerability Related
The following CVEs are addressed by this release:
* :cve:`2025-12890` `Bluetooth: peripheral: Invalid handling of malformed connection request
<https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-8hrf-pfww-83v9>`_
* :cve:`2025-27809` `TLS clients may unwittingly skip server authentication
<https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2025-03-1/>`_
* :cve:`2025-27810` `Potential authentication bypass in TLS handshake
@@ -1393,8 +1395,8 @@ Other notable changes
* 3.6.3: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.3
* 3.6.4: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.4
* Updated TF-M to version 2.1.2 (from 2.1.1). The release notes can be found at:
https://trustedfirmware-m.readthedocs.io/en/tf-mv2.1.2/releases/2.1.2.html
* Updated TF-M to version 2.2.0 (from 2.1.1). The release notes can be found at:
https://trustedfirmware-m.readthedocs.io/en/latest/releases/2.2.0.html
* Updated all boards with an external I2C connectors (Qwiic, Stemma, Grove...)
to use the ``zephyr_i2c`` devicetree label. This allows using the existing

View File

@@ -26,8 +26,8 @@
.. _zephyr_4.3:
Zephyr 4.3.0 (Working Draft)
############################
Zephyr 4.3.0
############
We are pleased to announce the release of Zephyr version 4.3.0.
@@ -42,13 +42,13 @@ Major enhancements with this release include:
**CPU load and dynamic frequency scaling subsystems**
A new experimental :ref:`CPU frequency <cpu_freq>` scaling subsystem enables dynamic,
policy-driven, clock adjustments to balance power consumption and performance.
Alongside it, a new :ref:`cpu_load` subsystem allows to obtain CPU usage metrics based on
Alongside it, a new :ref:`cpu_load` subsystem allows users to obtain CPU usage metrics based on
scheduler statistics, which can be used to drive the frequency scaling policy.
**Instrumentation Subsystem**
A new :zephyr:code-sample:`instrumentation subsystem <instrumentation>` simplifies tracing and
profiling of Zephyr applications by leveraging compiler-managed function instrumentation, allowing
to record call-graph traces and statistical profiles at runtime.
A new :ref:`instrumentation subsystem <instrumentation>` simplifies tracing and profiling of
Zephyr applications by leveraging compiler-managed function instrumentation, allowing the
recording of call-graph traces and statistical profiles at runtime.
**OCPP 1.6 library**
A new :ref:`OCPP (Open Charge Point Protocol) <ocpp_interface>` library enables EV charging
@@ -83,10 +83,12 @@ Security Vulnerability Related
******************************
The following CVEs are addressed by this release:
* :cve:`2025-9408`: Under embargo until 2025-11-10
* :cve:`2025-9408` `Zephyr project bug tracker GHSA-3r6j-5mp3-75wr
<https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-3r6j-5mp3-75wr>`_
* :cve:`2025-9557`: Under embargo until 2025-11-24
* :cve:`2025-9558`: Under embargo until 2025-11-24
* :cve:`2025-12035`: Under embargo until 2025-12-13
* :cve:`2025-12899`: Under embargo until 2026-01-28
* :cve:`2025-59438` `Padding oracle through timing of cipher error reporting
<https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2025-10-invalid-padding-error/>`_
* :cve:`2025-54764` `Side channel in RSA key generation and operations (SSBleed, M-Step)
@@ -113,9 +115,9 @@ Removed APIs and options
* The legacy pipe object API was removed. Use the new pipe API instead.
* ``bt_le_set_auto_conn``
* ``CONFIG_BT_BUF_ACL_RX_COUNT``
* ``ok`` enum value has now been removed completely from ``base.yaml`` binding ``status`` property in devicetree.
* STM32 LPTIM clock source selection through Kconfig was removed. Device Tree must now be used instead.
Affected Kconfig symbols: ``CONFIG_STM32_LPTIM_CLOCK_LSI`` / ``CONFIG_STM32_LPTIM_CLOCK_LSI``
* ``ok`` enum value has now been removed completely from ``base.yaml`` binding ``status`` property in Devicetree.
* STM32 LPTIM clock source selection through Kconfig was removed. Devicetree must now be used instead.
Affected Kconfig symbols: :kconfig:option:`CONFIG_STM32_LPTIM_CLOCK_LSI` / :kconfig:option:`CONFIG_STM32_LPTIM_CLOCK_LSE`
Deprecated APIs and options
===========================
@@ -227,6 +229,11 @@ New APIs and options
* :kconfig:option:`CONFIG_SDL_DISPLAY_DEFAULT_PIXEL_FORMAT_AL_88`
* :kconfig:option:`CONFIG_SDL_DISPLAY_COLOR_TINT`
* Ethernet
* The devicetree property ``default-speeds`` was added to most of the ethernet phys to configure
the advertised speeds for auto-negotiation during initialization of the driver.
* Haptics
* :kconfig:option:`CONFIG_HAPTICS_SHELL`
@@ -355,11 +362,85 @@ New APIs and options
* :c:struct:`coap_client_response_data`
* :c:member:`coap_client_request.payload_cb`
* :kconfig:option:`CONFIG_COAP_CLIENT_MAX_PATH_LENGTH`
* :kconfig:option:`CONFIG_COAP_CLIENT_MAX_EXTRA_OPTIONS`
* Connection manager
* :c:macro:`NET_EVENT_CONN_IF_IDLE_TIMEOUT`
* :c:func:`conn_mgr_if_set_idle_timeout`
* :c:func:`conn_mgr_if_get_idle_timeout`
* :c:func:`conn_mgr_if_used`
* DNS
* :c:enumerator:`DNS_QUERY_TYPE_CNAME`
* :c:enumerator:`DNS_QUERY_TYPE_TXT`
* :c:enumerator:`DNS_QUERY_TYPE_SRV`
* :c:func:`dns_resolve_enable_packet_forwarding`
* :c:func:`dns_resolve_remove_server_addresses`
* HTTP
* :kconfig:option:`CONFIG_HTTP_SERVER_STATIC_FS_RESPONSE_SIZE`
* :c:struct:`http_service_config`
* IPv6
* :kconfig:option:`CONFIG_NET_IPV6_NS_TIMEOUT`
* :c:func:`net_ipv6_get_addr_mcast_scope`
* LwM2M
* :c:type:`lwm2m_cache_filter_cb_t`
* :c:func:`lwm2m_set_cache_filter`
* MQTT-SN
* :c:func:`mqtt_sn_predefine_topic`
* :c:func:`mqtt_sn_update_will_topic`
* :c:func:`mqtt_sn_update_will_message`
* :c:func:`mqtt_sn_define_short_topic`
* Misc
* :kconfig:option:`CONFIG_NET_LATMON`
* :kconfig:option:`CONFIG_NETMIDI2_HOST`
* :kconfig:option:`CONFIG_OCPP`
* :c:member:`npf_rule.priority`
* :c:macro:`NPF_PRIORITY`
* :kconfig:option:`CONFIG_NET_CONFIG_CLOCK_SNTP_SET_RTC`
* :c:func:`ppp_peer_async_control_character_map`
* OpenThread
* :kconfig:option:`CONFIG_OPENTHREAD_ZEPHYR_BORDER_ROUTER`
* :kconfig:option:`CONFIG_OPENTHREAD_BORDER_ROUTING_DHCP6_PD_CLIENT`
* :kconfig:option:`CONFIG_OPENTHREAD_CHANNEL_MONITOR_AUTO_START`
* :kconfig:option:`CONFIG_OPENTHREAD_MAC_BEACON_PAYLOAD_PARSING`
* :kconfig:option:`CONFIG_OPENTHREAD_MULTIPLE_INSTANCE_NUM`
* :kconfig:option:`CONFIG_OPENTHREAD_PLATFORM_RADIO_COEX_ENABLE`
* :kconfig:option:`CONFIG_OPENTHREAD_PLATFORM_USEC_TIMER`
* :kconfig:option:`CONFIG_OPENTHREAD_RCP_RESTORATION_MAX_COUNT`
* :kconfig:option:`CONFIG_OPENTHREAD_SRP_SERVER_FAST_START`
* :kconfig:option:`CONFIG_OPENTHREAD_TREL_MANAGE_DNSSD`
* Sockets
* :c:func:`zsock_listen` now implements the ``backlog`` parameter support. The TCP server
socket will limit the number of pending incoming connections to that value.
* :c:macro:`IP_RECVTTL`
* :c:macro:`IPV6_PKTINFO`
* :c:macro:`IPV6_RECVHOPLIMIT`
* :c:macro:`IPV6_HOPLIMIT`
* Wi-Fi
* :kconfig:option:`CONFIG_WIFI_NM_WPA_SUPPLICANT_DEBUG_SHOW_KEYS`
* Set enterprise crypto insecure because certificate validation is disabled.
* If the usage mode option has AP enabled, then automatically enable AP mode.
* Add configuration options for background scanning (bgscan) in wpa_supplicant.
* Add support for multiple virtual interfaces (VIF).
* Newlib
@@ -377,7 +458,7 @@ New APIs and options
* :c:func:`pm_device_driver_deinit`
* :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE`
* :kconfig:option:`CONFIG_PM_S2RAM` has been refactored to be promptless. The application now
only needs to enable any "suspend-to-ram" power state in the devicetree.
only needs to enable any "suspend-to-ram" power state in the Devicetree.
* The :kconfig:option:`PM_S2RAM_CUSTOM_MARKING` has been renamed to
:kconfig:option:`HAS_PM_S2RAM_CUSTOM_MARKING` and refactored to be promptless. This option
is now selected by SoCs if they need it for their "suspend-to-ram" implementations.
@@ -1227,6 +1308,15 @@ New Samples
Libraries / Subsystems
**********************
* Firmware
* SCMI
* Added :kconfig:option:`ARM_SCMI_CHAN_SEM_TIMEOUT_USEC` to allow configuring the channel semaphore timeout.
* Use :c:func:`scmi_status_to_errno` directly for checking the returned command status code.
* Added new parameter to :c:func:`scmi_send_message` allowing users to specify if they want to use polling or not.
* [NXP] Various additions related to the NXP-specific CPU protocol.
* Logging:
* Added hybrid rate-limited logging macros to prevent log flooding when messages are generated frequently.

View File

@@ -2006,7 +2006,36 @@ This has been fixed in main for v4.2.0
:cve:`2025-9408`
----------------
Under embargo until 2025-11-10
Userspace privilege escalation vulnerability on Cortex M
System call entry on Cortex M (and possibly R and A, but I think not) has a race which allows very
practical privilege escalation for malicious userspace processes.
- `Zephyr project bug tracker GHSA-3r6j-5mp3-75wr
<https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-3r6j-5mp3-75wr>`_
This has been fixed in main for v4.3.0
- `PR 95101 fix for main
<https://github.com/zephyrproject-rtos/zephyr/pull/95101>`_
- `PR 96850 fix for main
<https://github.com/zephyrproject-rtos/zephyr/pull/96850>`_
- `PR 96014 fix for 4.2
<https://github.com/zephyrproject-rtos/zephyr/pull/96014>`_
- `PR 97306 fix for 4.2
<https://github.com/zephyrproject-rtos/zephyr/pull/97306>`_
- `PR 96015 fix for 4.1
<https://github.com/zephyrproject-rtos/zephyr/pull/96015>`_
- `PR 97305 fix for 4.1
<https://github.com/zephyrproject-rtos/zephyr/pull/97305>`_
- `PR 96030 fix for 3.7
<https://github.com/zephyrproject-rtos/zephyr/pull/96030>`_
- `PR 97313 fix for 3.7
<https://github.com/zephyrproject-rtos/zephyr/pull/97313>`_
:cve:`2025-9557`
----------------
@@ -2022,3 +2051,25 @@ Under embargo until 2025-11-24
-----------------
Under embargo until 2025-12-13
:cve:`2025-12890`
-----------------
Bluetooth: peripheral: Invalid handling of malformed connection request
Improper handling of malformed Connection Request with the interval
set to be 1 (which supposed to be illegal) and the chM 0x7CFFFFFFFF
triggers a crash. The peripheral will not be connectable after it.
- `Zephyr project bug tracker GHSA-8hrf-pfww-83v9
<https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-8hrf-pfww-83v9>`_
This has been fixed in main for v4.2.0
- `PR 89955 fix for main
<https://github.com/zephyrproject-rtos/zephyr/pull/89955>`_
:cve:`2025-12899`
-----------------
Under embargo until 2026-01-28

View File

@@ -17,6 +17,7 @@ OS Services
file_system/index.rst
formatted_output.rst
input/index.rst
instrumentation/index.rst
ipc/index.rst
llext/index.rst
logging/index.rst

View File

@@ -0,0 +1,240 @@
.. _instrumentation:
Instrumentation
###############
Overview
********
The instrumentation subsystem provides compiler-managed runtime system instrumentation capabilities
for Zephyr applications. It enables developers to trace function calls, observe context switches,
and profile application performance with minimal manual instrumentation effort.
Unlike the :ref:`tracing <tracing>` subsystem, which provides RTOS-aware tracing with structured
event APIs, the instrumentation subsystem works at a lower level by leveraging compiler
instrumentation hooks. This approach makes it possible to capture virtually any function entry and
exit events without requiring manual tracing calls in the code.
.. admonition:: Tracing vs. Instrumentation
:class: hint
**When to use Tracing**: Choose the tracing subsystem when you need RTOS-aware event tracing
(e.g. thread switches, semaphore operations, etc.) and want to minimize overhead.
**When to use Instrumentation**: Choose instrumentation when you need a detailed view of
function-level execution to better understand code flow, or to identify performance bottlenecks
without adding manual trace points.
The instrumentation subsystem relies on compiler support for automatic function instrumentation.
When enabled, the compiler automatically inserts calls to special instrumentation handler functions
at the entry and exit of every function in your application (excluding those explicitly marked with
``__no_instrumentation__``). Currently, only GCC is supported with the ``-finstrument-functions``
compiler flag.
The subsystem initializes automatically after RAM initialization and uses trigger/stopper functions
to control when recording is active. The default trigger and stopper functions are both set to
``main()`` (configurable via Kconfig), meaning instrumentation captures the entire execution from
when ``main()`` starts until it returns.
The recorded data is stored in RAM and can be accessed from a host computer thanks to a UART backend
that exposes a set of simple commands. :zephyr_file:`scripts/instrumentation/zaru.py` script allows
to execute these commands through a high-level command-line interface and makes it easy to obtain
data in a format suitable for further analysis (e.g. using `Perfetto`_).
Operational Modes
*****************
The instrumentation subsystem supports two modes that can be enabled independently or together:
Callgraph Mode (Tracing)
========================
In callgraph mode (enabled with :kconfig:option:`CONFIG_INSTRUMENTATION_MODE_CALLGRAPH`), the
subsystem records function entry and exit events along with timestamps and context information in a
memory buffer. This enables:
- Reconstruction of the complete function call graph
- Observation of thread context switches
- Analysis of execution flow and timing relationships
The trace buffer can operate in ring buffer mode (default, overwrites old entries) or fixed buffer
mode (stops when full). Buffer size is configurable via
:kconfig:option:`CONFIG_INSTRUMENTATION_MODE_CALLGRAPH_TRACE_BUFFER_SIZE`.
.. code-block:: console
:caption: Example of callgraph mode output. See :ref:`zaru_usage` for more details.
$ ./scripts/instrumentation/zaru.py trace
Thread Name Thread ID CPU Mode Timestamp Function(s)
------------------------------------------------------------------------------------------------
... (truncated) ...
main 0x20001a38 0) 0 | 187837720 ns | sys_dlist_append();
main 0x20001a38 0) 0 | 188802680 ns | }; /* z_priq_simple_add */
main 0x20001a38 0) 0 | 189282840 ns | }; /* add_to_waitq_locked */
main 0x20001a38 0) 0 | 189770000 ns | add_thread_timeout();
main 0x20001a38 0) 0 | 190732920 ns | }; /* pend_locked */
main 0x20001a38 0) 0 | 191198480 ns | k_spin_release();
main 0x20001a38 0) 0 | 192125560 ns | z_swap() {
main 0x20001a38 0) 0 | 192590080 ns | k_spin_release();
main 0x20001a38 0) 0 | 193520000 ns | z_swap_irqlock() {
main 0x20001a38 0) 0 | 193987840 ns | __set_BASEPRI() {
main 0x20001a38 0) 0 | 194474640 ns | /* --> Scheduler switched OUT from thread 'main' */
thread-none none-thread 0) 0 | 195178000 ns | /* <-- Scheduler switched IN thread 'thread-none' */
thread-none none-thread 0) 0 | 195851520 ns | z_thread_entry() {
thread-none none-thread 0) 0 | 196312600 ns | k_sched_current_thread_query() {
thread-none none-thread 0) 0 | 196774680 ns | z_impl_k_sched_current_thread_query();
thread-none none-thread 0) 0 | 197694480 ns | }; /* k_sched_current_thread_query */
thread_A 0x200000d8 0) 7 | 198160000 ns | thread_A() {
thread_A 0x200000d8 0) 7 | 198443400 ns | get_sem_and_exec_function() {
thread_A 0x200000d8 0) 7 | 198727440 ns | k_sem_take() {
thread_A 0x200000d8 0) 7 | 199011840 ns | z_impl_k_sem_take() {
thread_A 0x200000d8 0) 7 | 199397520 ns | k_spin_lock() {
thread_A 0x200000d8 0) 7 | 199784200 ns | __get_BASEPRI();
thread_A 0x200000d8 0) 7 | 200557840 ns | __set_BASEPRI_MAX();
thread_A 0x200000d8 0) 7 | 201333640 ns | __ISB();
thread_A 0x200000d8 0) 7 | 202111360 ns | z_spinlock_validate_pre();
thread_A 0x200000d8 0) 7 | 202891000 ns | z_spinlock_validate_post();
thread_A 0x200000d8 0) 7 | 203664760 ns | }; /* k_spin_lock */
thread_A 0x200000d8 0) 7 | 204058000 ns | k_spin_unlock() {
thread_A 0x200000d8 0) 7 | 204450840 ns | __set_BASEPRI();
thread_A 0x200000d8 0) 7 | 205231640 ns | __ISB();
thread_A 0x200000d8 0) 7 | 206009600 ns | }; /* k_spin_unlock */
thread_A 0x200000d8 0) 7 | 206291600 ns | }; /* z_impl_k_sem_take */
thread_A 0x200000d8 0) 7 | 206572920 ns | }; /* k_sem_take */
... (truncated) ...
Statistical Mode (Profiling)
============================
In statistical mode (enabled with :kconfig:option:`CONFIG_INSTRUMENTATION_MODE_STATISTICAL`), the
subsystem accumulates timing statistics for each unique function executed between the trigger and
stopper points. This provides total execution time per function and helps identify performance
bottlenecks. The subsystem tracks up to
:kconfig:option:`CONFIG_INSTRUMENTATION_MODE_STATISTICAL_MAX_NUM_FUNC` unique functions.
.. code-block:: console
:caption: Example of statistical mode output (top 10 most expensive functions). See
:ref:`zaru_usage` for more details.
$ ./scripts/instrumentation/zaru.py profile -n 10
9.45% 0000061d main
6.00% 0000049d k_msleep
5.98% 00000469 k_sleep
5.95% 0000aea1 z_impl_k_sleep
5.93% 0000ad6d z_tick_sleep
5.66% 00000431 k_sem_take
5.65% 00007e65 z_impl_k_sem_take
5.51% 0000ac29 z_pend_curr
2.83% 000063ed sys_clock_isr
2.67% 0000d361 sys_clock_announce
Configuration
*************
Enable instrumentation with:
.. code-block:: cfg
CONFIG_INSTRUMENTATION=y
CONFIG_INSTRUMENTATION_MODE_CALLGRAPH=y # For tracing
CONFIG_INSTRUMENTATION_MODE_STATISTICAL=y # For profiling
The instrumentation subsystem uses :ref:`retained memory <retention_api>` to persist trigger/stopper
function addresses across reboots. This must be configured in the devicetree:
.. code-block:: devicetree
/ {
sram@2003FC00 {
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x2003FC00 DT_SIZE_K(1)>;
zephyr,memory-region = "RetainedMem";
retainedmem {
compatible = "zephyr,retained-ram";
status = "okay";
instrumentation_triggers: retention@0 {
compatible = "zephyr,retention";
status = "okay";
reg = <0x0 0x10>;
};
};
};
};
/* Adjust main SRAM to exclude retained region */
&sram0 {
reg = <0x20000000 DT_SIZE_K(255)>;
};
See the :zephyr:code-sample:`instrumentation` sample for complete configuration examples.
Additional options include buffer sizes, trigger functions, and function/file exclusion lists (see
Kconfig options starting with :kconfig:option-regex:`CONFIG_INSTRUMENTATION_*`).
.. _zaru_usage:
``zaru.py`` Usage
*****************
The ``zaru.py`` command-line tool (located in :zephyr_file:`scripts/instrumentation/zaru.py`)
provides an interface for controlling instrumentation and extracting data from the target over UART.
The tool offers several commands:
- ``status``: Check if the target device supports callgraph (tracing) and statistical (profiling)
modes.
- ``trace``: Capture and display function call traces.
- ``profile``: Capture and display function profiling data.
- ``reboot``: Reboot the target device.
You can get help for each command by running ``zaru.py <command> --help``.
By default, ``zaru.py`` attempts to connect to the target device using ``/dev/ttyACM0``. You can
specify a different serial port using the ``--serial`` option:
.. code-block:: console
$ ./scripts/instrumentation/zaru.py --serial /dev/ttyACM1 status
The ``--build-dir`` option can be used to specify the Zephyr build directory, which is needed to
locate the ELF file for symbol resolution. If not provided, ``zaru.py`` will attempt to find it
automatically.
See the :zephyr:code-sample:`instrumentation` sample documentation for detailed usage instructions.
Limitations and Considerations
******************************
Compiler support
The instrumentation subsystem requires GCC with ``-finstrument-functions`` support. Other
compilers are not supported.
Stack size requirements
Instrumentation adds overhead to every function call, which increases stack usage. You will likely
need to increase thread stack sizes to accommodate the additional space required by instrumentation
handlers and nested function calls.
Execution overhead
All function calls incur instrumentation overhead. Code size will increase due to added
instrumentation calls, and performance will be impacted.
Initialization constraints
Code that runs before RAM initialization (e.g., early boot functions) is not captured as it runs
before the instrumentation subsystem is initialized.
To reduce overhead, use trigger/stopper functions to instrument only code regions of interest, and
exclude performance-critical functions via
:kconfig:option:`CONFIG_INSTRUMENTATION_EXCLUDE_FUNCTION_LIST` and
:kconfig:option:`CONFIG_INSTRUMENTATION_EXCLUDE_FILE_LIST`.
API Reference
*************
.. doxygengroup:: instrumentation_api
.. _Perfetto: https://perfetto.dev/

View File

@@ -57,6 +57,8 @@ struct mtls_shim_session {
struct mtls_shim_session mtls_sessions[CRYPTO_MAX_SESSION];
static K_MUTEX_DEFINE(mtls_sessions_lock);
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
#include "mbedtls/memory_buffer_alloc.h"
#else
@@ -110,7 +112,7 @@ int mtls_ecb_decrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt)
ret = mbedtls_aes_crypt_ecb(ecb_ctx, MBEDTLS_AES_DECRYPT,
pkt->in_buf, pkt->out_buf);
if (ret) {
LOG_ERR("Could not encrypt (%d)", ret);
LOG_ERR("Could not decrypt (%d)", ret);
return -EINVAL;
}
@@ -168,7 +170,7 @@ int mtls_cbc_decrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt, uint8_t *iv
ret = mbedtls_aes_crypt_cbc(cbc_ctx, MBEDTLS_AES_DECRYPT, pkt->in_len,
p_iv, pkt->in_buf + iv_bytes, pkt->out_buf);
if (ret) {
LOG_ERR("Could not encrypt (%d)", ret);
LOG_ERR("Could not decrypt (%d)", ret);
return -EINVAL;
}
@@ -231,9 +233,6 @@ static int mtls_ccm_decrypt_auth(struct cipher_ctx *ctx,
return -EINVAL;
}
apkt->pkt->out_len = apkt->pkt->in_len;
apkt->pkt->out_len += ctx->mode_params.ccm_info.tag_len;
return 0;
}
@@ -290,9 +289,6 @@ static int mtls_gcm_decrypt_auth(struct cipher_ctx *ctx,
return -EINVAL;
}
apkt->pkt->out_len = apkt->pkt->in_len;
apkt->pkt->out_len += ctx->mode_params.gcm_info.tag_len;
return 0;
}
#endif /* CONFIG_MBEDTLS_CIPHER_GCM_ENABLED */
@@ -301,13 +297,17 @@ static int mtls_get_unused_session_index(void)
{
int i;
k_mutex_lock(&mtls_sessions_lock, K_FOREVER);
for (i = 0; i < CRYPTO_MAX_SESSION; i++) {
if (!mtls_sessions[i].in_use) {
mtls_sessions[i].in_use = true;
k_mutex_unlock(&mtls_sessions_lock);
return i;
}
}
k_mutex_unlock(&mtls_sessions_lock);
return -1;
}
@@ -322,7 +322,7 @@ static int mtls_session_setup(const struct device *dev,
mbedtls_gcm_context *gcm_ctx;
#endif
int ctx_idx;
int ret;
int ret = 0;
if (ctx->flags & ~(MTLS_SUPPORT)) {
LOG_ERR("Unsupported flag");
@@ -355,6 +355,8 @@ static int mtls_session_setup(const struct device *dev,
return -ENOSPC;
}
mtls_sessions[ctx_idx].mode = mode;
ctx->drv_sessn_state = &mtls_sessions[ctx_idx];
switch (mode) {
case CRYPTO_CIPHER_MODE_ECB:
@@ -371,9 +373,8 @@ static int mtls_session_setup(const struct device *dev,
}
if (ret) {
LOG_ERR("AES_ECB: failed at setkey (%d)", ret);
ctx->ops.block_crypt_hndlr = NULL;
mtls_sessions[ctx_idx].in_use = false;
return -EINVAL;
mbedtls_aes_free(aes_ctx);
ret = -EINVAL;
}
break;
case CRYPTO_CIPHER_MODE_CBC:
@@ -390,9 +391,8 @@ static int mtls_session_setup(const struct device *dev,
}
if (ret) {
LOG_ERR("AES_CBC: failed at setkey (%d)", ret);
ctx->ops.cbc_crypt_hndlr = NULL;
mtls_sessions[ctx_idx].in_use = false;
return -EINVAL;
mbedtls_aes_init(aes_ctx);
ret = -EINVAL;
}
break;
case CRYPTO_CIPHER_MODE_CCM:
@@ -402,9 +402,9 @@ static int mtls_session_setup(const struct device *dev,
ctx->key.bit_stream, ctx->keylen * 8U);
if (ret) {
LOG_ERR("AES_CCM: failed at setkey (%d)", ret);
mtls_sessions[ctx_idx].in_use = false;
return -EINVAL;
mbedtls_ccm_free(ccm_ctx);
ret = -EINVAL;
break;
}
if (op_type == CRYPTO_CIPHER_OP_ENCRYPT) {
ctx->ops.ccm_crypt_hndlr = mtls_ccm_encrypt_auth;
@@ -420,9 +420,9 @@ static int mtls_session_setup(const struct device *dev,
ctx->key.bit_stream, ctx->keylen * 8U);
if (ret) {
LOG_ERR("AES_GCM: failed at setkey (%d)", ret);
mtls_sessions[ctx_idx].in_use = false;
return -EINVAL;
mbedtls_gcm_free(gcm_ctx);
ret = -EINVAL;
break;
}
if (op_type == CRYPTO_CIPHER_OP_ENCRYPT) {
ctx->ops.gcm_crypt_hndlr = mtls_gcm_encrypt_auth;
@@ -433,13 +433,17 @@ static int mtls_session_setup(const struct device *dev,
#endif /* CONFIG_MBEDTLS_CIPHER_GCM_ENABLED */
default:
LOG_ERR("Unhandled mode");
mtls_sessions[ctx_idx].in_use = false;
return -EINVAL;
ret = -EINVAL;
}
mtls_sessions[ctx_idx].mode = mode;
ctx->drv_sessn_state = &mtls_sessions[ctx_idx];
/* Centralized cleanup of the session slot if an error occurred
* during configuration (ret != 0).
*/
if (ret != 0) {
k_mutex_lock(&mtls_sessions_lock, K_FOREVER);
mtls_sessions[ctx_idx].in_use = false;
k_mutex_unlock(&mtls_sessions_lock);
}
return ret;
}
@@ -457,7 +461,9 @@ static int mtls_session_free(const struct device *dev, struct cipher_ctx *ctx)
} else {
mbedtls_aes_free(&mtls_session->mtls_aes);
}
k_mutex_lock(&mtls_sessions_lock, K_FOREVER);
mtls_session->in_use = false;
k_mutex_unlock(&mtls_sessions_lock);
return 0;
}
@@ -588,7 +594,9 @@ static int mtls_hash_session_free(const struct device *dev, struct hash_ctx *ctx
} else {
mbedtls_sha512_free(&mtls_session->mtls_sha512);
}
k_mutex_lock(&mtls_sessions_lock, K_FOREVER);
mtls_session->in_use = false;
k_mutex_unlock(&mtls_sessions_lock);
return 0;
}

View File

@@ -24,7 +24,7 @@ config SMBUS_STATS
config SMBUS_INIT_PRIORITY
int "Init priority"
default KERNEL_INIT_PRIORITY_DEFAULT
default KERNEL_INIT_PRIORITY_DEVICE
help
SMBus device driver initialization priority.

View File

@@ -355,12 +355,12 @@ static int smbus_stm32_pcall(const struct device *dev, uint16_t periph_addr, uin
.flags = I2C_MSG_WRITE,
},
{
.buf = &send_word,
.buf = (uint8_t *)&send_word,
.len = sizeof(send_word),
.flags = I2C_MSG_WRITE,
},
{
.buf = recv_word,
.buf = (uint8_t *)recv_word,
.len = sizeof(*recv_word),
.flags = I2C_MSG_READ | I2C_MSG_RESTART,
},

View File

@@ -467,6 +467,9 @@
sampling-times = <2 3 7 12 14 47 247 1500>;
st,adc-sequencer = "programmable";
st,adc-oversampler = "extended";
st,adc-internal-regulator = "none";
st,adc-has-deep-powerdown;
st,adc-has-channel-preselection;
status = "disabled";
};

View File

@@ -37,15 +37,15 @@ extern "C" {
* @anchor RTC_ALARM_TIME_MASK
* @{
*/
#define RTC_ALARM_TIME_MASK_SECOND BIT(0)
#define RTC_ALARM_TIME_MASK_MINUTE BIT(1)
#define RTC_ALARM_TIME_MASK_HOUR BIT(2)
#define RTC_ALARM_TIME_MASK_MONTHDAY BIT(3)
#define RTC_ALARM_TIME_MASK_MONTH BIT(4)
#define RTC_ALARM_TIME_MASK_YEAR BIT(5)
#define RTC_ALARM_TIME_MASK_WEEKDAY BIT(6)
#define RTC_ALARM_TIME_MASK_YEARDAY BIT(7)
#define RTC_ALARM_TIME_MASK_NSEC BIT(8)
#define RTC_ALARM_TIME_MASK_SECOND BIT(0) /**< Second */
#define RTC_ALARM_TIME_MASK_MINUTE BIT(1) /**< Minute */
#define RTC_ALARM_TIME_MASK_HOUR BIT(2) /**< Hour */
#define RTC_ALARM_TIME_MASK_MONTHDAY BIT(3) /**< Day of the month */
#define RTC_ALARM_TIME_MASK_MONTH BIT(4) /**< Month */
#define RTC_ALARM_TIME_MASK_YEAR BIT(5) /**< Year */
#define RTC_ALARM_TIME_MASK_WEEKDAY BIT(6) /**< Day of the week */
#define RTC_ALARM_TIME_MASK_YEARDAY BIT(7) /**< Day of the year */
#define RTC_ALARM_TIME_MASK_NSEC BIT(8) /**< Nanosecond */
/**
* @}
*/

View File

@@ -7,6 +7,12 @@
#ifndef ZEPHYR_INCLUDE_INSTRUMENTATION_INSTRUMENTATION_H_
#define ZEPHYR_INCLUDE_INSTRUMENTATION_INSTRUMENTATION_H_
/**
* @defgroup instrumentation_api Instrumentation
* @ingroup os_services
* @{
*/
#include <zephyr/kernel.h>
#ifdef __cplusplus
@@ -212,4 +218,8 @@ void *instr_get_stop_func(void);
}
#endif
/**
* @}
*/
#endif /* ZEPHYR_INCLUDE_INSTRUMENTATION_INSTRUMENTATION_H_ */

View File

@@ -13,7 +13,7 @@
*
* Copyright 2003-2020 Silicon Laboratories Inc. www.silabs.com
*
* SPDX-License-Identifier: APACHE-2.0
* SPDX-License-Identifier: Apache-2.0
*
* This software is subject to an open source license and is distributed by
* Silicon Laboratories Inc. pursuant to the terms of the Apache License,

View File

@@ -1,5 +1,6 @@
.. zephyr:code-sample:: instrumentation
:name: Instrumentation
:relevant-api: instrumentation_api
Demonstrate the instrumentation subsystem tracing and profiling features.

View File

@@ -499,12 +499,13 @@ class DevicetreeLintingCheck(ComplianceTest):
NPX_EXECUTABLE = "npx"
def ensure_npx(self) -> bool:
if not shutil.which(self.NPX_EXECUTABLE):
if not (npx_executable := shutil.which(self.NPX_EXECUTABLE)):
return False
try:
self.npx_exe = npx_executable
# --no prevents npx from fetching from registry
subprocess.run(
[self.NPX_EXECUTABLE, "--prefix", "./scripts/ci", "--no", 'dts-linter', "--", "--version"],
[self.npx_exe, "--prefix", "./scripts/ci", "--no", 'dts-linter', "--", "--version"],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
check=True,
@@ -535,6 +536,7 @@ class DevicetreeLintingCheck(ComplianceTest):
raise RuntimeError(f"Failed to parse dts-linter JSON output: {e}")
def run(self):
self.npx_exe = self.NPX_EXECUTABLE
# Get changed DTS files
dts_files = [
file for file in get_files(filter="d")
@@ -560,7 +562,7 @@ class DevicetreeLintingCheck(ComplianceTest):
temp_patch_files.append(temp_patch)
cmd = [
"npx", "--prefix", "./scripts/ci", "--no",
self.npx_exe, "--prefix", "./scripts/ci", "--no",
"dts-linter", "--", "--outputFormat",
"json", "--format",
"--patchFile", temp_patch,

View File

@@ -1,17 +1,17 @@
{
"name": "zephyr",
"name": "ci",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"dts-linter": "^0.3.2"
"dts-linter": "^0.3.6"
}
},
"node_modules/devicetree-language-server": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/devicetree-language-server/-/devicetree-language-server-0.6.3.tgz",
"integrity": "sha512-mvZC217Cq+WmqB51dk5+4slI3obcUgzaHBxroCkAR4clmiC0+PYi8hnY1PWB+HekOT2pWIDHT3/tCAfq31aK7Q==",
"version": "0.6.7",
"resolved": "https://registry.npmjs.org/devicetree-language-server/-/devicetree-language-server-0.6.7.tgz",
"integrity": "sha512-ov/f8B8WcKAgOR4TVmr3cgH5KWsrmFnHZJL4Zha6x7b7gpux9eXWWAg/XsgE0Aifexu8ht0txy1us7/IiUs/dg==",
"license": "Apache-2.0",
"bin": {
"devicetree-language-server": "dist/server.js"
@@ -21,12 +21,12 @@
}
},
"node_modules/dts-linter": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/dts-linter/-/dts-linter-0.3.2.tgz",
"integrity": "sha512-IXvPQhRuAGZ78mKn13fRfUoVhjbPiBqmy3NoVqPsFuW/0ZTbiPInBbiMxNB8dN5PImDja3Q8I2V3GG/RJNPdOg==",
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/dts-linter/-/dts-linter-0.3.6.tgz",
"integrity": "sha512-MG7r0hWOcmhue4k0oSd0+/mNC9nNnpdRKfW4EhQevOd1apHUhmTW4SsI6Um5zfVP1fNpy95IpBS0/dja9UYCXw==",
"license": "Apache-2.0",
"dependencies": {
"devicetree-language-server": "^0.6.3"
"devicetree-language-server": "^0.6.7"
},
"bin": {
"dts-linter": "dist/dts-linter.js"

View File

@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"dts-linter": "^0.3.2"
"dts-linter": "^0.3.6"
}
}

View File

@@ -1313,7 +1313,7 @@ def _check_valid(dialog, entry, sym, s):
entry.focus_set()
return False
for low_sym, high_sym, cond in sym.ranges:
for low_sym, high_sym, cond, _ in sym.ranges:
if expr_value(cond):
low_s = low_sym.str_value
high_s = high_sym.str_value
@@ -1336,7 +1336,7 @@ def _range_info(sym):
# 'sym', or None if 'sym' doesn't have a range
if sym.type in (INT, HEX):
for low, high, cond in sym.ranges:
for low, high, cond, _ in sym.ranges:
if expr_value(cond):
return "Range: {}-{}".format(low.str_value, high.str_value)

View File

@@ -3096,7 +3096,7 @@ def _check_valid(sym, s):
.format(s, TYPE_TO_STR[sym.orig_type]))
return False
for low_sym, high_sym, cond in sym.ranges:
for low_sym, high_sym, cond, _ in sym.ranges:
if expr_value(cond):
low_s = low_sym.str_value
high_s = high_sym.str_value
@@ -3116,7 +3116,7 @@ def _range_info(sym):
# 'sym', or None if 'sym' doesn't have a range
if sym.orig_type in (INT, HEX):
for low, high, cond in sym.ranges:
for low, high, cond, _ in sym.ranges:
if expr_value(cond):
return "Range: {}-{}".format(low.str_value, high.str_value)

View File

@@ -5762,7 +5762,6 @@ static void notify_iface_up(struct net_if *iface)
static void notify_iface_down(struct net_if *iface)
{
net_tcp_close_all_for_iface(iface);
net_if_flag_clear(iface, NET_IF_RUNNING);
net_mgmt_event_notify(NET_EVENT_IF_DOWN, iface);
net_virtual_disable(iface);
@@ -5774,6 +5773,12 @@ static void notify_iface_down(struct net_if *iface)
clear_joined_ipv4_mcast_groups(iface);
net_ipv4_autoconf_reset(iface);
}
if (IS_ENABLED(CONFIG_NET_NATIVE_TCP)) {
net_if_unlock(iface);
net_tcp_close_all_for_iface(iface);
net_if_lock(iface);
}
}
const char *net_if_oper_state2str(enum net_if_oper_state state)

View File

@@ -3705,6 +3705,17 @@ int net_tcp_put(struct net_context *context, bool force_close)
({ const char *state = net_context_state(context);
state ? state : "<unknown>"; }));
if (force_close) {
k_work_cancel_delayable(&conn->send_data_timer);
keep_alive_timer_stop(conn);
k_mutex_unlock(&conn->lock);
tcp_conn_close(conn, -ENETRESET);
return 0;
}
if (conn->state == TCP_ESTABLISHED ||
conn->state == TCP_SYN_RECEIVED) {
/* Send all remaining data if possible. */
@@ -3713,43 +3724,26 @@ int net_tcp_put(struct net_context *context, bool force_close)
conn->send_data_total);
conn->in_close = true;
if (force_close) {
k_work_cancel_delayable(&conn->send_data_timer);
keep_alive_timer_stop(conn);
tcp_conn_close(conn, -ENETRESET);
} else {
/* How long to wait until all the data has been sent?
*/
k_work_reschedule_for_queue(&tcp_work_q,
&conn->send_data_timer,
K_MSEC(TCP_RTO_MS));
}
/* How long to wait until all the data has been sent? */
k_work_reschedule_for_queue(&tcp_work_q,
&conn->send_data_timer,
K_MSEC(TCP_RTO_MS));
} else {
if (force_close) {
NET_DBG("[%p] TCP connection in %s close, "
"disposing immediately",
conn, "forced");
NET_DBG("[%p] TCP connection in %s close, "
"not disposing yet (waiting %dms)",
conn, "active", tcp_max_timeout_ms);
k_work_reschedule_for_queue(&tcp_work_q,
&conn->fin_timer,
FIN_TIMEOUT);
keep_alive_timer_stop(conn);
tcp_conn_close(conn, -ENETRESET);
} else {
NET_DBG("[%p] TCP connection in %s close, "
"not disposing yet (waiting %dms)",
conn, "active", tcp_max_timeout_ms);
k_work_reschedule_for_queue(&tcp_work_q,
&conn->fin_timer,
FIN_TIMEOUT);
tcp_out(conn, FIN | ACK);
conn_seq(conn, + 1);
tcp_setup_retransmission(conn);
tcp_out(conn, FIN | ACK);
conn_seq(conn, + 1);
tcp_setup_retransmission(conn);
conn_state(conn, TCP_FIN_WAIT_1);
conn_state(conn, TCP_FIN_WAIT_1);
keep_alive_timer_stop(conn);
}
keep_alive_timer_stop(conn);
}
} else if (conn->in_connect) {
conn->in_connect = false;
@@ -4765,7 +4759,18 @@ static void close_tcp_conn(struct tcp *conn, void *user_data)
}
/* net_tcp_put() will handle decrementing refcount on stack's behalf */
net_tcp_put(context, true);
if (net_context_get_state(context) != NET_CONTEXT_LISTENING) {
net_tcp_put(context, true);
} else {
if (context->conn_handler) {
net_conn_unregister(context->conn_handler);
context->conn_handler = NULL;
}
if (conn->accept_cb != NULL) {
conn->accept_cb(conn->context, NULL, 0, -ENETDOWN, context->user_data);
}
}
}
void net_tcp_close_all_for_iface(struct net_if *iface)

View File

@@ -25,7 +25,7 @@ config NET_DHCPV4_INITIAL_DELAY_MAX
default 10
range 2 10
help
As per RFC2131 4.1.1, we wait a random period between
As per RFC2131 4.4.1, we wait a random period between
1 and 10 seconds before sending the initial discover.
config NET_DHCPV4_OPTION_CALLBACKS

View File

@@ -1833,7 +1833,7 @@ static void dhcpv4_start_internal(struct net_if *iface, bool first_start)
/* Use default */
if (first_start) {
/* RFC2131 4.1.1 requires we wait a random period
/* RFC2131 4.4.1 requires we wait a random period
* between 1 and 10 seconds before sending the initial
* discover.
*/

View File

@@ -102,7 +102,7 @@ struct dhcp_msg {
* initial DISCOVER message. MAx value is defined with
* CONFIG_NET_DHCPV4_INITIAL_DELAY_MAX. Default max value
* should be 10.
* RFC2131 4.1.1
* RFC2131 4.4.1
*/
#define DHCPV4_INITIAL_DELAY_MIN 1

View File

@@ -350,9 +350,14 @@ static int put_name_nth_ri(struct lwm2m_output_context *out, struct lwm2m_obj_pa
struct record *record = GET_CBOR_FD_REC(fd);
/* With the first ri the resource name (and ri name) are already in place*/
if (path->res_inst_id > 0) {
return put_begin_ri(out, path);
}
if (record == NULL || !record->record_t_present) {
return 0;
}
/* Name need to be add for each time serialized record */
if (path->level == LWM2M_PATH_LEVEL_RESOURCE_INST) {
return put_begin_ri(out, path);

View File

@@ -217,8 +217,13 @@ static void zsock_accepted_cb(struct net_context *new_ctx,
net_context_ref(new_ctx);
(void)k_condvar_signal(&parent->cond.recv);
}
} else if (status < 0) {
parent->user_data = INT_TO_POINTER(-status);
sock_set_error(parent);
k_fifo_cancel_wait(&parent->recv_q);
(void)k_condvar_signal(&parent->cond.recv);
}
}
static void zsock_received_cb(struct net_context *ctx,

View File

@@ -11,6 +11,8 @@ tests:
- mps3/corstone310/fvp
- mps4/corstone315/fvp
- mps4/corstone320/fvp
- imx95_evk/mimx9596/m7
- imx95_evk/mimx9596/m7/ddr
- imx943_evk/mimx94398/m33
- imx943_evk/mimx94398/m33/ddr
- frdm_mcxc444/mcxc444

View File

@@ -3,6 +3,7 @@ common:
ignore_faults: true
ignore_qemu_crash: true
tags: kernel
filter: CONFIG_ARCH_STACKWALK
tests:
arch.common.stack_unwind.riscv_fp:
arch_allow: riscv

View File

@@ -88,6 +88,63 @@ target.
Use serial client, e.g. PUTTY to communicate over the serial port
(typically /dev/ttyUSBx) with the tester using BTP.
Building and running on :zephyr:board:`native_sim <native_sim>` on Linux
************************************************************************
It is possible to build and run the tester application using the
:zephyr:board:`native_sim <native_sim>` board, and any compatible HCI controller.
This has the advantage of allowing the use of Linux debugging tools like valgrind and gdb,
as well as tools like btmon.
It is also faster to apply changes to the code,
as building for :zephyr:board:`native_sim <native_sim>` is usually faster,
and there is no flashing step involved.
Building for :zephyr:board:`native_sim <native_sim>` is just
.. code-block::
west build -b native_sim
Which will generate a zephyr.exe file that can be executed as
.. code-block::
zephyr.exe --bt-dev=hciX
Where ``hciX`` is the HCI controller (like ``hci0``).
However for the purpose of running the tester application with auto-pts,
running the application is left to the auto-pts client.
Building the Zephyr controller for a :zephyr:board:`native_sim <native_sim>` host on Linux
==========================================================================================
To build and flash the Zephyr controller as an HCI controller usable by Linux,
either the :zephyr:code-sample:`bluetooth_hci_uart` or :zephyr:code-sample:`bluetooth_hci_usb`
samples can be used.
See also :ref:`bluetooth-tools`.
When building these samples, the tester application controller overlay should be supplied.
For example
.. code-block::
west build -b nrf5340_audio_dk/nrf5340/cpunet -d ${ZEPHYR_BASE}/build/nrf5340_audio_dk_nrf5340_cpunet ${ZEPHYR_BASE}/samples/bluetooth/hci_ipc/ -- -DEXTRA_CONF_FILE=${ZEPHYR_BASE}/tests/bluetooth/tester/overlay-bt_ll_sw_split.conf
west flash -d ${ZEPHYR_BASE}/build/nrf5340_audio_dk_nrf5340_cpunet
west build -b nrf5340_audio_dk/nrf5340/cpuapp -d ${ZEPHYR_BASE}/build/nrf5340_audio_dk_nrf5340_cpuapp ${ZEPHYR_BASE}/samples/bluetooth/hci_uart/
west flash -d ${ZEPHYR_BASE}/build/nrf5340_audio_dk_nrf5340_cpuapp
Will build and prepare a nRF5340 Audio DK to be an HCI controller over UART.
For single core boards like the nRF52840 DK it is a bit simpler and can be done like
.. code-block::
west build -b nrf52840dk/nrf52840 ${ZEPHYR_BASE}/samples/bluetooth/hci_uart/ -- -DEXTRA_CONF_FILE=${ZEPHYR_BASE}/tests/bluetooth/tester/overlay-bt_ll_sw_split.conf
west flash
The :zephyr:code-sample:`bluetooth_hci_usb` sample can also be used,
but support for Bluetooth Isochronous channels is not yet fully supported.
Building for LE Audio
*********************
@@ -95,6 +152,8 @@ The tester application can be built with support for BT LE Audio by applying the
the ``overlay-le-audio.conf`` and ``hci_ipc.conf`` with ``--sysbuild`` for the supported boards,
e.g.:
.. code-block::
west build -b nrf5340dk/nrf5340/cpuapp --sysbuild \
-- -DEXTRA_CONF_FILE=overlay-le-audio.conf;hci_ipc.conf

View File

@@ -593,6 +593,7 @@ test_i2c_fdc2x1x: fdc2x1x@54 {
sd-gpios = <&test_gpio 0 0>;
deglitch = <5>;
fref = <43360>;
channel_0 {
rcount = <7499>;
settlecount = <48>;

View File

@@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(build_all)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

View File

@@ -0,0 +1 @@
CONFIG_I2C=y

View File

@@ -0,0 +1,13 @@
/*
* SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors
* SPDX-License-Identifier: Apache-2.0
*/
&i2c1 {
status = "okay";
};
&smbus1 {
i2c = <&i2c1>;
status = "okay";
};

View File

@@ -0,0 +1,3 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_SMBUS=y

View File

@@ -0,0 +1,9 @@
/*
* SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors
* SPDX-License-Identifier: Apache-2.0
*/
int main(void)
{
return 0;
}

View File

@@ -0,0 +1,10 @@
common:
build_only: true
tags:
- drivers
- i2c
- smbus
tests:
drivers.smbus.build.stm32:
platform_allow:
- nucleo_g071rb

View File

@@ -71,7 +71,7 @@ ZTEST(test_ram, test_sdram1)
ZTEST(test_ram, test_ram0)
{
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ram0))
test_ram_rw(buf_ram0, RAM_SIZE_SRAM);
test_ram_rw(buf_ram0, RAM_SIZE);
#else
ztest_test_skip();
#endif

View File

@@ -369,7 +369,7 @@ manifest:
groups:
- tee
- name: trusted-firmware-m
revision: d3341a660f2f33156e1a8bb8ea47ad83066defea
revision: 04aa7243e04946b5422b124bea9c0675ab6b120f
path: modules/tee/tf-m/trusted-firmware-m
groups:
- tee