Commit graph

61185 commits

Author SHA1 Message Date
zhanghongyu
e404fe4b8d rndis.c: move ifup in setconfig to the work queue
Move network interface up operation (ifup) to work queue in RNDIS USB
device driver to avoid calling netdev_carrier_on API in interrupt context.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-02-27 15:39:38 +08:00
chenzhaoxiang
0d12f82074 sched/misc: fix incorrect mutex holder retrieval in assert backtrace
The dump_lockholder() function in assert.c was directly accessing themutex->holder
member variable to print the mutex holder's thread ID inthe backtrace log. This is
incorrect because the holder field is aprivate implementation detail of the mutex structure,
and the properAPI nxmutex_get_holder() should be used to retrieve the holder ID.

Using the public API ensures consistency with mutex state management,avoids potential issues
with future changes to the mutex structure'sinternal layout, and adheres to the kernel's
encapsulation principles.

This fix corrects the log output to show the accurate mutex holder IDwhen assertion failures
related to mutex locks occur, improving thedebuggability of lock-related issues.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-02-27 09:24:55 +08:00
Yuran Wu
17bc7a36ce video/imgdata: fix IMGDATA_SET_BUF macro int-conversion warning
set_buf return type is not a pointer but an integer, this will cause -Wint-conversion error.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-02-26 14:47:52 +01:00
chenzhaoxiang
14fb39a6cd sched/misc: fix incomplete data emission in coredump elf_emit function
The elf_emit() function in coredump.c was only checking for negative returnvalues
from lib_stream_puts() to detect write failures. However, lib_stream_puts()can return 0
to indicate that no bytes were written (e.g., due to stream full,end-of-file, or other
non-error conditions that prevent data writing).

This oversight meant that cases where lib_stream_puts() returned 0 would bypassthe error handling,
leading to incomplete data emission in the core dump withoutany failure indication.
The loop would continue attempting to write the remainingdata, resulting in partial or corrupted core dump files.

This fix modifies the condition from ret < 0 to ret <= 0 to:

1. Catch both error conditions (negative return values) and zero-byte writes.
2. Immediately break the write loop and propagate the failure, ensuring the core
   dump process correctly aborts when data cannot be written.

This change improves the reliability of core dump generation by ensuring allfailed or
incomplete write attempts are properly handled, preventing corruptedcore dump files.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-02-26 14:44:16 +01:00
zhanxiaoqi
4b09f34a45 mm/mempool: The wait variable of the memory pool is controlled by macros
The wait variable of the memory pool is modified to be controlled by macros, facilitating dynamic adjustment of its value via configuration macros.

Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
2026-02-26 20:48:12 +08:00
zhanxiaoqi
28749b8797 mm/mempool: Optimize undefined behavior in memory pool allocation
The wait member variable of the memory pool structure is not initialized, leading to undefined behavior of the memory pool.

Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
2026-02-26 20:48:12 +08:00
Arjav Patel
dfb2c24d62 cmake: Enhance .config handling and comparison logic
Refactor the logic for managing the .config file to ensure it aligns with Make behavior. Introduce a mechanism to set CONFIG_BASE_DEFCONFIG correctly and streamline the comparison process between .config and .config.orig, improving accuracy in detecting changes.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-02-26 09:46:02 -03:00
Arjav Patel
c172074f21 cmake/nuttx_mkconfig: Improve .config comparison logic
Refactor the process of comparing .config and .config.orig files by stripping CONFIG_BASE_DEFCONFIG lines to prevent false -dirty flags. Update .config to ensure it matches the expected Make behavior by writing the correct BASE_DEFCONFIG value.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-02-26 09:46:02 -03:00
wangchengdong
5060ee80d1 libs/pthread: disable pthread_kill when no signals
pthread_kill depends on signasl, so when all signals are disabled
 disable pthread_kill too

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
57bdb4e660 fs: disable fs automounter when no signals
disable fs automounter when no signals, since fs automounter
 depends on signals

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
3a38e71ef4 aio: add depends on not disable all signals
when all signals are disabled, aio should not be enabled

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
1608223eb3 drivers/xbee: remove nxsig_notification when signal support is disabled
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
800d39cdbf drivers/timers: remove nxsig_notification when signal support is disabled
When all signals are disabled, nxsig_notification is not available and
 should not be invoked. Remove the call to avoid build and runtime issues
 in no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
