Commit graph

60363 commits

Author SHA1 Message Date
yezhonghui
582415318a rpmsgdev: destroy distinguish active and passive
rpmsgdev server will not destroy if client reboot

Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-12 17:48:43 +08:00
wangchengdong
273578f658 sched/clock: Remove unnecessary preprocessor definition
Remove an unnecessary preprocessor definition in clock_systime_ticks.c.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-12-12 12:31:16 +08:00
yangsong8
3a76917058 sim/usbdev: Process all pending data at once
After processing a packet of data, do not exit interrupt, but continues
to check whether there is data to be processed. If there is, continue
processing.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:35:26 +08:00
ligd
6736558d10 sim_usb: fix host function caused up_interrupt_context() failed
use host_uninterruptible to protect some system functions

Signed-off-by: ligd <liguiding1@xiaomi.com>
2025-12-12 09:35:26 +08:00
yangsong8
8bf88945ce sim/usbdev: Supports registering multiple USB devices on a same host
when start multiple sim, the host refuses to recognize multiple USB
devices, and the prompt message is as follows:
[365652.175289] UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy
[365652.175304] misc raw-gadget: fail, usb_gadget_probe_driver returned -16

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:35:26 +08:00
yangsong8
3a0d2cbd41 sim_usb: fix dev function caused up_interrupt_context() failed
use host_uninterruptible to protect some system functions.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:35:26 +08:00
yangsong8
ae39301416 drivers/usbdev: not use wd timer when zero copy in cdcacm
When using the serial framework buffer, if the buffer is full, excess
data is cached in the usb req buffer. The CDCACM driver doesn't know
when the upper layer will read data from the serial buffer, so it
needs to periodically check if the cached data can be put into the
serial buffer. However, when using zero-copy, each usb req buffer
needs to be completely read before actively switching to the next
req buffer, so the timer is not needed to assist to query.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
04fbce9d40 driver/usbdev: fix cdcacm wr container missing issue
in cdcacm_sndpacket, If `if (priv->wrcontainer)` is true, then
`priv->wrcontainer` is set to NULL. If an interrupt occurs before
`priv->wrcontainer` is reassigned after being NULL,
`priv->wrcontainer` will be reassigned once during the interrupt,
and `nwrq--` will be called, but no data will be sent at this time.
Only when data is sent by calling `txint` will `priv->wrcontainer`
be reassigned and `nwrq--` called again. This causes the issue.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
10180ab4eb drivers/usb: use lock to protect reqbuf when cdcacm unbind
When CONFIG_CDCACM_DISABLE_TXBUF is enabled, if the USB is
unplugged during serial data transmission, it is possible
that cdcacm will enter the unbind process, and reqbuf will
be released, causing a crash during serial write.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
a53223741e drivers/usbdev: fix usb cdcacm build warning
usbdev/cdcacm.c:371:11: warning: implicit declaration of function 'spin_lock_irqsave' [-Wimplicit-function-declaration]
  371 |   flags = spin_lock_irqsave(&priv->lock);
      |           ^~~~~~~~~~~~~~~~~
usbdev/cdcacm.c:375:3: warning: implicit declaration of function 'spin_unlock_irqrestore' [-Wimplicit-function-declaration]
  375 |   spin_unlock_irqrestore(&priv->lock, flags);
      |   ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
