Commit Graph

86289 Commits

Author SHA1 Message Date
Bjarki Arge Andreasen 03d2671ddd drivers: gnss: Add GNSS dump to log feature
This commit adds dumping of GNSS data and satellites to
the log if CONFIG_GNSS_DUMP_TO_LOG is selected

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen 2a81c22489 drivers: gnss: Add gnss_dump library
This commit adds a library which dumps the contents of the
gnss structures gnss_info, navigation_data, gnss_time and
gnss_satellite as a string.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen 28f5f2d1ed drivers: Add GNSS API public header
This commit adds the public header for the GNSS API, along
with the initial GNSS Kconfig file and an entry in the
common linker file for registered GNSS data callbacks.

A very naive implementation of the GNSS data callback is
provided as well in drivers/gnss/gnss_publish.c

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen ed92612689 data: Add navigation utils header
This commit adds the initial navigation data type and tools
which will lay the foundation to share and process navigation
data between the application and navigation systems like GNSS
and similar triangulation technologies.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Maciej Perkowski 3314b8e0c3 twister: bugfix: Fix infinite loop in test_plan.py script
Commit 72f416f382 added a horizontal
scan for .yaml files when a modification was made in "common" folder.
If yamls were found in such way, the loop ended. However, the
implementation didn't address what happens if such yamls are not found.
This made the script going into an infinite loop. If yamls are not
found next to "common", the script should proceed as before, i.e. go
to the directory above an start looking there.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-10-30 10:54:57 -04:00
Krzysztof Chruściński b1c207b257 logging: Use optimization for simple messages only in kernel
Optimized version of logging for simple messages can work
only in kernel space. Do not use it in user space.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-30 10:15:49 -04:00
Krzysztof Chruściński a33fff38ae tests: logging: log_benchmark: Fix integration platform
Userspace test was using native_posix which does not support
userspace. Change to qemu_x86.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-30 10:15:49 -04:00
Andrei Emeltchenko c243991000 tests: work_queue: Change TC_PRINT to LOG_DBG
There are many TC_PRINT()'s in the work_queue test and it make sense
to change them to LOG_DBG() which are disabled by default. Other issue
is that some of TC_PRINT() are inside works for which execution time
is measured.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-10-30 09:29:25 -04:00
Flavio Ceolin a36c016dff kernel: mmu: Fix possible null de-reference
virt_page_phys_get can be called with phy parameter NULL when
the intention is just checking if a virtual address is mapped.

This function is generally overwritten by a an arch API that checks if
phys is null before using it but this default implementation doesn't.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 09:23:23 -04:00
Lukasz Mrugala 471cff50e8 scripts: tests: twister: Jobserver tests
Jobserver module was not covered by unit tests.
This change brings its coverage to 100%.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-30 08:28:02 -04:00
Lukasz Mrugala 3c7968172e scripts: tests: twister: Add error testing
Errors did not have their dedicated test file.
This change adds it to the repo and
checks the only non-def statement there.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-30 08:27:43 -04:00
Benjamin Cabé 26d7c61370 doc: samples: Show related code samples contents by default
Add required class so that sphinx-togglebutton admonition is expanded by
default.

Also remove sphinx-immaterial code that should not be there.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-30 12:27:00 +01:00
Benjamin Cabé cf1fdc3ea8 doc: samples: Use definition list for code samples
Using an UL with "manually" formatted text was probably an oversight.
Show related samples as a "definition list", with sample name as the
"term" and the description as the "definition".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-30 12:27:00 +01:00
Benedikt Schmidt be8408cbac usb: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt c5b252d8f1 testssuite: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 24de378986 portability: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt d7f0da1c78 net: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt aa25e212d1 tests: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 6202459d9f samples: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt a03f1010b8 drivers: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 191865b51c drivers: sensor: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt ba49cb81f1 drivers: modem: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 9eb993c063 drivers: ieee802154: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt fbef0edb99 drivers: ethernet: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 9247f0e07b drivers: bluetooth: fix thread function signatures
Fix thread function signatures to avoid a stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt c533924370 drivers: can: fix thread function signatures
Fix thread function signatures to avoid a stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 49ce054200 drivers: adc: fix thread function signatures
Fix the data acquisition thread function signatures to avoid a stack
corruption on thread exit.
Fixes #62637

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Alberto Escolar Piedras e934e49aa9 tests bsim cis: Fix sim_id collision
This test was reusing the sim_id from an l2cap test,
which was colliding with the corresponding l2cap test
when they were run in parallel.
Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-30 11:35:45 +01:00
Alberto Escolar Piedras 55c59e041e Bluetooth: Controller: Avoid division by 0 with BT_CTLR_THROUGHPUT
With very fast HCI interfaces (for ex. in the simulated nrf5340)
the tx_rate calculation can do a division by 0
(if to packets are enqueued in the same 32KHz clock period).
Let's avoid it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-30 10:49:51 +01:00
Deepti Deshatty 1816775466 drivers: flash: provide api to reset the flash registers
changes enable flash driver to provide api interface to send reset memory
spi command to the spi flash. The reset memory command would bring the
spi flash to its default power-on state and loose all the volatile register
settings.
Flash reset is needed when more than one controller access the flash chip
in a shared mode.

Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com>
2023-10-30 09:27:42 +01:00
Ping Wang f0728ce0aa samples: Bluetooth: Add LC3 to broadcast audio samples
The broadcast audio samples (broadcast_audio_sink
and broadcast_audio_source) are sending mock data,
the apps are improved by using the LC3 module as
the unicast audio samples do.