913aa99f05 drivers/sensors: remove nxsig_notification when signal support is disabled
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
784a469e02 drivers/net: remove nxsig_notification when signal support is disabled
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
9c80011c53 sched/signal: update nxsig_clockwait() to support disable all signals
Update nxsig_clockwait() to handle the case where all signals functions
are disabled.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
8514e9978f sched/signal: move nxsig_clockwait implementation to a separate file
Move the implementation of nxsig_clockwait() into a separate file
to decouple it from nxsig_timedwait().

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
317a39a3e9 drivers/lcd: remove nxsig_notification when signal support is disabled
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
8d99ce1b62 drivers/ioexpander: add DEV_GPIO_NSIGNALS dependency on signals
DEV_GPIO_NSIGNALS relies on signal support. Add an explicit Kconfig
dependency on SIGNALS to prevent invalid no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
7aa761c69d drivers/input: remove nxsig_notification when signal support is disabled
When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
wangchengdong
a7daf0a04d drivers/alt1250: remove altmdm_timer for no signals
When all signals are disabled, remove the altmdm_timer-related
  implementation and API definitions.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 20:03:05 +08:00
fangzhenwei
e4ed6156ca arch/sim: fix incomplete HCI socket data reading in simulator interrupt handler
The sim_bthcisock_interrupt() handler for Bluetooth HCI sockets in the simulatorwas using
an if statement to check for available data on the HCI socket. Thismeant that only a single
packet would be read and processed per interrupt trigger,even if multiple packets were waiting
in the socket buffer.

This led to incomplete data processing: unread packets would remain in the bufferuntil the next
interrupt tick, causing delayed handling of Bluetooth HCI events/commands,packet backlogs,
or missed data in high-throughput scenarios.

This fix replaces the if with a while loop to:

1. Continuously check for and read available data from the HCI socket until no more
   packets are present in the buffer.
2. Ensure all pending HCI packets are processed in a single interrupt handler invocation.
3. Eliminate packet backlogs and reduce latency in Bluetooth HCI communication.

The change maintains the same core data reception logic (bthcisock_receive()) butensures it runs
for all available packets, improving the reliability and responsivenessof the simulator's Bluetooth HCI socket implementation.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-02-26 08:15:28 -03:00
yinshengkai
e62e245f64 arm64/cmake: fix typo in CMAKE_STRIP flag
Typo in CMAKE_STRIP option (strl dunneeded -> strip-unneeded).

Signed-off-by: yinshengkai <yinshengkai@bytedance.com>
2026-02-26 12:12:35 +01:00
wangchengdong
bbf311348b cmake: bump minimum required CMake version to 3.20
Raise the minimum required CMake version to 3.20,
as the build system now uses the `cmake_path()` command,
which is available starting from CMake 3.20.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 10:24:36 +01:00
wangchengdong
c7b2313cdd Documentation: document nxsched_abstick_sleep()
Document nxsched_abstick_sleep().

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 17:04:47 +08:00
wangchengdong
23d48da4bd sched/sched: add nxsched_abstick_sleep()
Add nxsched_abstick_sleep() and make nxsched_ticksleep()
a wrapper around it.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-26 17:04:47 +08:00
aviralgarg05
2820444284 include/cxx/cmath: Use toolchain <cmath> with toolchain libm.
When CONFIG_LIBM_TOOLCHAIN is enabled, include_next the toolchain\n<c\+\+>/cmath wrapper instead of importing symbols from the NuttX\ncmath shim. This avoids include-order recursion and lets libstdc\+\+\nresolve std::abs/std::acos/... against the matching toolchain C\nmath.h declarations.\n\nKeep the existing NuttX cmath namespace path unchanged for non-\ntoolchain libm configurations.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-02-26 12:48:55 +08:00
simbit18
37152f7a34 boards/arm/stm32wl5: CMake added nucleo-wl55jc board
CMake added nucleo-wl55jc board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-02-26 06:20:41 +08:00
simbit18
49b2e7d6a6 arch/arm/src/stm32wl5: CMake build implemented for STM32 STM32WL5
- added STMicroelectronics STM32WL5

Signed-off-by: simbit18 <simbit18@gmail.com>

Update CMakeLists.txt

