Commit graph

61466 commits

Author SHA1 Message Date
simbit18
04a2bb39a9 boards\risc-v\esp32c3: CMake added esp32-c3-zero board
CMake added  Waveshare ESP32-C3-Zero board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-02 19:21:36 -04:00
zhanghongyu
27214321be net/can,udp: fix conn unlock position in callback
Move conn_unlock() after the data event handling in can_callback()
and udp_callback(). Previously, the connection lock was released
immediately after devif_conn_event(), leaving the subsequent
can_data_event()/net_dataevent() and read-ahead buffer operations
unprotected. This could lead to a race condition where another
context modifies the connection state while data is being stored.

Hold the lock until the entire callback processing is complete to
ensure thread safety.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-02 20:55:27 +08:00
Felipe Moura
11d15bb238 arm/ht32f491x3: rework PWM lower-half like nrf53
Use static lower-half instances per timer and select the channel
through Kconfig and board data instead of passing runtime PWM
routing into the driver.

This keeps the HT32 PWM support aligned with the existing NuttX
pattern and documents the esk32 single-device TMR3 routing.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-04-02 12:11:13 +02:00
Filipe Cavalcanti
b5b7e8f72e arch/espressif: add flash encryption support on CMake
Add support for burning flash encryption E-Fuses on target.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-02 13:16:54 +08:00
Filipe Cavalcanti
e59604bbe6 tools/espressif: add support for target flashing using CMake
Support flashing target using cmake --build <build> -t flash.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-02 13:16:54 +08:00
Filipe Cavalcanti
ed217f8f3f arch/risc-v: add CMake support for Espressif RISC-V devices
Adds CMake build support. Touches arch and board at the same time to avoid
creating a commit that is not able to build.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-02 13:16:54 +08:00
Filipe Cavalcanti
2615513a45 docs: add CMake documentation for RISC-V Espressif devices
Update NuttX documentation with CMake usage instructions for Espressif devices.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-02 13:16:54 +08:00
Filipe Cavalcanti
709453beca cmake: add olddefconfig target for CMake builds
Olddefconfig allows refreshing .config options if the user manually
edit some entry on .config file.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-02 13:16:54 +08:00
Filipe Cavalcanti
9eb07645ac cmake: add support for 3rdparty functions
Adds support for checking git hash and creating nxtmpdir.
This is already available for Make builds.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-02 13:16:54 +08:00
simbit18
bfbd7414eb build.yml: Fix No files were found with the provided path
Fix

Warning: No files were found with the provided path: buildartifacts/.

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-02 06:42:08 +08:00
Peter Barada
efdbdfe409 arch/arm/stm32*: Use PRIx32 format specifier where appropriate
Replace 'x' printf format specifier with PRIx32 where
corresponding value is uint32_t type.

