Commit graph

98421 commits

Author SHA1 Message Date
Jukka Rissanen
0cfd963ddc net: wifi: shell: Avoid using sscanf
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>
2024-06-28 20:58:50 -04:00
Bjarki Arge Andreasen
5343ae6817 tests: drivers: rtc: rtc_api: add config for alarm time mask
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>
2024-06-28 20:58:22 -04:00
Krzysztof Chruściński
90ab94f61d logging: Do not store module name pointer when strings are stripped
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>
2024-06-28 20:57:41 -04:00
Johann Fischer
a79700623d tests: drivers: udc: add build_only test case
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>
2024-06-28 20:56:47 -04:00
Johann Fischer
ef512305fb tests: drivers: udc: updates to pass testing on supported platforms
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>
2024-06-28 20:56:47 -04:00
Johann Fischer
155ef4bd1d drivers: udc_stm32: disable control endpoints in udc_disable()
Disable control endpoints in udc_disable() implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
a01ab79685 drivers: udc_kinetis: add missing return statement
Add the missing return statement to the branch where no slabs are
available.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Henrik Brix Andersen
1c0f241b92 tests: drivers: can: api: restore default bitrates
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>
2024-06-28 20:55:53 -04:00
Jamie McCrae
88f30f3f51 samples: Use DEFAULT_IMAGE for sysbuild
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>
2024-06-28 20:54:25 -04:00
Maciej Perkowski
116fdc1a23 maintainers: remove gopiotr from twister collaborators
Piotr no longer works in Nordic and was not active in Zephyr
since December 2023.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-28 20:54:13 -04:00
Johann Fischer
88c2476136 samples: usb: mass: increase main stack size
"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>
2024-06-28 20:54:01 -04:00
Sylvio Alves
57f6077f7c hal_espressif: remove extra not-used constructor
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>
2024-06-28 20:53:47 -04:00
Daniel Leung
8c10964435 xtensa: mmu: clear ZSR_DEPC_SAVE at boot
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>
2024-06-28 20:53:37 -04:00
Adrien MARTIN
fd90c9ba21 drivers: spi: gecko: propagate spi config error
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>
2024-06-28 21:53:22 +02:00
Iuliana Prodan
f91700e629 linker: nxp: adsp: add orphan linker section
Add missing linker section to avoid warning
about orphans when building with host compiler.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-06-28 21:53:01 +02:00
Chaitanya Tata
fbe7e95359 net: sockets_service: Fix thread failure
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>
2024-06-28 21:52:49 +02:00
Daniel Leung
9a08fdc1df tests: logging/dictionary: enable pytest to test output
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
d1c222a7c7 tests: logging: copy dictionary logging sample into tests
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
2eb0ffb7ea scripts: logging/dictionary: fix annoying pylint warning
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
f5762e07f2 logging: dictionary: new verion 3 format
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
0e33c7a976 scripts: logging/dictionary: replace %#llx too
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
ecc642b2df scripts: logging/dictionary: refactor common parser functions...
... 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>
2024-06-28 21:14:14 +02:00
Daniel Leung
3da42fb547 scripts: logging/dictionary: fix long long alignment
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
eacf71d92a scripts: logging/dictionary: extract DataTypes into its own file
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
cb0a3ce6aa logging: dictionary: keep string section if always runtime
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>
2024-06-28 21:14:14 +02:00
Daniel Leung
531557a772 logging: fix dictionary database not being generated
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>
2024-06-28 21:14:14 +02:00
Louis Feller
5b4c8945fd west : runners : Fix error message when runners.yaml is not found.
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>
2024-06-28 12:23:18 -04:00
Ioannis Damigos
6cc5478530 bme280: Update decoder to decode channels correctly
Update bme280 sensor driver decoder to decode
correctly the requested channels.

