If OPENTHREAD_IP6_FRAGM is enabled the IPv6 fragments are handled in
OpenThread stack but also forwarder unconditionally to the Zephyr
uplayers. It causes additional packets processing and leads to errors
like unrecognized next header type or duplicate ping reply. What more
these errors generate additional traffic which jam channel and decrease
latency for packets required fragmentation.
This commit add filtering IPv6 fragments when data fragmentation and
reassembling is enabled in OpenThread.
Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
Uninitialized memory would report wrong value for
`mAckedWithSecEnhAck` flag in the received frame, making the
OpenThread stack to update the frame counter for the neighbor
wrongly.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
pb_adv_reprovision is failing in CI, but the error cannot be reproduced
locally. Disable the test as a hotfix for main, so we can determine the
issue and re-enable the test in a separate PR.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Commit 678b76e4b0 ("kernel/init.c: allow for memset/memcpy
alternatives during early boot") and commit da28829b64 ("kernel:
zero the bss section of OCM memory at boot time") were created
independently and missed changes from each other.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Added test which estimates stack usage of few types of logging
messages in various modes, with and without optimization. Test
was used to determine usage for various architectures and is expected
to be used to detect stack usage increase since it fails when
stack usage in given configuration goes beyond the hardcoded limit.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
When immediate logging is used and optimization is off then bigger
stack is needed for thread analyzer. Adjusting the value.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added test which checks that log argument is evaluated only
once when log message is created.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Logging v2 is utilizing complex preprocessing operations to
prepare message at compile time. Multiple operations are peformed
on log message arguments. However, it is expected that argument
will be evaluated only once (e.g. it can be a call to a function
with side effects). Adding additional layer which creates copies
of user arguments on stack and passes them to further processing.
Updated test for log_msg2 which is using internal macro which
got renamed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Always use runtime packaging in immediate mode. Removing attempt to
package on stack if possible. It would be done only to speed up
logging but that is not a requirement in immediate mode where
packaging time is fractional compared to backend processing. Using
runtime packaging also reduces stack usage in the context which calls
log message.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The commit adds FS_FATFS_MAX_ROOT_ENTRIES Kconfig option that allows
to select number of root node entries that will be allocated while
creating FAT file system on a device.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This adds support for the ads101x (ads1013, ads1014, ads1015) and
ads111x (ads1113, ads1114, ads1115) family of i2c adc devices.
Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
The commit removes redundant memcpy operations and switches from
using TinyCBOR provided byte order converters to sys_be, native
to Zephyr.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
We have single server but it can accept multiple connections so
keep same requirements for all connection attempts.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
When XIP is not enabled, z_data_copy() already falls back to an empty
function. No need to ifdef it.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add dts node for thingy53 board to forcibly set
PMIC to PWM mode by setting GPIO pin high.
Signed-off-by: Jan Zyczkowski <jan.zyczkowski@nordicsemi.no>
The crypto driver API is 6 years old, has 5 different implementations,
and is widely used.
Remove the EXPERIMENTAL marking from the API. Each implementation may
still choose to mark itself as EXPERIMENTAL.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add stress test for logging to validate that logging is coherent:
All message are processed by the logger or dropped and no message
is lost.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
When system clock is set globally for the test which is executed
on various qemu platforms it may happen that clock is set too
high compared to CPU clock frequency. In that case test may stuck.
Added check and test skipping in that case.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Updated log_core to use spin lock instead of irq_lock.
Refactored z_log_msg_post_finalize function.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This is a bare minimal changes to tell the server that we are using
LwM2M 1.1 version. Queue-mode parameter has changed between 1.0 and
1.1 so it must be changed in the same time.
Other 1.1 features may follow on separate commits. This is still
an experimental feature that allows developing and testing of
1.1 features.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Initialize the i2c config of the emulator based on the clock_frequency
property.
The emulator can be used without calling the i2c_configure function, but
the i2c_get_config would return an error. With this change, it is
possible to get the config prior to the i2c_configure call.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Otherwise XCC (based on GCC 4.2) will complain at log related undefined
symbols, that won't be generated as CONFIG_STDOUT_CONSOLE=n will be
forced.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
XCC (based on GCC 4.2) will emit undefined references to symbols that
are not used. Newer versions of GCC simply don't emit them, but for XCC,
linker will complain about those undefined references.
This patch adds a dummy definition of the mbox devices used on tests, so
that the linker is happy.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
NET_SOCKET_GET_NAME macro adds some extra parenthesis that, on XCC (based
on GCC 4.2) ends up in the generated assembly, thus causing `as` to error
with:
Error: junk at end of line, first unrecognized character is `('
It appears that the parenthesis are actually concatenated to the
generated name for identifier. This patch just removes them.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
XCC (based on GCC 4.2) doesn't recognize -Wvla (for variable-length
array), so remove it from "warning_error_misra_sane" property.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This register is a pre-define hardware slave A and can be accessed
through I2C0. It is not currently used, so it can be disabled to
avoid illegal access.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Helpers like dev_cfg have been removed from all in-tree drivers, this
one was missed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Use the IF_ENABLED macro helper to conditionally initialize the int_gpio
field. This avoids duplication of initialization code.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>