Commit graph

60363 commits

Author SHA1 Message Date
liwenxiang1
0750e417c9 drivers/note:Fix the crash issue when enabling trace dump
fix dereference of null pointer.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-12-10 14:58:29 +08:00
wangzhi16
a340cb59d9 drivers/note: fix compile error.
note/note_driver.c:2440:45: error: implicit declaration of function 'note_find_taskname'; did you mean 'note_get_taskname'? [-Werror=implicit-function-declaration]
 2440 |       FAR struct note_taskname_info_s *ti = note_find_taskname(pid);
      |                                             ^~~~~~~~~~~~~~~~~~
      |                                             note_get_taskname
note/note_driver.c:2440:45: error: initialization of 'struct note_taskname_info_s *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
note/note_driver.c:2444:26: error: invalid use of undefined type 'struct note_taskname_info_s'
 2444 |           strlcpy(buf, ti->name, len);
      |                          ^~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-12-10 14:58:29 +08:00
yukangzhi
d5b254fabb drivers/note/note_driver: Modify the macro control scope
The function sched_note_add should not be in the code
section of #ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH

Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
2025-12-10 14:58:29 +08:00
wangzhi16
9e20b41f19 note/drivers: Get taskname more safely.
When tcb may has been released in caller, the return pointer to tcb->name is dangling pointer. So add a buffer in caller, even if tcb is released, buffer is still valid.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-12-10 14:58:29 +08:00
simbit18
86a07ffac1 drivers/mmcsd: Aligned Cmake with Make
Add:
- sdio.c #5155

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-09 14:25:40 -03:00
yangsong8
130b2154aa binfmt/elf: fix issue of file not closing after being opened.
When opening the file succeeds but reading the file fails in
modlib_initialize, this will result in the open file not be closed.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-09 22:24:57 +08:00
yangsong8
7907a5b1c3 driver/usbhost: Support obtaining USB3.0 device descriptors
usbhost supports USB 3.0 device descriptors.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-09 08:57:28 -05:00
lipengfei28
84d99b7329 arch/arm64: fix create page table err
arm64 only PA_BITS=52 level 0 can be used as BlockDescriptors

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-12-09 20:25:02 +08:00
zhang hu
1e63cf1c30 Revert: "drivers/i3c: remove extra i3c_dev_register, do_daa has created them"
This reverts commit 694750e8af.

Signed-off-by: octopushu <octopushu@163.com>
2025-12-09 08:23:46 -03:00
chenxiaoyi
f107b3f5d5 stdio: disable fortify of snprintf/sprintf for clang
clang does not have builtin function `__builtin_va_arg_pack`

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-12-09 08:23:14 -03:00
chenxiaoyi
c07d9dc900 compiler: fix fortify for clang
The clang compiler has also defined `__GNUC__`, which can't be used to
decide the compiler version.

And the version used to decide whether the builtin function
`__builtin_dynamic_object_size` exist is not correct.

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-12-09 08:23:14 -03:00
zhangkai25
ad422684d4 drivers/net: Ethernet protocol stack key abnormal point pile for DFX
add log output for error flow

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2025-12-09 07:56:20 -03:00
zhanghongyu
4f7e03db2e netdev_upperhalf.c: add net_lock when vlan_foreach
avoid illegal address access caused by removing vlan
network cards during the traversal of vlan network cards

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 07:56:20 -03:00
gaohedong
00dfb5d1f3 ethernet: Release iob when dropping ethernet packets
Release iob when dropping ethernet packets

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng
8d7799d6c1 net/vlan: Allow setting default priority (PCP)
1. We add default PCP because some of our apps may not want to set PCP
   manually (e.g. Our user may just ping with pre-set PCP)
2. The `vlan_qos` is used as PCP when setting Linux's priority mapping:
   https://github.com/torvalds/linux/blob/v6.12/net/8021q/vlan.c#L590
   Although `vlan_qos` is not used when creating VLAN on Linux, we can
   use it as PCP on creating VLAN (without changing its meaning), and
   keep compatible with Linux's creating (Exactly the same when
   `vlan_qos` is 0).

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng
2b34bcfcb1 netdev/ioctl: Add support for simple VLAN ioctl
Supporting ADD_VLAN_CMD and DEL_VLAN_CMD of SIOCSIFVLAN
Ref: https://github.com/torvalds/linux/blob/v6.12/net/8021q/vlan.c#L621

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng
242c253178 net: Add VLAN device support
Inspired by Linux's way, we also create VLAN devices for managing VLAN,
which will become interfaces like `eth0.58`.

QinQ is also supported, we can create VLAN devices above another VLAN
devices, like `eth0.100.101` (or even `eth0.1.2.3.4`, also supported on
Linux).

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng
750fae4cca netdev/lower: Support share quota between devices
To prepare for VLAN device support, a VLAN device will share quota with
its real device.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
daichuan
afc210667d netdev_upperhalf.c: modify for maybe use after free with upper pointer
avoid continuing to access the released memory after the netdev_register
error occurs.

