Commit graph

101710 commits

Author SHA1 Message Date
Pieter De Gendt
3981b22845 tests: Add a CodeChecker config file
Create a file to be used in CI or locally that lists all enabled/disabled
checks.

Can be passed as a CMake argument or set as environment variable:
CODECHECKER_CONFIG_FILE=$ZEPHYR_BASE/tests/codechecker_config.yaml

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
493cc9daea doc: develop: sca: Update CodeChecker configuration options
Put CodeChecker configuration parameters in tables for a clear overview
of all the options.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
9f2d7659b8 cmake: sca: codechecker: Add cleanup step
Add the option to remove the static code analysis reports after
parsing/storing.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
5e334425d2 cmake: sca: codechecker: Parse twister variables
If we're running in a twister context, use the information as sane
defaults for CodeChecker.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
518c818353 cmake: sca: codechecker: CMake targets instead of commands
Replace CodeChecker post build commands with regular CMake Targets.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
19a6dd8e2f cmake: sca: codechecker: Configurable variables
Add a separate variables for CodeChecker commands

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
5c9eb219be cmake: sca: codechecker: Use zephyr_get for variables
Allow setting CodeChecker cmake variables from multiple sources with
zephyr_get.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
d2bae91803 scripts: pylib: twister: Pass testsuite name to cmake
Add a CMake argument with the current testsuite name.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
d2fb07785d cmake: Create git module
Create a CMake git module for a git_describe function.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Thomas Stranger
02afc352e3 boards: st: nucleo_g0b1re: update pyocd target
Update the pyocd runner configuration of the nucleo_g0b1re
to use the correct target.

Pyocd had issues only just after the release of the G0B1/C1 line.
This issue has already been fixed a few releases ago.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-12 10:03:58 +02:00
Jiafei Pan
133a5c921d samples: shell_module: add imx93 board support
Add kernel reboot support, so can use shell to verify reboot function.
uart:~$ kernel reboot cold
Known issue is imx93 currently can only support cold reboot and doen't
support warm reboot.

Updated board document.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-12 10:03:52 +02:00
Jiafei Pan
c2bbf1a169 dts: imx93_a55: add PSCI device node
Add PSCI device node, so can use PSCI to achieve CPU power
management.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-12 10:03:52 +02:00
Jiafei Pan
002ed73ff4 arm64: add sys_arch_reboot() support
If PSCI is enabled, it will leverage psci reset API to achieve system
reboot, otherwise a weak dump reboot API is provided, and platform
can override these APIs if platform specified implementation provided.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-12 10:03:52 +02:00
Wilfried Chauveau
a55bb955af scripts: twister: add type hint to twister_main.py
Twister main expects an instance of TwisterEnv. Let's the linter know
about this.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
30dc833cab scripts: twister: Use args rather than injecting members
This changes how some arguments are set in the `Handler`s.
`options`, `generator_cmd` and `suite_name_check` are now passed as
arguments to the constructor rather than injected from an other module.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
6d9e5df401 scripts: twister: TwisterEnv is always used with an options parameter
Adjusting the type hints and code accordingly.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
5ad5af3713 scripts: twisterlib: Fix warning about deprecation of truthiness
Python 3.12 warns that

> Testing an element's truth value will raise an exception in future
> versions. Use specific 'len(elem)' or 'elem is not None' test instead.
>    if elem_ts := root.find('testsuite'):

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
deeec33934 scripts: twister: Solve deprecation notice when running tests
CONF_FILE, DTC_OVERLAY_FILE and OVERLAY_CONFIG are deprecated but still
used by the tests causing warnings when running them.

This adds a test_data specific to validate the emission of the warning,
and removes the offending args from the other test_data files.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
28add0cd36 scripts: twister: check for deprecation notice for space-separated lists
Space separated lists are deprecated but this notice is not checked for.
extract_fields_from_arg_list also converts lists back to space-separated
lists causing a warning on get_scenario

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Mathieu Choplain
30abd595d0 boards: st: nucleo_wb09ke: add support for Nucleo-WB09KE board
This commit adds support for the ST Nucleo-WB09KE board.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
2867aaaa16 boards: st: nucleo_wb05kz: add support for Nucleo-WB05KZ board
Add support for the STMicroelectronics Nucleo-WB05KZ board.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
6aaa2f8be0 dts: arm: st: wb0: add DTSI for STM32WB0 series
Adds Device Tree include files for all MCUs in the STM32WB0 series.
These DTSI files only contain the supported peripherals for now.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
1530c98a77 drivers: hwinfo: stm32: mark STM32WB0 series as incompatible
The existing hwinfo driver for STM32 is incompatible with STM32WB0 series.
Prevent compiling the driver if the target's series is STM32WB0.
This fixes the build failure on the drivers.hwinfo.api test.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
e322fa9781 drivers: flash: stm32: add STM32WB0 flash controller
Adds a basic driver for the STM32WB0 flash controller (read/erase/write).
Extended operations are not supported by this driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
263b03feeb drivers: gpio: stm32: add support for STM32WB0
Adds support for the STM32WB0 series in the existing STM32 GPIO driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
32a1b0cc54 drivers: intc: add STM32WB0 GPIO interrupt controller
Adds a driver for the STM32WB0 series GPIO interrupt controller.
This driver implements the STM32 GPIO INTC API, along with an extension
function used to check if a specific line is available on current board.