Update CMakeLists.txt
2026-02-26 06:20:41 +08:00
Matteo Golin
e699889ebc codeowners: Shorten file by using wildcards
To prevent reaching the 3MB limit on the CODEOWNERS file, this commit
replaces some multi-file entries with wildcard entries.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 17:31:29 -03:00
Matteo Golin
6d092be2b1 boards/tms570ls31x-usb-kit: Set LOOPSPERMSEC=0 to avoid build errors
This board does not have a calibrated LOOPSPERMSEC value despite needing
one in order for correct operation. This commits sets the value to 0 so
that CI builds may pass, but users who build this board will see a
warning indicate the steps for calibrating a new value.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
cd81223ac4 boards/launchxl-tms57004: Set LOOPSPERMSEC=0 to avoid build errors
This board does not have a calibrated LOOPSPERMSEC value despite needing
one in order for correct operation. This commits sets the value to 0 so
that CI builds may pass, but users who build this board will see a
warning indicate the steps for calibrating a new value.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
6e8016e6c6 boards/nucleo-wl55jc: Set LOOPSPERMSEC=0 to avoid build errors
This board does not have a calibrated LOOPSPERMSEC value despite needing
one in order for correct operation. This commits sets the value to 0 so
that CI builds may pass, but users who build this board will see a
warning indicate the steps for calibrating a new value.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
97b8cb4a5f boards/nucleo-g474re: Set LOOPSPERMSEC=0 to avoid build errors
This board does not have a calibrated LOOPSPERMSEC value despite needing
one in order for correct operation. This commits sets the value to 0 so
that CI builds may pass, but users who build this board will see a
warning indicate the steps for calibrating a new value.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
40e5379c88 boards/phy6222: Set LOOPSPERMSEC=0 to avoid build errors
This board does not have a calibrated LOOPSPERMSEC value despite needing
one in order for correct operation. This commits sets the value to 0 so
that CI builds may pass, but users who build this board will see a
warning indicate the steps for calibrating a new value.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
ca3c7c6c73 boards/qemu-armv7a: Correct LOOPSPERMSEC value
Use calibrated CONFIG_BOARD_LOOPSPERMSEC value for board configurations.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
3eb45695da boards/avaota-a1: Correct LOOPSPERMSEC value
Use calibrated CONFIG_BOARD_LOOPSPERMSEC value for board configurations.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
9de4557d2c boards/stm32/b-g474e-dpow1: Correct LOOPSPERMSEC value
Propagated correct CONFIG_BOARDS_LOOPSPERMSEC value to remaining
configurations for this board.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
Matteo Golin
2d768c294e arch/delays: Invalid default value for BOARD_LOOPSPERMSEC
Changes the default value for CONFIG_BOARD_LOOPSPERMSEC to -1, which is
invalid. All boards that forget to configure this value will encounter a
static assertion at compile time, enforcing that configurations
upstreamed to NuttX have calibrated values for correct delay timings.

Boards which implement ALARM_ARCH or TIMER_ARCH do not rely on the
busy-loop delay implementation and thus only have a run-time check to
ensure proper delay-timings (in the case where delays are used before
the alarm/timer driver is registered).

Some boards already in the NuttX upstream do not have calibrated values,
but there are no users who currently own the board to submit a
calibrated value for the configurations to use. In this scenario, the
value is temporarily set to 0 and a warning is displayed so that users
of these boards are informed of the calibration process.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-02-25 15:00:03 -03:00
wangchengdong
629a9d4ace sched/sched: fix typos and remove unused declarations in sched.h
This patch removes unnecessary and unimplemented function declarations in sched.h, fixing typos and cleaning up the header file.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-25 12:38:13 -05:00
Alin Jerpelea
c47b9dc26c AUTHORS: add Donny Jiuzhu
Donny Jiuzhu has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-02-25 10:17:40 +01:00
Alin Jerpelea
caf5457ac7 AUTHORS: add Nishant Kumar
Nishant Kumar has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-02-25 10:17:40 +01:00
Alin Jerpelea
22d6e2d05e AUTHORS: add Chengdong Wang
Chengdong Wang has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-02-25 10:17:40 +01:00
wangchengdong
ae1731210d sched/clock: fix CLOCK_BOOTTIME and CLOCK_MONOTONIC handling
The current implementation retrieves time from the same source for both
CLOCK_BOOTTIME and CLOCK_MONOTONIC, which is incorrect. CLOCK_BOOTTIME
includes time spent in system suspend, whereas CLOCK_MONOTONIC does not.

This patch fixes the incorrect clock source handling and ensures the
two clocks are distinguished properly.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-02-25 16:15:23 +08:00
simbit18
303760b937 boards/arm/a1x: CMake added QuickFeather board
CMake added QuickFeather board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-02-25 06:47:58 +08:00
simbit18
6f92e14e81 arch/arm/src/a1x: CMake build implemented for Quicklogic EOS S3
- added Quicklogic EOS S3

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-02-25 06:47:58 +08:00
simbit18
9b80988fd1 boards/arm/a1x: CMake added pcDuino board
CMake added pcDuino board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-02-24 21:40:48 +08:00
simbit18
c6c9876227 arch/arm/src/a1x: CMake build implemented for Allwinner A1X family
- added Allwinner A1X family

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-02-24 21:40:48 +08:00
anjiahao
3770c0871c mm:use mm_malloc inside of mm_memalign
Test build breadxavr:nsh:

➜ size nuttx_with_mm_memalgin
   text    data     bss     dec     hex filename
  53018      91     556   53665    d1a1 nuttx_with_mm_memalgin
~/work/nuttxwork/nuttx
➜ size nuttx
   text    data     bss     dec     hex filename
  51580      91     556   52227    cc03 nuttx

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-02-24 19:58:17 +08:00
Eren Terzioglu
90147a72c2 arch/xtensa/espressif: Fix SHA errors
Fix SHA errors for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-02-24 12:57:46 +01:00