Commit graph

101220 commits

Author SHA1 Message Date
Furkan Akkiz
ac3f4c8dce manifest: Update hal_adi to fix ADC build warnings
Fixed build warnings of ADC for MAX32662 and MAX32672 SoCs on
hal_adi size, this commit fetches it.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-04 21:28:08 +02:00
Anuj Pathak
645beff897 drivers: led: lp5562: reuse engine already linked
Right now "lp5562_led_blink" unconditionally find and assign a engine
that is not executing at the moment. This is an issue, if 3 "led" are
already using an engine. That is a call to "lp5562_led_blink" could
terminate with error, even if the "led" is already using an engine.
This commit fixes this issue by adding a check to see if engine is
linked and reuse it, otherwise assign a free engine.

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-04 21:27:53 +02:00
Bartosz Miller
7f3c08b232 tests: drivers: Allow configurable i2c speed for bme688 test
Configure the I2C test speed with K-config
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-04 21:27:45 +02:00
Anas Nashif
8538c4ae33 sample: uart passthrough: fix filtering and twister file
sample.yml is wrong and was not scanned. Also fix filters in the file so
it can build.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Anas Nashif
bbb63d8aca sample: sip_svc: fix filter and printk formatting
Rename sample.yml and fix build and filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Lucien Zhao
c5dd2c2a84 samples: sensor: mcux_acmp: add case support for RT1180-EVK
Use gpio_ad_01_acmp1_in2 as ACMP1_IN2, test case can be captured
in J45-13.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Lucien Zhao
62e5805c57 drivers: sensor: mcux_acmp: update mcux_acmp drivers
add MCUX_ACMP_HAS_HYSTCTR macro to adapt feature if IP
don't exist HYSTCTR bit

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Lucien Zhao
2680c7d020 dts: arm: nxp: nxp_rt118x: add acmp instances
enable acmp clock in rt118x/soc.c file

add instances and enable clock for rt118x

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Florian Grandel
21481dd31c doc: net: qemu: minor fixes
Adds missing preliminaries and recommends to start persistent commands
in the background.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-04 21:27:20 +02:00
Torsten Rasmussen
5db1f1ae8f cmake: deprecate toolchain_ld_<base|baremetal|cpp> macros
Remove the toolchain_ld_<base|baremetal|cpp> macro as all the macro
handling is now done through the use of linker properties.

Keep support for calling the old macros for out of tree toolchains
which have not been updated to the new property approach.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
5badbfe2a2 cmake: move toolchain_ld_baremetal to linker properties.
Move linker flag setting from toolchain_ld_baremetal() to linker flag
properties as to follow the principle used in previos commits and from
PR#24851.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
9a9e252d16 cmake: linker: move toolchain_ld_<base|cpp> to linker flag property
Transition the linker flag for the toolchain_ld_base and
toolchain_ld_cpp macros to linker flag properties.
This work follows the toolchain abstraction started in PR#24851.

toolchain_ld_base() was intended for base linker flags, but has slowly
become a 'set-any-linker-flag-here' and thus having several
`if(<check>)` or `<func>_ifdef(<check> ...)`.

Move the check to the top-level Zephyr CMakeLists.txt file, so that it
becomes cleaner which part is responsible for setting a value, and then
move the actual value (the linker flag) definition to the linker flag
property location.

It also helps adding support for new linkers, as it becomes clearer
which linker flags Zephyr always expects, for example `base` and
`cpp_base`, as well as those settings which are targeting for a given
purpose, such as linker sort alignment.

It also makes it clearer when those are used, for example in top-level
CMakeLists.txt with CONFIG_LINKER_SORT_BY_ALIGNMENT compared to this
information being buried in a linker support macro.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
d63489195f cmake: support PROPERTY argument on zephyr_link_libraries.
To ease the use of linker flag properties and to simplify the use of
generator expression then an optional PROPERTY argument has been added
to the zephyr_link_libraries() function.

This means a call such as:
zephyr_link_libraries($<TARGET_PROPERTY:linker,<property-name>)
can instead be simplified to:
zephyr_link_libraries(PROPERTY <property-name>)

Thus making intention clearer and keeping the complexity and minimizes
the risk of typos when writing generator expressions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
1728e04b8c cmake: fix check_set_linker_property() function
Fix check_set_linker_property() to correctly handle multiple linker
flags passed on function call.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
22c45c9234 cmake: remove llvm runtime library selection from target_base.cmake
The selection of the runtime library when using LLVM has already been
done in llvm/target.cmake and passed to the toolchain_ld_base() function
through the global TOOLCHAIN_LD_FLAGS setting.

