is_area_readable is used for SOCS other than LPC55XXX chips, not just
chips other than LPC55S36. Change the condition which elides this code
to avoid a GCC 14.3 warning.
Signed-off-by: Keith Packard <keithp@keithp.com>
In the previous code, strnlen could have returned WIFI_SSID_MAX_LEN, and
the following statement ensuring NUL termination would have written one
past the end of the array.
Replace this with code that ensures a NUL termination within the bounds
of the array and then use strlen to compute the length.
Signed-off-by: Keith Packard <keithp@keithp.com>
We want the stack trace to show the correct nesting of functions,
so we need to prevent the compiler from in-lining functions or
performing tail-call optimizations.
Add __noinline to prevent inlining. Add another printf in each
function to avoid tail calls.
Signed-off-by: Keith Packard <keithp@keithp.com>
GCC 14.3 is not happy when this variable is left uninitialized, although
we don't actually care about the contents, just the address.
Signed-off-by: Keith Packard <keithp@keithp.com>
SUBALIGN forces alignment to the specified value, even if the object
requires stricter alignment. This causes mis-aligned access when accessing
the resulting value.
Signed-off-by: Keith Packard <keithp@keithp.com>
Most uses of this macro should *not* include SUBALIGN as that can reduce
the alignment requirement for data and cause unaligned access faults in
the processor. Leave support for this in place in case there are
still uses for it.
Signed-off-by: Keith Packard <keithp@keithp.com>
SUBALIGN forces alignment of input sections to the specified value, even
if they require stricter alignment.
Signed-off-by: Keith Packard <keithp@keithp.com>
inference_process.hpp depended on the C library implicitly including
stdint.h through some path, which is not defined behavior. Explicitly
include <cstdint> to ensure that uint8_t is defined.
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit adds names to Kconfig choice sysmbols. This allows for their
selection from Kconfig, e.g.:
choice TRACING_FORMAT_CHOICE
default TRACING_TEST if CONFIG_FOO
default TRACING_CTF if CONFIG_BAR
endchoice
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The 50 ms TX mutex timeouts introduced in commit b0a0feb cause
dropped messages when used with the shell log backend. This
commit makes time timeout configurable using the
CONFIG_SHELL_TX_TIMEOUT_MS Kconfig option and makes the
default timeout longer when shell log backend is enabled.
Link: #90215
Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
The bt_le_ext_adv_info struct has been extended to also
contain the advertising and periodic advertising states.
Additionally, the function verifies the input to avoid
NULL pointer access, and the addr field is more
properly documented.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
See Discussion https://github.com/zephyrproject-rtos/zephyr/discussions/83659
for information about the purpose of this change.
Modifies run actions of hierarchical state machines
to return a value indicating if the event was handled
by the run action or should be propagated up to the
parent run action. Flat state machines are not affected,
and their run action returns void.
smf_set_handled() has been removed and replaced by
this return value. smf_set_state() will not propagate
events regardless of the return value as the transition
is considered to have occurred.
Documentation, tests, samples, has been updated.
USB-C and hawkBit use SMF and have been updated to use
the new return codes.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Apply clang-format to USB-C in preparation for code changes
No code is changed, only formatting.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Implement a check in the CI pipeline to enforce
that property names in device tree bindings do
not contain underscores.
Signed-off-by: James Roy <rruuaanng@outlook.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Disable tracing on exit and do not discard data immediately after
enabling tracing. The length of the data depends on the timings of the
host and targets and may simply be an arbitrary length that does not fit
any trace format or frame.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Not all the hooks for k_events, k_lifo, k_fifo, k_msgq, and k_queue are
implemented in tracing_test.h and tracing_test.c and therefore the
testing format cannot be used with the new USB device stack.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When the user presses Ctrl+c to exit the infinite capturing loop, ensure
that the cleanup funciton is always executed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit prevents the hardware from generating an unexpected
target slave address match ISR by the following change:
1. Enable the New Match Interrupt Enable bit (NMINTEN) only when
necessary.
2. Explicitly clear all SMBnADDRx registers because they are not
cleared when the I2C hardware is disabled. It will cause the
asynchrinization between SMBnADDRx and registered_target_mask if the
system jumps from the RO image to the RW image.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Add gpio support for STM32MP257F-EV1 board.
Add the orange (&led0) LED to the device tree and enable GPIOJ.
Add the user button USER2 to the device tree and enable GPIOG.
This step allows building and debugging the blinky and button sample
applications.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add GPIO A-K nodes to the device tree for STM32MP2 SoC.
Note that GPIOs are disabled by default in the STM32MP2 SoC.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Remove gpio clock management from the GPIO driver when running on the
cortex-m33 on the mp2 and gpio clocks are managed by the cortex-A, being
the resource manager, allowed by the Resource Isolation Framework (RIF).
Also add a specific binding for the mp2 gpio to make clock property
optional.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add the stm32mp2 clock driver to the clock_control subsystem. The driver
is a reduced version of the generic stm32 clock driver.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Introduce DeviceTree binding for the STM32MP2 RCC clock controller,
enabling support for STM32MP2-specific clock configuration in Zephyr.
Update Kconfig.stm32 to add a dependency on STM32MP2 configuration,
allowing the use of STM32 LL RCC features when targeting STM32MP2
devices.
Add header for STM32MP2 per peripheral clock definitions.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add support for STM32MP2 series in the hwinfo driver.
The STM32MP2 series uses the HAL functions since it doesn't have a
ll_utils.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add the mp2 exti2 dts to the dtsi file.
Add mp2 exti hal and ll function calls with EXTI2 instance. We use the
EXTI2 instance because it contains the GPIO interrupts in the non-secure
context. (We are trying to build the blinky sample as a first milestone)
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Replace the use of `DT_NODELABEL(exti)` which depends on the node label
with the defined EXTI_NODE macro using the instance with the
`st_stm32_exti` compatible.
Since both macros point to the same node, this change doesn't affect
the code logic, but makes it independent of the node label, in
preparation for the addition of the STM32MP2 exti nodes.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Introduce initial board support for the STM32MP257F-EV1. This includes:
- Board metadata (board.yml, stm32mp257f_ev1.yaml)
- Base software configuration (Kconfig.stm32mp257f_ev1)
- CMake build integration (board.cmake)
- Default configuration (stm32mp257f_ev1_stm32mp257fxx_m33_defconfig)
- Minimal device tree (stm32mp257f_ev1_stm32mp257fxx_m33.dts)
- Initial documentation and image for the stm32mp257f_ev1 board.
- OpenOCD configuration files for debugging support.
This enables the STM32MP257F-EV1 board to build and debug a hello world
sample.
Note that other necessary openocd configuration files are added to the
zephyr sdk directory and can be found in the stm-openocd repository[1].
[1]:https://github.com/STMicroelectronics/device-stm-openocd/tree/main
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add a linker script for the stm32mp2x soc series. It includes the
standard arm cortex-m linker and adds standard zephyr relocation
sections.
Replace the rom_start section name with .isr_vectors in the linker
script. This is necessary for the zephyr firmware to be started by the
remote proc driver which expects the section containing the vector table
to be named .isr_vectors.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add initial soc support for the stm32mp2x series, including
initial Kconfig entries and default configuration files.
This enables Zephyr to recognize and build for the stm32mp2x series,
taking the stm32mp257f_ev1 as a baseline.
Includes:
- Kconfig and defconfig files for SoC selection and defaults
- soc.h for hal headers
- CMakeLists.txt for build system integration
- soc.yml update to register the new SoC
System Clock is configured statically from DTS. So no initialization
hook or soc.c needed.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add the initial device tree source include (dtsi) files for the
stm32mp25 series boards, covering non-secure configuration for zephyr on
the Cortex-M33 core.
These files provide the basic hardware description, including CPU
(Cortex-M33), memory, RCC clock controller and NVIC interrupt
controller.
Key features:
- Set flash and RAM addresses to DDR memory.
- Adjust RCC peripheral address for non-secure context.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Adds a new abstract struct for unicast group that is
specific for CAP. The difference between this and the BAP
unicast group, is that the parameters are CAP streams and
thus ensuring that the streams in the group adhere to the
additional requirements that CAP has on top of BAP.
This also adds foreach functions for both CAP and BAP
to allow users to iterate on the streams in the
abstract groups.
Various samples, modules and tests have been updated
to use the CAP struct and API.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use && instead of & in channel validation logic to ensure channel is
either CHAN_IR or CHAN_LIGHT.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add one config file for IW610 chip, as it has different net related
settings and thread priority settings from other hosted MCU, due to
Wi-Fi chip capability difference.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>