Commit Graph

61352 Commits

Author SHA1 Message Date
Huang Qi 864fdb090c arch/risc-v/k210: Remove QEMU support
Remove the CONFIG_K210_WITH_QEMU option and associated conditional
code paths. The reasons for removal are:

* Simplifies code path for real hardware by removing QEMU workarounds
* The current QEMU target uses sifive_u machine, which is not designed
  for K210 emulation
* For RISC-V QEMU simulation, the qemu-rv (rv-virt) target is a better
  choice
* Renode can be used as an alternative for K210 simulation if needed

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-23 14:25:29 +08:00
Michal Lenc f07e4e690b nucleo-l476rg: register userleds device driver if CONFIG_USERLED is set
This enhances the bringup file with /dev/userleds registration if
CONFIG_USERLED option is set.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-03-23 14:24:54 +08:00
Lup Yuen Lee a84d263f09 CI: Revert GitHub Actions for Docker, by hash
Docker-Linux / push (push) Has been cancelled
All CI Builds have been failing since 18 hours ago:
- https://github.com/apache/nuttx/pull/18571#issuecomment-4104792750
- https://github.com/apache/nuttx/actions/runs/23389990049

> _The action docker/login-action@v4 is not allowed in apache/nuttx because all actions must be from a repository owned by your enterprise, created by GitHub, or match one of the patterns: 1Password/load-secrets-action@13f58eec61, 1Password/load-secrets-action@8d0d610af1, 1Password/load-secrets-action@dafbe7cb03, AdoptOpenJDK/install-jdk@*, BobAnkh/auto-generate-changelog@*, DavidAnson/markdownlint-cli2-action@07035fd053, DavidAnson/markdownlint-cli2-action@30a0e04f18, EnricoMi/publish-unit-test-result-action@*, JamesIves/github-pages-deploy-action@4a3abc783e, JamesIves/github-pages-deploy-action@d92aa235d0, Jimver/cuda-toolkit@6008063726, Jimver/cuda-toolkit@b6fc3a9f3f, JustinBeckwith/linkinator-action@af984b9f30f63e796..._

That's because ASF Infrastructure Team has mandated that we use the Hash Versions of GitHub Actions for Docker, stated below:
- https://github.com/apache/infrastructure-actions/blob/main/actions.yml
- Which generates: https://github.com/apache/infrastructure-actions/blob/main/approved_patterns.yml
- Due to: https://github.com/apache/infrastructure-actions/pull/547

```yaml
docker/build-push-action:
  10e90e3645eae34f1e60eeb005ba3a3d33f178e8:
    tag: v6.19.2
docker/login-action:
  c94ce9fb468520275223c153574b00df6fe4bcc9:
    tag: v3.7.0
docker/metadata-action:
  c299e40c65443455700f0fdfc63efafe5b349051:
    tag: v5.10.0
docker/setup-buildx-action:
  8d2750c68a42422c14e847fe6c8ac0403b4cbd6f:
    tag: v3.12.0
```

This PR reverts our GitHub Actions for Docker to the hash versions stated above.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-03-22 07:35:04 +01:00
Lup Yuen Lee bef5603844 CI: Revert GitHub Actions for Docker
Docker-Linux / push (push) Has been cancelled
All CI Builds have been failing since 18 hours ago. That's because ASF Infrastructure Team has mandated that we use the Specific Versions of GitHub Actions for Docker, stated below:
- https://github.com/apache/infrastructure-actions/blob/main/actions.yml
- Which generates: https://github.com/apache/infrastructure-actions/blob/main/approved_patterns.yml

```yaml
docker/build-push-action:
  10e90e3645eae34f1e60eeb005ba3a3d33f178e8:
    tag: v6.19.2
docker/login-action:
  c94ce9fb468520275223c153574b00df6fe4bcc9:
    tag: v3.7.0
docker/metadata-action:
  c299e40c65443455700f0fdfc63efafe5b349051:
    tag: v5.10.0
docker/setup-buildx-action:
  8d2750c68a42422c14e847fe6c8ac0403b4cbd6f:
    tag: v3.12.0
```