Signed-off-by Peter Barada <peter.barada@gmail.com>
2026-04-01 13:48:58 +08:00
Piyush Patle
bd885b7075 Documentation/verdin-mx8mp: port README.txt to rst 2026-03-31 22:15:12 -04:00
Piyush Patle
c118b9c8a7 Documentation/sam4cmp-db: port README.txt to rst 2026-03-31 22:15:12 -04:00
Piyush Patle
4d970d4a70 Documentation/olimex-lpc2378: port README.txt to rst 2026-03-31 22:15:12 -04:00
Piyush Patle
8d84652d6d Documentation/teensy-lc: port README.txt to rst 2026-03-31 22:15:12 -04:00
Eren Terzioglu
a9142d93cd Docs/risc-v/esp32p4: Add LPI2C docs
Add LPI2C docs for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-01 10:06:46 +08:00
Eren Terzioglu
93ff86fab7 boards/risc-v/esp32p4: Add LPI2C board support
Add LPI2C board support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-01 10:06:46 +08:00
Eren Terzioglu
7e321e0aba arch/risc-v/espressif: Add LPI2C support for esp32p4
Add LPI2C support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-01 10:06:46 +08:00
Eren Terzioglu
ae5c08c758 Docs/risc-v/esp32p4: Add LPUART docs for esp32p4
Add LPUART docs for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-01 10:06:46 +08:00
Eren Terzioglu
6480bb231d arch/risc-v/espressif: Add LPUART support for esp32p4
Add LPUART support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-01 10:06:46 +08:00
p-szafonimateusz
8b57a48d8f arch/intel64: add CPU affinity support for irq
add CPU affinity support for interrupts (up_affinity_irq)

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2026-03-31 21:10:51 +08:00
dependabot[bot]
4bfa4fa2e3 build(deps): bump pygments from 2.19.2 to 2.20.0 in /Documentation
Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.19.2...2.20.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-version: 2.20.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-31 08:38:01 -03:00
Eren Terzioglu
d7a4a6e0d8 Docs/risc-v/esp32p4: Add lpcore docs for esp32p4
Add lpcore docs for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-31 08:37:24 -03:00
Eren Terzioglu
ce4b76ff91 boards/risc-v/esp32p4: Add lpcore board support
Add ULP lpcore board support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-31 08:37:24 -03:00
Eren Terzioglu
dedf9045c1 arch/risc-v/espressif: Add lpcore support for esp32p4
Add ULP lpcore support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-31 08:37:24 -03:00
Eren Terzioglu
24208438eb boards/risc-v/esp32p4: Add RTC GPIO support
Add RTC GPIO support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-31 08:37:24 -03:00
Eren Terzioglu
8c42fda257 arch/risc-v/espressif: Add RTC GPIO support for esp32p4
Add RTC GPIO support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-31 08:37:24 -03:00
wangjianyu3
7e29152cd7 boards/lckfb-szpi-esp32s3: enable required IRQ vector table configs for uvc
Enable CONFIG_ARCH_IRQ_TO_NDX, CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC
and CONFIG_ARCH_NUSER_INTERRUPTS=2 which are now required by the Xtensa
ESP32-S3 interrupt handling after upstream changes.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-31 17:16:42 +08:00
likun17
4401b49eaa boards/risc-v/esp32p4: add Waveshare ESP32-P4-PICO-WIFI board support
Add board support for the Waveshare ESP32-P4-PICO-WIFI development
board. This board features:
- ESP32-P4 dual-core RISC-V MCU (rev v1.0)
- 768KB HP L2MEM (MM_REGIONS=2 for sram_low + sram_high)
- 32MB external NOR Flash (GD25Q256EYIGR, Quad SPI)
- 32MB SiP PSRAM (driver not yet available upstream)

Configurations:
- nsh: basic NuttX shell
- spiflash: NSH with SPI Flash (SmartFS) support

Signed-off-by: likun17 <likun17@xiaomi.com>
2026-03-30 16:46:29 +02:00
likun17
b606180da9 boards/risc-v/esp32p4: add sram_high as second heap region for rev < v3
On ESP32-P4 rev < v3, the 768KB HP L2MEM is split into two
non-contiguous regions: sram_low and sram_high. Previously only
sram_low was used for the heap, wasting 384KB of sram_high.

Export _sram_high_heap_start and _sram_high_heap_end symbols from
the linker script and add sram_high to the heap via kumm_addregion()
in riscv_addregion() when MM_REGIONS > 1.

Signed-off-by: likun17 <likun17@xiaomi.com>
2026-03-30 16:46:29 +02:00
likun17
81602e16a2 boards/risc-v/esp32p4: restore chip revision check with macro guard
The chip revision check was disabled with #if 0 for v1.0 bringup.
Restore the original #ifndef ESP32P4_IGNORE_CHIP_REVISION_CHECK
guard so boards can selectively bypass the PANIC by defining
this macro, while keeping the warning message in the #else branch.

Signed-off-by: likun17 <likun17@xiaomi.com>
2026-03-30 16:46:29 +02:00
likun17
6123cc3cbe nuttx/arch/risc-v/src/common/espressif: add 32MB flash size option
Add ESPRESSIF_FLASH_32M Kconfig option and the corresponding
esptool flash size mapping in Config.mk to support boards with
32MB NOR flash.

Signed-off-by: likun17 <likun17@xiaomi.com>
2026-03-30 16:46:29 +02:00
Felipe Moura
bd6a466317 ht32f491x3/esk32: add docs and flash helpers
Document the HT32F491x3 ESK32 board, build steps,
flashing flow, and validation commands. Add WSL and
PowerShell flash backends plus a Python wrapper.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-03-30 09:48:16 +08:00
Felipe Moura
41c53e7fdc boards/arm/ht32f491x3: add ESK32 board support
Add the ESK32 board with nsh configuration, linker script,
board bring-up, flashing helper, and user LED support.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-03-30 09:48:16 +08:00
Felipe Moura
ba6ee9d559 arch/arm/ht32f491x3: add initial support
Add initial HT32F491x3 support with startup, IRQ handling,
serial console, GPIO helpers, custom vectors, and CMake build files.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-03-30 09:48:16 +08:00
Vlad Pruteanu
3039184806 crypto/cryptosoft: Add support for PBKDF2
This adds support for PBKDF2 (SHA1 and SHA256) while leveraging
the existing infrastructure for HMAC.

