Commit Graph

111926 Commits

Author SHA1 Message Date
The Nguyen
710fb596df drivers: watchdog: initial support for watchdog driver on Renesas RA family
First commit to add support for Renesas RA watchdog driver

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-03-18 08:26:40 +01:00
The Nguyen
b72b271682 soc: renesas: ra: allocate default NMI handler for Renesas RA SoC
Allocate NMI_Handler as default NMI handler for Renesas RA family

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-03-18 08:26:40 +01:00
Declan Snyder
9cc3676c75 boards: nxp: convert board sys_inits to hooks
Convert the nxp boards that have general init functions
as SYS_INITs to use board_early_init_hook instead.

Also standardize selection of CONFIG_BOARD_EARLY_INIT_HOOK in the
Kconfig file across NXP boards.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-18 08:25:06 +01:00
Tom Hughes
481a3c77c9 tests: lib: cmsis_dsp: Fix -Wsometimes-uninitialized warning
Building with clang warns:

tests/lib/cmsis_dsp/distance/src/u32.c:82:3: error: variable 'val' is
used uninitialized whenever switch default is taken
[-Werror,-Wsometimes-uninitialized]
                default:
                ^~~~~~~
tests/lib/cmsis_dsp/distance/src/u32.c:87:19: note: uninitialized use
occurs here
                output[index] = val;
                                ^~~
tests/lib/cmsis_dsp/distance/src/u32.c:47:16: note: initialize the
variable 'val' to silence this warning
                float32_t val;
                             ^
                              = 0.0

Hitting the default switch will assert, so this won't cause any problems
as written, but it doesn't hurt to initialize the variable.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-18 08:24:56 +01:00
Benjamin Cabé
e34270519e tests: kernel: adopt new count_bits util function
Adopt new count_bits helper from util.h and avoid
having conflicting definition

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-18 08:24:16 +01:00
Benjamin Cabé
17c42550f3 drivers: adc: adopt new count_bits util function
Adopt new count_bits helper from util.h and avoid
having conflicting definition

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-18 08:24:16 +01:00
Emil Gydesen
ee335399c1 Bluetooth: Audio: Use generic count_bits to count bits
Instead of re-implementing or assuming that POPCOUNT is available
we now use the generic function from Zephyr.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-17 21:03:56 -04:00
Emil Gydesen
d05de070db include: util: Add generic function to count bits set in a value
Adds a generic function that will count the number of bits set in
a value.

It uses POPCOUNT (e.g. __builtin_popcount for GCC) if available,
or else it will use Brian Kernighan’s Algorithm to count bits.

POPCOUNT will likely always support unsigned ints, but the function
was implemented to use it with uint8_t for the sake of simplicity
and compatibility with Brian Kernighan’s Algorithm.

A generic solution was chosen rather than a macro/function per
type (e.g. uint8_t, uint16_t, etc.) as that is easier to maintain
and also supports array types (e.g. counting the number of bits
in 128 or 256 octet arrays).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-17 21:03:56 -04:00
Jan Gałda
4b622a256e ci: Use Ubuntu 24 in GH actions
Ubuntu 20.04 will be deprecated soon