This PR reverts our GitHub Actions for Docker to the versions stated above.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-03-21 20:22:57 -04:00
Huang Qi 228eae22a0 libs/libbuiltin: Fix spacing style in gcov.c
Add space after 'else if' keyword to follow NuttX coding style
guidelines.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-21 19:44:54 -04:00
Peter Barada 8409599ae4 boards/arm/stm32*/: Align ARM STM32 idle stack
This patch fixes [BUG #18558] for stm32 by aligning _ebss symbol(used
as base of idle stack) in linker files to 8-byte boundary to conform
to AAPCS-32.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-03-21 17:07:39 -03:00
wangjianyu3 5718c81750 boards/xtensa/esp32s3: fix WiFi init by using CONFIG_ESPRESSIF_WIFI
The WiFi driver refactor (662c1e0bbb) renamed the Kconfig symbol
from CONFIG_ESPRESSIF_WLAN to CONFIG_ESPRESSIF_WIFI, but several
ESP32-S3 board bringup files were not updated. This caused
board_wlan_init() to be compiled out, so the wlan0 interface
never appeared.

Update the preprocessor guards in all affected boards:
  - esp32s3-box
  - esp32s3-eye
  - esp32s3-korvo-2
  - esp32s3-lcd-ev
  - lckfb-szpi-esp32s3

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-20 08:55:18 +01:00
simbit18 bc758f1025 boards/arm/gd32f4: CMake added boards
CMake added boards:

 - gd32f450zk-aiotbox
 - gd32f450zk-eval
 - gd32f470ik-eval

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-20 08:53:42 +01:00
simbit18 0a72e2cbf8 arch/arm/src/gd32f4: CMake build implemented for GigaDevice GD32F4xx Series
- added GigaDevice GD32F4xx Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-20 08:53:42 +01:00
Michal Lenc 014f22b1c2 drivers/mtd/w25.c: ensure the device is not in power down mode
If power down mode is set, trying to read ID ends in an infinite loop
because w25_waitwritecomplete never returns as status register never
signalizes write complete. Therefore ensure the device is not in a
power down mode before trying to read from it.

This can be an issue if the board is trying to check for more NOR
memories on one SPI bus and one chip select. For example GD25 driver
returns the memory to power down state after read id is finished,
therefore board initialization is stuck in an infinite loop if it first
checks for GD25 and then fallbacks to W25.

The commit fixes the possible issue by ensuring W25 is brought back
to normal operation mode before trying to obtain the manufacturer ID.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-03-19 16:23:45 -04:00
Carlos Sanchez ff29b04e66 arch/arm/src/stm32h5: add support for HW RNG.
Driver copied from stm32f7, which includes CEIS/SEIS clearing per reference manual.

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2026-03-19 19:42:01 +08:00
Filipe Cavalcanti 2554d210a5 boards/xtensa: fix optional item on spiflash config
Removes optional keyword causing selection to fail on the
automatic bringup of SPI flash device.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-19 17:46:28 +08:00
Huang Qi 8ed1e63292 arch/risc-v/hpm6000: Use WDOGx naming for watchdog peripherals
Fix duplicate watchdog prompts in Kconfig by using unique WDOG0, WDOG1,
WDOG2 names instead of generic 'watchdog' label. This matches the UART
peripheral naming convention in the same file and makes it clear which
watchdog is being configured in menuconfig.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-18 15:24:03 -04:00
simbit18 71709d487b tools/ci/testlist: skip the build of bl602evb:elf
This bl602evb:elf configuration has caused job risc-v-01 to fail on several occasions.

riscv-none-elf-ld: cannot find /github/workspace/sources/nuttx/arch/risc-v/src/crt0.o: No such file or directory

https://github.com/apache/nuttx/pull/17792

Added -bl602evb:elf to the risc-v-01.dat file to skip the build.

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-18 15:23:28 -04:00
Michal Lenc 600d0e413a ioexpander/iso1i813t: add option to check errors during read
This commit adds the possibility to check for expander errors when
reading the data. This is optional if glerr_check or interr_check
fields in configuration are not zero.