Signed-off-by: Vlad Pruteanu <pruteanuvlad1611@yahoo.com>
2026-03-29 17:23:03 -03:00
trns1997
219a5ce09e build/cmake/stdlib: guard include/cxx by LIBMINIABI, fix div_t conflict
include/cxx contains NuttX's mini C++ ABI shims and must only be added
to the include path when CONFIG_LIBMINIABI is selected.  tools/Config.mk
was adding it unconditionally for every non-LIBCXX/non-UCLIBCXX build,
and the platform.cmake files for arm, arm64, risc-v, x86_64 and tricore
were adding it inside the CONFIG_LIBCXXTOOLCHAIN block.

With an unpatched downloaded ARM GNU Toolchain, <cstdlib> uses
newlib's stdlib.h, defining div_t as an anonymous struct.  A later
inclusion of NuttX's stdlib.h via <cstdio>->stdio.h->kmalloc.h then
redefines div_t with struct tag div_s, causing a conflicting declaration
error.

Guard the div_t/ldiv_t/lldiv_t definitions in stdlib.h with
redefinitions when a toolchain stdlib.h was already processed.

Also fix lldiv_s members typed as long instead of long long.

Signed-off-by: trns1997 <trns1997@gmail.com>
2026-03-29 16:45:29 -03:00
wangjianyu3
bab7e3e51b boards/lckfb-szpi-esp32s3: add UVC camera standalone defconfig
Add UVC configuration for lckfb-szpi-esp32s3 board based on gc0308
camera config, with USB OTG and UVC gadget driver enabled in
standalone (non-composite) mode.

- defconfig: enable ESP32S3_OTG, USBUVC, UVC example app
- board doc: add uvc section with usage and host verification

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-29 12:35:22 -03:00
wangjianyu3
4775b36316 drivers/usbdev: add UVC gadget class driver
Add USB Video Class 1.1 gadget driver supporting Bulk transport
with uncompressed YUY2 video streaming. Resolution and frame
interval are negotiated dynamically via PROBE/COMMIT control.

- uvc.h: protocol constants, streaming control struct, public API
- uvc.c: class driver with PROBE/COMMIT, bulk EP, /dev/uvc0 chardev
- Kconfig/Make.defs: USBUVC config and build rules
- boardctl.c: BOARDIOC_USBDEV_UVC standalone init path

Hardened against host disconnect:
- Removed nxmutex_lock from USB interrupt context paths
- Added 30s semaphore timeout in uvc_write with EP_CANCEL fallback
- Drain stale wrsem counts in VS_COMMIT before new stream
- Guard uvc_streaming_stop() against double EP_CANCEL race
- Handle EP_SUBMIT returning -ESHUTDOWN gracefully

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-29 12:35:22 -03:00
wangjianyu3
99afb5ee34 drivers/video/gc0308: add YUYV output format support
GC0308 sensor supports multiple output formats via register 0x24.
Add YUYV (YCbCr422) alongside existing RGB565 in fmtdescs and
configure the output format register dynamically in start_capture()
based on the requested pixel format.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-29 12:35:22 -03:00
wangjianyu3
f92b3d8d79 arch/xtensa/esp32s3: fix CAM DMA race and heap-allocate descriptors
- Remove debug polling loop from esp32s3_cam_start_capture() that
  busy-waited on DMA status register.

- Fix DMA ISR race: stop DMA before invoking capture callback to
  prevent ISR re-triggering while callback processes the buffer.
  Check priv->capturing before restarting DMA in ISR.

- Move DMA descriptors from struct to heap allocation, avoiding
  stack/BSS alignment issues with cache-line-aligned descriptors.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-29 12:35:22 -03:00
Alin Jerpelea
f8ef8e7bb1 Documentation: add NuttX-12.13.0 release notes
Add release notes for 12.13.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-03-29 22:34:53 +08:00
Shunchao Hu
fc6fd3f24d arch/risc-v/qemu-rv: Configure PMP before booting secondary harts.
Export qemu_rv_configure_mpu() and invoke it on the secondary-hart
boot path before riscv_cpu_boot().

