The sscanf() is not available for minimal libc so it cannot be used.
Use the net_bytes_from_str() that is provided for this purposes.
Fixes#75029
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
RTCs support a variety of combinations of alarm time fields, set
by the alarm time mask. Until now, alarm tests have selected
only the minute and hour fields, as these are always supported,
but some RTCs require setting every supported field when setting
the alarm time, while other RTCs don't support setting every field.
To support all RTCs in the test suite, a configuration has been
added which makes the alarm time mask configurable. Boards can now
define the specific alarm time mask they want to test within
their boards .conf files.
Additionally, the alarm tests have been refactored to not depend
on the time.h library to determine the struct rtc_time times to
set as these are constant, so they are now provided as const
structs instead.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
When logging strings are stripped then addresses to log module
names are invalid. Do not store that address in the const
data structure associated with the logging module to avoid
someone accessing it. Store null instead.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
nRF54H20 USB device controller cannot be enabled without VBUS, but the
device should not be connected to the host during testing. Add it to
build_only section.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Do not halt control endpoint, control endpoint may not be enabled when
there no host is connected. Yield after buffer is queued to allow the
driver to work.
Tweak pool size and number of buffers to pass the test with high-speed
drivers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Restore the default CAN bitrates after having tested setting bitrate and
timing. This ensures the arbitration phase bitrate is proportional to the
data phase bitrate, allowing CAN FD transmission tests to complete.
Fixes: #73723
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Uses the variable for the default image when adding sysbuild
dependencies so that they can be copied out-of-tree and still work
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
"ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0" observed on a few
supported platforms when using SD card disk. Increase main stack size
for next USB device stack configuration to prevent stack overflow.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
After #74682, any function with constructor attribution requires
additional configuration. Due to some left-over and not-used
code in hal_espressif with that attribution, some samples started failing.
This is an additional to ##75063
Fixes#75169
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
ZSR_DEPC_SAVE is being used to determine whether we are faulting
inside double exception if this is not zero. It is possible that
the boot ROM or custom startup code leaves this non-zero, which
would result in a fake triple fault. So clear it at boot. Note
that the zeroing is done in MMU init code as these triple
faults are not actual hardware ones but only semantics, and will
occur once MMU is enabled.
Fixes#75194
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit catch the return code of the spi_config function and
early returns on error so that high level spi transfer api gets
the error too.
Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
In case of thread failure, fix the registrations by properly managing
the synchronization i.e. use conditional wait only if thread is being
initialized or will be initialized, else check for success or failure
without waiting for conditional variables.
Fixes#73523.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add pytest to test the output of dictionary logging to make sure
the encoded logs can be decoded back into strings, and to also
make sure the decoded logs have the expected strings.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is in preparation for introducing pytest to test the output
of dictionary logging. Code is the same, but the testcase.yaml
is trimmed to only those that can be tested.
Note that a copy is made instead of moving the whole sample over
is simply due to various documentation having references to
the sample. Since RST files under tests/ are not parsed for
zephyr:code-sample:<name>, the linking would have been vanished.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
pylint keeps failing and complaining about arg_data_type is
used before assignment. So assign it to None to silence
the warning.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The package_len has been extended from 10 bits to 11 bits
in the log message header. So the format for dictionary
logging also needs to be updated.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Python does not really support long long double, so %llx cannot
be formatted correctly, so we replace it with a simple %lx.
There is another variant %#llx and we also need replace it to
%#lx.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
... and put them into the LogParser class file instead of
the verisoned parser. This is in preparation for introducing
a new parser version.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Printing long long requires alignment on 64-bit before parsing
the actual argument. Or else the parser would be looking at
some unrelated bits. So fix it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This extracts the DataTypes class into its own file. This is in
preparation to add a new version of parser which can reuse this
class.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If logging packages need to be created at runtime, the format
strings need to be in memory for the packaging code to know
what to be packed. So prevent stripping the logging string
section if CONFIG_LOG_ALWAYS_RUNTIME is enabled.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fix the dictionary database not being generated under some
situations even though CONFIG_LOG_DICTIONARY_DB_TARGET is
disabled. For example, build and run through QEMU via
west build -t run.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adjust error message so that it clearly states runners.yaml is
missing from <build_dir>/zephyr, instead of referencing CMake cache
variable ZEPHYR_RUNNERS_YAML, which is no longer used (since
3124c02987 ).
Also clean up that variable in CMake since it is no longer used
(0 other references in entire tree).
Fixes#70605
Signed-off-by: Louis Feller <louis.feller@st.com>
Terms like the west workspace or even west projects and modules were not
documented prominently enough, prompting users to ask for additional
clarification. This patch attempts to resolve this by adding terms and
explanation of concepts to the glossary and west doc pages.
Fixes#67376.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Move information about device power state constraints from device
to policy.
It slows down the constraints lookup since we now have to find the
constraints for a device in a global array, but it saves resources
because we don't need to add a reference to constraints in all devices
instances.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Print on what board/core sample is executing.
Print how many bytes of data can be sent
in the mbox message (show use of mbox_mtu_get_dt()).
Print how many channels are available for incoming and/or
outgoing messages (show use of mbox_max_channels_get_dt()).
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add the sample application as existing for the CAP initiator
and CAP acceptor.
The samples are still in progress of being improved and
fully featured, but they exist and can be used already now.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Set the UNALIGNED_ACCESS_SUPPORTED only for MCU with cortex M
that are neither M0 nor M0plus
Cortex M0 or M0plus mcus do not support un-aligned address access
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add `CONFIG_REQUIRES_FLOAT_PRINTF=y` to tflite-micro samples as in the
past the module was using its own `printf` implementation, but now uses
our logging infrastructure.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add test cases for testing basic CFB functions.
These tests cannot run in CI because the CI environment has no display.
Mark these tests as `build_only`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
I broke the rendering of the CFB_FONT_MSB_FIRST font in
the previously committed #53796.
I will correct the entire font rendering process to make it
easier to remove the restriction that the vertical size of
the font must be a multiple of 8.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().
This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.
This fixes https://github.com/zephyrproject-rtos/zephyr/issues/74562
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Add validation of the number of ASEs in control point
write requests.
This validates that the number of ASEs
in the control point is not greater than the total number
of ASEs we support.
This also validates that the GATT MTU is large enough to
hold all the responses from the write since those can only be
sent as notifications and never be truncated.
Finally this validates and updates the size of the buffer used to
hold the responses, which may be an optimization for some builds.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add CANXL MRU handler, use the same RX, TX IRQ number.
Update the error priority that is lower priority than
the the tx_rx_mru priority incase the error interrupt
happens continuously, mru interrupt priority must be
higher to get report error counter. Otherwise the mru
interrupt can be delayed by error interrupt and
never call to MRU handler. This fixes#75022.
Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>