Commit graph

24663 commits

Author SHA1 Message Date
raiden00pl
28b1b65e13 arch/arm/stm32f3/stm32f33xxx_pinmap.h: fix compilation
fix compilation error

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-10 22:03:20 +08:00
raiden00pl
859e61df60 arch/nrf91: fix broken modem initialization
fix broken modem initialization for nrf91

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-10 21:40:32 +08:00
lccosy
c6e36a4a8b arch/arm/gd32f4: fix NULL pointer dereference in arm_earlyserialinit.
Add NULL check for g_uart_devs[i] before accessing ->priv in
arm_earlyserialinit() loop. When a USART is not enabled in defconfig,
g_uart_devs[i] is NULL, causing a HardFault crash during early boot.

The bug occurs because the original code only checked g_uart_devs[i]->priv
without first verifying g_uart_devs[i] is not NULL. On Cortex-M4, NULL
pointer dereference reads from Flash vector table (0x00000000 maps to
0x08000000), returning a function pointer that causes BusFault when
written to.

This fix matches the existing NULL check pattern used in arm_serialinit()
at line 2835 of the same file.

Tested on mplant-gd32f450 board with only USART5 enabled in defconfig.
Before fix: HardFault at boot (IPSR=3, PC=0x080003e0)
After fix: System boots normally to NSH Shell

Signed-off-by: lccosy <1191294205@qq.com>
2026-06-10 20:58:26 +08:00
Sammy Tran
2ab4cfe14c arch/arm/src/stm32h5/stm32_adc: Reset channel counter before conversions
Signed-off-by: Sammy Tran <sammytran@geotab.com>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI-Model: claude-sonnet-4.6
2026-06-10 20:16:22 +08:00
Sammy Tran
e2e5abde67 arch/arm/src/stm32h7/stm32_adc: Reset channel counter before conversions
Signed-off-by: Sammy Tran <sammytran@geotab.com>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI-Model: claude-sonnet-4.6
2026-06-10 20:16:22 +08:00
Shoji Tokunaga
db1035f820 arch/sim: Add dependencies for Rust cargo in make builds
Add `EXTRA_LIB_DEPS` to the simulator nuttx target prerequisites.