d2daf66d38 drivers/usbdev/cdcacm: Fix the issue of missing release one req buf
When unbinding, if a req buf is held by priv->container, it also
needs to be released.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
cc067ab199 drivers/usbdev/cdcacm.c: Use small lock to protect cdcacm
Use spin lock to replace enter_critical_section

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
fe293ec9b5 drivers/usbdev/cdcacm.c: fix check priv->nwrq issue
When enable CONFIG_CDCACM_DISABLE_TXBUF, dev->xmit.buffer always
take one req, so just compare CONFIG_CDCACM_NWRREQS - 1.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
e78e152cc7 drivers/usbdev/cdcacm.c: fix runtime error memcpy para is null
usbdev/cdcacm.c:2974:3: runtime error: null pointer passed as argument 2, which is declared to never be null
    #0 0x44716307 in cdcuart_dmasend usbdev/cdcacm.c:2974

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
dd5a2662ac cdcacm: check present bit
When close the serial tool in PC, only the persent bit is cleared
on Windows but all bits are cleared on linux.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:34:47 +08:00
yangsong8
b3758a1df0 compiler: redefine float and double when disable float compiling
Redefine float and double on devices that do not support floating-point.
float  ==> int
double ==> long

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 02:33:49 +08:00
ligd
452557a249 binfmt: Fix error handling in exec_module
Remove an extra return statement in exec_module failure path,
ensuring proper cleanup when errors occurs.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2025-12-11 12:57:07 -05:00
ligd
eb65ea5612 env: Always call env_release in group_release
Remove unnecessary #ifdef CONFIG_DISABLE_ENVIRON.
This makes sure environment resources are always cleaned up,
regardless of configuration.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2025-12-11 12:57:07 -05:00
zhengyu16
dd76bf54d1 Documentation: add '-f' description for umount command
Reference:
https://github.com/apache/nuttx-apps/pull/3240

Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
2025-12-11 12:13:58 -05:00
wangchengdong
e2703c3f4a arm/stm32: Disable NSH help to fix build issue
Disable NSH help in nucleo-f302r8/ihm07m1_b16 to resolve a build
failure caused by insufficient memory.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-12-11 20:07:00 +08:00
wangchengdong
23733e7642 sched/clock: Fix missing clock_inittime() call
The current implementation only calls
  clock_inittime() when RTC is enabled,
  which causes it to be skipped on other
  architectures. This patch ensures
  clock_inittime() is invoked during clock
  initialization for all cases.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-12-11 20:07:00 +08:00
Filipe Cavalcanti
37521ebf1d documentation: update flash encryption docs for Espressif devices
Adds new subsection under MCUBoot regarding use of flash encryption.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
Filipe Cavalcanti
49d6177c68 espressif: automate build system for flash enc
Modifies Kconfig and build tools to support flash encryption
and E-Fuse burning when flash encryption is enabled.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
Filipe Cavalcanti
8f42a6f6d7 arch/xtensa: add critical section on e-fuse bringup
The efuse initialization requires critical section to avoid a very
hidden corner case when flash encryption is enabled.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
Filipe Cavalcanti
151776f0a5 arch/xtensa: change .bss clear location on start
Moves the clearing of global variables to the very start
of the chip start up process. This avoids clearing some
globals that are initialized between the new location and
previous location.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
Filipe Cavalcanti
3a74b82e09 arch/xtensa: flash encryption support for ESP32|S2|S3
Deprecates ESP32_STORAGE_MTD_ENCRYPT and ESP32_OTA_PARTITION_ENCRYPT options.
Add ESPRESSIF_SECURE_FLASH_ENC_ENABLED Kconfig option.
Updates SPI Flash driver to handle encryption automatically.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
Filipe Cavalcanti
0835b345e8 arch/risc-v: flash encryption support for ESP32-C3|C6|H2
Add Kconfig option to enable flash encryption.
Default E-Fuse state is now VIRTUAL.
Modifies SPI Flash driver for encrypted operation.
Limitations:
- Requires MCUBoot
- Flash fully encrypted (no unencrypted MTD part. support)

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
simbit18
846f86e011 boards/risc-v/esp32c3: Corrected the names of #include guards
Corrected the names of #include guards

boards:

- esp32c3-devkit

- esp32c3-legacy

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-11 09:16:14 +08:00
Jiri Vlasak
702e45155a lcd/ili9341: Improve initialization
- Re-select LCD after soft reset during init. It looks that (soft) reset
  affects SPI communication.