Fixes issue #74927

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-28 12:22:54 -04:00
Carles Cufi
457994816b doc: west: Clarify basic west terms
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>
2024-06-28 12:22:41 -04:00
Flavio Ceolin
e1f20f36a0 pm: policy: Move device power state constraints to policy
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>
2024-06-28 12:22:28 -04:00
Sebastian Głąb
c6ef6941a3 samples: drivers: mbox: Extend mbox sample
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>
2024-06-28 12:21:55 -04:00
Sebastian Głąb
92b0d6dda5 samples: drivers: mbox: Fix overlays for nrf54h20
Add sample configuration 'nrf54h20_app_ppr' where:
- cpuapp sends messages to cpuppr vevif channel 15,
- cpuppr sends messages to cpuapp bellboard channel 18.

Add sample configuration 'nrf54h20_rad_app' where:
- cpuapp sends messages to cpurad bellboard channel 12,
- cpurad sends messages to cpuapp bellboard channel 18.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-28 12:21:55 -04:00
Emil Gydesen
cb80ca3a50 doc: Bluetooth: Add sample app for CAP ini/acc in status table
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>
2024-06-28 12:21:37 -04:00
Francois Ramu
9e03abb8cb debug: no UNALIGNED_ACCESS_SUPPORTED for cortex M0 or M0plus
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>
2024-06-28 12:21:18 -04:00
Jukka Rissanen
2abd982040 doc: release-notes-3.7: Add notes for selected network components
Added release notes for these network components:

* DNS/mDNS/LLMNR
* gPTP/PTP
* Sockets
* Capture API
* Virtual interface
* VLAN
* Wi-Fi

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-28 12:21:05 -04:00
Emil Gydesen
1159c2adda Bluetooth: OTS: Add return validation of bt_uuid_create for client
The OTS client did not validate the return value of bt_uuid_create.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 07:50:30 -04:00
Jordan Yates
5b0fb6e406 doc: release-notes: document CMSIS-NN upgrade
Update the version update and link to the changelog.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
08eab876d8 samples: tflite-micro: add REQUIRES_FLOAT_PRINTF
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>
2024-06-28 07:50:12 -04:00
Jordan Yates
3905e8d6be tests: lib: cmsis_nn: add missing filter dimension
Specify the missing filter dimension that was the reason for the v6.0.0
version bump.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
f4d09c9791 modules: cmsis-nn: add *_s4.c sources
Add new sources for 4 bit function variants to build system.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
afdbb3b94b submanifests: update tflite-micro
Update `tflite-micro` to the latest version.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
5abf8aa165 manifest: update cmsis-nn to v6.0.0
Update cmsis-nn to version 6.0.0.
Revision history can be found at:
https://arm-software.github.io/CMSIS-NN/latest/rev_hist.html

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
TOKITA Hiroshi
1bcebbafac tests: subsys: display: cfb: Add CFB tests
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>
2024-06-28 07:21:47 -04:00
TOKITA Hiroshi
83860c2dfd fb: cfb: Add framebuffer deinitialize function
Add the `cfb_framebuffer_deinit` function for deinitializing
the framebuffer.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
TOKITA Hiroshi
d542e75975 fb: cfb: Fix CFB_FONT_MSB_FIRST font rendering
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>
2024-06-28 07:21:47 -04:00
Johann Fischer
06086ce771 drivers: udc_dwc: remove rwup flag
The driver does not implement host_wakeup, remove rwup capability flag.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 07:21:29 -04:00
Nikolay Agishev
5d92abeaec ARCMWDT: Fix cbprintf issue with omitted function prototype
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>
2024-06-28 07:21:11 -04:00
Emil Gydesen
7b0784c1f6 Bluetooth: ASCS: Validate num_ases in CP requests
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>
2024-06-28 07:20:47 -04:00
Jordan Yates
91f8c1aea9 everywhere: replace #if IS_ENABLED() as per docs
Replace `#if IS_ENABLED()` with `#if defined()` as recommended by the
documentation of `IS_ENABLED`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:20:32 -04:00
Cong Nguyen Huu
41418f5266 drivers: nxp_s32_canxl: add CANXL MRU handler
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>
2024-06-28 07:20:20 -04:00