Improves group error descriptions by adding comments which will be
rendered into the documentation.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Improved the wording of the Hardening tool documentation to better
reflect that it does suggestions for both options that could be enabled
for improved security, as well as options that should be disabled for
they may expose to vulnerabilities. Also fixed the "Usage" section which
was stale.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This is a follow-up to commit 223cc3c6bd.
When a peripheral pin is disconnected, the pinctrl driver should skip
applying of GPIO configuration, as there is no pin number available in
such case, but due to an incorrect check, it actually did not skip it
and used an incorrect pin number for that. In nrfx prior to 3.0.0, this
caused an assertion failure, but because of a fallback routine, things
could still work in most cases (when assertions were disabled) as that
GPIO configuration was just applied to P0.31. Hence the bug was not
discovered until now. In the recent nrfx, this causes a null pointer
dereference, so always a crash.
This commit corrects the mentioned check and also uses the term "psel"
instead of "pin" where it is possible that the value is not a correct
pin number, in the hope of preventing a similar problem in the future.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Fix BT_CTLR_SW_SWITCH_SINGLE_TIMER to correctly disable the
PPI group used to switch radio Tx/Rx. The issue was
uncovered when adding coverage in BabbleSim test.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Prepare to replace HAL_RADIO_ENABLE_ON_TICK_PPI with
independent use of HAL_RADIO_ENABLE_TX_ON_TICK_PPI and
HAL_RADIO_ENABLE_RX_ON_TICK_PPI.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This reverts commit 4516117e9f.
A git bisect showed that the duration of an incremental build doubled
after this commit enabled `numfig=True`. Measurements shared and
discussed in #37572, #55708 and #56631 confirmed this. Here are yet more
measurements below in two different system configurations building docs
for very recent Zephyr commit b10817ba25 + all `:numref:` removed by
the previous commit. In other words these numbers show the cost of
`numfig=True` _without_ even using `:numref:`.
* Ubuntu 22, 8 cores
sphinx-build --version 4.3.2
numfig=True numfig=False
- from scratch 7 min 15 s 6 min 40 s
- one-line .rst change 48 s 24s
* Current Arch Linux, 72 cores
sphinx-build --version 6.2.1
numfig=True numfig=False
- from scratch 5 min 0 s 4 min 50 s
- one-line .rst change 37 s 18 s
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Usage of numfig=True option in conf.py significantly increases doc build
time. While it is a nice feature, it's not extensively used in Zephyr
documentation, so let's remove its usage in favor of faster doc builds.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Allow to periodically initializes/disables the modbus interface.
Switch from modbus line discipline to serial and switch back to modbus.
This can be required when the serial is shared by two sensors
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Also add a comment in each file reminding to keep them the same.
Fixes 251f269e23 ("west: v0.14.0 is required now (and soon, v1.1")
Confusing error message before this commit:
```
-- Found west (found suitable version 0.13.1, minimum required is 0.7.1)
CMake Error at SOF/zephyr/cmake/modules/zephyr_module.cmake:77 (message):
Traceback (most recent call last):
File "SOF/zephyr/scripts/zephyr_module.py", line 733, in <module>
main()
File "SOF/zephyr/scripts/zephyr_module.py", line 678, in main
west_projs = west_projects()
^^^^^^^^^^^^^^^
File "SOF/zephyr/scripts/zephyr_module.py", line 536, in west_projects
from west.configuration import MalformedConfig
ImportError: cannot import name 'MalformedConfig'
from 'west.configuration'
(west/src/west/configuration.py)
```
Clearer error message after this commit:
```
CMake Error at SOF/zephyr/cmake/modules/west.cmake:68 (message):
The detected west version, 0.13.1, is unsupported.
The minimum supported version is 0.14.0.
Please upgrade with:
/usr/bin/python3.11 -m pip install --upgrade west
```
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The commit 434ca63e2f introduced the
Cortex-A and Cortex-R CPU type dependency to `CONFIG_FP16` based on
the reasoning that the hardware half-precision support is only
available on them.
While it is true that the _hardware_ half-precision support is limited
to these targets, the compiler will provide the _software_ emulation
for the targets that lack the hardware half-precision support, as
mentioned in 41fd6e003c (the original
commit that introduced `CONFIG_FP16`).
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
The i2c_npcx_controller does not actually implement the i2c API, that's
implemented in the port driver and the controller one is in support of
that. This means there's no need to use the I2C specific instance
define, as that would end up adding the stats structure that would never
get used.
This was originally added in 7b1349cfe6.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This significantly improve user experience as 32 bit mdb binary
require to install multiple libraries before it can be used on
modern linux distros.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Since Merge zephyrproject-rtos#57360, user can use ch<x> and ch<x>N
simultaneously, which is beneficial for STM32 users
working in motor control area.
Signed-off-by: Savent Gate <savent_gate@outlook.com>
This fixes invalid conn unref that happens in ACL disconnected callback
context. When the ACL disconnects, the implementation waits for CIS to
be disconnected if connected. If the client won't disconnect the
CIS, the implementation initiates the disconnection by itself, from
delayed work context. Thus the ACL conn object has to be remained at
that time because it indicates whether the ASE object is in use or not.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Once the ACL disconnects, the implementation releases the related
endpoints. The ops->released callback is called once ASE enters IDLE
state, thus there is no need to call it explicitly.
This fixes repeated ops->released callback call.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Continue test execution even if assumption failed. This won't break the
test execution prematurely and allow to perform a cleanup.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
New silicon revision supports reading of GPIO inputs.
Button added to shield overlay to support new functionality.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Status readback has been added in the latest silicon revision.
.port_get_raw and .port_toggle_bits are now supported
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Replace memcpy usage in write since it is not linked to non-external
flash which might cause read-while-write issues.
Move the function that invalidated the data cache inside the critical
section to avoid context switch before it is invalidated.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Check memc_flexspi_is_running_xip before calling
memc_flexspi_set_device_config in hyperflash init.
This aligns with the nor flash driver.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Hyperflash write operations resulted in invalid writes. This commit
fixes the issue by temporarily lowering the clock during writes.
This aligns with the mcux-sdk-examples.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/53855
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add a function to update the flexspi bus clock. This is
needed when write operations are done to the hyperflash.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
When a running thread gets aborted asynchronously (this only happens
in SMP contexts, obviously) it gets flagged "aborting", but the actual
abort needs to happen in the thread's own context. For convenience,
this was done in the next_up() routine that selects the next thread to
run at interrupt exit time.
But this check was being done AFTER the next candidate thread was
selected from the run queue. Thread abort can wake up threads blocked
in k_thread_join(), and therefore these weren't seen as runable
threads, even if they should have been.
Executive summary: if you killed a thread running on another CPU, and
there was another thread joined to the killed thread that should have
run on that CPU, it wouldn't (until it received an interrupt or
otherwise reached a schedule point).
Move the abort check above the run queue inspection and into the
end-of-interrupt processing in z_get_next_switch_handle() (so it's
actually a mild performance boost as it's no longer part of the
cooperative context switch path). Simple fix, subtle bug.
Fixes#58040
Signed-off-by: Andy Ross <andyross@google.com>
This change splits the IEEE 802.15.4 test into two separate
test profiles, one with and one without sockets enabled to ensure
that both configurations work correctly.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
IEEE 802.15.4-2020 introduces a sequence number suppression feature.
This change covers sequence number handling to ensure that future
changes will not break sequence number handling when introducing
the sequence number suppression feature.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This refactoring dries up duplicate code required to configure
the socket address structure used in tests.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Additional test cases introduced in later commits will re-use
an existing test frame that requests acknowledgement. It is
therefore extracted into a function.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The current IEEE 802.15.4 stack assumes that drivers will
not provide more than one fragment in incoming packages.
This change exposes and enforces the pre-existing assumption
made by the implementation.
So far this is not a limiting restriction as MPDUs with more
than 127 bytes are not supported yet. It will probably have to
be changed as soon as larger payloads (as allowed by PHYs
introduced more recently into the spec) might want to allocate
smaller fragments.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Additional test case that covers reception of AF_SOCKET/SOCK_DGRAM
packages via socket API.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
When changing IEEE 802.15.4 security settings or setting security
to 'none' then the previous session must be cleaned up to avoid
resource leaks.
This change introduces proper clean-up of the security session.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Security set-up and clean-up is extracted into functions
to enable re-use by test cases introduced in later commits.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Improves inline documentation of binary IEEE 802.15.4 frames
to ease future maintenance. In this case the frame required
for testing raw sockets.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This is a purely syntactical change that makes test case
expectations configuration more readable.
This is required as later commits will introduce further
expectations.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Clarify the comment in the code so people looking to use mDNS don't
think that interaction with Zephyr is necessary for mDNS support to
work, its in fact built into the networking stack when the mDNS
feature is enabled.
Signed-off-by: Chris Morgan <chmorgan@gmail.com>