This lets Make notice when an extra application library, such as a Rust
static library rebuilt by Cargo, has changed and ensures the final
simulator binary is relinked.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-06-10 08:57:45 -03:00
Lingao Meng
64f1962568 arch/sim: walk frame-pointer chain for non-running tasks in up_backtrace
The previous up_backtrace() relied entirely on host_backtrace() (a thin
wrapper around glibc's backtrace()), which can only unwind the host
thread that calls it.  As a result, when assert / dump_tasks() walked the
task list and called sched_dumpstack() for every task, every task other
than the currently-running one returned a zero-length backtrace, and the
output was silently dropped.  In practice this meant that on sim only
the crashing task ever produced a usable trace.

Fix this by walking the frame-pointer chain ourselves whenever the
target tcb is not the running task.  Because sim's setjmp/longjmp is
provided by NuttX itself (libs/libc/machine/sim/arch_setjmp_*.S) and not
by host libc, the rbp/rsp/rip (or arm fp/sp/pc) saved in tcb->xcp.regs
are plain unmangled pointers, identical across Linux, macOS and Windows
hosts.  The frame layout ([fp]=prev fp, [fp+1]=return address) is also
shared by every host ABI sim supports (x86, x86_64, ARM, ARM64).

The walker validates that fp lies inside the task's stack and is
properly aligned, and stops when fp[0] is NULL, so a corrupted stack
cannot make us read out of bounds.  The running-task path is unchanged
and still uses host_backtrace() so DWARF unwinding through host
libraries continues to work.

Requires CONFIG_FRAME_POINTER=y so the compiler emits a usable fp link.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-06-10 08:54:41 -03:00
hanzj
652117c3ed arch/arm/nrf91: Fix OOB read/write in nrf91_usrsock_ioctl_handler
nrf91_usrsock_ioctl_handler() copies req->arglen bytes from the
request payload into the fixed-size usrsock->out buffer without
validating that the payload actually fits either the received
request or the destination buffer.  A crafted ioctl request with
an inflated arglen triggers:

  1. OOB read — memcpy reads past the end of the received request.
  2. OOB write — memcpy writes past the end of usrsock->out.

Add three checks before the copy:

  - len >= sizeof(*req): ensure the full request header is present.
  - copylen <= len - sizeof(*req): payload must fit the received data.
  - copylen <= sizeof(usrsock->out) - sizeof(*ack): payload must fit
    the destination buffer.

The recvfrom handler in the same file already performs the equivalent
buffer-size check (line 892).  Fixes #18515.

Signed-off-by: hanzj <hanzjian@zepp.com>
2026-06-10 08:50:50 -03:00
hanzj
9aada7f9ae arch/sim: Fix OOB read/write in usrsock_ioctl_handler
usrsock_ioctl_handler() copies req->arglen bytes from the request
payload into the fixed-size usrsock->out buffer without validating
that the payload fits either the received request or the destination
buffer.  This is the same class of vulnerability as the one already
fixed in nrf91_modem_sock.c (commit a43fb69283).

Add three checks before the copy:

  - len >= sizeof(*req): ensure the full request header is present.
  - copylen <= len - sizeof(*req): payload must fit the received data.
  - copylen <= SIM_USRSOCK_BUFSIZE - sizeof(*ack): payload must fit
    the destination buffer.

Signed-off-by: hanzj <hanzjian@zepp.com>
2026-06-10 19:29:28 +08:00
Matteo Golin
0f14427658 bcm2711/fb: Use physical device resolution OR force resolution
This change causes the frame buffer allocation to use the connected
device's physical resolution by default. The user also has the option to
force a request for a different, compile-time selected resolution if the
physical display can support something else the user would prefer.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-31 11:06:41 +08:00
Shoji Tokunaga
7c38d58675 tools/rust: Fix aarch64 NuttX Rust target specs
Add a custom aarch64 Mach-O Rust target for macOS sim builds and use it
instead of an Apple Darwin Rust target. This keeps Rust cfg values aligned
with NuttX while producing Mach-O objects required by the simulator link.

Also align sim host handling for aarch64 Linux by detecting `aarch64` as
`HOST_ARM64` and avoiding x86-specific `-mcmodel` and `-no-pie` options
on ARM64 hosts.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-05-29 10:25:10 +02:00
Piyush Patle
8788590436 arm64/am62x: add core boot and serial support
Add the AM62x architecture support needed to boot NuttX on TI K3
AM62x platforms. This includes the chip integration, memory map, IRQ
definitions, low-level console support, boot code, and the AM62x 16550
serial lower half.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-05-28 22:21:38 +08:00
Piyush Patle
fd2fe246cc arm64/common: enable EL1 GICv3 sysreg access from EL2
AM62x enters NuttX through EL2 before dropping to EL1. Enable the
GICv3 system register interface for lower exception levels during the
EL2 handoff so EL1 can use the CPU interface without depending on
firmware state.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-05-28 22:21:38 +08:00
Nazmi Aras
433312e81f arch/armv7-r: fix duplicate arm_perf.o build rule in flat build
Guard CMN_UCSRCS += arm_perf.c in arch/arm/src/armv7-r/Make.defs so that arm_perf.o is not added twice during flat builds, preventing the duplicate target make error.

Signed-off-by: Nazmi Aras <nazmi.aras@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
9bb24d43ce boards/arm/am67: Add support for t3-gem-o1 board.
This commit introduces basic support for the T3 Gemstone O1 (t3-gem-o1)
development board, including board configuration, linker scripts, and
drivers for NSH. Currently only UART console is supported.
All necessary files and configurations are added to enable building and
running NuttX on this TI AM67-based board.

Co-authored-by: Emre Cecanpunar <emreleno@gmail.com>
Co-authored-by: Abdullah Türkmen <abdullahturkmen@protonmail.com>
Co-authored-by: Muhammet Onur Bayraktar <mobayraktar@t3gemstone.org>
Co-authored-by: Bayram Akay <bakay@t3gemstone.org>
Co-authored-by: Nazmi Aras <nazmi.aras@t3gemstone.org>
Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
94f094cbfe arch/arm/am67: Add support for TI AM67 chips.
This commit introduces basic support for running NuttX on
main domain R5F core of TI AM67 chips, including irq, mpu, pinmux,
timer, and serial configurations. Currently only UART console is
supported. NuttX can be loaded into R5F core from U-Boot or Linux
via RemoteProc.

Co-authored-by: Emre Cecanpunar <emreleno@gmail.com>
Co-authored-by: Abdullah Türkmen <abdullahturkmen@protonmail.com>
Co-authored-by: Muhammet Onur Bayraktar <mobayraktar@t3gemstone.org>
Co-authored-by: Bayram Akay <bakay@t3gemstone.org>
Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
afdc7675c8 arch/armv7-r: Include arm_mpu.c when CONFIG_ARM_MPU is enabled.
Previously, arm_mpu.c was only compiled when CONFIG_BUILD_PROTECTED
was enabled. This caused build failures when CONFIG_ARM_MPU was set
without CONFIG_BUILD_PROTECTED. The build logic has been updated to
include arm_mpu.c whenever either CONFIG_ARM_MPU or
CONFIG_BUILD_PROTECTED is enabled.

Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
2020035d75 arch/armv7-r: Resolve format‑specifier warnings by using proper macros.
The previous use of `%u` and `%X` for `uint32_t` values triggered
compiler warnings. These have been replaced with the appropriate
format‑specifier macros to ensure type‑correctness and eliminate the
warnings.

Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
alexcekay
d32fdfa20b arch/arm/stm32: Support optional TX/RX UART GPIOs.
The STM32 serial drivers already treat 0 as not present for optional
GPIO fields (CTS, RTS), guarding each call site with a != 0 check.

TX and RX GPIO fields lacked this guard, so boards that
define GPIO_UARTx_TX or GPIO_UARTx_RX as 0 (pin not routed) caused
stm32_configgpio(0) to be called, which silently configures PA0 as a
floating input, corrupting any other peripheral using that pin.

Having an optional TX/RX UART is useful for several cases:
* RX-only connections: e.g. radio control input on flight-controllers where no TX is wired.
* Single-wire (half-duplex) connections: e.g. ESC telemetry connections.
* Output-only NSH which prints output but does not allow entering inputs.

Without a sentinel value for these cases one must assign the unused GPIO to
a NC pin, which is misleading when reading board configuration files.

Add != 0 guards for tx_gpio and rx_gpio across all STM32 serial driver
families.

Using 0 as the sentinel is safe for TX/RX because any valid UART config requires
GPIO_ALT bits set in the config word, so 0 can never represent a real
TX or RX pin configuration.

Signed-off-by: alexcekay <alexander@auterion.com>
2026-05-27 14:32:19 -04:00
Peter Barada
6bba29a2ba arch/arm/src/stm32h7: Add support for CRYP peripheral
Add STM32H7 support for AES-CBC/CTR HW encryption accelerator.
Add nucleo-h753zi:crypt defconfig.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-05-27 23:50:18 +08:00
hanzhijian
2969c8807e arch/sim: Stop publishing stale X11 display during teardown.
sim_x11events() polls g_display from the idle loop while the
framebuffer teardown path closes the X connection.  Clear the global
Display handle before teardown so the event path stops using it, but
keep the saved local Display pointer for XShmDetach(), XUngrabButton(),
and XCloseDisplay().

This only changes the sim X11 framebuffer shutdown ordering and does
not change user-visible APIs or build configuration.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-27 13:16:29 +02:00
Tiago Medicci Serrano
fc5c01dc70 xtensa/esp32: Fix RWDT register offsets.
The RWDT register offsets were incorrectly set to ESP32-S3 values
instead of ESP32 values. This was introduced when the code was
refactored from using the local NuttX header hardware/esp32_rtccntl.h
(which had the correct offsets) to using the HAL library headers, and
the offsets were moved inline into esp32_wdt.c with wrong values.

Correct the offsets to match the actual ESP32 register layout from
soc/rtc_cntl_reg.h (RTC_CNTL_WDTCONFIG0_REG at 0x8c, INT_ENA at
0x3c, etc). Without this fix, all RWDT operations (enable, configure
timeout, enable interrupt, acknowledge interrupt, feed, write-protect)
were targeting wrong memory addresses, rendering the RWDT completely
non-functional.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
d2cbca2759 xtensa/esp32: Fix divide-by-zero in RTC WDT clock calibration.
Under the BOARD_LATE_INITIALIZE boot flow, rtc_clk_xtal_freq_get()
may return 0 (SOC_XTAL_FREQ_AUTO) because the XTAL frequency has
not yet been stored to the RTC register when the WDT driver is
initialized. This causes rtc_clk_cal() to divide by zero
internally (EXCCAUSE=0006) when computing the RTC slow clock
period.

Fix by explicitly calling rtc_clk_xtal_freq_update() with the
board's configured crystal frequency if rtc_clk_xtal_freq_get()
returns 0. Also add a guard in esp32_wdt_settimeout() to return
-EIO if ESP32_RWDT_CLK() still returns 0 cycles/ms, preventing
a subsequent divide-by-zero when computing the maximum timeout.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
8e51220447 xtensa/esp32: Re-apply WDT prescaler and timeout at start.
Same issue as ESP32-S3/S2: with BOARD_LATE_INITIALIZE, the
constructor function enable_timer_group0_for_calibration() resets
Timer Group 0 registers after board_late_initialize() has
configured the MWDT0 prescaler, causing the watchdog to fire at an
incorrect rate.

Re-apply the prescaler, timeout, and feed the WDT counter in
esp32_wdt_start() just before enabling the timer.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
239d108ed7 xtensa/esp32s2: Re-apply WDT prescaler and timeout at start.
Same issue as ESP32-S3: with BOARD_LATE_INITIALIZE, the constructor
function enable_timer_group0_for_calibration() resets Timer Group 0
registers after board_late_initialize() has configured the MWDT0
prescaler, causing the watchdog to fire at an incorrect rate.

Re-apply the prescaler, timeout, and feed the WDT counter in
wdt_lh_start() just before enabling the timer.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
96d71ea565 xtensa/esp32s3: Re-apply WDT prescaler and timeout at start.
With the BOARD_LATE_INITIALIZE flow, board_late_initialize() runs
on a kernel thread and sets the MWDT0 prescaler. However, after it
returns, the init task (NSH) is spawned and lib_cxx_initialize()
invokes constructor functions, including
enable_timer_group0_for_calibration() from esp-hal-3rdparty which
calls timg_ll_reset_register(0), resetting all Timer Group 0
registers (including the WDT prescaler) back to their defaults.

Re-apply the prescaler, timeout, and feed the WDT counter in
wdt_lh_start() just before enabling the timer. This ensures
correct WDT configuration regardless of any intermediate register
resets by external code.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
yushuailong
9e58127339 arch/sim: Add MM_FILL_ALLOCATIONS support to sim customized heap.
When CONFIG_MM_UMM_CUSTOMIZE_MANAGER is enabled, the sim heap
bypasses mm_heap/tlsf entirely and calls host malloc/free directly,
so MM_FILL_ALLOCATIONS has no effect. Add fill pattern support
directly in sim_ummheap.c:
- malloc: fill user region with 0xaa
- free: fill user region with 0x55
- realloc: fill extended region with 0xaa

This helps detect uninitialized reads in sim environment,
which ASan does not support.

Signed-off-by: yushuailong <yyyusl@qq.com>
2026-05-27 01:40:18 +08:00
Eren Terzioglu
5a8678b591 arch/risc-v/espressif: Add LP Mailbox support for esp32p4
Add LP Mailbox support for esp32p4 to share data between HP and LP core

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-26 10:03:43 +08:00
raiden00pl
207bddc40f arch: remove PULSECOUNT references from PWM drivers
remove PULSECOUNT references from PWM drivers that not implemet PWM feature.
PULSECOUNT for these architectures was not implemented, so we just remove all references to it.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
ab8262eb62 !arch/tivia: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
adf0a2fc25 !arch/tlsr82: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
b858b3746f !arch/stm32h7: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
224b710da7 !arch/stm32l4: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
fe4baaea86 !arch/stm32h5: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
ade7264b44 !arch/stm32f7: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
ae4f9f5b44 !arch/stm32f0l0g0: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
765ea96828 !arch/stm32: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
93602a3a72 !arch/at32: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
Brunocor26
53ef7c0635 arch/arm/rp23xx: Fix PWM frequency and duty cycle calculation.
Fixed three bugs in the RP23XX PWM driver:

* setup_period: The previous divisor calculation used integer arithmetic
  that caused overflow and loss of precision. The divider is now computed
  as a 16-bit fixed-point value (div16) using 64-bit arithmetic, and
  clamped to the valid hardware range (0x10 to 0xFFF).

* setup_pulse: The compare value was incorrectly scaled by TOP instead
  of 65535, producing wrong duty cycles. The formula is now corrected
  to ((duty * (top + 1)) / 65535) with an overflow guard.

* pwm_start: The driver was not updated as part of the breaking change
  introduced in commit 4df80e19 ("!drivers/pwm: remove PWM_MULTICHAN
  option"). Access to single channel API is now info->channels[0].duty
  instead of info[0].duty.

Signed-off-by: Brunocor26 <bruno.correia@ubi.pt>
2026-05-25 10:29:17 +08:00
Matteo Golin
94f3db6bff sim/keyboard: Translate X11 key codes to NuttX codec
The previous implementation just passed X11 key codes to the NuttX
keyboard driver, which only really worked correctly for the letter keys.
Now, special keys are translated into the NuttX codec (like Enter, arrow
keys, etc.) so that they can be used properly by NuttX applications
relying on keyboard input.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-24 16:01:31 -03:00
Patrick José Pereira
c9975a1e00 arch/arm/stm32h5/stm32_ethernet: Add missing netdev_carrier calls
This follows what was done in a7567677a8

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2026-05-23 20:25:16 +08:00
ImBonkers
58c07d00d1 boards/arm/stm32n6/nucleo-n657x0-q: Add autoleds support.
Add the autoleds driver for the three on-board user LEDs (LD5 red
PG10, LD6 green PG0, LD7 blue PG8; all active-low).  Structure
mirrors boards/arm/stm32h5/nucleo-h563zi with the polarity and
initial-OFF state corrected for the active-low wiring.

* boards/Kconfig: ARCH_BOARD_NUCLEO_N657X0_Q selects ARCH_HAVE_LEDS
  so the ARCH_LEDS prompt becomes available.
* arch/arm/src/stm32n6/stm32_idle.c: include <arch/board/board.h>
  so LED_IDLE is defined and up_idle() actually calls into the
  autoleds driver around WFI.

The existing nsh and ostest defconfigs do not pin CONFIG_ARCH_LEDS
and therefore inherit its Kconfig default (y when ARCH_HAVE_LEDS is
selected), so after this patch they include the autoleds driver by
default.  This matches the convention on the comparable H5 and H7
Nucleo defconfigs, which also leave ARCH_LEDS at its default.

Tested on Nucleo-N657X0-Q: nsh and ostest still build, flash and
run.  With CONFIG_ARCH_LEDS=y, green is steady at the NSH idle
prompt; red pulses on each IRQ but the on-time is too brief to be
clearly visible to the eye.

Signed-off-by: ImBonkers <samuelnlinden@pm.me>
2026-05-23 20:23:35 +08:00
Tiago Medicci Serrano
d649732877 arch/risc-v: Fix Espressif timer registering ID
Fix Espressif timer registering ID. Espressif's general purpose
timers are grouped in different Timer Groups, which may contain
more than one general purpose timer. The current implementation is
related to the timer groups (timer0 refers to Timer Group 0, for
instance), but previous registering method was referring to the
timer inside each group, which caused it to fail when more than
one timer group was being selected because only the first timer
on each group is being actually registered.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-22 19:38:44 -04:00
Tiago Medicci Serrano
4047b9f42b arch/risc-v: Clear BSS section for RISC-V-based Espressif SoCs
Always clear the BSS section before calling `bootloader_init`.
This is necessary because, otherwise, `bootloader_init` may fail
even before `bootloader_clear_bss_section` is called again by that
function.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-22 12:20:33 -04:00
Eren Terzioglu
c1cc9a4dc7 arch/risc-v/espressif: Fix CMake build issues for new peripheral support
Fix CMake build issues

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-22 19:25:56 +08:00
zhangyu117
c858f3cc44 arch/tricore: Add hardware debug breakpoint and watchpoint support.
Implement hardware breakpoint and watchpoint support for TriCore
architecture using the Trigger Event (TREVT) registers. This enables
the standard NuttX debugpoint API (up_debugpoint_add/remove) on TriCore
processors, supporting read/write/execute watchpoints and breakpoints
via the on-chip debug unit.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-05-22 15:38:36 +08:00
Patrick José Pereira
49d7959b96 arch/arm/stm32h5/i2c: Fix warn message about used but not initialized variables
Fix "-Wmaybe-uninitialized" warning messages

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2026-05-22 13:36:54 +08:00
Patrick José Pereira
8df855d2ab arch/arm/stm32h5: Add ethernet hardware checksum
The Ethernet MAC (57.11.4) was already configured in the code,
but it was necessary to configure the Transmit Descriptor (57.10.3)
in read format:
  - Checksum Interface Control for IP, payload and pseudo-header
Add checks for Recceive Descriptor (57.10.4) in read format:
  - Receive Descriptor 1 is valid from Receive Descriptor 3
  - IP checksum was not bypassed
  - IP header checksum error op IP payload checkerror is set

Testing with STM32 Nucleo-144 using iperf, improved transmission from
35 MBits/s to 50MBits/s.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2026-05-21 23:14:24 -04:00
Peter van der Perk
87d8dd797d arch/arm/imx9: Add SAR ADC support
Add support for the i.MX9 SAR ADC block.

Based on the arm64 version but slightly different init due to SCMI and
different channel mask for i.MX95.

The driver provides initialization, deinitialization, channel-mask
validation, and one-shot reads for the supported ADC channels. It also
handles the ADC clock bring-up, power-up sequence, calibration, and raw
12-bit result extraction from the per-channel data registers.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-05-21 23:13:11 -04:00
Tiago Medicci Serrano
2c8dc17510 arch/risc-v: Enable setting cache line size for ESP32-P4
Enables setting the cache line size for ESP32-P4 using Kconfig
options.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-22 10:41:19 +08:00