Commit graph

61932 commits

Author SHA1 Message Date
Piyush Patle
fd2fe246cc arm64/common: enable EL1 GICv3 sysreg access from EL2
AM62x enters NuttX through EL2 before dropping to EL1. Enable the
GICv3 system register interface for lower exception levels during the
EL2 handoff so EL1 can use the CPU interface without depending on
firmware state.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-05-28 22:21:38 +08:00
hanzj
331caeb475 Documentation: document ping6 command.
Add documentation for the ping6 ICMPv6 ECHO request command.
The ping6 tool sends ICMPv6 ECHO_REQUEST packets to a remote
IPv6 host and reports round-trip times and packet loss statistics.

Refs #11081

Signed-off-by: hanzj <hanzjian@zepp.com>
2026-05-28 09:43:31 -03:00
Nazmi Aras
433312e81f arch/armv7-r: fix duplicate arm_perf.o build rule in flat build
Guard CMN_UCSRCS += arm_perf.c in arch/arm/src/armv7-r/Make.defs so that arm_perf.o is not added twice during flat builds, preventing the duplicate target make error.

Signed-off-by: Nazmi Aras <nazmi.aras@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
15354fc7c5 docs/boards: Add documentation for t3-gem-o1 board.
Add documentation for the T3 Gemstone O1 (t3-gem-o1) development board,
including board specifications, serial console, available
configurations (nsh), and installation instructions via RemoteProc.

Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
9bb24d43ce boards/arm/am67: Add support for t3-gem-o1 board.
This commit introduces basic support for the T3 Gemstone O1 (t3-gem-o1)
development board, including board configuration, linker scripts, and
drivers for NSH. Currently only UART console is supported.
All necessary files and configurations are added to enable building and
running NuttX on this TI AM67-based board.

Co-authored-by: Emre Cecanpunar <emreleno@gmail.com>
Co-authored-by: Abdullah Türkmen <abdullahturkmen@protonmail.com>
Co-authored-by: Muhammet Onur Bayraktar <mobayraktar@t3gemstone.org>
Co-authored-by: Bayram Akay <bakay@t3gemstone.org>
Co-authored-by: Nazmi Aras <nazmi.aras@t3gemstone.org>
Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
94f094cbfe arch/arm/am67: Add support for TI AM67 chips.
This commit introduces basic support for running NuttX on
main domain R5F core of TI AM67 chips, including irq, mpu, pinmux,
timer, and serial configurations. Currently only UART console is
supported. NuttX can be loaded into R5F core from U-Boot or Linux
via RemoteProc.

Co-authored-by: Emre Cecanpunar <emreleno@gmail.com>
Co-authored-by: Abdullah Türkmen <abdullahturkmen@protonmail.com>
Co-authored-by: Muhammet Onur Bayraktar <mobayraktar@t3gemstone.org>
Co-authored-by: Bayram Akay <bakay@t3gemstone.org>
Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
afdc7675c8 arch/armv7-r: Include arm_mpu.c when CONFIG_ARM_MPU is enabled.
Previously, arm_mpu.c was only compiled when CONFIG_BUILD_PROTECTED
was enabled. This caused build failures when CONFIG_ARM_MPU was set
without CONFIG_BUILD_PROTECTED. The build logic has been updated to
include arm_mpu.c whenever either CONFIG_ARM_MPU or
CONFIG_BUILD_PROTECTED is enabled.

Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
Erkan Vatan
2020035d75 arch/armv7-r: Resolve format‑specifier warnings by using proper macros.
The previous use of `%u` and `%X` for `uint32_t` values triggered
compiler warnings. These have been replaced with the appropriate
format‑specifier macros to ensure type‑correctness and eliminate the
warnings.

Signed-off-by: Erkan Vatan <evatan@t3gemstone.org>
2026-05-28 14:16:03 +02:00
hanzj
f031dc5604 Documentation: document lzf command.
Add documentation for the lzf compression/decompression command.
The lzf tool uses the liblzf library to compress and decompress
files using the lightweight LZF algorithm.