- Clear display during the initialization.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2025-12-10 23:54:44 +08:00
Jiri Vlasak
908ce01386 lcd/lcddrv: Implement 3-wire 9-bit SPI
Some display drivers, like ILI9341, support 3-wire 9-bit SPI. In
contrast to 4-wire 8-bit SPI, which uses dedicated CMD/DATA pin to
distinguish between CMD and DATA, 3-wire 9-bit SPI uses MSB of 9-bit
frame for this purpose.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2025-12-10 23:54:44 +08:00
Jiri Vlasak
3a4b53b37c lcd/ili9341: Add config option for BGR
Display's BGR mode should not depend on the endianness.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2025-12-10 23:54:44 +08:00
Jiri Vlasak
c8ab1e3919 lcd/lcddrv: Fix warnings
- Log received param's value.
- uint32_t should be %lu in printf.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2025-12-10 23:54:44 +08:00
zhanghongyu
150e52769b net/udp: fix build error when NET_UDP_WRITE_BUFFERS disable
fix build error.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-10 23:44:14 +08:00
zhanghongyu
8d7ce77247 net/pkt: fix build error when NET_PKT_WRITE_BUFFERS disable
fix build error.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-10 23:44:14 +08:00
zhanghongyu
e2525f61b1 net/pkt: add nonblock mode and send buffered support
Supports more flexible configuration of sending methods

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-10 23:44:14 +08:00
Zhe Weng
6fd74f817d net/pkt: Support filtering protocol in AF_PACKET
Ref: https://man7.org/linux/man-pages/man7/packet.7.html

1. For `socket(AF_PACKET, int socket_type, int protocol)`: When `protocol` is set to `htons(ETH_P_ALL)`, then all protocols are received. If `protocol` is set to zero, no packets are received.
2. For `bind`: `bind` can optionally be called with a nonzero `sll_protocol` to start receiving packets for the protocols specified.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-10 23:44:14 +08:00
daichuan
ba54829239 include: modify for support socat, so need add some macro same as linux
add the necessary definitions to the Header File

Signed-off-by: daichuan<daichuan@xiaomi.com>
2025-12-10 23:44:14 +08:00
gaohedong
09e12a58d3 net/pkt: add poll function for pkt socket
add poll function for pkt socket

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-10 23:44:14 +08:00
gaohedong
9e0852c6a4 net/pkt: delete the read-back mechanism in pkt stack
When app send a pkt-packet, then it will read back it and case some problem. Connection should not read back the message sent by itself.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-10 23:44:14 +08:00
gaohedong
81f42cb2cf net/ethernet: add timestamp for socket packet
add timestamp for socket packet

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-10 23:44:14 +08:00
yangsong8
3949a87d36 boards/defconfig: enable CONFIG_SCHED_CHILD_STATUS
ADBD_SHELL_SERVICE depends on SCHED_CHILD_STATUS

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-10 23:42:07 +08:00
dependabot[bot]
dd5f562b58 build(deps): bump fonttools from 4.54.1 to 4.60.2 in /tools/pynuttx
Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.54.1 to 4.60.2.
- [Release notes](https://github.com/fonttools/fonttools/releases)
- [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst)
- [Commits](https://github.com/fonttools/fonttools/compare/4.54.1...4.60.2)

---
updated-dependencies:
- dependency-name: fonttools
  dependency-version: 4.60.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-10 22:43:44 +08:00
simbit18
5dfc4559a5 Documentation/Pipfile.lock: bump urllib3 from 2.2.3 to 2.6.0
- bump urllib3 from 2.2.3 to 2.6.0

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-10 19:23:50 +08:00
simbit18
145db20bf4 workflows/doc.yml: bump python from 3.8 to 3.10
- bump python from 3.8 to 3.10

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-10 19:23:50 +08:00
Yanfeng Liu
c38042941f arch/crt0.c: revert entry _start
This reverts crt0.c entry name to _start to fix LTO issue/17443,
needs apps/ side pull/3235.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2025-12-10 19:06:04 +08:00
Jiri Vlasak
af205ebd39 arm/kinetis: Fix warning
8th bit of SCGC3 is NFC, see K60 Reference Manual
(K60P144M150SF3RM.pdf, 12.2.11).

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
Jiri Vlasak
5090572b2a arm/kinetis: K60 has SPI1, SPI2, improve errors
K60 family has support for SPI1 and SPI2.

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
Jiri Vlasak
207767d0d6 arm/kinetis: Add FTM3 PIN defines, K60 has FTM3
Found in K60P144M150SF3RM.pdf, used for MK60FN1M0VLQ12.

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
Miloš Pokorný
b404e30332 arch/arm/kinetis: Add option to use RTS as RS-485 transmit enable
Support RS-485 on UART peripheral.

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
wangzhi16
ddad4fa16e drivers/note: Optimize code logic.
Remove duplicate code

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-12-10 14:58:29 +08:00