Signed-off-by: daichuan <daichuan@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng
b2db3a6430 net/netdev: Add netdev_iob_replace_l2 for netdev to avoid misuse
And fix wrong `d_len` for IOBs from `upper->txq` in TX.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Petro Karashchenko
3c0309e0ed arch/arm/samv7: optimize MCUboot loader configuration
Disable configuration options that are not needed for MCUboot loader
 - Disable floating point and long long support in libc
 - Disable libm
 - Disable POSIX features: environment variables, message queues, timers
   and pthreads
 - Disable RAMTEST app to save code space

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:04:01 +08:00
Petro Karashchenko
535b08514d cxx/cstddef: expose 'max_align_t'
expose 'max_align_t'

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:03:10 +08:00
Petro Karashchenko
9c38276249 cxx/cmath: expose 'nextafter'
expose 'nextafter'

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:03:10 +08:00
Petro Karashchenko
8c3106e2a4 libs/libm: fix typo in Kconfig
fix typo in Kconfig

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:03:10 +08:00
zhanghongyu
521e319aa3 drivers/net: replace critical_section with spinlock
so as to better support multi-core scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 14:43:59 +08:00
wangchen
fe822145a3 tun:modify issue of repeatly tun_close failed
after the network card is turned off, read and write operations need
to return -ENETDOWN, and it is necessary to wake up the waiting read
and write operations.

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2025-12-09 14:43:59 +08:00
zhanghongyu
d02ac985dc wireless/ieee802154/: remove the use of critical_section
so as to better support multi-core scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 14:43:59 +08:00
zhanghongyu
9dab103fa0 net: replace critical_section with spin lock
so as to better support multi-core scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 14:43:59 +08:00
xiezhanpeng3
fc0647491b arch/armv8-r: use -mfpu=fpv5-sp-d16 for SP-only Cortex-R52 targets
The specific Cortex-R52 implementation could be configured with
a Single-Precision-only FPU (SP-only) and no Neon unit.
Executing double-precision instructions (e.g., `vadd.f64`) triggers
an Undefined Instruction exception.

The standard `-mfpu=fp-armv8` implicitly enables double-precision,
which is unsafe for this hardware.

`-mfpu=fpv5-sp-d16` is selected as the closest architectural match.
  - It enforces Single Precision code generation (preventing crashes).
  - It enables VFPv4/FPv5 features like FMA (Fused Multiply-Add) supported by the CR52 FPU.
  - It restricts the register set to d0-d15, matching the hardware constraints.

This ensures the compiler utilizes hardware FPU and FMA acceleration
without emitting illegal double-precision instructions.

Signed-off-by: xiezhanpeng3 <xiezhanpeng3@lixiang.com>
2025-12-08 21:09:05 +08:00
Alan Carvalho de Assis
a51e45d5b3 drivers/lpwan: Fix Kconfig SX1276 and SX1262 position
When user was selecting SX1276 the configuration options to this
device was appear below SX1262.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-12-08 10:39:11 +08:00
zhanghongyu
e87082b195 net/utils/net_bufpool: add lock to struct net_bufpool_s and bufpool_navail
Add a lock to net_bufpool to simplify the protocol stack code.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-07 11:11:21 +08:00
kywwilson11
2c0e105cad arch/arm/stm32h5: Add RS-485 support to serial driver
Initial commit for adding rs-485 support to serial driver. More is needed as well as testing.

Style fixes.

Added unconfigure functionality.

Added Unconfigure configs to CONFIG.

More style fixes.

Changed depend spacing from 4 spaces to tab.

Fixed priv types, changed serialin to getreg.

Do not unconfigure tx/rx/dir pins by default.

Signed-off-by: kywwilson11 <kwilson@2g-eng.com>
2025-12-06 11:35:53 -03:00
zhanghongyu
f5741c0ea1 net/netdev/netdev_register.c: skip mld_devinit if Nic can not support mld
avoid unnecessary operations

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-06 18:13:26 +08:00
zhanghongyu
f7526522a1 icmp/icmpv6: fix the level parameter type
use a more standard definition

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-06 17:55:40 +08:00
zhanghongyu
d697f1c4f6 icmp/icmp6: fix errno forgot to add a negative sign
otherwise, errors cannot be returned correctly

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-06 17:55:40 +08:00
zhanghongyu
1bf71795fc select: fix too small timeout will be counted as 0
avoiding timeouts less than 1ms may lead to busyloop

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-06 17:46:20 +08:00
Søren Friis
1569621149 cmake: Add support for ccache.
Enable ccache in CMake if CONFIG_CCACHE is set