If not zero, read operation also reads ISO1I813T_GLERR and
ISO1I813T_INTERR register and returns error if there is some error.
The user can control which errors he wants to check with
glerr_check and interr_check masks.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-03-18 15:00:48 -03:00
Filipe Cavalcanti cacfb7ebda boards/risc-v: increase init stack size on esp32h2-devkit:efuse
Fix a crash scenarion due to stack overflow when debug assertions are
enabled.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-18 18:54:20 +01:00
Neil Berkman b9c639f604 boards/nucleo-h743zi: remove write buffering from bootloader configs
Remove CONFIG_FTL_WRITEBUFFER, CONFIG_DRVR_WRITEBUFFER,
CONFIG_DRVR_READAHEAD, and CONFIG_DRVR_INVALIDATE from the
nxboot-loader and mcuboot-loader defconfigs.

FTL write buffering delays physical flash commits, which can cause
data loss on power failure during OTA updates. Bootloaders require
immediate write durability and should not use buffered writes.

Signed-off-by: Neil Berkman <neil@xuku.com>
2026-03-18 13:05:20 +01:00
Neil Berkman c1c6e26395 drivers/mtd/ftl: bypass rwbuffer when O_DIRECT is set
ftl_write() unconditionally routes writes through rwb_write() when
FTL_HAVE_RWBUFFER is defined, ignoring the O_DIRECT flag stored in
dev->oflags. This means callers that open with O_DIRECT expecting
unbuffered writes still get their data buffered in RAM.

The O_DIRECT flag is already checked in ftl_flush() to select
between direct and read-modify-write paths, but the buffering
decision in ftl_write() never consults it.

Add O_DIRECT checks in both ftl_write() and ftl_read() to bypass
rwbuffer entirely when the flag is set. For writes, go directly to
ftl_flush() and normalize the return value to match the block
driver convention (nsectors on success). For reads, go directly to
ftl_reload(), bypassing any read-ahead cache.

This gives O_DIRECT callers a complete bypass of the rwbuffer layer
for both reads and writes, matching the documented contract.

Signed-off-by: Neil Berkman <neil@xuku.com>
2026-03-18 13:05:20 +01:00
Filipe Cavalcanti 1630b483d2 boards/xtensa: add option to disable SPI Flash MTD automatic bringup
Build Documentation / build-html (push) Has been cancelled
The ESP32*_SPIFLASH_AUTO_BRINGUP option allows disabling automatic bringup.
This causes /dev/mtdblock0 to show up instead of always mounting a file system.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-18 10:16:38 +08:00
Filipe Cavalcanti 4e8bc78307 boards/risc-v: add option to disable SPI Flash MTD automatic bringup
The ESPRESSIF_SPIFLASH_AUTO_BRINGUP option allows disabling automatic bringup.
This causes /dev/mtdblock0 to show up instead of always mounting a file system.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-18 10:16:38 +08:00
Huang Qi 078e7099b7 arch/risc-v/k210: Add Watchdog Timer (WDT) driver support.
Add WDT driver for K210 with support for both WDT0 and WDT1 peripherals.
This includes:
- Add k210_wdt.c and k210_wdt.h driver files with interrupt-based
  watchdog timer functionality
