24577 Commits

Author SHA1 Message Date
Eren Terzioglu b82b5d0ebc arch/xtensa: Update common layer version for esp32[-|-s2|-s3]
Build Documentation / build-html (push) Waiting to run
Update common layer version to sync for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-09 09:48:32 +08:00
Eren Terzioglu a18b7186a6 arch/risc-v/espressif: Add BLE sleep
Add BLE sleep for esp32[-c3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-09 09:48:32 +08:00
Peter Bee 2a353fcc0c sim: adapt macos avfoundation backend for camera indexing and capture
Adapt the macOS AVFoundation backend for multi-device discovery,
camera index mapping and capture startup compatibility. This enables
reliable use of multiple cameras through the SIM camera framework.

Signed-off-by: Peter Bee <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
Peter Bee ea05918799 sim: support camera framework multi-instance and dynamic mounting
Allow the SIM camera/V4L2 capture framework to manage multiple
imgdata instances with dynamic mounting. This avoids cross-talk
between camera streams when multiple devices are used.

Signed-off-by: Peter Bee <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
raiden00pl deb52b0855 !arch/arm/src/stm32: remove STM32_USE_LEGACY_PINMAP
BREAKING CHANGE: remove STM32_USE_LEGACY_PINMAP and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-07 11:45:23 +08:00
daniellizewski 0b0769f8d9 arch/arm/src/stm32h5/stm32_usbdrdhost.c: Disable host channel when freed
Build Documentation / build-html (push) Has been cancelled
The host interrupt callback was incorrectly using the wrong IRQ for
disconnected. In host mode the same IRQ is used for connect/disconnected
and it must check a status bit to know which one.

When a USB device was unplugged, the host channels were free'd,
but if they happen to be mid-transfer, that transfer was never cancelled
so the USB hardware might still be trying to perfrom a transfer after
was free'd. Fixed by cancelling any transfers on free.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-05-06 06:20:03 +08:00
Tiago Medicci Serrano 34bfa0d68d arch/xtensa: Update common-source base for ESP32[|S2|S3]
After recent changes on the event handler for the RISC-V-based
Espressif SoCs, the same set of changes were ported back to xtensa
devices.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-06 01:37:00 +08:00
Tiago Medicci Serrano 5c4c60f9d2 arch/risc-v: Support the ethernet driver on ESP32-P4
This commit enables the ethernet driver support on ESP32-P4 based
on a common-source implementation. This required a set of changes
regargind the event handler for the Wi-Fi driver (which is now
shared with the ethernet driver).

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-06 01:37:00 +08:00
raiden00pl d6e1c20a9c arch/stm32: use input mode for STM32F1 input pinmap entries
Use GPIO_MODE_INPUT for STM32F1 pinmap entries that are configured as
GPIO_INPUT instead of carrying GPIO_MODE_2MHz.

For STM32F1 the MODE field selects output speed only for output or
alternate-function output pins. stm32_configgpio() forces input pins to
input mode regardless of the encoded MODE bits.

From arch/arm/src/stm32/stm32_gpio.c:

   311   /* Decode the mode and configuration */
   312
   313   regval  = getreg32(cr);
   314
   315   if (input)
   316     {
   317       /* Input.. force mode = INPUT */
   318
   319       modecnf = 0;
   320     }
   321   else
   322     {
   323       /* Output or alternate function */
   324
   325       modecnf = (cfgset & GPIO_MODE_MASK) >> GPIO_MODE_SHIFT;
   326     }

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-05 11:48:49 -04:00
Alan Carvalho de Assis f8e78c1075 drivers/qe: Don't compile stm32_qencoder.c if STM32 QE is not enabled
NuttX uses Quadrature Encoder lower half driver to internal QE from
MCUs and also with Magnetic Rotary Encoder sensors. But when the
STM32 QE is not enabled, the board code will try to compile the
stm32_qencoder.c because Magnetic Rotary Encoders enables the
CONFIG_SENSORS_QENCODER. This patch fixes this issue.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-03 07:56:38 -03:00
Alan Carvalho de Assis 63a03d0f8a arch/x86: Add palette 256 color to qemu-i486 VGA driver
Build Documentation / build-html (push) Has been cancelled
This patch adds support to get the VGA driver working with 256
colors.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-02 09:51:59 -04:00
Alan Carvalho de Assis b30fe55fe0 arch/x86: Replace planar pixel copy with linear copy
The planar copy was used even when linar mode was used (chain4 = 1)
Probably this modification could impact VGA text mode, but for now
it is not important, since the goal is get graphic mode working.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-02 09:51:59 -04:00
Matteo Golin a5e8ea2b40 arch/ceva: Replace board_app_initialize
Replaced board_app_initialize logic with board_late_initialize.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 18:36:46 +08:00
Matteo Golin 48db502daf !boards: Remove NSH_ARCHINIT and board_app_initialize
BREAKING: In an effort to simplify NuttX initialization, NSH_ARCHINIT is
removed. board_app_initialize is also removed. BOARD_LATE_INITIALIZE now
performs all board initialization logic, and is by default enabled. All
references to these symbols are removed. BOARDIOC_INIT remains, but will
result in -ENOTTY when called. It is to be removed in a later commit.

Quick fix: Boards relying on NSH_ARCHINIT should now enable
CONFIG_BOARD_LATE_INITIALIZE instead. If the application needs
fine-grained control over board initialization from userspace, the logic
performed by BOARDIOC_INIT may be copied to the board_finalinitialize
function and used instead via BOARDIOC_FINALINIT. All
board_app_initialize logic provided by NuttX is now moved to
board_late_initialize, and the same should be done for out-of-tree
boards.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 18:36:46 +08:00
yaojiaqi ae7525d195 arch/arm/include/arm*/irq.h: fix FPU context layout guard macro
The register index layout for D16-D31 and FPU_CONTEXT_REGS was guarded
by CONFIG_ARM_HAVE_DPFPU32 (hardware capability) in three header files,
but all save/restore code in the corresponding .S files gates on
CONFIG_ARM_DPFPU32 (software enable).

These two macros are distinct:
  CONFIG_ARM_HAVE_DPFPU32 - set by chip via 'select'; means hardware
                            has D16-D31 registers
  CONFIG_ARM_DPFPU32      - user-selectable; means software has chosen
                            to use D16-D31 (requires hardware support)

When ARM_HAVE_DPFPU32=y and ARM_DPFPU32=n, the header defined
REG_FPSCR at offset 64 and FPU_CONTEXT_REGS=65, while the assembly
only saved S0-S31+FPSCR (33 words), placing FPSCR at offset 32.
This mismatch causes incorrect register access and wrong xcptcontext
sizing.

Signed-off-by: yaojiaqi <yaojiaqi@lixiang.com>
2026-04-30 21:23:41 +08:00
Filipe Cavalcanti 3759cc72ab arch/xtensa: properly set carrier on/off on espnow driver
Build Documentation / build-html (push) Has been cancelled
In esp_espnow_pktradio.c, after ESP-NOW is successfully initialized in espnow_ifup, call netdev_carrier_on(dev).
In espnow_ifdown, call netdev_carrier_off(dev).

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-30 12:25:32 +08:00
Jukka Laitinen 101ff2c2bb arch/imx9: Add bidirectional dshot driver using i.MX9 FlexIO
Create a bidirectional dshot lower-half driver, using the flexio block.

This driver enables use of DShot protocol for Electronic Speed Controllers
(ESCs) typically used in drone motor control.

Eight channels of DShot per flexio block are supported in:

- Normal mode in all DShot speeds, with telemetry request (uart response
  needs to be handled outside of this driver)
- Bidirectional mode in all DShot speeds, with telemetry request & response
- Configurable to use either independent TX timers for each channel, or to
  use a common TX timer for all channels to synchronize the output
- For bidirectional RX, each channel always uses an own timer.

In normal mode, the driver operates without any interrupts.

In bidirectional mode, the driver reconfigures the FlexIO timers (as needed)
and shifters from TX to RX in the interrupt handler, and reads out the
raw response packet.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-04-30 12:24:47 +08:00
Alan Carvalho de Assis 163dcd0438 arch/x86: Modify qemu_vga to return init error
This modify just modify the function to let the user that the function
failed to initialize the VGA mode.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-30 11:56:49 +08:00
Peter van der Perk f25db33113 arch/arm/imx9: Add FlexIO support
Build Documentation / build-html (push) Has been cancelled
Backport for i.MXRT FlexIO driver, features identical.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-04-29 21:39:30 +08:00
Peter van der Perk ed4a351f98 arch/arm/imx9: eDMA fix SG TCM address calculation
DLASTSGA needs to be offest for TCM backdoor address.
Cleanup as well using inline helper for calculuation.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-04-29 21:39:30 +08:00
Peter van der Perk 23ec411844 arch/arm/imx9: LPI2C backport imx95 arm64 improvements
Get i2c reset improvement from ARM64 driver and fix kconfig entries

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-04-29 21:39:30 +08:00
Alexey Matveev 369755d00b drivers/can: Fix close drain, write-only reader lifecycle, and STM32 RX header
Always allocate per-file can_reader on open so write-only descriptors get msgalign / ioctl state; free that context on close when it was never linked into cd_readers (fixes leak).

Cap each drain loop (20×500 ms) so close() cannot block forever when bxCAN retries without ACK or dev_txempty never clears.

Fix stm32can_vputreg debug log to print the written value (correct parameter name).

Signed-off-by: Alexey Matveev <tippet@yandex.ru>
2026-04-28 10:32:56 -03:00
Eren Terzioglu 170b04df01 arch/risc-v/espressif: Fix PM wakeup sources
Fix PM wakeup sources for esp32[-c6|-h2|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-27 21:20:21 +02:00
Lingao Meng e7fd9b1d49 arch/sim: add host_set_timeratio stub for Windows
The simulated time ratio feature introduced a host_set_timeratio()
call in sim_head.c, but the Windows host time implementation was
missing this symbol, causing a link error. Add a no-op stub since
the time ratio feature is not implemented on Windows.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-04-27 15:04:33 +08:00
Lingao Meng 62629d5efe arch/sim: fix host_settimer clock mismatch on macOS
dispatch_walltime() expects a delta in nanoseconds from now, but the
previous code subtracted CLOCK_REALTIME from a CLOCK_MONOTONIC absolute
timestamp, which have different epochs and produce a meaningless result.

Fix by subtracting the current CLOCK_MONOTONIC absolute time to get the
correct remaining duration.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-04-25 15:53:42 +08:00
Lingao Meng dfd735045c arch/sim: add simulated time ratio support
Add CONFIG_SIM_WALLTIME_RATIO Kconfig option and --sim-rt-ratio=
command-line argument to control the ratio of simulated time to
real time in percent. 100 means real-time (default), 200 means
simulated time advances twice as fast, 50 means half speed.

The implementation applies the ratio in host_gettime(), host_sleepuntil()
and host_settimer() so both SIM_WALLTIME_SLEEP and SIM_WALLTIME_SIGNAL
modes are supported.

This is inspired by the --rt-ratio feature in Zephyr's native_sim board.

Tested on sim:nsh with the following sleep test:

  $ echo -e "sleep 2\nexit" | time ./nuttx
  real    0m2.0xxs

  $ echo -e "sleep 2\nexit" | time ./nuttx --sim-rt-ratio=200
  real    0m1.0xxs

  $ echo -e "sleep 2\nexit" | time ./nuttx --sim-rt-ratio=50
  real    0m4.0xxs

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-04-25 15:53:42 +08:00
Eren Terzioglu ac26b63556 arch/risc-v/espressif: Add ULP wakeup modes
Add ULP wakeup modes for esp32[-c6|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-24 12:38:04 +02:00
Eren Terzioglu 2da63a0679 arch/risc-v/espressif: Add LP_ADC support
Add LP_ADC support

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-24 12:37:11 +02:00
raiden00pl e2cc71f540 !arch/arm/src/stm32l5: remove STM32L5_USE_LEGACY_PINMAP
BREAKING CHANGE: remove STM32L5_USE_LEGACY_PINMAP and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-24 10:44:30 +02:00
raiden00pl 5eb4387a99 !arch/arm/src/stm32wb: remove STM32WB_USE_LEGACY_PINMAP
BREAKING CHANGE: remove STM32WB_USE_LEGACY_PINMAP and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-24 10:44:30 +02:00
raiden00pl 2d8c4baa09 !arch/arm/src/stm32l4: remove STM32L4_USE_LEGACY_PINMAP
BREAKING CHANGE: remove STM32L4_USE_LEGACY_PINMAP and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-24 10:44:30 +02:00
alexcekay 1446961c87 arch/arm/stm32h7: Fix SPI RX DMA returning stale DCACHE data
Build Documentation / build-html (push) Has been cancelled
In sporadic cases it is possible that a SPI exchange returns stale RX data from the DCACHE.

This occurs when:
- DCACHE is enabled
- DMA is used

The impact of this can be hard to debug and vanishes when the timing even changes minimally.

This is caused by the DCACHE being invalidated before the actual DMA transaction starts which violates
the recommendations from AN4839 and also does not match the implementation of other drivers on the STM32H7/STM32F7.

Fixed by invalidating the DCACHE right before the actual read, which matches the implementation
of the STM32F7 SPI driver.

Signed-off-by: alexcekay <alexander@auterion.com>
2026-04-23 16:28:36 +02:00
raiden00pl 94e5fb9d3e boards/stm32l4: migrate to new pinmap
migrate stm32l4 to new pinmap

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-23 20:34:00 +08:00
Tiago Medicci Serrano 629d0fe356 arch/[risc-v|xtensa]: Re-add RMT_LOOP_TEST_MODE Kconfig entry
The PR #18654 removed the Kconfig option `RMT_LOOP_TEST_MODE` used
by Espressif's RMT peripheral. This commit reintroduces it as a
lower-half driver interface used to enable internal loopback tests.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-23 09:31:36 +08:00
raiden00pl 8b0f684a05 arch/arm/src/stm32f0l0g0: remove STM32F0G0L0_USE_LEGACY_PINMAP
remove STM32F0G0L0_USE_LEGACY_PINMAP and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-23 09:30:53 +08:00
raiden00pl 6ab27b3a8a arch/arm/src/stm32f7: remove STM32F7_USE_LEGACY_PINMAP
remove STM32F7_USE_LEGACY_PINMAP option and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-23 09:30:53 +08:00
raiden00pl c4586c0742 arch/arm/src/stm32h7: remove STM32H7_USE_LEGACY_PINMAP
remove STM32H7_USE_LEGACY_PINMAP option and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-23 09:30:53 +08:00
aviralgarg05 59d44c4997 boards/arm/stm32: switch nucleo-f412zg console to USART3 VCP
Build Documentation / build-html (push) Has been cancelled
Enable USART3 support for STM32F412 and use it as the default NUCLEO-F412ZG nsh console path.

The ST-LINK virtual COM port on this board is wired to USART3 on PD8/PD9. Restore USART2 to its header-pin routing, switch the nsh defconfig to USART3, and update the board documentation to match the shipped solder-bridge configuration described in issue #17722.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-04-22 01:14:39 +02:00
simbit18 b37b22eacd cmake: Moved the creation of the nxtmpdir folder to the root CMake file
- Moved the creation of the `nxtmpdir` folder for third-party packages to the root  `CMakeLists.txt` file.

cmake/nuttx_3rdparty.cmake

- Add the nuttx_remove_nxtmpdir function to remove the third-party cache directory under nuttx/../nxtmpdir

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
Shunchao Hu 04cc4740ea arch/xtensa: Scope Wi-Fi disconnect case declarations.
- fix a "a label can only be part of a statement and
  a declaration is not a statement" compile error.
- toolchain xtensa-esp32s3-elf-gcc
  (crosstool-NG esp-2021r2) 8.4.0

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
2026-04-21 22:06:52 +08:00
raiden00pl a9e9607d95 arch/x86_64/intel64: fix signal delivery race in x86_64_sigdeliver
copy logic from arm64 to fix SMP bugs in the signal trampoline
caused signals to be lost or mis-delivered in ostest signest_test
on qemu-intel64/jumbo.

Also update comments so this logic is easier to follow

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
Filipe Cavalcanti c47a984b63 arch/xtensa: remove _info from startup of ESP32
Build Documentation / build-html (push) Has been cancelled
During startup we should avoid using _info since the system is not
fully initialized. Default to use ets_printf which is safe for
this scenario.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-21 09:43:38 +08:00
yanxingyu17 02407ad192 arch/risc-v/cmake: fix linker option case in Toolchain.cmake.
Fix lowercase -wl to correct -Wl for GCC linker pass-through
option in LTO full configuration. The lowercase form is not
recognized by the linker, causing --print-memory-usage to be
silently ignored.

Signed-off-by: v-yanxingyu <v-yanxingyu@xiaomi.com>
2026-04-20 17:44:39 +02:00
Eren Terzioglu 50fb11492c arch/risc-v/espressif: Fix auto light sleep enable flag
Fix auto light sleep enable flag

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-20 15:08:27 +02:00
Filipe Cavalcanti 0e5e71cc08 arch/risc-v: update MCUBoot slot size and offsets
Increase image slot size from ~1MB to ~1.4MB to allow more features by default.
Solves issues when enabling debug features would extrapolate the slot size.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-19 07:10:31 -03:00
daniellizewski 1632beaede arch/arm/src/stm32h5/stm32_usbdrdhost.c: Fixed Hub support
Fixed a few bugs in the initial stm32_usbdrdhost.c implementation
when using a USB hub. Fixed fault when freeing control endpoints.
Fixed crash when disconnecting devices from hubs due ot use after free.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-04-19 14:24:40 +08:00
Tiago Medicci Serrano d6a55824b3 arch/risc-v/esp32p4: Implements PSRAM support for ESP32-P4
This commit implements the in-package PSRAM support for ESP32-P4.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-18 19:17:31 -03:00
raiden00pl a33c555b5e arch/stm32f0l0g0/stm32_serial_v2.c: fix compilation error
Build Documentation / build-html (push) Has been cancelled
fix compilation error for CONFIG_SERIAL_TERMIOS=y

chip/stm32_serial_v2.c:923:35: error: 'struct up_dev_s' has no member named 'rxftcfg'
  923 |   regval |= USART_CR3_RXFTCFG(priv->rxftcfg);

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-17 14:18:51 +02:00
Norihiko Itou 83efa44f0c arch/arm: add STM32H755XI chip
Support STM32H755XI chip.
The STM32H755XI is a chip with a different package than the STM32H755II.

Signed-off-by: Norihiko Itou <itounrh@jae.co.jp>
2026-04-17 13:18:02 +02:00
daniellizewski c205505ca9 arch/arm/src/stm32h5/stm32_serial.c: Fixed compiler warning
Build Documentation / build-html (push) Has been cancelled
Added missing #ifdef to avoid compiler warning when DMA is not used.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-04-17 12:42:12 +08:00