Signed-off-by: Ping Wang <pinw@demant.com>
2023-10-30 09:27:17 +01:00
Fabio Baltieri 2dcb1280a5 ci: compliance: fetch only the last revision and skip tags
Add some west update flags to do a shallow fetch of the modules and
skip the tags. That data is not needed anyway, should make the
compliance check initialization a bit faster.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-30 09:26:56 +01:00
Robert Lubos 08d1bb2c92 tests: net: checksum_offload: Cleanup and fixes for the test suite
When working on new test cases for checksum_offload test suite it turned
out that some existing test cases were already broken and not testing
what expected. This commit fixes the broken functionality:
  * Despite having two separate interfaces for offloaded and
    non-offloaded checksum scenario, all packets ended up in a single
    interface anyway due to src address matching. Therefore use
    different destination address, depending on tests.
  * Add separate semaphores for offloaded and non-offloaded case, to
    ensure that the packet ended up on the correct interface.
  * The packet loopback in RX cases was broken, the LL address, IP
    address and UDP port swap written data in wrong places.
  * The receive path was not tested in the offloaded case.

Additionally, do a small cleanup before adding more tests:
  * Fix net_context leak.
  * Configure IPv6 neighbor once, during setup.
  * Add before function to cleanup the flags before tests execute.
  * Split tests into separate test cases, as they're not really
    dependent on each other.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-10-30 09:26:19 +01:00
Alberto Escolar Piedras b12785f86d tests/bsim/bt bis: Do not call into controller in split builds
Use the HCI layer to update the channel map instead of calling directly
into the controller.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/64441

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-30 09:26:06 +01:00
Benjamin Cabé 9e0c46f81b doc: fix Doxygen light theme
As per Doxygen Awesome documentation:
"HTML_COLORSTYLE must be set to LIGHT since Doxygen 1.9.5!"

Fixes #64505

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-30 09:25:48 +01:00
Henrik Brix Andersen eddfba487d doc: can: move the documention for high-level protocols to connectivity
Move the documentation for high-level CAN protocols (for now only covering
ISO-TP) from the peripherals section to the connectivity section.

This matches the layout in code, where the CAN controllers are under the
drivers/can directory and the protocols are under the subsys/canbus/
directory.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-30 09:25:40 +01:00
Fabio Baltieri bc43e890fd doc: drivers: add a paragraph mentioning the initlevels target
Add a paragraph mentioning the initlevels target for inspecting the
DEVICE_DEFINE and SYS_INIT sequence.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-28 23:19:59 +02:00
Andrzej Głąbek dbf385bb08 boards: bl653_dvk: Fix incorrect definition of cs-gpios in spi1
`cs-gpios = <&gpio1 23 0>;` is incorrect, since pin P1.23 does not even
exist in nRF52833. According to schematic, it should be P0.23 and this
CS line should be configured as active low.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-10-28 23:16:53 +02:00
Carles Cufi 09f6800d1f actions: manifest: Update the revision of the manifest action
Pull in https://github.com/zephyrproject-rtos/action-manifest/pull/10.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-10-28 16:22:28 -04:00
Flavio Ceolin e7340282a7 west.yml: update hal_intel
Update hal_intel to include a power management fix.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-27 13:41:04 -05:00
Iuliana Prodan b2eade6bcb west: update open-amp repo
Update open-amp repository with new sha.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-10-27 13:39:31 -05:00
Tom Keddie ad6d8f2811 boards/arm/serpente: fix system clock rate
Serpente schematic has the same clocking arrangement as
boards/arm/adafruit_trinket_m0.  This fix copies the clocking
config from the trinket.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/64470

Signed-off-by: Tom Keddie <github@bronwenandtom.com>
2023-10-27 13:37:32 -05:00
Lukasz Mrugala 2235a8253b scripts: tests: twister: runner test expansion
Creates a few dozen new tests that cover every runner.py method.
99% coverage (All statements save for one) is achieved.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-27 13:36:17 -05:00
Grzegorz Chwierut fffe0b9fad twister: pytest: Parametrize scope of the dut fixture
Added pytest_dut_scope keyword under harness_config section.
New keyword is used to determine the scope of dut and shell
fixtures in pytest-twister-harness plugin.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-10-27 13:35:14 -05:00
Flavio Ceolin e57e7f28a9 Revert "Revert "modules: tinycrypt: Options only when module is available""
This reverts commit 572491ab95.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-27 13:33:30 -05:00
Flavio Ceolin a6c3230b74 unittest: Generate symbol for existent modules
Generate ZEPHYR_{MODULE_NAME}_MODULE for existent modules
for unittests as well since they may be using Zephyr modules.

Fixes: 64348

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-27 13:33:30 -05:00
Henrik Brix Andersen 49f0c9f221 samples: modules: canopennode: suggest using manifest.project-filter
Suggest users to use "west config manifest.project-filter +canopennode"
instead of "west config manifest.group-filter +optional" in the sample
documentation to avoid pulling in unrelated, optional modules.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-27 13:30:50 -05:00
Dawid Niedzwiecki 0aed42f2ee mgmt: ec_host_cmd: improve handling buffer sizes
Add the len_max rx structure member to indicate maximum number of bytes
possible to receive. It is needed to send information about our protocol
parameters to host.

Also, limit the maximum size of request/responses for backends that uses
buffers provided by the handler.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-10-27 13:26:00 -05:00
Andriy Gelman d0961756a6 drivers: watchdog: Add xmc4xxx support
Adds watchdog support for Infineon xmc4xxx MCUs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-27 12:58:07 -05:00
Kai Vehmanen 460c2167e4 Revert "drivers: intel: ssp: Correct FIFO depth value for CAVS25 platforms"
This reverts commit d75127caa4.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-10-27 12:33:53 -05:00