Commit graph

61880 commits

Author SHA1 Message Date
raiden00pl
224b710da7 !arch/stm32l4: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
fe4baaea86 !arch/stm32h5: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
ade7264b44 !arch/stm32f7: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
ae4f9f5b44 !arch/stm32f0l0g0: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
765ea96828 !arch/stm32: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
93602a3a72 !arch/at32: separate pulse count from PWM driver
BREAKING CHANGE: separate pulse count from PWM driver

Pulse count handling was removed from PWM driver and moved to a separate driver.
For details about this change, look at previous commit.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
f1e7b143d9 !drivers: separate pulse count feature from PWM driver
BREAKING CHANGE: separate pulse count feature from PWM driver.

Coupling PWM driver with pulse count feature was bad decision from the beginning,
these are two different things:

- PWM is a modulation scheme: it continuously represents a value by varying duty
cycle, usually at a fixed frequency.
- Pulse train generation is a finite waveform transaction: generate N edges/pulses
with selected timing, then complete.

This change introduce a new pulse count driver with new API.
Now user can generate pulse train by providing:

- high pulse length in ns
- low pulse length in ns
- pulse count

All architectures supporting pulse count have been adapted in subsequent commits.
Users must migrate their code to use the new driver with new API.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
Shoji Tokunaga
08a2de27cf cmake: Fix SIM_TOOLCHAIN using CMake on macOS.
Fix an issue where `SIM_TOOLCHAIN_GCC` was incorrectly set when
configuring `sim:nsh` using CMake on macOS.
Ensure that `nuttx_sethost()` is called before `nuttx_olddefconfig()`.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-05-25 14:32:48 +02:00
dependabot[bot]
cdd10a604b build(deps): bump docker/build-push-action from 7.0.0 to 7.2.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 7.0.0 to 7.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](d08e5c354a...f9f3042f7e)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 7.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-25 19:37:58 +08:00
dependabot[bot]
ab6dbdb616 build(deps): bump docker/setup-buildx-action from 4.0.0 to 4.1.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](4d04d5d948...d7f5e7f509)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-25 19:37:32 +08:00
Lup Yuen Lee
c2de12153f Dockerfile & Docs: Change bitbucket.org/nuttx/tools to github.com
The repo bitbucket.org/nuttx/tools is no longer available. This PR changes it to to github.com/patacongo/tools, as explained in https://github.com/apache/nuttx/pull/18890. This PR updates the URL in Dockerfile and Docs.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-05-25 08:34:45 -03:00
Brunocor26
53ef7c0635 arch/arm/rp23xx: Fix PWM frequency and duty cycle calculation.
Fixed three bugs in the RP23XX PWM driver:

* setup_period: The previous divisor calculation used integer arithmetic
  that caused overflow and loss of precision. The divider is now computed
  as a 16-bit fixed-point value (div16) using 64-bit arithmetic, and
  clamped to the valid hardware range (0x10 to 0xFFF).

* setup_pulse: The compare value was incorrectly scaled by TOP instead
  of 65535, producing wrong duty cycles. The formula is now corrected
  to ((duty * (top + 1)) / 65535) with an overflow guard.