Refs #11081

Signed-off-by: hanzj <hanzjian@zepp.com>
2026-05-28 15:43:13 +08:00
Matteo Golin
8b0c54b59e docs/nxinit: Add link to Android init docs
Add the same link from the NXInit Kconfig help.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-28 09:38:17 +08:00
Matteo Golin
cee841c775 docs/nxinit: Document configurable file path
Document that the init.rc file path is now configurable.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-28 09:38:17 +08:00
Abhishek Mishra
25d7207721 fs/vfs: validate chmod and chown callers in inode_chstat()
Add pseudoFS caller validation for chmod and chown operations
using the caller's effective uid. Align behavior with POSIX
semantics by allowing owner/root chmod and root-only chown.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-05-28 09:36:51 +08:00
Tomasz 'CeDeROM' CEDRO
0cfa6f1b96 doc: Migrating the rest of documentation from cwiki.
* This completes task list in https://github.com/apache/nuttx/issues/11127.
* This preserves selected content from cwiki and moves it to new docs.
* Most pages are simple copy-paste with a simple RST formatting updates,
  with minor updates.
* Content update / reorganization will follow later on when needed.
* Files added (or updated title from cwiki -> current docs):
  * Documentation/implementation:
    * index.
    * cancellation_points.
    * Asynchronous vs. Synchronous Context Switches -> context_switches.rst.
    * ARMv7-M Hardfaults, SVCALL, and Debuggers -> hardfatuls.rst.
    * chip.h FAQ -> chip_h.rst.
    * Debug Output (SYSLOG) Issues -> syslog.rst.
    * Detaching File Descriptors -> file_descriptors.rst.
    * device_nodes.rst.
    * Dynamic Clocking -> power_management.rst.
    * ENOTTY ioctl() Return Value -> ioctl.rst.
    * memory_configurations.rst.
    * kernel_modules_vs_shared_libraries.rst.
    * NAKing USB OUT/IN Tokens -> usb.rst.
    * naming_arch_mcu_board_interfaces.rst.
    * naming_os_internals.rst.
    * nuttx_tasking.rst.
    * oneshot_timers_and_cpu_load.rst.
    * nuttx_initialization_sequence.rst.
    * short_time_delays.rst.
    * Signal Handler Tour -> signal_handlers.rst.
    * smp.rst.
    * syslog.rst.
    * Task Exit Sequence -> nuttx_tasking.rst.
    * tasks_vs_threads.rst.
    * tls.rst.
    * tickless_os.rst.
    * Why Can't Kernel Threads Have pthreads -> kernel_threads_vs_pthreads.rst.
  * Documentation/components/filesystem:
    * smartfs.rst.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2026-05-28 09:34:04 +08:00
hanzhijian
2354c720d8 Documentation: document gprof command.
Add documentation for the gprof command, which controls NuttX
function-call profiling.  Covers the start, stop, dump, and help
subcommands, configuration dependencies on CONFIG_PROFILE and
CONFIG_SYSTEM_GPROF, and a worked example showing how to collect
and analyse a gmon.out file.

Refs #11081

Signed-off-by: hanzj <hanzhijian@zepp.com>
2026-05-28 02:20:42 +02:00
hanzhijian
fa1589a697 drivers/analog: fix dead free and memory leak in mcp48xx and mcp47x6.
mcp48xx_initialize() and mcp47x6_initialize() share the same two bugs
in their allocation error paths:

1. Dead code: when the first kmm_malloc() fails and priv is NULL, the
   code calls free(priv) which is a no-op on NULL.  Remove it.

2. Memory leak: when the second kmm_malloc() fails (dacdev), the
   function returns NULL without freeing the already-allocated priv.
   Add kmm_free(priv) before the return.

