Commit graph

86270 commits

Author SHA1 Message Date
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
Kai Vehmanen 3e4c50b0ef Revert "drivers: intel: ssp: Revise receive FIFO draining"
This reverts commit 97bb67d66c.

The revised FIFO draining seems to cause failures due
to channel shift with Intel MTL platform.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-10-27 12:33:53 -05:00
Tomasz Bursztyka 7b2cb95cd5 tests/x86: Reverting back to old logic
It was simpler, and it worked: it counted the cpu number correctly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-10-27 17:36:44 +01:00
Tomasz Bursztyka f5ce4ddc79 arch/x86: Remove useless legacy ACPI code
ACPI is now being handled through ACPICA.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-10-27 17:36:31 +01:00
Tomasz Bursztyka c294b7d270 lib/acpi: Fix the behavior to fit with how it used to be
z_acpi_get_cpu() used to retrieve the local apic on enabled CPU, where
n was about the n'th enabled CPU, not just the n'th local apic.
The system indeed keeps local apic info also about non-enabled CPU,
and we don't care about these as there is nothing to do about it.

This issue exists on up_squared board for instance, but it's a common
one anyway.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-10-27 17:36:31 +01:00
Maciej Perkowski 72f416f382 scripts: Add workflow for "common" directories in find_tests()
Some tests use a "common" directory to store pieces of code which
are reused by different scenarios. In those cases, no test yaml is
found within such director nor within its parents.
If no test yaml is found in a directory, and the directory is called
common, also look in collocated directories if they have test yamls.
If so, add all those locations to the scope.
E.g. tests/bluetooth/controller/common

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-10-27 09:13:16 -04:00
Maciej Perkowski 9f85001061 scripts: Make workflow of test_plan.py script more robust
The script was not resolving all detected changes uniformly:
find_excludes() could skip or not certain patterns based on
required testing scope. The idea was to not include files
that were already handled by find_test() and find_boards() workflows.
However, only boards and tests folders could be removed but
not samples. This also led to blind spots: changes in some files
were not triggering any tests. E.g. change in a test/common, where
no corresponding yaml can be found by find_tests() which is also
ignored by find_excludes(). In the new workflow a list of resolved
files (for which find_arch(), find_tests() or find_boards()
found scope) is created. Instead of using skip in find_excludes,
files are excluded only if they were resolved.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-10-27 09:13:16 -04:00
Adam Mitchell 2f43b0b696 drivers: flash: Add RDP (readout protection) support for STM32G4x flash
Add support (and tests) for flash readout protection on the STM32G4x series
Signed-off-by: Adam Mitchell <adam.mitchell@brillpower.com>
2023-10-27 12:31:41 +02:00
Adam Mitchell df1897c122 drivers: flash: Add RDP (readout protection) support for STM32G4x flash
Add support for Flash readout protection on the STM32G4x series
Signed-off-by: Adam Mitchell <adam.mitchell@brillpower.com>
2023-10-27 12:31:41 +02:00
Bartosz Bilas 8487aad003 drivers: i2c: i2c_nrfx_twi*: don't print errors in case of transfer failure
Let the caller decide what should be done in case of the transfer failure.
It will reduce the number of error log prints when the i2c scan is
called for the bus where nothing is connected.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-10-27 12:29:29 +02:00
Henrik Brix Andersen 6ddde16bdb drivers: can: add missing documentation to can.h
Add missing doxygen documentation to the can.h header file.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-27 12:28:04 +02:00
Henrik Brix Andersen 2e2de9e5c2 drivers: eeprom: add missing documentation to eeprom.h
Add missing doxygen documentation to the eeprom.h header file.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-27 12:27:31 +02:00
Krzysztof Chruściński 78bf8ebf75 logging: Allow keeping module names in dedicated section
When CONFIG_LOG_FMT_SECTION is enabled then module name strings
are also placed in the dedicated section used for all logging
strings.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-27 11:42:21 +02:00
Krzysztof Chruściński 9470e3d129 logging: Imply strings stripping if dictionary frontend is used
When UART dictionary frontend is used strings can be removed
from the binary.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-27 11:42:21 +02:00
Krzysztof Chruściński 59abf921c1 logging: Add option to remove strings from binary
Add option to remove string literals which are constant and
never touched by the firmware. It can save significant amount
of RO memory.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-27 11:42:21 +02:00
Krzysztof Chruściński f172a1a5ee scripts: logging: dictionary: Handle string stripping
Add support for getting strings from section which is not part
of the binary.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-27 11:42:21 +02:00
Krzysztof Chruscinski dfb3674c4c linker: Add devnull memory for cortex_m and riscv32
Added memory region which is intended to be removed from the final
binary but may be using in byproduct to extract data used by the
host tools (e.g. strings used by logging).

Add devnull region to Cortex-M and RISCV linker scripts.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-27 11:42:21 +02:00
Benjamin Cabé 0fe6c72d40 debug: coredump: guard selection of ADSP memory window backend
Enabling the core dump via memory window backend only makes sense on
Intel ADSP platform wtih memory windows enabled.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-27 10:53:32 +02:00
Benjamin Cabé 9ff60803c4 debug: coredump: logging backend should always select LOG
The DEBUG_COREDUMP_BACKEND_LOGGING option should automatically
select LOG Kconfig instead of just depending on it.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-27 10:53:32 +02:00
Andries Kruithof 8c1513c837 Bluetooth: shell: make behaviour of iso cmd same as bt cmd
When no parameters are given to the 'bt' command it prints
the help message. The 'iso' command responds with 'missing
subcommand'. This commit updates the behaviour of the iso
command so that it behaves the same as the bt command, i.e.
prints a help message

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-27 10:53:25 +02:00