This keeps protected SMP builds from faulting on !CPU0 when userspace
work is first scheduled there.

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
2026-03-28 16:00:58 -03:00
Tiago Medicci Serrano
9028fe72c7 ci: split xtensa jobs into three separate jobs (instead of two)
This is necessary because new defconfig were recently added to
Xtensa-based Espressif SoCs and the build job may exceed 2 hours.
In order to avoid increasing job timeout, a specific job for each
supported SoC (ESP32, ESP32-S2 and ESP32-S3) was created instead.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-03-29 00:33:11 +08:00
Tiago Medicci Serrano
c17e16eaed xtensa/espressif: Update common-source integration for Xtensa devices
This commit updates the common-source integration for Xtensa-based
Espressif devices (ESP32, ESP32-S2, and ESP32-S3). This is part of a larger
common-source update split by architecture for better maintainability.

Major components updated:
- IRQ allocator refactoring with intr_alloc integration
- Common-source drivers (GPIO, RMT, I2C, SPI, UART, etc.)
- Espressif components upgrade to release/master.b-test
- Peripheral drivers (ADC, PWM, LEDC, MCPWM, PCNT, Temperature Sensor, etc.)
- Wireless adapters (Wi-Fi and BLE)
- esp_timer migration to the common-source path for Xtensa devices
- Common-source power management implementation (auto-sleep and wakeup paths)
- Board defconfigs for all Xtensa Espressif boards
- SMP support improvements for ESP32-S3
- Critical section handling improvements

Key architectural changes:
- IRQ Allocator: The new interrupt allocator enables multiple mapping
  options from interrupt sources to CPU interrupts, providing flexibility
  required by modern peripherals. Although this introduces breaking changes
  to the interrupt handling API, the required ARCH_MINIMAL_VECTORTABLE
  Kconfig option is explicitly checked during startup to ensure proper
  configuration. This validation prevents runtime issues from configuration
  mismatches.
- Xtensa-specific interrupt handling via esp_xtensa_intr.c providing
  NuttX-native implementations of xt_ints_on/off and interrupt handlers,
  avoiding conflicts with NuttX's core Xtensa macros.
- Timer/RTC unification: ESP32/ESP32-S2/ESP32-S3 move from chip-specific
  RTC/RT-timer code to common-source Espressif integration, including
  esp_timer_adapter/esp_rtc paths and the required bringup/defconfig updates.
- Power management consolidation: Xtensa PM follows the common-source
  implementation, including common-source auto-sleep behavior, UART/Wi-Fi
  wakeup coordination, and tickless-safe sleep flow compatibility.

Note: This is a large commit to maintain bisectability. Breaking the
changes into smaller commits would result in non-building intermediate
states across the common-source infrastructure update.

Tested configurations:
- All defconfigs were tested, including `ostest`.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-03-29 00:33:11 +08:00
Tiago Medicci Serrano
c64b95ccbf ci: split xtensa jobs into three separate jobs (instead of two)
This is necessary because new defconfig were recently added to
Xtensa-based Espressif SoCs and the build job may exceed 2 hours.
In order to avoid increasing job timeout, a specific job for each
supported SoC (ESP32, ESP32-S2 and ESP32-S3) was created instead.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-03-28 06:14:34 +08:00
Michal Lenc
5bb7ceb5fe nucleo-l476rg/stm32_gpio.c: fix compilation error
Fixes the following compilation error.

stm32_gpio.c: In function 'stm32gpio_interrupt':
stm32_gpio.c:150:24: error: 'tm32gpint' undeclared (first use in
this function); did you mean 'stm32gpint'?
  150 |                        tm32gpint->stm32gpio.id);
      |                        ^~~~~~~~~
      |                        stm32gpint

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-03-27 12:47:49 -04:00
Eren Terzioglu
5c9f5f1323 arch/risc-v/espressif: Fix wrong C3 naming
Fix wrong C3 naming in Kconfig

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-27 19:32:10 +08:00
Michal Lenc
b8374cbf1d nucleo-l476rg: fix ADC driver compilation
The definition of ADC channels should not depend on option
CONFIG_INPUT_AJOYSTICK at all. Moreover, the include of stm32l4_adc.h
file was missing (PWM include was used instead), causing the implicit
declaration of stm32l4_adc_initialize function.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-03-27 19:31:56 +08:00
liuhongchao
c252d564cd Documentation: Add getevent input event monitor documentation.
Add rst documentation for the getevent tool under
Documentation/applications/graphics/input/. Content is placed
directly in index.rst following the existing convention used by
other graphics application docs.

Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-03-27 08:09:24 -03:00