Signed-off-by: hanzj <hanzhijian@zepp.com>
2026-05-28 02:18:58 +02:00
Alan Carvalho de Assis
4df7831d48 doc/nxinit: Rename Init to NXInit and fix review comments
Initially Xiang contributed NXInit as Init, but then the community
suggested to rename it to NXInit to avoid conflict with other init
systems.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-27 19:29:04 -04:00
wangjianyu3
a628ff656f Docs: Add documentation for Init
Add documentation for the Init component, including syntax explanations and
simple examples.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-05-27 19:29:04 -04:00
alexcekay
d32fdfa20b arch/arm/stm32: Support optional TX/RX UART GPIOs.
The STM32 serial drivers already treat 0 as not present for optional
GPIO fields (CTS, RTS), guarding each call site with a != 0 check.

TX and RX GPIO fields lacked this guard, so boards that
define GPIO_UARTx_TX or GPIO_UARTx_RX as 0 (pin not routed) caused
stm32_configgpio(0) to be called, which silently configures PA0 as a
floating input, corrupting any other peripheral using that pin.

Having an optional TX/RX UART is useful for several cases:
* RX-only connections: e.g. radio control input on flight-controllers where no TX is wired.
* Single-wire (half-duplex) connections: e.g. ESC telemetry connections.
* Output-only NSH which prints output but does not allow entering inputs.

Without a sentinel value for these cases one must assign the unused GPIO to
a NC pin, which is misleading when reading board configuration files.

Add != 0 guards for tx_gpio and rx_gpio across all STM32 serial driver
families.

Using 0 as the sentinel is safe for TX/RX because any valid UART config requires
GPIO_ALT bits set in the config word, so 0 can never represent a real
TX or RX pin configuration.

Signed-off-by: alexcekay <alexander@auterion.com>
2026-05-27 14:32:19 -04:00
Eren Terzioglu
328ffdb297 Docs/platforms/espressif: Add UF2 file format docs
Add UF2 file format docs for RISC-V based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-27 14:29:35 -04:00
Eren Terzioglu
a8a3e36adf Docs/platforms/xtensa: Add UF2 file format docs
Add UF2 file format docs for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-27 14:29:35 -04:00
Eren Terzioglu
be257fb910 tools/espressif: Add UF2 output support
Add UF2 file output support for Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-27 14:29:35 -04:00
Peter Barada
6bba29a2ba arch/arm/src/stm32h7: Add support for CRYP peripheral
Add STM32H7 support for AES-CBC/CTR HW encryption accelerator.
Add nucleo-h753zi:crypt defconfig.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-05-27 23:50:18 +08:00
hanzhijian
304b8706cb Documentation: document hex2bin command.
Fill the blank hex2bin documentation page with an overview,
configuration options, usage synopsis, option descriptions,
examples, and notes.  All claims are sourced from the
hex2bin_main.c implementation and the Kconfig in
apps/system/hex2bin/.

Refs #11081

Signed-off-by: Zepp-Hanzj <han6569084@gmail.com>
2026-05-27 21:46:38 +08:00
hanzhijian
8bddb558cc Documentation: Document hostname command.
Add documentation for the hostname command, which displays or
sets the system hostname.

Refs #11081

Signed-off-by: hanzj <your-email@example.com>
2026-05-27 10:04:35 -03:00
hanzhijian
95b1f7dbf1 Documentation: document cle library.
Refs #11081

Signed-off-by: hanzj <hanzj@users.noreply.github.com>
Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-27 10:03:54 -03:00
hanzhijian
9fe1ce133f Documentation: document lm75 temperature command.
Fill the blank documentation page for the lm75 (LM75 Temperature)
system command. The command reads temperature data from an LM75
I2C sensor and supports sample count and unit configuration.

Refs #11081

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-27 10:03:04 -03:00
hanzhijian
2969c8807e arch/sim: Stop publishing stale X11 display during teardown.
sim_x11events() polls g_display from the idle loop while the
framebuffer teardown path closes the X connection.  Clear the global
Display handle before teardown so the event path stops using it, but
keep the saved local Display pointer for XShmDetach(), XUngrabButton(),
and XCloseDisplay().