* pwm_start: The driver was not updated as part of the breaking change
  introduced in commit 4df80e19 ("!drivers/pwm: remove PWM_MULTICHAN
  option"). Access to single channel API is now info->channels[0].duty
  instead of info[0].duty.

Signed-off-by: Brunocor26 <bruno.correia@ubi.pt>
2026-05-25 10:29:17 +08:00
Matteo Golin
94f3db6bff sim/keyboard: Translate X11 key codes to NuttX codec
The previous implementation just passed X11 key codes to the NuttX
keyboard driver, which only really worked correctly for the letter keys.
Now, special keys are translated into the NuttX codec (like Enter, arrow
keys, etc.) so that they can be used properly by NuttX applications
relying on keyboard input.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-24 16:01:31 -03:00
Michal Lenc
aca5b6533e documentation/pwm: update to reflect the latest API changes
Commit 4df80e19 removed CONFIG_PWM_MULTICHAN option and changed
the API. Update the documentation to reflect this change.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-05-24 15:02:09 +02:00
Arjav Patel
0eda74c478 doc/system: Add documentation for micro-ROS integration.
Add minimal documentation of micro-ROS integration to the system
applications category, covering the library skeleton structure and
Kconfig options. This document provides baseline context for the
foundational library layout in apps/system/microros/.
2026-05-24 09:10:01 +08:00
simbit18
45fbb41a05 ci/platforms/ubuntu.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
simbit18
81c48957ee ci/platforms/linux.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
simbit18
84949a2882 ci/platforms/darwin_arm64.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
simbit18
054fc2a1b5 ci/platforms/darwin.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
Tiago Medicci Serrano
11cf7c13c0 tools/ci/testlist: Remove ESP32-P4 python defconfig from regular CI
Remove `esp32p4-function-ev-board:python` defconfig from being
built for the regular CI pipelines to avoid overloading it.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-23 09:35:16 -03:00
Tiago Medicci Serrano
144cfecc9a Documentation: Add entry for Python on ESP32-P4
Add entries related to the Python interpreter for ESP32-P4.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-23 09:35:16 -03:00
Tiago Medicci Serrano
0861662c5e boards/risc-v/esp32p4: Add defconfig for Python on ESP32-P4
Add a dedicated defconfig to run the Python interpreter on the
ESP32-P4-Function-EV-Board with ethernet support, pip and ctypes.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-23 09:35:16 -03:00
Patrick José Pereira
c9975a1e00 arch/arm/stm32h5/stm32_ethernet: Add missing netdev_carrier calls
This follows what was done in a7567677a8

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2026-05-23 20:25:16 +08:00
ImBonkers
5993ed41aa Documentation/arm: Document Nucleo-N657X0-Q LED support.
Update the Nucleo-N657X0-Q board page to reflect the autoleds and
userleds support added in the preceding commits:

* Drop "user LEDs" from the "not yet wired up" warning list (only
  the user button remains there).
* Replace the placeholder "no userleds/buttons drivers" paragraph in
  the Buttons and LEDs section with a description of the two
  mutually-exclusive paths (ARCH_LEDS vs USERLED) and a pointer to
  the new nucleo-n657x0-q:leds configuration.
* Add a leds entry under Configurations.

Signed-off-by: ImBonkers <samuelnlinden@pm.me>
2026-05-23 20:23:35 +08:00
ImBonkers
921c9d1c2f boards/arm/stm32n6/nucleo-n657x0-q: Add userleds support.
Add the userleds driver and register the /dev/userleds device so the
three on-board LEDs (LD5/LD6/LD7) can be driven from userspace when
CONFIG_ARCH_LEDS is disabled.  Structure mirrors
boards/arm/stm32h5/nucleo-h563zi with one adjustment: GPIO writes
invert state for the active-low wiring.  ARCH_LEDS / USERLED remain
mutually exclusive per the H5/H7 convention.

stm32_bringup.c now calls userled_lower_initialize("/dev/userleds")
when CONFIG_USERLED_LOWER is set; mirrors the H5 bringup hook.

Ship a nucleo-n657x0-q:leds defconfig that bundles ARCH_LEDS=n +
USERLED + USERLED_LOWER + EXAMPLES_LEDS (LEDSET=0x07) so the userled
path is reproducible with one configure step.

Tested on Nucleo-N657X0-Q with arm-none-eabi-gcc.  Configured with
nucleo-n657x0-q:leds, built and flashed: /dev/userleds appears and
the 'leds' NSH command cycles Red, Green and Blue independently as
expected.

Signed-off-by: ImBonkers <samuelnlinden@pm.me>
2026-05-23 20:23:35 +08:00
ImBonkers
58c07d00d1 boards/arm/stm32n6/nucleo-n657x0-q: Add autoleds support.
Add the autoleds driver for the three on-board user LEDs (LD5 red
PG10, LD6 green PG0, LD7 blue PG8; all active-low).  Structure
mirrors boards/arm/stm32h5/nucleo-h563zi with the polarity and
initial-OFF state corrected for the active-low wiring.

* boards/Kconfig: ARCH_BOARD_NUCLEO_N657X0_Q selects ARCH_HAVE_LEDS
  so the ARCH_LEDS prompt becomes available.
* arch/arm/src/stm32n6/stm32_idle.c: include <arch/board/board.h>
  so LED_IDLE is defined and up_idle() actually calls into the
  autoleds driver around WFI.

The existing nsh and ostest defconfigs do not pin CONFIG_ARCH_LEDS
and therefore inherit its Kconfig default (y when ARCH_HAVE_LEDS is
selected), so after this patch they include the autoleds driver by
default.  This matches the convention on the comparable H5 and H7
Nucleo defconfigs, which also leave ARCH_LEDS at its default.

Tested on Nucleo-N657X0-Q: nsh and ostest still build, flash and
run.  With CONFIG_ARCH_LEDS=y, green is steady at the NSH idle
prompt; red pulses on each IRQ but the on-time is too brief to be
clearly visible to the eye.

Signed-off-by: ImBonkers <samuelnlinden@pm.me>
2026-05-23 20:23:35 +08:00
Tiago Medicci Serrano
d649732877 arch/risc-v: Fix Espressif timer registering ID
Fix Espressif timer registering ID. Espressif's general purpose
timers are grouped in different Timer Groups, which may contain
more than one general purpose timer. The current implementation is
related to the timer groups (timer0 refers to Timer Group 0, for
instance), but previous registering method was referring to the
timer inside each group, which caused it to fail when more than
one timer group was being selected because only the first timer
on each group is being actually registered.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-22 19:38:44 -04:00
Tiago Medicci Serrano
4047b9f42b arch/risc-v: Clear BSS section for RISC-V-based Espressif SoCs
Always clear the BSS section before calling `bootloader_init`.
This is necessary because, otherwise, `bootloader_init` may fail
even before `bootloader_clear_bss_section` is called again by that
function.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-22 12:20:33 -04:00
Eren Terzioglu
c1cc9a4dc7 arch/risc-v/espressif: Fix CMake build issues for new peripheral support
Fix CMake build issues

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-22 19:25:56 +08:00
jianglianfang
94733dd17e golfish_gpu_fb: clear fb when initialization
Commit an initial blank frame during goldfish_gpu_fb_register() to
avoid rendering a stale frame from the emulator after reboot.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2026-05-22 17:18:13 +08:00
jianglianfang
a8de4c998c drivers/video: use spinlock to replace critical section for goldfish_fb and vnc
Critical sections only disable interrupts on the local CPU, which
is insufficient for SMP. Replace with per-device spinlocks to
ensure proper mutual exclusion across all cores.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2026-05-22 15:38:50 +08:00
zhangyu117
c858f3cc44 arch/tricore: Add hardware debug breakpoint and watchpoint support.
Implement hardware breakpoint and watchpoint support for TriCore
architecture using the Trigger Event (TREVT) registers. This enables
the standard NuttX debugpoint API (up_debugpoint_add/remove) on TriCore
processors, supporting read/write/execute watchpoints and breakpoints
via the on-chip debug unit.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-05-22 15:38:36 +08:00
Patrick José Pereira
49d7959b96 arch/arm/stm32h5/i2c: Fix warn message about used but not initialized variables
Fix "-Wmaybe-uninitialized" warning messages

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2026-05-22 13:36:54 +08:00
Patrick José Pereira
8df855d2ab arch/arm/stm32h5: Add ethernet hardware checksum
The Ethernet MAC (57.11.4) was already configured in the code,
but it was necessary to configure the Transmit Descriptor (57.10.3)
in read format:
  - Checksum Interface Control for IP, payload and pseudo-header
Add checks for Recceive Descriptor (57.10.4) in read format:
  - Receive Descriptor 1 is valid from Receive Descriptor 3
  - IP checksum was not bypassed
  - IP header checksum error op IP payload checkerror is set

Testing with STM32 Nucleo-144 using iperf, improved transmission from
35 MBits/s to 50MBits/s.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2026-05-21 23:14:24 -04:00
Peter van der Perk
87d8dd797d arch/arm/imx9: Add SAR ADC support
Add support for the i.MX9 SAR ADC block.

Based on the arm64 version but slightly different init due to SCMI and
different channel mask for i.MX95.

The driver provides initialization, deinitialization, channel-mask
validation, and one-shot reads for the supported ADC channels. It also
handles the ADC clock bring-up, power-up sequence, calibration, and raw
12-bit result extraction from the per-channel data registers.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-05-21 23:13:11 -04:00
Filipe Cavalcanti
91cd34a10c boards/xtensa/esp32: increase MM_REGIONS for psram defconfig
Increase MM_REGIONS from 5 to 6 to accomodate latest changes from
initialization refactor.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-05-21 23:12:33 -04:00
Jiri Vlasak
7065266c0c doc/audioutils: Add rtttl-c documentation
Add documentation about rtttl-c, a simple RTTTL parsing library.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2026-05-21 23:12:05 -04:00
Tiago Medicci Serrano
2c8dc17510 arch/risc-v: Enable setting cache line size for ESP32-P4
Enables setting the cache line size for ESP32-P4 using Kconfig
options.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-22 10:41:19 +08:00
Lwazi Dube
2b0c59bcf4 drivers/usbhost_hidmouse: fix button detection in touchscreen example
Fix an issue where button presses were missed in the touchscreen
example due to incorrect packet processing.

Previously, the driver waited to accumulate a batch of packets but only
processed the first one, effectively discarding the rest. The driver
now reads and processes packets one at a time to ensure no input
events are lost.

Also fixed typo: usbhost_xythreshold does not exist.

Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
2026-05-22 10:38:25 +08:00
Matteo Golin
a50614512c docs/raspberrypi-4b: Document new SMP configuration
Documents the new SMP configuration.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-22 06:45:10 +08:00
Matteo Golin
4f8b897e37 boards/raspberrypi-4b: Add SMP configuration
Adds SMP support and an `smp` configuration for the RPi4B.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-22 06:45:10 +08:00
hanzhijian
2b670b83ae Documentation: add candump application documentation
Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-22 00:43:01 +08:00
hanzhijian
41cd6eb16d Documentation/uorb: Fix command references in uORB docs.
Align the uORB application documentation with the actual command names, source layout, and configuration options in apps/system/uorb.

This updates the page to describe both uorb_listener and uorb_generator, uses the registered NSH command names in usage examples, and documents the listener and generator options to match the current implementation.

It also adds the relevant Kconfig enablement notes so the documented commands are easier to find and use.

Tested with:
- make html SPHINXOPTS="-W" -j

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-22 00:42:48 +08:00
zhangyu117
02833038fd arch/tricore: Full implementation of setjmp and longjmp.
1. The original method of restoring the register context relies on
   the ret instruction, which does not conform to the semantics of
   longjmp not returning.
2. There are csa leak during longjmp and need recycle.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-05-22 00:38:02 +08:00
zhangyuan29
e087d0f79d arch/tricore: Support setjmp and longjmp.
Add setjmp/longjmp support for TriCore architecture using iLLD
intrinsics to save and restore the CSA (Context Save Area) chain.

This implementation saves upper/lower context registers and walks
the CSA linked list to restore the full call context on longjmp.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-05-22 00:38:02 +08:00
hanzhijian
fd907e6ef4 sim: pass no-pie through gcc driver
Pass -no-pie through the gcc driver instead of forwarding it as -Wl,-no-pie.

On Ubuntu 20 with GCC 9, sim:nsh failed during the final link step with /usr/bin/ld: cannot find -lgcc_s.

This change fixes the link failure in that environment.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-21 10:53:00 -03:00
Eren Terzioglu
50352c5b75 Docs/platforms/risc-v: Add Analog Comparator docs for esp32[-h2|-p4]
Add Analog Comparator docs for esp32h2 and esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-21 09:38:58 -04:00
Eren Terzioglu
2769b27efd boards/risc-v/espressif: Add Analog Comparator board support for esp32[-h2|-p4]
Add Analog Comparator board support for esp32p4 and esp32h2

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-21 09:38:58 -04:00
Eren Terzioglu
df27531c09 arch/risc-v/espressif: Add Analog Comparator for esp32[-h2|-p4]
Add analog comparator support for esp32p4 and esp32h2

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-21 09:38:58 -04:00
Peter Barada
2230d32595 Documentation/nucleo-h753zi: Add board image
Add missing NUCLEO-H753ZI board image.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-05-21 08:56:24 +02:00