Commit graph

61328 commits

Author SHA1 Message Date
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
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
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
Eren Terzioglu
c1f542687b arch/risc-v/espressif: Add SHA accelerator features
Add SHA accelerator features for esp32[-c3|-c6|-h2]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-03-16 11:09:49 +08:00
simbit18
b8880c40d1 boards/arm/lpc17xx_40xx: CMake added boards
CMake added boards:

 - lincoln60
 - lpc4088-devkit
 - lpc4088-quickstart
 - lpcxpresso-lpc1768
 - mbed
 - mcb1700
 - olimex-lpc1766stk
 - open1788
 - pnev5180b
 - u-blox-c027
 - zkit-arm-1769

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-14 09:01:54 +08:00
simbit18
e12b7d8a82 arch/arm/src/mx8mp: CMake build implemented for NXP LPC17xx/40xx family
- added NXP LPC17xx/40xx family

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-14 09:01:54 +08:00
wangjianyu3
e8cef27b77 boards/lckfb-szpi-esp32s3: add sdmmc defconfig
Add SD card configuration for lckfb-szpi-esp32s3 board using
SDMMC peripheral in 1-bit mode with the following pin mapping:
  - CLK: GPIO47
  - CMD: GPIO48
  - D0:  GPIO21

Features enabled:
  - ESP32S3 SDMMC driver
  - FAT filesystem with long filename (LFN) support
  - mkfatfs utility for on-device formatting

Usage:
  mkfatfs -F 32 /dev/mmcsd1
  mkdir -p /mnt/sd
  mount -t vfat /dev/mmcsd1 /mnt/sd

Update documentation with sdmmc configuration details.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-13 12:38:43 +01:00
Alan Carvalho de Assis
108b23b7a2 doc/stm32f4discovery: Add LCD ST7567
This commits explains how to use the LCD ST7567 with STM32F4Discovery
board.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-03-13 11:29:07 +08:00
Alan Carvalho de Assis
419b44ce19 boards/stm32f4discovery: Add board profile to ST7567 LCD
This board profiles adds board support example to OPEN-SMART 1.8INCH
LCD Driver IC: ST7567 Logic Level: 3.3V

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-03-13 11:29:07 +08:00
Alan Carvalho de Assis
da39903ff0 doc/stm32f4discovery: Improve the page, add board picture
This commits improves a little bit the STM32F4Discovery documentation
page.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-03-13 11:29:07 +08:00
Filipe Cavalcanti
ad43dffb8b boards/risc-v/esp32c6: remove debug options from defconfig
Removes debug options from two defconfigs which should not been set.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-13 10:30:59 +08:00
Chip L.
4aca170070 wireless/cc1101: Make SPI burst and single frequencies configurable
This patch introduces CONFIG_CC1101_SPIFREQ_BURST and
CONFIG_CC1101_SPIFREQ_SINGLE to Kconfig, allowing users to override
the default SPI frequencies for the CC1101 wireless driver.

Previously, these values were hardcoded to 6.5 MHz and 9.0 MHz
respectively. While these are safe defaults for many setups, specific
hardware designs, high routing capacitance, or platforms utilizing
internal GPIO switching matrices (such as the ESP32) can suffer from
signal integrity degradation at these speeds. By exposing these to
Kconfig, users can easily adjust the clock speeds to match their
hardware capabilities without modifying the core driver source.

Impact:
- Build: Adds two new Kconfig options under WL_CC1101.
- Runtime: Retains 6.5 MHz / 9.0 MHz defaults. Behavior only changes
  if overridden via menuconfig.

Testing:
- Built with default values and custom Kconfig overrides.
- Hardware Testing: Tested on a sub-optimal platform utilizing an
  internal GPIO matrix (ESP32). The CC1101 failed to load at the
  default 6.5/9.0 MHz due to signal integrity issues. Downclocking
  the frequencies to 4.0 MHz via Kconfig successfully restored
  signal integrity and allowed the driver to initialize and operate
  normally.

Signed-off-by: Chip L. <chplee@gmail.com>
2026-03-12 14:23:35 +01:00
simbit18
9685cc50e2 arch/risc-v: Fix Kconfig style
- Remove spaces from Kconfig

