Previously the script used templates where the fields were identified by
numeric ordinal-identified placeholders. This makes the code hard to read
because it is hard to tell which string corresponds to which placeholder
in the substitution.
This patch corrects the issue by replacing the ordinal placeholders with
named placeholders.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
In Python, type annotations can be quoted to avoid forward references.
However, if "from __future__ import annotations" is present, Python will
always evaluate type annotations in a deferred manner, making the quotes
unnecessary.
The ruff python linter produces UP037 warnings to indicate cases where
quoting of type annotations can be removed. This patch corrects the
warnings.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
PEP585 enabled collections in the Python standard library (like tuple) to
be used as generic type annotations directly, instead of importing
analogous members from the typing module (like typing.Tuple).
The ruff python linter produces a UP006 warning if the deprecated type
annotations continue to be used.
This patch corrects the issue by correcting the single instance where
PEP585-style type annotations can be used.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
The ruff python linter produces a SIM401 warning when a dictionary is
accessed using if-statements to check for key presence. In this case, the
dict.get() method could be used instead.
For example:
value = foo["bar"] if "bar" in foo else 0
...can be replaced with:
value = foo.get("bar", 0)
This patch corrects the single instance of this issue in the script.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
The ruff python linter produces a SIM102 warning when there are nested if
statements which can be collapsed into a single if statement:
if foo:
if bar:
...
...becomes...
if foo and bar:
...
This patch corrects the single instance of this issue in the script.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
The ruff python linter produces a I001 warning when the imports of a Python
script are not sorted. This patch corrects the issue by sorting them.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
The script can be made more concise by combining the imports of three
classes from the typing module into a single line.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
The ruff python linter produces a B028 warning when the warnings.warn()
function is called with a stacklevel parameter.
By default the function will set a stacklevel of 1 which causes it to
output the stack frame of the line where the function is called without
any context information from higher up the stack.
It is recommended to use a stacklevel of 2 or higher. Therfore, this patch
sets the stacklevel parameter of all warnings.warn() calls to to 2.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
Ruff is the Zephyr projects supported Python formatting tool. This patch
applies auto-formatting gen_relocate_app.py in preparation for coming
tidy-ups and improvements.
With the Ruff auto-formatter applied, error E501 can be removed from
.ruff-excludes.toml exclusion rules.
gen_relocate_app.py has also been removed from the format exclude list.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
Add support for the Sony IMX335 CSI sensor.
This sensor supports resolution of 2592x1944 in RGGB bayer format
either 10 or 12 bits and using 2 or 4 CSI lanes.
For the time being only 10 bits on 2 CSI lanes is supported via
this commit.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Adds the simplest possible I2Cv1 controller driver for STM32 with the RTIO
interface. Currently only interrupt driven transfers are supported.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Adds the simplest possible I2Cv2 controller driver for STM32 with the RTIO
interface. Currently only interrupt driven transfers are supported.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Co-authored-by: Tom Burdick <thomas.burdick@intel.com>
In preparation of the introduction of the STM32 I2Cv2 RTIO driver, move
some functions that are used in both drivers into a common file.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Rename all functions and macros starting by stm32_i2c_* to i2c_stm32_* to
harmonize the driver.
Reformat some indents for better alignment.
Remove i2c_stm32_get_config function declaration from header since it is
not used.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
During previous commit of adding interface arg, wrongly change the
parameter count of 'wifi ap enable' to a small one. Change the value
to 47 can fix this issue and match the need of adding interface arg.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Update the west API documentation for the added active_only arguments
to as_dict/as_frozen_dict/as_yaml/as_frozen_yaml.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a sample demonstrating how to use the IRONside update service to
update the IRONside SE firmware on the nrf54h20dk/nrf54h20/cpuapp/iron
board.
Co-authored-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Add an IPC service API for triggering updates of the Nordic IRONside SE
firmware using the IRONside call module.
Co-authored-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Add an IPC service API for booting local domain cores.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Port SYS_INIT to use soc_early_init_hook as SYS_INITs are legacy.
Due to moving dmm_init() from PRE_KERNEL_1 SYS_INIT to
soc_early_init_hook(), the DMM test is also updated to ensure that
its setup function runs before dmm_init().
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
This is needed for next generation Secure Domain firmware.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
After introducing compile time argument validation of strings
used in zassert macros multiple warnings appear. Fix all of
them.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add noncallable printf with string used for ztest assert/assume
macros to ensure printf-like argument validation at compile time.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Right now, the power_clock_irq is not available on nRF54LM20A.
Since the onoff mechanism relies on the irq, the timer is used
to emit the hfclk_ready callback.
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
Use LL_GPIO_SetOutputPin and LL_GPIO_ResetOutputPin for the STM32
optimized DP functions. This yelds a speedup of the bit-banged interface
from about 585kHz to 640kHz on an STM32C0.
Suggested-by: Mathieu Choplain <mathieu.choplain@st.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>