This only changes the sim X11 framebuffer shutdown ordering and does
not change user-visible APIs or build configuration.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-27 13:16:29 +02:00
hanzhijian
4f512de7cb Documentation: Document dd command.
Add documentation for the dd command, which copies data from
an input file or device to an output file or device.

Refs #11081

Signed-off-by: hanzj <your-email@example.com>
2026-05-27 12:48:02 +02:00
hanzhijian
ab77fb3467 Documentation: Document stackmonitor command.
Add documentation for the stackmonitor command, which starts a
background daemon to monitor stack usage for all tasks and threads.

Refs #11081

Signed-off-by: hanzj <your-email@example.com>
2026-05-27 12:29:35 +08:00
Tiago Medicci Serrano
fc5c01dc70 xtensa/esp32: Fix RWDT register offsets.
The RWDT register offsets were incorrectly set to ESP32-S3 values
instead of ESP32 values. This was introduced when the code was
refactored from using the local NuttX header hardware/esp32_rtccntl.h
(which had the correct offsets) to using the HAL library headers, and
the offsets were moved inline into esp32_wdt.c with wrong values.

Correct the offsets to match the actual ESP32 register layout from
soc/rtc_cntl_reg.h (RTC_CNTL_WDTCONFIG0_REG at 0x8c, INT_ENA at
0x3c, etc). Without this fix, all RWDT operations (enable, configure
timeout, enable interrupt, acknowledge interrupt, feed, write-protect)
were targeting wrong memory addresses, rendering the RWDT completely
non-functional.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
d2cbca2759 xtensa/esp32: Fix divide-by-zero in RTC WDT clock calibration.
Under the BOARD_LATE_INITIALIZE boot flow, rtc_clk_xtal_freq_get()
may return 0 (SOC_XTAL_FREQ_AUTO) because the XTAL frequency has
not yet been stored to the RTC register when the WDT driver is
initialized. This causes rtc_clk_cal() to divide by zero
internally (EXCCAUSE=0006) when computing the RTC slow clock
period.

Fix by explicitly calling rtc_clk_xtal_freq_update() with the
board's configured crystal frequency if rtc_clk_xtal_freq_get()
returns 0. Also add a guard in esp32_wdt_settimeout() to return
-EIO if ESP32_RWDT_CLK() still returns 0 cycles/ms, preventing
a subsequent divide-by-zero when computing the maximum timeout.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
8e51220447 xtensa/esp32: Re-apply WDT prescaler and timeout at start.
Same issue as ESP32-S3/S2: with BOARD_LATE_INITIALIZE, the
constructor function enable_timer_group0_for_calibration() resets
Timer Group 0 registers after board_late_initialize() has
configured the MWDT0 prescaler, causing the watchdog to fire at an
incorrect rate.

Re-apply the prescaler, timeout, and feed the WDT counter in
esp32_wdt_start() just before enabling the timer.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
239d108ed7 xtensa/esp32s2: Re-apply WDT prescaler and timeout at start.
Same issue as ESP32-S3: with BOARD_LATE_INITIALIZE, the constructor
function enable_timer_group0_for_calibration() resets Timer Group 0
registers after board_late_initialize() has configured the MWDT0
prescaler, causing the watchdog to fire at an incorrect rate.

Re-apply the prescaler, timeout, and feed the WDT counter in
wdt_lh_start() just before enabling the timer.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Tiago Medicci Serrano
96d71ea565 xtensa/esp32s3: Re-apply WDT prescaler and timeout at start.
With the BOARD_LATE_INITIALIZE flow, board_late_initialize() runs
on a kernel thread and sets the MWDT0 prescaler. However, after it
returns, the init task (NSH) is spawned and lib_cxx_initialize()
invokes constructor functions, including
enable_timer_group0_for_calibration() from esp-hal-3rdparty which
calls timg_ll_reset_register(0), resetting all Timer Group 0
registers (including the WDT prescaler) back to their defaults.