The only reason this haven't been noticed is because of CMake's built-in
symbol de-duplication feature.

Remove the redundant runtime library handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
9bb0140522 cmake: remove the use of PROPERTY_LINKER_SCRIPT_DEFINES
The support of PROPERTY_LINKER_SCRIPT_DEFINES has been broken since
the transition to CMake in 12f8f76165.

The intention was probably to allow users / projects to adjust
PROPERTY_LINKER_SCRIPT_DEFINES by setting a CMake cache variable.

The implementation tests for the CMake variable (local scope or cache)
PROPERTY_LINKER_SCRIPT_DEFINES, but it never uses such CMake variable.

Instead it uses a CMake global property named
PROPERTY_LINKER_SCRIPT_DEFINES. CMake variables and CMake global
properties are two very different things, and therefore the current
implementation has never worked. The fact that no one has never noticed
this flaw, means that the feature has never been used as intended.

Simplify the code by removing the use of the global CMake property and
instead set the value of the property on the linker script
pre-processing invocation.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
048ceb3a64 cmake: toolchain: remove obsolete and unused macros
The macro `toolchain_cc_nostdinc` were made obsolete with PR#24851 and
are no longer invoked.

Remove the macro implementations.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
ce0ab067e6 cmake: cleanup newlib CMakeLists.txt file
Commit 282f77e732f0a4bc859f559bc5a748f953a8140c removed the only place
defining LIBC_INCLUDE_DIR. Remove the corresponding use of
LIBC_INCLUDE_DIR from newlib/CMakeLists.txt as this setting is no longer
being defined anywhere.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Benjamin Cabé
ee77704715 samples: sensor: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 21:26:50 +02:00
Jeppe Odgaard
20fb6b6d24 drivers: sensors: explorir_m: fix uart flush early termination
`explorir_m_uart_flush_until_end` terminates immediately if the read
variable is initially equal to `EXPLORIR_M_MAX_RESPONSE_DELAY` and
`uart_poll_in` does not read anything.