This also extends the GPIO INTC API to support level-sensitive interrupts,
as this feature is available on STM32WB0.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
20c45fe10a drivers: clock: add STM32WB0 clock control
Add control driver for STM32WB0 series, with support for all clock sources.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
fb224d139a include: dt-bindings: add STM32WB0 reset header
Adds the reset controller dt-bindings header for STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
e32bc6e78d dts: bindings: power: add STM32WB0 power controller
Add a Device Tree binding for the STM32WB0 power controller.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
4b357345df dts: bindings: flash: add STM32WB0 flash controller
Add the Device Tree binding for the STM32WB0 flash controller.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
4822c0c692 dts: bindings: intc: add STM32WB0 GPIO interrupt controller
Add the Device Tree binding for the STM32WB0 GPIO interrupt controller.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
6992f4e88b dts: bindings: clock: add STM32WB0 RCC and LSI
Add the Device Tree bindings for the RCC and LSI clock of STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
16ab346f28 soc: st: stm32: add STM32WB0 series
Adds support for the STM32WB0 MCU series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
4670c3c8b4 modules: Kconfig.stm32: Add Kconfig symbols for RADIO
The RADIO and RADIO_TIMER HAL modules will be required to
implement BLE support for STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
e3ac543879 west.yml: hal_stm32: Update to HAL integrating STM32WB0
Update the West manifest to point to an updated version of the STM32 HAL
compatible with WB0 series thank to inclusion of STM32CubeWB0 package.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Anas Nashif
ef49f031dc doc: overhaul sample criteria and expectations
overhaul sample criteria and what we expect in a sample, especially
overhaul the twister part and what should be provided for good test
coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-12 10:03:30 +02:00
Tomasz Leman
4f5f4c0389 fix: power: ace: Move HST domain suspend before IMR context save
This patch addresses an issue in the ACE platform power management code
where the HST domain suspend operation was performed after the IMR
context save. This resulted in the power management context being
restored with outdated values upon wake-up from D3 state, leading to a
failure to resume the HST domain correctly.

By moving the `pm_device_runtime_put(INTEL_ADSP_HST_DOMAIN_DEV)` call
before the IMR context save, we ensure that the HST domain is suspended
with the current context, and upon resume, the power management context
has the correct information to restore the HST domain state.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-09-12 10:03:11 +02:00
Magdalena Pastula
495207668e samples: subsys: ipc: add testcases for icbmsg on nRF54L15
Add testcases for ICBMSG on nRF54L15 with only one endpoint,
including non-multithreading case.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-09-12 10:03:05 +02:00
Magdalena Pastula
5de1c092b7 ipc: align icbmsg to no-multithreading
Modify ICBMSG so that it could be used in no-multithreading
appliactions.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-09-12 10:03:05 +02:00
Karthikeyan Krishnasamy
12e8bc7f82 tests: posix: fs: add testsuite for open truncate
add tests for posix open() with truncate flag

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-09-12 10:02:57 +02:00
Karthikeyan Krishnasamy
063d938aa5 lib: posix:fs: handle O_TRUNC in open()
handling of O_TRUNC flag from posix open()
to zephyr filesystem flag

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-09-12 10:02:57 +02:00
Karthikeyan Krishnasamy
20288c254b include: posix: fcntl: add O_TRUNC flags for posix open()
introduction of O_TRUNC flag has conflict with libc flags,
so realtered posix open flags based on the commit
499a633976 ("posix: device_io: use mode argument correctly in open()")

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-09-12 10:02:57 +02:00
Vinayak Kariappa Chettimada
9eb35c4e24 Bluetooth: Controller: Rework FAKE_ENTROPY_NATIVE_POSIX text
Rework comment text for FAKE_ENTROPY_NATIVE_POSIX used as
entropy driver for the Controller on BOARD_NRF54L15BSIM.

Relates to commit 34b6b3d9eb ("Bluetooth: Controller:
Support FAKE_ENTROPY_NATIVE_POSIX").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-12 10:02:48 +02:00
Valerio Setti
7fadfeec7c mbedtls: do not set PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_BASIC
Mbed TLS automatically sets PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_BASIC
whenever "_IMPORT || _EXPORT || _GENERATE || _DERIVE" operations
are set. Therefore we just set the proper actions where required.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-12 10:02:40 +02:00
Josuah Demangeon
95599968d9 MAINTAINERS: add josuah as Video collaborator
Adding myself as a collaborator for video driver category.
Add the samples/drivers/video/ to the MAINTAINERS.yml

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-11 20:22:54 -04:00
Nicolas Pitre
db9e5ec6f8 sample: demand_paging: add a demo about ondemand section usage
This sample demonstrates how demand paging can be leveraged to deal with
firmware bigger than the available RAM if XIP is not possible. Select
code can be tagged to be loaded into memory on demand, and also be
automatically evicted for more code to be executed when memory is
exhausted.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
7e847eca25 tests: demand_paging: add a test for on-demand sections
Exercises linker placement, the ondemand backing store, demand paging.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
78cd836e2f tests: demand_paging: move existing test to a mem_map subdirectory
This test concerns itself mainly with anonymous memory mappings.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
4fd3bf2060 demand_paging: add a semihosting based backing store for on-demand sections
This is especially handy for tests and validation using QEMU.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
c99371e486 arm64: demand paging is supported
Test configs for UP and SMP are also included.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00