Re-apply the prescaler, timeout, and feed the WDT counter in
wdt_lh_start() just before enabling the timer. This ensures
correct WDT configuration regardless of any intermediate register
resets by external code.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-27 09:36:43 +08:00
Patrick José Pereira
d37309e8db cmake: nuttx_create_symlink: Remove warning for CMP0205
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2026-05-26 15:11:35 -03:00
yushuailong
9e58127339 arch/sim: Add MM_FILL_ALLOCATIONS support to sim customized heap.
When CONFIG_MM_UMM_CUSTOMIZE_MANAGER is enabled, the sim heap
bypasses mm_heap/tlsf entirely and calls host malloc/free directly,
so MM_FILL_ALLOCATIONS has no effect. Add fill pattern support
directly in sim_ummheap.c:
- malloc: fill user region with 0xaa
- free: fill user region with 0x55
- realloc: fill extended region with 0xaa

This helps detect uninitialized reads in sim environment,
which ASan does not support.

Signed-off-by: yushuailong <yyyusl@qq.com>
2026-05-27 01:40:18 +08:00
hanzhijian
3f4251e257 Documentation: Document taskset command.
Fill the taskset application reference page with source-backed usage,
configuration, forms, examples, and notes.  The documented command forms and
mask constraints come from apps/system/taskset/taskset.c and the enabling
configuration comes from apps/system/taskset/Kconfig.

Signed-off-by: hanzj <han.zhijiang@zte.com.cn>
2026-05-26 23:15:36 +08:00
hanzhijian
84f8156605 Documentation: document uniqueid command.
Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-26 09:05:19 -04:00
hanzhijian
cea3a33ae7 Documentation: Document tee command.
Add the missing application reference for the tee system command.  The
page now documents the command purpose, build configuration, usage,
options, arguments, examples, and error behavior using the implementation
in apps/system/tee as source evidence.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-26 09:04:57 -04:00
Eren Terzioglu
1c382c1a39 Docs/platforms/esp32p4: Add LP Mailbox docs
Add LP Mailbox docs for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-26 10:03:43 +08:00
Eren Terzioglu
16776059d2 boards/risc-v/esp32p4: Add LP Mailbox board support
Add LP Mailbox board support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-26 10:03:43 +08:00
Eren Terzioglu
5a8678b591 arch/risc-v/espressif: Add LP Mailbox support for esp32p4
Add LP Mailbox support for esp32p4 to share data between HP and LP core

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-26 10:03:43 +08:00
Matteo Golin
8a8a5af90d !boards/boardctl: Remove BOARDIOC_INIT
BREAKING CHANGE: Remove BOARDIOC_INIT macro now that the interface is
removed in favour of CONFIG_BOARD_LATE_INITIALIZE.

Quick fix: instead of calling BOARDIOC_INIT from your application,
instead enable late initialization to have it performed automatically
prior to application entry.

If you need custom initialization logic, use the board_final_initialize
function and `BOARDIOC_FINALINIT` command instead.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-26 09:57:29 +08:00
dependabot[bot]
684031aeab build(deps): bump docker/login-action from 4.0.0 to 4.2.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.0.0 to 4.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](b45d80f862...650006c6eb)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-25 15:56:41 -04:00
hanzhijian
0d792e6ffd Documentation: document setlogmask command 2026-05-25 10:30:16 -03:00
raiden00pl
a8f8979bfe boards/nucleo-c092rc: add pulse count example
add pulse count example for nucleo-c092rc

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
d54ed68aa0 boards/nucleo-f446re: add pulse count example
add pulse count example for nucleo-f446re

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
4f929d63f3 boards/nucleo-h743zi2: add pulse count example
add pulse count example for nucleo-h743zi2

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
207bddc40f arch: remove PULSECOUNT references from PWM drivers
remove PULSECOUNT references from PWM drivers that not implemet PWM feature.
PULSECOUNT for these architectures was not implemented, so we just remove all references to it.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-25 14:33:11 +02:00
raiden00pl
ab8262eb62 !arch/tivia: 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