Signed-off-by: Jan Gałda <jan.galda@nordicsemi.no>
2025-03-17 21:02:38 -04:00
Hake Huang
1383d5cadd tests: ztest: rd_rw612_bga: add ZTEST_NO_YIELD
Add ZTEST_NO_YIELD to keep test case output consist.
The log may missing, as the soc goes to low power.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-03-17 21:02:10 -04:00
Benjamin Cabé
9279bddc2d boards: arduino: use revisions for Arduino Uno R4 Minima and WiFi
Use revisions instead of making these two different boards.
Deprecate old board names

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-17 21:01:57 -04:00
Pete Johanson
0e8ea4d12a boards: common: Enable debugging MAX32 with pico + OpenOCD
Explicitly set the OpenOCD target-handle so `west debug` will work
as expected on MAX32 targets using a supported OpenOCD version.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-03-17 21:01:41 -04:00
Pete Johanson
1c05f2121c west: runners: openocd: Handle ADI OpenOCD fork version format
The ADI fork of OpenOCD prints a modified version line; adjusting the
regex to account for that different format when checking the OpenOCD
version.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-03-17 21:01:41 -04:00
Derek Snell
3598c413ed doc: boards: nxp: Add footer to board doc pages
Adds common footer to NXP boards.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-03-17 21:00:46 -04:00
Scott Worley
beab500c42 soc: microchip: mec5: Disable PM in mec174x, mec175x, and mech172x
We disable power management by removing select HAS_PM. At this time
these new SoC do not have any power management code. With HAS_PM
selected the zephyr test runner will choose PM tests which fail to
build.  PM support will be enabled in the future once we decide
which of the many Zephyr PM implementations we will support.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2025-03-17 20:58:52 -04:00
Benjamin Cabé
e808ccf013 ci: pin GitHub Actions to SHAs
This commit updates all GitHub Actions workflows to use specific
SHAs for the actions when they're not GitHub owned (`actions/*`)
instead of using tag-based versioning since tags are mutable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-17 20:58:39 -04:00
Alex Fabre
ef9548355e net: lladdr: add default case to switch
This commit only eliminates warning message raised by GCC when option
'-Wswitch-default' is used.

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2025-03-17 20:05:09 +01:00
Benjamin Cabé
258b89bd63 doc: _extensions: handle custom bindings in board catalog
Boards might have local bindings for which generating links using the
dtcompatible role doesn't work -- update the code accordingly so that
we can still provide a description of these custom bindings in the table
of supported features (but with no hyperlink).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-17 20:04:10 +01:00
Henrik Brix Andersen
d6d0c1c4cd soc: neorv32: only allow reading frequency at runtime with a system clock
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME depends on
CONFIG_SYS_CLOCK_EXISTS, so CONFIG_SOC_NEORV32_READ_FREQUENCY_AT_RUNTIME
needs to depend on CONFIG_SYS_CLOCK_EXISTS for selecting it.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-03-17 20:01:31 +01:00
Andrei-Edward Popa
b1833e8588 boards: wch: add support for ch32v003f4p6 development board
Added support for the CH32V003F4P6 Development Board, which
features QingKe RISC-V2A MCU.

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2025-03-17 20:01:20 +01:00
Peter Mitsis
0a7fde2afd arch: x86: Restrict direct IPI support
It has been discovered that direct IPI support does not work
correctly when CONFIG_X2APIC is enabled. Until that can be
fixed, restrict this feature on x86 to platforms that do not
enable CONFIG_X2APIC.

Fixes #87046

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-03-17 20:01:09 +01:00
Emilio Benavente
fc1a65d162 boards: nxp: frdm_mcxw72: Add Button Support
Add Button Support for frdm_mcxw72 and mcxw72_evk.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-03-17 20:00:59 +01:00
Vinayak Kariappa Chettimada
0a4480ce61 Bluetooth: Controller: Fix connection update interval_us variables
Fix connection update microsecond interval variable data
type, to use 32-bit so that a value upto 2000 seconds, i.e.
4 seconds interval and 499 peripheral latency can be stored.