- Add TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-12 09:08:18 +08:00
simbit18
68593448d7 mm: Fix Kconfig style
- Remove spaces from Kconfig

- Add TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-12 09:08:18 +08:00
Neil Berkman
107b7a9aa1 boards/nucleo-h743zi: Add nxboot bootloader support
Add nxboot bootloader board integration for nucleo-h743zi.

nxboot uses a three-slot layout (primary, secondary, tertiary) with
no scratch partition.

- add STM32_APP_FORMAT_NXBOOT board support and nxboot-specific OTA
  slot defaults
- gate scratch partition configuration on MCUboot, where it applies
- select nxboot linker scripts in the board build logic
- add tertiary OTA partition support in stm32_progmem.c
- add nxboot-loader and nxboot-app defconfigs and linker scripts
- validate the fixed nxboot flash layout used by this board so
  mismatched config values fail at build time instead of producing
  a silently broken image

Signed-off-by: Neil Berkman <neil@xuku.com>
2026-03-11 16:33:26 -03:00
Sumit6307
bd5e017ebd fs/mnemofs: Add portable bit primitives and cleanup hash functions
This PR addresses several portability and technical debt issues in the mnemofs filesystem by resolving source-level TODO items.

Changes:
- Implemented a portable fallback for mfs\_clz (Count Leading Zeros) in fs/mnemofs/mnemofs.h using a binary search approach. This ensures compatibility with non-GCC compilers.
- Removed the redundant 8-bit mfs\_arrhash and consolidated hashing with the existing 16-bit mfs\_hash in mnemofs\_util.c.
- Removed the related TODO comments in mnemofs.h and mnemofs\_util.c.
- Fixed NuttX style (indentation and braces) in the fallback bit primitives.

Signed-off-by: Sumit <sumit6307@gmail.com>
2026-03-11 15:07:43 -03:00
Chip L.
7bfd6ee33e wireless/cc1101: Add MSK/4-FSK, dynamic PATABLE ramping, and fix IOCTL safety
This commit overhauls the CC1101 RF driver to address physical hardware
constraints, prevent register wrap-around overflows, and support accurate
dBm power scaling via the standard IOCTL interface.

What this change does:
1. Adds WLIOC_MSK and WLIOC_4FSK modulation support in `ioctl.h` and driver.
2. Replaces static PATABLE initialization with a dynamic Ramp-up curve
   generator `cc1101_ioctl_apply_power()` based on lab calibration data.
3. Modifies WLIOC_SETTXPOWER and WLIOC_GETTXPOWER to process actual dBm
   values with a nearest-match algorithm instead of raw array indices.
4. Removes DEBUGASSERT on user-space IOCTL pointers and replaces them
   with strict -EFAULT checks.
5. Implements saturation clamping (e.g., mantissa to 256-511) to prevent
   bitrate and frequency deviation calculation overflows.
6. Rebuilds volatile PATABLE memory upon SLEEP mode wake-up.

Why it is necessary & what it fixes:
- Fixes severe OOK modulation distortion and FSK spectral splatter caused
  by statically assigned PATABLE indices.
- Fixes potential kernel panic in flat builds when IOCTL receives a NULL
  pointer from user space.
- Fixes register wrap-around (silent failures) when users pass
  out-of-bounds baud rate or FDEV values.
- Prevents RF silence after SLEEP mode due to PATABLE volatility.
- Resolves inaccurate power output when changing frequencies dynamically.

Impact:
Changes the behavior of CC1101 TX power and modulation IOCTLs to strictly
comply with standard `wlioc` definitions. Improves overall driver stability
and hardware safety.

Signed-off-by: Chip L. <chplee@gmail.com>
2026-03-11 16:05:19 +01:00
simbit18
3bea64dbb0 arch/arm/src/lpc54xx: CMake added NXP LPC54000 Series
- added NXP LPC54000 Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-11 22:43:15 +08:00
simbit18
4bfdfcbce8 boards/arm/lpc54xx: CMake added LPCXpresso54628 board
- CMake added LPCXpresso54628 board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-11 22:43:15 +08:00
anjiahao
718ae3d2c6 stm32l5/nucleo-l552ze: enable LPUART1 console on ST-Link VCP
Three fixes to make LPUART1 work as NSH console on Nucleo-L552ZE-Q:

