Commit Graph

61642 Commits

Author SHA1 Message Date
Eren Terzioglu 5e29129d97 Docs/platforms/esp32p4: Add LP_ADC docs
Add LP_ADC docs for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-24 12:37:11 +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
Tomasz 'CeDeROM' CEDRO 3efaf80d3d boards/xtensa/esp32s3: New board WaveShare ESP32-S3-Touch-LCD-1.28 (WIP).
* Initial experimental / work in progress implementation.
* New board name is esp32s3-ws-lcd128.
* Supports Kconfig delectable w/wo touch variants (lcd gpios difference).
* IMU QMI8658 bringups is put into esp32s3/common/src to share with other
  boards. Pin defines are located at <board>include/board.h and referenced
  with `#include <arch/board/board.h>`.
* Supported configurations: nsh, ostest, coremark, touch-lvgl, notouch-lvgl,
  imu-qmi8658, watchdog.
* Does not have touch panel driver yet.
* Created board documentation. Added sphinx inline cross-references.
* TODO: Fix SPI GC9A01A LCD pixel format colors.
* TODO: Create I2C CST816S touch panel driver.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2026-04-24 16:27:08 +08:00
Tiago Medicci Serrano 04c4269ef0 Documentation: Update rmt defconfig description
Updated the `rmt` defconfig description for the Espressif's SoCs.
Use the `irtest` testing app (instead of the deprecated `rmtchar`)
to test the RMT peripheral.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-24 11:09:41 +08:00
Tiago Medicci Serrano f6837da271 boards/[risc-v|xtensa]: Update `rmt defconfig for Espressif's SoCs
Adds the `CONFIG_SYSTEM_IRTEST` macro to enable building the
`irtest` application.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-24 11:09:41 +08:00
Alan Carvalho de Assis c476700583 doc/input: Add documention to MPR121 Capacitive Keypad
Build Documentation / build-html (push) Has been cancelled
This commit adds the Documentation to MPR121 Keypad and the board
profile documentation to STM32F4Discovery board.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-23 15:56:32 -03:00
Alan Carvalho de Assis f2219060c2 boards: Add support to MPR121 Capacitive Keypad
This commit adds support to MPR121 on stm32f4discovery board and a
board config example.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-23 15:56:32 -03:00
Alan Carvalho de Assis 90ab0a8ae1 drivers/mpr121: Add support to MPR121 Capacitive Keypad
This driver adds support to MPR121 Capacitive Keypad usually found
at Aliexpress. The MPR121 is a touch sensor chip from Freescale/NXP
that supports up to 12 sensor electrodes and 1 proximity electrode.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-23 15:56:32 -03: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
Julian Oes 2fd76ea150 drivers/mtd/w25n: address review comments
- Replace syslog() with finfo()/fwarn() to follow the NuttX subsystem
  debug convention.
- Merge adjacent early-continue `if` branches in w25n_pick_free_spare
  and w25n_scan_factory_bad.
- Add Input Parameters / Returned Value sections to the BBM helper
  headers.
- Clarify why only -EIO triggers a remap retry in w25n_erase and
  w25n_bwrite (block-level E-FAIL/P-FAIL vs. transient bus faults).

Signed-off-by: Julian Oes <julian@oes.ch>
2026-04-23 16:26:44 +02:00
Julian Oes 0c287d6f45 drivers/mtd/w25n: implement bad block management
Use the chip's built-in 20-entry non-volatile Bad Block Management
Look-Up Table (datasheet section 8.2.7) to transparently route around
bad blocks.

Init:
- Reserve the top 24 blocks of the array as a spare pool
- Clamp the MTD geometry to W25N_USER_BLOCKS = 1000 so upper layers
  never see the spare area (125 MB usable instead of 128 MB)
- Force BUF=1 alongside enabling ECC. The W25N01GVxxIT variant
  power-ups with BUF=0 (Continuous Read mode), in which Read Data
  ignores the column address and always starts at byte 0 - which
  silently broke any read targeting a non-zero column (OOB markers,
  sub-page reads in w25n_read).
- Scan all 1024 blocks for factory bad markers (non-FFh at byte 0 of
  the spare area of page 0) and remap any user-area bad blocks via the
  A1h BBM command. Idempotent across reboots: blocks already present
  in the LUT are skipped, so repeated scans don't consume LUT slots.

Runtime:
- On E-FAIL from w25n_block_erase or P-FAIL from w25n_program_execute,
  allocate a spare and issue A1h, then retry the operation once. The
  chip routes the retry to the spare PBA transparently. Data buffer is
  reloaded on program retry.
- Uncorrectable read ECC is left as -EIO (soft errors shouldn't trigger
  permanent remap, and remapping discards data we may still recover).

Safeguards against burning LUT slots on bogus bad blocks:
- w25n_pick_free_spare erases each candidate spare as an active proof
  of life before returning it - the factory OOB marker alone isn't
  trusted.
- w25n_bbm_swap rejects A1h with LBA outside the user area or PBA
  outside the spare pool.

Stack discipline for the logger-thread hot path:
- The 20-entry cached LUT lives in the device struct, not on the stack.
- w25n_read_bbm_lut decodes 4 bytes at a time instead of reading the
  full 80-byte LUT dump into a local buffer.

Boot diagnostics are emitted via syslog so they appear unconditionally:
- [w25n] BBM scan summary (new/remapped/unremapped/previously-remapped/
  LUT slots used)
- [w25n] W25N01GV ready line with user blocks, spare count, geometry,
  and actual SPI frequency
- [w25n] per-remap info and warnings on runtime E-FAIL/P-FAIL paths

Note: existing littlefs filesystems become unmountable because the
block count shrinks from 1024 to 1000; both PX4 board init.c paths
already mount with autoformat so they reformat on first boot after
this change.

Signed-off-by: Julian Oes <julian@oes.ch>
2026-04-23 16:26:44 +02:00
Arjav Patel f51052d780 sched/docs: Align ETC ROMFS text with tmpfs-first /tmp mount.
Update ETC_ROMFS help text and NSH/ROMFS guides to describe the
/tmp mount behavior as tmpfs-first with FAT RAMDISK fallback when
CONFIG_FS_TMPFS is not enabled.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-04-23 10:26:21 -03:00
Arjav Patel bf0848dbd6 boards/sim: Prefer tmpfs for /tmp in rc.sysinit.
Prefer mounting /tmp with tmpfs in the SIM default rc.sysinit when
CONFIG_FS_TMPFS is enabled, and keep the FAT RAMDISK path as a
fallback for configurations that only enable CONFIG_FS_FAT.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-04-23 10:26:21 -03: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
raiden00pl 53c4574ebc boards/stm32l5: migrate to new pinmap
migrate stm32l5 to new pinmap

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-23 20:31:50 +08:00
raiden00pl ec85c9a708 boards/stm32wb: migrate to new pinmap
migrate stm32wb to new pinmap

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-23 12:59:47 +02:00
Shunchao Hu 5428220062 net/devif: Reorder ipv4_input packet classification.
Rework ipv4_input() packet classification to make the control flow
clearer and keep the common local-unicast case first.

This change:
- handles local packets first
- keeps broadcast/multicast handling in dedicated branches

It also prevents broadcast and multicast packets from falling through
into the unicast forward path.

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
2026-04-23 15:11:08 +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 3349a40e9a sensors/Make.defs: Aligned Make with Cmake
This sensor was not present in the Make.defs file

     AMG88xx Infrared Array Sensor
     https://github.com/apache/nuttx/pull/12829

Moved:
    These drivers can be used with sensor connected over SPI or I2C bus
         Bosch Sensortec BMI160
         Bosch Sensortec BMI088

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:55 +08: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
simbit18 9035fba275 ci/testlist/risc-v-02.dat: Added boards build with CMake
-  Boards build by CMake

    esp32c3-xiao

    esp32-c3-zero

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
simbit18 ce7326bf14 testbuild.sh: CMake Added -DNXTMPDIR
- It is now possible to create folder for third-party packages in CMake as well. (Aligned with Make)

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
shichunma 7897729bec net/tcp: improve tcp_send_txnotify
Use conn->dev directly when it is already available

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
2026-04-21 22:13: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 7141f487c0 boards/qemu-intel64: align _etbss to fix TLS block size mismatch
Align _etbss in the linker script so (_etbss - _stdata) matches the
compiler's aligned TLS block size.

Fix ostest failure for CONFIG_SCHED_THREAD_LOCAL=y

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +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
raiden00pl e79cade0e3 boards/qemu-intel64/nsh: enable assertions and full opt
enable assertions and full opt for qemu-intel64/nsh

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
raiden00pl 78eae568ea boards/qemu-intel64/jumbo: enable assertions and full opt
enable assertions and full opt for qemu-intel64/jumbo

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
raiden00pl 9416b1a606 boards/qemu-intel64/ostest: enable assertions
enable assertions for qemu-intel64/ostest

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
raiden00pl 6f9d6f3d94 boards/nucleo-c071rb: add nxmodbus examples to jumbo
add nxmodbus client and server examples to jumbo

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +08:00
raiden00pl 4c38d9be04 boards/sim: add nxmodbus over RTU demo
add nxmodbus over RTU demo for sim

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +08:00
raiden00pl 287051ef09 boards/qemu-intel64: add nxmodbus tools for jumbo config
add nxmodbus tools for qemu-intel64/jumbo config

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +08:00
raiden00pl d1c8c7e480 Documentation: add nxmodbus doc
add nxmodbus doc

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +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
Alan Carvalho de Assis e5efaf9f5d boards: Fix modbus configs after moving it to apps/industry
The modbus was moved to inside apps/industry, so these defconfigs
need to be updated

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-20 08:35:15 +02:00
Alexey Matveev e9de74d3a9 boards/stm32f103-minimum: Add CAN bring-up, char/socket drivers, and defconfig
Build Documentation / build-html (push) Has been cancelled
Add board support for on-chip bxCAN: stm32_can.c registers /dev/can0 via stm32_caninitialize() when CONFIG_STM32_CAN_CHARDRIVER is set; stm32_cansock.c calls stm32_cansockinitialize() for the socket-CAN path when CONFIG_STM32_CAN_SOCKET is set.

Signed-off-by: Alexey Matveev <tippet@yandex.ru>
2026-04-19 22:56:46 +08:00
aviralgarg05 87bebead38 boards/arm/cxd56xx/spresense: Add ostest, coremark and getprime configs.
Add dedicated Spresense defconfigs for ostest, coremark and\ngetprime so the board has focused test and benchmark entry\npoints for these workloads.\n\nThis keeps the change scoped to new board configurations and\nfollows the existing Spresense baseline settings for the new\ntargets.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-04-19 10:41:47 -03:00
Filipe Cavalcanti fc003777c5 documentation: update ESP32-C3|C6|H2 flash allocation table
Update the user documentation for flash allocation when using MCUboot.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-19 07:10:31 -03: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
Lup Yuen Lee 3e570aa219 CI: Remove corrupted downloads for build retry
We have implemented CI Build Retry for mitigating Download Failures. But right now it will reuse any Corrupted Downloads (instead of deleting them), which will cause CI Build Retry to fail repeatedly: https://github.com/apache/nuttx/actions/runs/24611381081/job/71966407518#step:10:627

```
Ignored files: system/argtable3/v3.2.0.7402e6e.tar.gz
gzip: stdin: not in gzip format
make[3]: *** [Makefile:76: argtable3] Error 2
```

This PR proposes to change `git clean -fd` to `git clean -xfdq`. This will remove any Corrupted Downloads, preventing their reuse for CI Build Retry:

```bash
## Simulate a corrupted download for argtable3
$ tools/configure.sh qemu-armv8a/netnsh
$ Downloading v3.2.0.7402e6e.tar.gz--argtable3
## Press Ctrl-C to stop the build

## `git clean -fd` won't remove the corrupted download
$ cd ../apps
$ git clean -fd
$ find . -name "v3.2.0.7402e6e.tar.gz"
./system/argtable3/v3.2.0.7402e6e.tar.gz

## `git clean -xfdq` removes the corrupted download
$ git clean -xfdq
$ find . -name "v3.2.0.7402e6e.tar.gz"
## Corrupted download is deleted correctly
```

`git clean -xfdq` is also found in the same testbuild script, so we are using it consistently:

https://github.com/apache/nuttx/blob/12e8f92a282fac58e0dfff587ea3d9502e4804c0/tools/testbuild.sh#L286-L291

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-04-19 14:21:58 +08:00