Andrzej is no longer involved directly in Zephyr, but remains connected
to the MCUboot project. Replace his maintainership with either other
people from Nordic or leave the subsystem "orphaned" (i.e. labeled as
odd fixes).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
There should be functional equivalence between these two forms. And the
'_eq'-form is more readable.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
The sysbuild documentation refers to CMakeLists.txt which can lead the
user to believe this call can be added to the <sample>/CMakeLists.txt
file.
This file is sourced as part of the Zephyr CMake build and not sysbuild
CMake build.
Therefore change the description to sysbuild.cmake.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Adds bt610 and bl5340_dvk_cpuapp* targets to exclusion list for tests
as these boards enabled i2c by default for GPIO usage which conflicts
with the test.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
As the parameter of "MAX" is uint32, the nagetive number will be
bigger than 0. The MAX function does not work as expected. So
change it to if/else form.
Fixes#51146
Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
The commit f10fa0dea8 mapped the
Cortex-R52 processor type to use the "VFPv3" FPU type, but the
toolchain requires the "FPv5" FPU type and refuses to assemble
floating-point instructions when the "VFPv3" FPU type is specified.
This commit updates the build script to specify the FPU type of
`fpv5-sp-d16` when the processor is configured with a single-precision
FPU, and `neon-fp-armv8` when the processor is configured with a
double-precision + Advanced SIMD-capable FPU.
Note that the `fp-armv8` FPU type is an alias for double-precision FPv5
with 32 double-precision registers (refer to the GCC
`gcc/config/arm/arm-cpus.in` for more details); NEON is always
specified in case of a double-precision configuration because the
Cortex-R52 can only be configured as such.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Selects the hidden Kconfig to note that the APIC timer's cycle count
accessor is a lock free path and may use the spin lock time limit check.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Select the Kconfig option noting that the cavs (intel adsp)
timer driver provides a lock free cycle count accessor and
therefore can be used with a spin lock time limit assert.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Spin locks held for any lengthy duration prevent interrupts and
in a real time system where interrupts drive tasks this can be
problematic. Add an option to assert if a spin lock is held for
a duration longer than the configurable number of microseconds.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adds check to verify that the audio stream is actually
in the streaming state before handling the
audio data. As per the BAP spec, a stream that
is not in the streaming state shall not send
any data, and this check is to handle any
remote devices that are not working correctly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The TXF interrupt mask is not properly set. In this case the
interrupt line is not cleaned, leading to the re-entrance
in the interrupt handler.
the issue is linked to the management of the IPCC_CxTOCySR value.
The TXF interrupt is triggered when the IPCC_CyMR is channel bit is
set to 0 and the IPCC_CxTOCySR associated bit move from 1 to 0.
The fix is to check if the IPCC_CxTOCySR channel bit is 0 instead of 1.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
This sample is intended to show users how they can create a sample which
has dedicated configuration files for extra images included in a build.
MCUboot is used as example on how its default can be adjusted and
MCUboot itself automatically be included in the build when using
sysbuild.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Introduce a `test_sysbuild()` function.
This function is intended to be used by samples that are dependent on
sysbuild. This function allows such samples to test if sysbuild was used
in the build process, and when sysbuild is not used, then print a
warning to the user, or even fail the build.
This is useful for samples that have two parts to function properly, for
example samples that needs to be build and flash on two or more cores.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit introduces the possibility of a sample to locate
configuration files for extra images that are used when building with
MCUboot.
This allows use-cases where a sample, A, want to include MCUboot but has
adjustments to the default MCUboot configuration.
By adding a Kconfig fragment `<sample>/sysbuild/mcuboot.conf`, then that
fragment will be used together with the default configuration for
MCUboot.
It is also possible to completely replace the MCUboot configuration.
This is done by creating `<sample>/sysbuild/mcuboot/` folder.
This folder will then be used as the `APPLICATION_CONFIG_DIR` when
building MCUboot.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Using char pointers for %p should be avoided in log messages. It will
cause issues in configurations where logging strings are removed from
the binary and they are not inspected when cbprintf packages from
logging string are built. In that case any char pointers are treated as
strings and copied into the pacakge body.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
For Intel ACE1.x the GPDMA link list structure should be aligned
to 64 bytes to avoid the link list entry fetch crossing the 64 bytes
address alignment.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Add support for regulator-boot-on to PMIC driver. Many PMIC devices will
be enabled at boot, so this property allows the regulator framework
to correctly track their state.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add mode specific PMIC configuration functions, to allow consumers to
configure target voltages of each regulator mode. This will allow users
to enable or disable, as well as set target voltages for regulator modes
without actually entering that mode.
This feature can be useful for power managment applications where the
consumer may want to switch the regulator to low power mode at a later
time.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Remove mode awareness from PMIC voltage setting, current setting, and
enable/disable functions. Concepts such as regulator consumers do not
work well with multiple modes, so support for changing voltages or
disabling regulators in each mode has been removed.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add missed 'zephyr' prefix to files paths while including.
Also, remove that paths from libraries include paths to generate
compilation error if shortened path is used.
Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
As part of a previous refactor, this property was removed from the STM32
USART binding. The driver code to support this feature was not changed.
This commit simply adds the property back to the new base .yaml for
device trees which used it.
Tested on a proprietary board using the STM32U5 on USART1.
Signed-off-by: Peter Maxwell Warasila <madmaxwell@soundcomesout.com>
The inactivity time registers identified by `ADXL362_REG_TIME_INACT_L`
and `ADXL362_REG_TIME_INACT_H` accepts a 16-bit value. (8 in each).
Without this change the last 5 bits of the register value
will be cleared.
Clearing the last bits of the register value greatly reduces the maximum
inactivity time that can be set.
Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
The commit adds note on deprecation of zephyr_ prefix in SMP API
used by SMP transports, that allow MCUMgr receive and process
SMP frames.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Cosmetic change: the zst was short for zephyr_smp_transport,
now it is just smp_transport so smpt makes more sense.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The MCUMgr library is now part of Zephyr, so there is no point
to prefix SMP functions with Zephyr.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit removes the `mps3_an547` board from the integration
platform list for the tests whose minimum flash size requirement exceed
the size of the flash available on the board.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
This commit adds the flash and RAM size attributes to the board YAML
file so that the board can be properly filtered by memory sizes.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Server might return the endpoint name in a registration reply. Default
max allowed endpoint name is only 12 characters.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Linux kernels before v5.14 do not define the CANFD_FDF flag. The flag is
disregarded within the Linux kernel. It is just there for being able to
reuse the canfd_frame struct for classic CAN frames in Linux user-space
applications.
Define the CANFD_FDF flag locally if not already defined to allow compiling
against older Linux kernel headers.
See the following Linux kernel commit for further details:
02546884221279da2725e87e35348290470363d7
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This change implements part two of the program laid out in the TSCH RFC,
see #50336#issuecomment-1250250154 :
> Consolidate IEEE 802.15.4 options in net_pkt
This change improves decoupling of generic net core code from
IEEE 802.15.4 internals. It also simplifies IEEE 802.15.4
attribute cloning and thereby makes it easier to maintain and less
error prone (and probably even faster as individual bits are no longer
copied over separately).
This enables us to extend and design IEEE 802.15.4 L2 attributes inside
the package in isolation from the net core code which will no longer
have to be changed when introducing changes or additions to the flags.
This flexibility will be built upon in later change sets to model the
IEEE 802.15.4 attributes closer to the spec.
The solution is inspired by Linux's sk_buff->cb attribute which addresses
the same concern as the attribute introduced in this change set:
https://elixir.bootlin.com/linux/v6.0.1/source/include/linux/skbuff.h#L871
As the inline comment says: The cb attribute can be made a union or even a
uint8[something] in the future, if further L2s need a control block, too.
Right now such full indirection would make the code overly abstract, so
I chose to compromise with maintainability in mind.
Care has been taken to ensure that this changes does not introduce
additional padding into the net package. To maintain zero-padding, future
changes to the net packet struct will have to ensure that the
IEEE 802.15.4 struct is 4-byte aligned (iff the IEEE 802.15.4 struct
continues with max uint32_t scalar members) which is no deviation from
the previous implementation.
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
This change removes unnecessary padding from the net_pkt struct in
preparation for restructuring it in a later commit. Depending on the
number of activated Kconfig options, this saves between 4 and 8 bytes
per packet.
The change also removes anonymous unions inside of bitfields:
* The assumption, that anonymous unions inside bitfields save space is
wrong. They rather enforce an additional byte aligment boundary with
padding before or after on most compilers (try -Wpadded to prove it).
Removing the unions therefore counter-intuitively removes padding.
* Some of the fields inside the union may actually not be orthogonal if
several extensions are enabled at the same time. They may overwrite
each other when activated at the same time.
The change therefore not only improves packing of net_pkt but also makes
net_pkt easier to understand and maintain by removing potentially
non-orthogonal uses of bits within bitfields.
The union of RX/TX-only attributes has been maintained, though, as it DOES
save space and is easy to maintain. Maintainability has further been
improved by introducing additional inline comments and anonymous structs
that make the orthogonality of RX- and TX-attributes even more obvious.
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
The IEEE 802.15.4 L2 now sets the ll protocol in the packet to a
specific value. This corresponds to the respective solution in Linux and
is required to validate access to IEEE 802.15.4 specific attributes of
the packet.
Later change sets will rely on this value to ensure that IEEE 802.15.4
specific package content can only be accessed on IEEE 802.15.4 packages.
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
The net packet structure contains pointers to link-layer source and
destination addresses. Usually, these structures do not point to
separately allocated memory but directly into the packet's data buffer.
In case of a deep package clone (which includes copying the buffer) the
copy of the ll addresses continued to point into the old package
(contrary to a rather misleading inline comment). This was proven by an
additional failing unit test assertion.
As the original package may be unreferenced while the cloned package is
still being accessed, the ll address pointers of the cloned package may
become invalid.
The fix consists of two parts:
* First it is determined whether a given ll address actually points into
the buffer and if so at which logical cursor offset it is located.
* If the address points into the package buffer then the cursor API is
used to determine the corresponding physical memory location in the
cloned package. The ll address of the cloned package is then patched
to point to the cloned buffer.
Additional assertions were introduced to the existing unit test to ensure
that the newly generated address points to the correct content of the
cloned package.
The solution is implemented in a generic way so that the previously
redundant implementations were consolidated into a single one. The code
includes a check that ensures that the ll address check and manipulation
will be skipped in case of shallow package copies.
The change also addresses problems related to the "overwrite" flag of the
package:
* Package cloning assumes the overwrite flag to be set. Otherwise it
will not work correctly. This was not ensured inside the clone method.
* Package cloning manipulates the overwrite flag of the cloned package
but does not reset it to represent the same state as the original
package.
The change introduces a fix and unit test assertions for both problems.
Fixes: #51265
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
Nordic's IEEE 802.15.4 radio driver adapter layer had a few raw accesses
to net packet attributes.
Packet attributes should never be accessed directly, though, but only
through the dedicated accessor methods provided by the net core.
This change replaces raw accesses to packet attributes by their
respective wrapper functions.
This also is a necessary precondition to the isolation and
encapsulation of IEEE 802.15.4 specific packet attributes which will be
introduced in a later commit of this change set.
Fixes: #51264
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
Most IEEE 802.15.4 drivers do not support promiscuous mode, some do.
There is a dedicated L2 flag to signal this capability to clients.
Unfortunately the IEEE 802.15.4 L2 stack does not announce this flag
even for drivers that correctly expose it in their HW capabilities.
Some clients (notably the OpenThread L2) even uses promiscuous mode
without checking whether the driver actually supports it.
This change lets the vanilla IEEE 802.15.4 L2 check the driver's
HW capabilities to announce promiscuous mode on its 'get_flags()'
interface if supported.
The OpenThread L2 uses a constant (potentially incorrect) response
to 'get_flags()'. Fixing the OpenThread L2 is out of scope of this
change. This change just introduces TODO messages to the OpenThread code
so that the OpenThread team may fix the issue (or delete the TODO if they
deem it irrelevant).
Fixes: #51263
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>