Regression in commit abfe5f17a9 ("Bluetooth: Controller:
1 ms connection").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-03-17 20:00:42 +01:00
Emilio Benavente
2df6b7fd2d boards: nxp: frdm_rw612: Added Button Support
Updated dts to add Button Support. SW2

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-03-17 20:00:09 +01:00
Bartlomiej Buczek
c08edf7a72 samples: boards: nrf: system_off: Print reset reason.
Add printing reset reason at the beginning of the sample. Makes it easier
to determine if sample correctly wakes up from LP mode.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2025-03-17 19:59:15 +01:00
James Roy
394c78538f doc: Add a new migration guide entry to DAI
Add the following property renaming entries to
the migration:

* dai_id
* afe_name
* agent_disable
* ch_num
* mono_invert
* quad_ch
* int_odd

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-03-17 19:58:53 +01:00
James Roy
17bf487da5 dts: bindings: dai: Change the property names in the DTS
Rename the following properties in bindings and DTS
to implement RFC-53506:

-- dai_id =>dai-id
-- afe_name => afe-name
-- agent_disable => agent-disable
-- ch_num => ch-num
-- mono_invert => mono-invert
-- quad_ch => quad-ch
-- int_odd => int-odd

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-03-17 19:58:53 +01:00
Ole Morten Haaland
160ae23cd6 drivers: ethernet: stm32: Allow disabling carrier checking
On Zephyr devices that has an Ethernet switch IC with the Zephyr device
connected to the CPU port, there aren't necessarilly any register to
check the link state on that port. If the check is kept on such devices,
Zephyr will believe the link disappears
CONFIG_ETH_STM32_CARRIER_CHECK_RX_IDLE_TIMEOUT_MS after last message was
received, until a new message is received. If the application tries to
send data while the link is considered gone, sending returns an error,
sometimes indicating that the interface is down.

It also seems conceptually meaningless to try determining link state on
such devices, since as long as both the microcontroller and the switch
IC is powered, the link should always be up.

This commit therefore introduces a new Kconfig to allow disabling the
entire checking of link state, so that on devices where there is no
relevant PHY register to read, the check can be disabled.

Signed-off-by: Ole Morten Haaland <omh@ixys.no>
2025-03-17 19:58:42 +01:00
Luca Burelli
a6584d5b2b llext: add test for section and symbol alignment
Add a test case for the alignment support in loadable extensions. This
test case creates a set of constants with specific alignment requirements
and verifies that they are placed in memory as expected.

Fix the detached section test to use a more standard syntax for the
section attribute, avoiding issues with different toolchains.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
959f1b352d llext: support alignment requirements for sections
This patch adds support for alignment requirements for sections in the
loader. The alignment requirements are taken from the ELF file and
checked when the section is mapped to a memory region and when the
region is copied to memory (or directly used from the ELF buffer).

Supporting a larger alignment requirement than the region's current
alignment is done by adjusting the region's start address. This needs
care to avoid detecting false overlaps with other regions and to ensure
that the region address and size reported by the inspection APIs are
correct. The extra offset needed to re-adjust these values is stored in
the 'sh_info' field of the region descriptor.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
1b48f74346 llext: avoid redundant 'ldr_parm' checks
Since commit 0aa6b1c9de, the 'ldr_parm' pointer is guaranteed to be
valid inside all the functions of the llext_load() call tree.

This commit fixes the only exception of llext_copy_strings(), which was
not passed the 'ldr_parm' pointer, and remove the redundant checks.

No functional change is intended by this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
c0c8f778f7 llext: refactor llext_copy_region()
This commit adjusts the logic of the LLEXT memory allocation routine by:

 * defining 'align' and 'alloc' variables once and updating them in the
   following code;

 * swapping the condition, converting it to an 'if(IS_ENABLED(...))' and
   using a direct calculation for the size to make the code easier to
   read;

 * updating and extending a few comments.

No functional change is intended.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
219cde6621 llext: avoid direct llext_string() usage
Since 3466dab804 the generic llext_symbol_name() function abstracts
the use of llext_string() for (non-section) symbols. Define a similar
llext_section_name() function and replace current occurrences of
llext_string() with the proper abstraction.

By extending llext_symbol_name(), this commit also allows to print the
correct name of sections that are referred to by a symbol.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
79a9ff0264 llext: (cosmetic) cleaner region overlap checks
Rewrite the overlap checks in llext_map_sections() to use a pair of
macros to calculate the top and bottom of a region. This makes the
code more readable and less error-prone.

No functional change is introduced in this commit apart from a log
message format change.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
8f9ab18ce2 llext: (cosmetic) log uniformity cleanups
Use the more compact %#x format for printing out hexadecimal values in
the LLEXT subsystem. This also uses a clearer wording for the
llext_link() log message that avoids repeating information.

No functional change is introduced by this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
111d7c3754 llext: (cosmetic) rename llext_copy_section() to llext_copy_region()
llext_copy_section() is a misnomer, as it is copying a region of memory,
not a section. Rename it to llext_copy_region() and use 'region' in the
internal variables to better reflect their purpose.

No functional change is introduced in this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
4b34163faa llext: (cosmetic) llext_map_sections() cleanups
Add a 'continue' statement when the first section of a region is
detected, to avoid unnecessary indentation.

No functional change is introduced in this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Benjamin Cabé
05c3775fa9 doc: boards: renesas: fix Sphinx directive typo
Remove a stray space in zephyr:board-supported-hw Sphinx directive

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-17 16:25:49 +01:00
Alberto Escolar Piedras
1dab77b49f Bluetooth: Host: ATT: Fix build warning with clang
Fix the following warning
att.c:734:3: warning: label followed by a declaration is a C23 extension
[-Wc23-extensions]
  734 |                 k_tid_t current_thread = k_current_get();
      |                 ^
By wrapping that code as a compound statement

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-17 16:25:33 +01:00
Jamie McCrae
ed1faa262a west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  c8470fb145f8aff92696d05396fb77c3b8068b32

Brings following Zephyr relevant fixes:

  - 2f294d1f zephyr: Use flash_area_flatten in
    bs_custom_storage_erase
  - 2346d69c zephyr: Add support for devices without erase and
    reduced erases
  - 2a2b562b bootutil: Add support for devices without erase and
    reduced erases
  - 1ead4a67 boot: zephyr: kconfig: Remove superflous default n
    lines
  - e5d8640c zephyr: Add missing selection for allowed SHA
    algorithms
  - f523c60d zephyr: Fix ED25519 compilation with mbedTLS
  - 0ba80ffb zephyr: Prevent selecting MBEDTLS_ASN1_PARSE_C when
    not needed
  - ec86244a zephyr: Do not compile ASN1 code when bypassed
  - a01ca4cf bootutil: Fix ASN1 bypass not building
  - 4535ad98 boot: Additional flash_area_open removals
  - c0bb1337 boot: zephyr: boards: Add frdm-mcxn236 configuration

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-03-17 16:25:29 +01:00
Jukka Rissanen
152a03b62c doc: net: Add link address change info to migration guide
Add information about "struct net_linkaddr" changes to 4.2
migration guide to help the developers to handle issues if
they access the net_linkaddr struct fields directly in their
code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
Jukka Rissanen
ac3cb9dac0 net: Change the net_linkaddr struct to not use pointers
Previously the net_linkaddr struct had pointers to the link address.
This is error prone and difficult to handle if cloning the packet as
those pointers can point to wrong place. Mitigate this issue by
allocating the space for link address in net_linkaddr struct. This will
increase the size of the net_pkt by 4 octets for IEEE 802.15.4 where the
link address length is 8, but there no increase in size if link address
is 6 bytes like in Ethernet/Wi-Fi.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
Jukka Rissanen
fedd815c1e tests: net: utils: Verify src and dst link addresses
Make sure that source and destination link addresses are correct
after cloning and pulling net_pkt.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
Sudan Landge
06847b5801 modules: tf-m: fix Ethos-U Cmake warnings
This is to fix the below compiler warning from TF-M builds
   that don't use the Ethos-U driver.
```
CMake Warning:
  Manually-specified variables were not used by the project:

    ETHOS_DRIVER_PATH
```

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-03-17 16:25:12 +01:00
Lars-Ove Karlsson
413c06b1ea arch: arm: Replaced __volatile__ with volatile
IAR doesn't support the __volatile__ keyword, and since the
toolchain.h isn't included by these arm-specific files and
other arm-specific files already uses volatile, I've made
them all use volatile.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2025-03-17 16:24:51 +01:00
TOKITA Hiroshi
a54d4ac83d docs: migration-guide-4.2: Add note about Renesas RA4M1 migration
The Renesas RA4M1 has moved to an FSP-based implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-17 16:24:42 +01:00
TOKITA Hiroshi
cbcf36e1a7 dts: arm: renesas: ra: Remove old R7FA4M1AB3CFM configurations
Due to historical reasons, there were two implementations of
R7FA4M1AB3CFM. However, the migration has been completed,
so the old one is now being removed.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-17 16:24:42 +01:00
TOKITA Hiroshi
1ef5dfce63 boards: Migrate Renesas RA4M1 to the new configuration
Migrate to the new GPIO and Interrupt drivers based on FSP.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-17 16:24:42 +01:00
TOKITA Hiroshi
b313342696 dts: arm: renesas: ra: Reorganize RA4M1 files
Extract common parts from `dts/arm/renesas/ra/ra4/r7fa4m1ab3cfp.dtsi`
to support R7FA4M1AB3CFM.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-17 16:24:42 +01:00
Vinayak Kariappa Chettimada
64ea1b8696 tests: bsim: Bluetooth: broadcast_audio_source interleaved/sequential
Test broadcast audio source sample in interleaved and
sequential packing.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-03-17 16:24:33 +01:00