- Add hardware register definitions in k210_wdt.h
- Add K210_WDT, K210_WDT0, K210_WDT1 Kconfig options
- Add memory map definitions for WDT0 (0x50400000) and WDT1 (0x50410000)
- Reorder WDT IRQ definitions (IRQ 21, 22) before UART0 (IRQ 33) in irq.h
- Add WDT initialization in board bringup for maix-bit

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-18 10:15:36 +08:00
Eren Terzioglu f7614f640f boards/xtensa/espressif: Add AES accelerator board support
Build Documentation / build-html (push) Has been cancelled
Add AES accelerator board support for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
Eren Terzioglu 5b6d0e9d49 Docs/platforms/espressif: Add AES support docs
Add AES support docs for esp32s2

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
Eren Terzioglu 77f2f7989d arch/xtensa/espressif: Add AES accelerator support
Add AES accelerator support for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
Eren Terzioglu d68dec3d3d Docs/platforms/espressif: Add AES support docs
Add AES support docs for esp32[-c3|-c6|-h2|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
Eren Terzioglu 7951410bc7 boards/risc-v/espressif: Add AES accelerator board support
Add AES accelerator board support for esp32[-c3|-c6|-h2|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
Eren Terzioglu 76f69c7a8c arch/risc-v/espressif: Add AES accelerator support
Add AES accelerator support for esp32[-c3|-c6|-h2|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-17 18:45:53 -03:00
Arjav Patel 3d14873faa docs/sdio: add reference to card initialization flowchart
This update enhances the SDIO documentation by including a reference to the card initialization flowchart in the MMC/SD physical layer specification. This addition aims to provide implementers with a clearer understanding of the complete card initialization and command sequence.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-03-17 18:14:10 -03:00
Arjav Patel dacdb77010 docs/sdio: enhance call-flow documentation for SDIO lower-half
This update clarifies the call-flow for the SDIO lower-half driver implementation by providing a simplified example of the interaction between the MMCSD upper-half and the lower-half. It details the command sequence for handling R2 responses, improving the understanding of the expected behavior during card identification and initialization.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-03-17 18:14:10 -03:00
Arjav Patel 5a798be3ba docs/mmcsd: update documentation for SDIO lower-half driver implementation
This update adds a reference to the SDIO Driver Documentation for implementers of SDIO lower-half drivers, emphasizing the importance of understanding R2/CSD response handling and the correct implementation of the lower-half interface.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-03-17 18:14:10 -03:00
Arjav Patel 0acaf4abf6 docs/sdio: add implementation details for SDIO lower-half
This update expands the documentation for implementing an SDIO lower-half driver, detailing the required interface, call-flow, and handling of the R2 response format. It emphasizes the importance of byte-shifting when the CRC is stripped by the hardware, providing reference implementations for clarity.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-03-17 18:14:10 -03:00
Arjav Patel 10c75d2722 docs/sdio: clarify 136-bit R2 format
This update adds comprehensive documentation regarding the 136-bit response format for SDIO, including the structure of the response, CRC handling, and necessary byte-shifting for alignment. This information is crucial for developers implementing or maintaining SDIO drivers.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-03-17 18:14:10 -03:00
Xiang Xiao 55e752ada8 Documentation/debugging: add stackusage tool documentation
Build Documentation / build-html (push) Has been cancelled
Add RST documentation for the stackusage.py static stack analysis tool,
covering usage, command-line options, output format, and markers.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-03-17 11:26:44 -03:00
Xiang Xiao fe217e533b tools/stackusage.py: use toolchain binaries instead of Python libraries
Replace pyelftools and capstone Python library dependencies with
subprocess calls to standard toolchain binaries (readelf, objdump,
addr2line). This eliminates all external Python package requirements,
removes manual DWARF parsing, and reduces the code from 818 to 563
lines.

Works with both GNU and LLVM toolchains via the -p/--prefix option:
  -p arm-none-eabi-  (GCC cross-compiler)
  -p llvm-           (LLVM/clang toolchain)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-03-17 11:26:44 -03:00
simbit18 76fe46a6db tools/testbuild.sh: Added a break to the dotest Blacklist and CMake loop
Added break to the dotest Blacklist and CMake loop: it stops at the first match instead of continuing unnecessarily.

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-17 10:28:48 +08:00
wangjianyu3 9e55df4eb3 boards/lckfb-szpi-esp32s3: add gc0308 minimal defconfig
Build Documentation / build-html (push) Has been cancelled
Add a minimal GC0308 camera configuration based on nsh. Unlike the
full camera config, this only enables the GC0308 DVP camera driver
(I2C, PCA9557, LEDC, CAM, VIDEO) and camcap example, without ADB,
SDMMC, LCD, PSRAM or other peripherals.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
wangjianyu3 ebfacd3bb8 boards/lckfb-szpi-esp32s3: add camera defconfig
Add camera configuration for lckfb-szpi-esp32s3 board with GC0308
sensor on DVP interface. Includes board-level camera initialization,
DVP GPIO pin mapping, and V4L2 video pipeline setup.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
wangjianyu3 370921aeba arch/xtensa/esp32s3: add CAM DVP imgdata driver
Add ESP32-S3 CAM controller driver implementing the NuttX imgdata
interface. Supports 8-bit DVP camera input with DMA-based frame
capture, VSYNC interrupt handling, and PSRAM frame buffer allocation.

The driver is sensor-agnostic: resolution and pixel format are
negotiated at runtime through the V4L2 pipeline. XCLK output
(24 MHz) is started during initialization for sensor communication.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
wangjianyu3 fadfa85296 drivers/video: add GC0308 VGA CMOS image sensor driver
Add support for the GalaxyCore GC0308 VGA CMOS image sensor.
The driver implements the NuttX imgsensor interface and supports
VGA (640x480), QVGA (320x240), and QQVGA (160x120) resolutions
via Kconfig selection. Output format is RGB565X (big-endian).

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
wangjianyu3 a07a6a00f4 video: add V4L2_PIX_FMT_RGB565X pixel format support
Add big-endian RGB565 (RGB565X) pixel format throughout the V4L2
video pipeline:
- IMGDATA_PIX_FMT_RGB565X in imgdata.h
- IMGSENSOR_PIX_FMT_RGB565X in imgsensor.h
- Format conversion and buffer size handling in v4l2_cap.c

This is needed by 8-bit DVP camera sensors that output RGB565 in
big-endian byte order (high byte first on the data bus).

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-16 17:26:27 -03:00
simbit18 3305badbd7 boards/arm/mx8mp: CMake added nutiny-nuc120 board
- CMake added nutiny-nuc120 board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 16:11:07 -04:00
simbit18 d070e3a9da arch/arm/src/nuc1xx: CMake build implemented for NuMicro NUC100 Series
- added NuMicro NUC100 Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 16:11:07 -04:00
simbit18 d6a5d7129d boards/arm/lpc43xx: CMake added boards
CMake added boards:

 - bambino-200e
 - lpc4330-xplorer
 - lpc4337-ws
 - lpc4357-evb
 - lpc4370-link2

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 16:06:14 -04:00
simbit18 09b0a83423 arch/arm/src/lpc43xx: CMake build implemented for NXP LPC43xx
- added NXP LPC43xx

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 16:06:14 -04:00
Huang Qi a48936788a arch/risc-v/k210: Add sysctl driver for clock and reset control
Add sysctl driver for K210 SoC providing clock and reset control:
- Clock enable/disable with two-stage APB/peripheral enable pattern
- Peripheral reset control with proper timing
- Clock frequency query for PLL, CPU, APB buses, and peripherals
- PLL frequency calculation and CPU frequency configuration

The sysctl driver is built unconditionally for K210 boards as it
provides essential clock and reset control functionality.

Add Kconfig option:
- K210_CPU_FREQ: Target CPU frequency in Hz (default 400MHz)

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-03-16 17:03:41 +01:00
simbit18 11b4125170 boards/arm/mx8mp: CMake added verdin-mx8mp board
- CMake added verdin-mx8mp board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 11:10:13 +08:00
simbit18 1a2fb11955 arch/arm/src/mx8mp: CMake build implemented for NXP i.MX 8M Plus family
- added NXP i.MX 8M Plus family

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-16 11:10:13 +08:00
Eren Terzioglu 6a4418b7ba boards/xtensa/esp32[-s2|-s3]: Add SHA accelerator features
Add SHA accelerator board features for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-16 11:09:49 +08:00
Eren Terzioglu 5d582b3f97 boards/risc-v/esp32[-c3|c6|-h2]: Add SHA accelerator features
Add SHA accelerator board features for esp32[-c3|-c6|-h2]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-16 11:09:49 +08:00
Eren Terzioglu 515e87391a arch/xtensa/espressif: Add SHA accelerator features
Add SHA accelerator features for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-16 11:09:49 +08:00