Signed-off-by: Søren Friis <sfriis@gmail.com>
2025-12-05 11:46:30 +01:00
simbit18
c47911ffa1 boards/arm/stm32l4: CMake added boards Part1
CMake added boards:

  - b-l475e-iot01a

 -  nucleo-l432kc

 -  nucleo-l452re

 -  nucleo-l496zg

 -  steval-stlcs01v1

 - stm32l476-mdk

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-04 17:51:44 -03:00
donghaokun
839468f52d docs/sched/sched: Add documentation for different sleep interfaces
As pull request apache#17200 & apache#17368 introduced support for scheduling sleep, a documentation is needed for different sleep interfaces.
This patch adds the description for sleep interfaces currently provided in NuttX, including Scheduled sleep(nxsched_sleep()...), Signal-scheduled sleep(nxsig_sleep()...), and Busy sleep(up_udelay()).

Signed-off-by: Haokun Dong <donghaokun@lixiang.com>
2025-12-04 18:59:58 +01:00
Michal Lenc
58be428e37 arch/arm/src/samv7/Kconfig: allow 0 in MCANx_RXFIFOx_SIZE
Zero can be used to disable the FIFO queue. Fix the range to allow
to configure this value.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-12-04 16:32:39 +01:00
simbit18
424aa6be0f workflows/build.yml: fix fatal: write error: No space left on device
Fixed error verified in this PR https://github.com/apache/nuttx/pull/17423

added to the workflow:

- Show Disk Space

- Free Disk Space (Ubuntu)
  Only Android runtime removed

- Post-build Disk Space

We can now monitor disk space.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-04 22:07:05 +08:00
Mathias Duckeck
21b9b919cc arch/arm/samv7: allow all values for count in read
The parameter count of read had to be a multiple of 4, otherwise the
result was truncated. Now all values are possible.

Signed-off-by: Mathias Duckeck <mathias.duckeck@avat.de>
2025-12-03 22:05:53 +08:00
Antoine Juckler
4863564d48 drivers/eeprom: Support PE/SE/CE commands
Add support for the page erase (PE), sector erase (SE) and chip erase
(CE) dedicated commands on supported devices.
They can be triggered using the corresponding IOCTL commands
EEPIOC_PAGEERASE, EEPIOC_SECTORERASE and
EEPIOC_CHIPERASE.

On unsupported devices, this is equivalent to writing a full page,
sector, or the entire EEPROM to 0xFF.

Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
2025-12-03 22:05:44 +08:00
Michal Lenc
bf391cc2bc drivers/lcd/st7789.c: fix byte order in st7789_fill for 3 wires
The bytes of color should be sent in an opposite order in st7789_fill
function if the driver operates in 3 wire mode.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-12-03 14:36:46 +01:00
Alin Jerpelea
0522e15e1b AUTHORS: add Michal Lenc
Michal Lenc has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2025-12-03 08:46:33 -03:00
adriendesp
ec04ef9ccf arch/arm/xmc4 : various fixes and clean
- Fix EtherCAT signals drive strengh (from errata PORTS_CM.H002), caused bus faults.
- Changed xmc4_ecat.c for compile time pin definition.
- Fixed xmc4_ecat.c register not written (reset value already used).
- Removed EXTCLK for xmc4800 as pin is used for ECAT.
- Clean xmc4 familly board.h and clocks config.

Signed-off-by: adriendesp <adrien.desproges@gmail.com>
2025-12-03 13:47:34 +08:00
Filipe Cavalcanti
2b39147fe2 documentation: update ESP32-C3 board names for legacy and new devkit
Updates the docs to the new esp32c3-devkit naming, after deprecating support
for now esp32c3-legacy.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-03 13:45:13 +08:00
Filipe Cavalcanti
1218ecfd88 boards/risc-v/esp32c3: deprecate esp32c3 boards based on esp32c3-legacy arch
This change makes the esp32c3-generic the main esp32c3 supported board: esp32c3-devkit.
The now esp32c3-legacy is pure register based and not maintained anymore.
Now, esp32c3-devkit shares the same driver implementation as ESP32-C6 and ESP32-H2.

- esp32c3-devkit  -> esp32c3-legacy
- esp32c3-generic -> esp32c3-devkit

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-03 13:45:13 +08:00
Filipe Cavalcanti
6ccc5847fb arch/risc-v/esp32c3: rename ESP32-C3 Generic configs
- ARCH_CHIP_ESP32C3_LEGACY created
- ARCH_CHIP_ESP32C3_GENERIC is now ARCH_CHIP_ESP32C3

This is part of deprecating esp32c3-devkit as esp32c3-legacy and
using esp32c3-generic (now esp32c3-devkit) instead.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-03 13:45:13 +08:00
Filipe Cavalcanti
ea1d59e89c boards/risc-v/esp32c6: add capture example to capture defconfig
Add missing PWM capture example from the capture defconfig of
esp32c3-devkitc.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-03 13:44:25 +08:00