Fix this by only checking the read variable if `uart_poll_in` reads a char.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-09-04 21:26:36 +02:00
Nicolas Pitre
ef30aa8626 arm64: linker: leave app_smem before .data
Commit 87f68b4dfe ("arm64: linker: move data section between rodata
and bss") moved .data up a little too far. Keep app_smem in front of it
otherwise user memory partitions end up in general .data with no user
permissions.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-04 21:25:56 +02:00
Jordan Yates
652839aee0 mgmt: mcumgr: os_mgmt: fix millisecond return
Ensure that leading zeros are present in the milliseconds field,
otherwise a milliseconds count of 35 will appear as x.35, i.e. 350
milliseconds. With this fix, it will appear as x.035.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 07:22:05 -04:00
Attie Grande
e6dc930322 bindesc: Add support for the build version values
This patch adds bindesc support for the build version values for the
kernel and application - BUILD_VERSION and APP_BUILD_VERSION.

The kernel's BUILD_VERSION can be overridden at build time.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2024-09-04 07:03:47 -04:00
Tomasz Moń
aa6319dcfd usb: device_next: msc: Allow user to sort LUNs
Modify USBD_DEFINE_MSC_LUN() to take in separate id by which the LUNs
are sorted. Previously the disk name itself was implicitly used as a
sorting key. This is a breaking change to Experimental API.

Another advantage of splitting the sorting id from disk name is the
ability to use KConfig symbols as disk name. Currently the MMC disk
driver uses KConfig symbol CONFIG_MMC_VOLUME_NAME.

Mark LUN definitions as static const because the LUNs are ending up in
ITERABLE_SECTION_ROM().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-04 07:03:06 -04:00
Karol Lasończyk
e4236be678 tests: cpp: Exclude nRF54L20 platform from cpp98 test
Exclude nRF54L20 platform as Nordic HAL is not compatible
with C++98.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
d66110bb35 boards: Add support for nRF54L20 PDK
Introduce doc and board description.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
76f8f20aa6 modules: hal_nordic: Add support for nRF54L20 SoC
Extend CMakeList and add nrfx_config with L20 peripherals' entries.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
198a005177 soc: Add support for nRF54L20 SoC
Introduce nRF54L20 entries in soc directory.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
f5fd5c06f5 dts: Add support for nRF54L20 SoC
Introduce nRF54L20 description in dts.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Thomas Keller
ae04401e12 doc: rpi_pico fix I2C1 default peripheral mapping
This commit updates the board documentation to match the I2C1 default
peripheral mapping in rpi_pico-pinctrl.dtsi.

Signed-off-by: Thomas Keller <t.tschaler@gmail.com>
2024-09-04 07:01:02 -04:00
Bjarki Arge Andreasen
28b9f55a0a drivers: serial: uart_nrfx_uarte: Patch RX init
The initialization of the UARTE is attempting to handle potential
improper handover from the bootloader. This handling is additional
complexity which should be fixed in the bootloader or whatever
component is failing to deinit the UART properly.

This commit removes the handling of improper handover from the
bootloader, while additionally clearing the ERROR flag when suspending
the UARTE component.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-04 06:55:43 -04:00
Stine Åkredalen
c89bca6f3f Bluetooth: Mesh: Logic fix for recvd unseg msgs
Fixed transport layer logic causing excessive processing of
some unsegmented messages

Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
2024-09-04 06:54:10 -04:00
Jordan Yates
51c0cb9f5c dts: common: nordic: default memory partitioning
Add default memory partitioning for the nRF53 and nRF91 series devices.
As these partitions refer to TF-M and the TF-M layouts cannot be
modified, use the partitioning scheme from TF-M.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:52:31 +02:00
Sebastian Głąb
bd936236c6 tests: drivers: mbox: mbox_error_cases: Fix for BUS FAULT on nrf54l15
mbox_error_cases tests must be run with the nordic-flpr snippet
to prevent bus fault error while accessing VPR registers.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Sebastian Głąb
812ae1e243 tests: drivers: mbox: mbox_error_cases: Enable test on nRF54l15
Add overlay that enables execution of mbox_error_cases on
nrf54l15pdk/nrf54l15/cpuapp.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Sebastian Głąb
06b56c7971 drivers: mbox: Fix error code in Nordic's implementation
According to the official MBOX API documentation available at
https://docs.zephyrproject.org/latest/hardware/peripherals/mbox.html
mbox_sen() shall return
-EMSGSIZE – If the supplied data size is unsupported by the driver.

Fix error code returned by the mbox_send().

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Sebastian Głąb
6e045743f8 tests: drivers: mbox: Add negative tests for MBOX driver
Add negative test cases for the MBOX driver.
Confirm that driver implementation is aligned with
the MBOX API documentation available at
https://docs.zephyrproject.org/latest/hardware/peripherals/mbox.html

Enable test execution on nRF54H20 Application and PPR cores.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Mykyta Poturai
745c9543c6 xen: Make XEN_INTERFACE_VERSION configurable
Add Kconfig option to specify Xen interface version to use. This will
make it easier to switch between different versions of Xen.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-09-04 12:52:16 +02:00
Jordan Yates
08a7808000 zbus: separate clang-format control comments
Add a line of whitespace between `/* clang-format off */` comments and
the first line of doxygen comment blocks. Some intellisense parsers
will combine all sequential comment blocks when providing code context.
This results in the control comment appearing in the help text for
`ZBUS_CHAN_DEFINE`, for example.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:52:01 +02:00
Jordan Yates
1ed77cb50c zbus: remove unneeded const qualifiers
Remove `const` qualifiers on fields in structures that are only created
or instantiated as `const`.

This if primarily for consistency, in the same way that `struct device`
fields and `device->config` struct fields are not additionally marked as
`const`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:52:01 +02:00
Jordan Yates
cbc4100eda i2c: i2c_nrfx_twim: init semaphores in init function
Initialise the semaphores in the init function so that a copy of the
data structure does not need to exist in `.data`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:51:40 +02:00
Jordan Yates
4c15cd119b i2c: i2c_nrfx_twim: move msg_buf to config
This is a constant pointer, there is no need for it to be in the mutable
data struct.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:51:40 +02:00
Bartosz Miller
a49c649b90 tests: drivers: Extend coverage for NRF GRTC timer
Add more test cases for nRF GRTC timer

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-04 12:51:29 +02:00
Andrej Trnkóci
9ac8786bb2 fs: nvs: fix nvs static analysis error
There is asignment from size_t variable to uint8_t variable in
nvs_al_size function that can trigger static analysis error.
The problem is fixed by changing the variable to size_t type
instead of uint8_t.

Signed-off-by: Andrej Trnkóci <andrej.trnkoci@nxp.com>
2024-09-04 12:51:14 +02:00
Benjamin Cabé
66717f17da doc: remove unnecessary heading
The table of contents already has a caption so the "Sections"
heading is effectively redundant.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 12:51:06 +02:00
Benjamin Cabé
06eb2f02b8 doc: shorten descriptions of doc homepage grid items
The descriptions of the homepage grid items were too long and often
repetitive (e.g. there's no need to repeat "Zephyr" in almost every
descriptions). This commit shortens them to aim at having them fit on
two lines, three at most.

Also updated the look&feel slightly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 12:51:06 +02:00
Florian Grandel
48e49fac56 cmake: emu: qemu: pkill monitor_15_4
The IEEE 801.15.4 monitor can be started by a parameter to cmake. This
change removes a TODO to kill the monitor after qemu ends.

The change also re-assigns Ctrl-C to Ctrl-D to ensure that QEMU is not
inadvertently sending SIGINT to the surrounding ninja session (which
would leave the monitor sub-process alive).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-04 12:50:53 +02:00
Jamie McCrae
689d1edee1 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  52e2afc2f809c424b0f337f56059d1dfcc7e6d98

Brings following Zephyr relevant fixes:
  - 52e2afc2 boot_serial: Fix `format` warning
  - dd4d6541 boot_serial: Fix `incompatible-pointer-types` warning
  - 2931f9d7 booutil: swap_scratch: Do not check sectors with
    compression
  - feb9265f bootutil: loader: Add protected TLV size to image size
    check
  - 4d85e29f bootutil: loader: Remove images with conflicting flags
  - 206c7e74 bootutil: loader: Remove encrypted/compressed images
    without support
  - 0c1ddf7e zephyr: Add Kconfig for decompression
  - 91d86b8a bootutil: Add compressed image flags and TLV
  - 2939d305 bootutil: loader: Verify image header before checking
    image
  - dbb5c782 bootutil: loader: Add state to boot_is_header_valid()
    function
  - 6071ceb1 boot: Introduce the MCUBOOT_ENC_BUILTIN_KEY option
  - ab4fb329 bootutil: Fix wrong definition of find_swap_count
  - dc030555 imgtool: Add --non-bootable flag
  - aa1f9560 zephyr: prefix generated header path with `zephyr/`
  - 334d2c28 boot: main: avoid unused build warning
  - c87d41ef boot: zephyr: Fix included header
  - 034f58cb bootutil: Fix missing include
  - e2e1e945 bootutil: Fix swap move max app size calculation
  - 4f1ab9e7 bootutil: Add missing images to get maximum image
    size details
  - eaae6500 zephyr: Add support for automatically calculcating
    max sectors
  - 6fe259b1 boot: Simplify copy loop in boot_copy_region
  - 7e69047b boot: zephyr: add support for frdm-mcxn947
  - 899ade2d boot: zephyr: boards: Add mimxrt1062_fmurt6
    configuration
  - ae27bc77 boot: zephyr: boards: Add common mimxrt1050_evk
    configuration.
  - 6123e916 boot: zephyr: boards: Add mimxrt11xx configurations
  - 3f11286e boot: Remove image_index from boot_encrypt
  - 2a7565b3 bootutil: Move encryption key function to common file
  - 0e5e1a9f Reapply "boot: Add MCUBOOT_HW_KEY support for image
    encryption"
  - ef598b13 imgtool: Fix getpub fails for ed25519 key
  - 8456464c zephyr: Fix issue with sysbuild if something else is
    named mcuboot
  - d09112ac boot: Reduce repeating code in
    boot_decrypt_and_copy_image_to_sram
  - 7f9ac979 boot: Change boot_enc_load to take slot number
    instead of image
  - 7fc3ad3d boot: zephyr: Fix RAM load chain load address
  - 49976dc6 imgtool: Bump cryptography library version
  - 33557352 boot: Move encryption context invalidation to
    boot_enc_drop.
  - 2371c0aa boot: Rename boot_enc_decrypt to boot_decrypt_key
  - 4b9d07dc boot: boot_serial: change logging to debug level
  - 7e3a1cec boot: Add missing boot_enc_init
  - 4da4a72c boot: Remove pointless slot identification
  - 08d2d94c bootutil: Keep image encrypted in scratch area
  - f515bb1c bootutil: Properly retrieve image headers after
    interrupted swap-scratch

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-04 09:59:26 +02:00
Tomi Fontanilles
03751b4553 west.yml: update hal_espressif
Update to a newer version to fix CI when updating MCUboot.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 09:59:26 +02:00
Tomi Fontanilles
8a5a5ec665 modules: trusted-firmware-m: pull in MCUboot fixes
Pull in fixes to update MCUboot.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 09:59:26 +02:00