1. stm32l5_lowputc: add LPUART-specific BRR formula (256 * fCK / baud)
   instead of reusing the standard USART divisor calculation.

2. stm32_boot: enable VDDIO2 and reconfigure LPUART1 GPIOs (PG7/PG8)
   in board_initialize. The low-level setup runs before VDDIO2 is
   enabled, so GPIOG writes silently fail.

3. stm32l5_serial: fix LPUART1 apbclock (PCLK1 not PCLK2), add
   LPUART BRR branch in setformat, cast to uint64_t to prevent
   32-bit overflow in (fCK << 8).

Also switch nsh defconfig from USART3 to LPUART1, add GPIO_LPUART1
pin definitions in board.h, and update board documentation.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-03-11 19:24:01 +08:00
Lup Yuen Lee
ebc75b0ed5 arch/tricore: Fix --help-- in Kconfig
This PR fixes a typo at `--help--` that causes NuttX Builds to fail, it should have been `---help---`. This is a recurring problem, NuttX CI uses a different way of handling NuttX Configs (it doesn't use `tools/configure.sh`)

https://github.com/lupyuen/nuttx-riscv64/actions/runs/22929878852/job/66548808341#step:5:161
```
$ tools/configure.sh rv-virt:nsh
arch/tricore/Kconfig:124: syntax error
arch/tricore/Kconfig:123: unknown option "--help--"
arch/tricore/Kconfig:124:warning: ignoring unsupported character ','
arch/tricore/Kconfig:124: unknown option "In"
```

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-03-11 13:06:13 +08:00
Arjav Patel
cc464ea7f3 docs: Add documentation for TIOCSERGSTRUCT ioctl in serial driver
Add a new section documenting the TIOCSERGSTRUCT debug ioctl and CONFIG_SERIAL_TIOCSERGSTRUCT Kconfig option. The section covers enabling the feature, how the ioctl copies driver-internal state to user space, example usage with the 16550 UART driver, and a warning about the non-stable nature of exposed structures.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-03-11 00:30:39 -04:00
Filipe Cavalcanti
5c717342ea boards/risc-v: increase init stacksize for efuse defconfig on ESP32-C6
Fixes a crash when executing basic commands on the efuse defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-03-10 22:47:51 -04:00
simbit18
dcfc386a36 boards/arm/stm32: CMake added ViewTool stm32f107 board
CMake added ViewTool stm32f107 board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-11 06:24:31 +08:00
simbit18
9fcbc65320 boards/arm/max326xx: CMake added max32660-evsys board
CMake added max32660-evsys board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-10 17:26:42 -04:00
simbit18
a64047ec1c arch/arm/src/max326xx: CMake build implemented for MAX326xx Series
- added MAX326xx Series

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-03-10 17:26:42 -04:00
Chip L.
075215cd5b wireless/cc1101: migrate to wlioc_rx_hdr_s and add operation modes
This commit refactors the CC1101 driver's read interface to comply with
the standard NuttX wireless character driver API and introduces extended
hardware operation modes.

- Migrate `cc1101_file_read` to accept and populate the standard
  `struct wlioc_rx_hdr_s` instead of returning raw byte arrays.
- Implement `cc1101_calc_rssi_dbm_x100` to preserve the hardware's
  0.5 dBm RSSI precision when scaling to 1/100 dBm units, eliminating
  the integer truncation loss present in the legacy calculation.
- Add `CC1101IOC_SETOPMODE` and `CC1101IOC_GETOPMODE` IOCTLs.
- Introduce four RF operation modes (`enum cc1101_opmode_e`):
  1. NORMAL: Standard packet mode with hardware filtering.
  2. PROMISCUOUS: Packet mode bypassing address filtering and retaining
     packets with CRC errors.
  3. SYNC_SERIAL: Bypasses FIFO, routes clock and data to GDO0/GDO2.
  4. ASYNC_SERIAL: Bypasses FIFO, routes async data to GDO2.
- Fix the `GS2200M_FIRST` IOCTL block offset in `wireless/ioctl.h` and
  allocate a dedicated IOCTL block for CC1101.

Signed-off-by: Chip L. <chplee@gmail.com>
2026-03-11 02:25:50 +08:00