Commit graph

3316 commits

Author SHA1 Message Date
makejian
5fb5e2ff4f docs: update crypto API documentation with supported algorithms
Document all supported cryptographic algorithms and their variants in the NuttX Crypto API subsystem, including:
- AES-CBC with 128/192/256-bit key sizes
- HMAC and hash functions
- AES GMAC and CMAC
- ChaCha20-Poly1305
- And other supported algorithms

This documentation provides a comprehensive reference for developers using the cryptographic services.

Signed-off-by: makejian <makejian@xiaomi.com>
2026-01-15 16:11:19 -03:00
xuxin19
81d1126965 tools[feat]: add config check tool
[checkkconfig.py] is a tool that simulates the effects of modifying a CONFIG item,
Can be used to check whether my config changes are what I expected.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-14 17:50:18 +01:00
ouyangxiangzhen
4514a11237 sched/sched: Update the comments and docs.
This commit updated the comments and docs after removing the
nxsched_tick_expiration.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen
dedfc9af1f sched/wdog: Update the documentation.
This commit updated the documentation.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen
b968070829 sched/hrtimer: Update the documentation.
This commit updated the documentation.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
chenzihan1
513673c11a drivers/ioexpander: add enable & disable macro for gpio SETDEBOUNCE and SETMASK
IOEXPANDER_DEBOUNCE_DISABLE (0): Disable debounce filtering
IOEXPANDER_DEBOUNCE_ENABLE (1): Enable debounce filtering
IOEXPANDER_MASK_DISABLE (0): Unmask the interrupter
IOEXPANDER_MASK_ENABLE (1): Mask the interrupter

Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
2026-01-13 09:27:52 -03:00
wangchengdong
51bcec53c4 nuttx/sched: rename nxsched_timer_expiration
rename nxsched_timer_expiration to nxsched_tick_expiration
    to align with nxsched_process_tick()

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-12 16:20:42 +08:00
zhangshuai39
4b5bd23957 netlib: Supplement the netlib_check_httpconnectivity documentation
A brief introduction to the interface functions, parameters, and return values.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-01-09 17:11:04 +08:00
xucheng5
f989860c4a timer: add timer operation support
Add basic timer operations to the kernel, including registration,
start/stop, and callback handling. This provides a consistent timer
interface for use by kernel components and drivers.

Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2026-01-09 17:10:43 +08:00
dependabot[bot]
69d4e4101f build(deps): bump urllib3 from 2.6.0 to 2.6.3 in /Documentation
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.0 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.6.0...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-08 09:05:02 +01:00
Huang Qi
e6a0c6c377 Documentation: Add mquickjs documentation
Add documentation for MicroQuickJS JavaScript interpreter in
Documentation/applications/interpreters/mquickjs/index.rst.

The documentation includes:
- Description of MicroQuickJS (lightweight JS interpreter by Fabrice Bellard)
- Strict mode restrictions (ES5 subset, no array holes, no value boxing, etc.)
- Configuration options (CONFIG_INTERPRETERS_MQJS, priority, stack size)
- Usage instructions with command options and examples
- Memory limit warning (default 16MB is too large for embedded systems)
- Feature highlights (minimal footprint, tracing GC, ROM-based stdlib, etc.)

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-01-07 12:39:14 -05:00
gaohedong
863c20544c net/vlan: add a documentation for vconfig
Users can add or delete Vlan interfaces through the vconfig tool. This document describes the usage of vconfig.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2026-01-07 22:25:47 +08:00
zhangshuai39
6b4bb6b20f netlib: Supplement the netlib_check_ifconnectivity documentation
A brief introduction to the interface functions, parameters, and return values.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-01-07 17:26:35 +08:00
wangchengdong
24651af90c [EXPERIMENTAL]sched/hrtimer: update hrtimer document
Update the hrtimer documentation to describe the hrtimer state machine,
    which is introduced to handle safe cancellation and execution in SMP
    environments.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-06 23:14:04 +08:00
zhaohaiyang1
2a60b7e747 can: strict TX priority ordering to avoid priority inversion
Introduce a single configuration option to provide strict transmit
priority ordering based on CAN ID.

The intention is to expose the user-visible behavior (strict TX
priority ordering) rather than the underlying implementation details.
Strict priority ordering is only meaningful when hardware transmit
buffer cancellation is available, so splitting this functionality into
separate configuration options was misleading and could result in
partially effective or incorrect configurations.

Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2026-01-06 16:03:14 +08:00
Matteo Golin
9baf67c9d4 docs/platforms/raspberrypi-4b: Document testing configurations
Adds documentation for the two new testing configurations, ostest and
coremark.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-01-06 16:00:52 +08:00
Tomasz 'CeDeROM' CEDRO
3ab698c734 docs/security: Add Security section to the documentation.
* Each Apache project should have its own security guide.
* Security section is added to the NuttX documentation.
* Information about reported and fixed CVEs.
* Information and hints on how to report and handle security issues
  in accordance with The Apache Security Team [1] and Committers Guide [2].
* Information on what is and is not considered a vulnerability.
* List of existing NuttX CVEs added.

[1] https://www.apache.org/security
[2] https://www.apache.org/security/committers.html

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2026-01-06 02:17:20 +08:00
Bowen Wang
7dfc62bac5 qemuv7a/v8a-rpserver/proxy: remove "_ivshmem" suffix and update documents
Now the qemu-armv7a:rpserver_ivshmem, qemu-armv7a:rpproxy_ivshmem and
qemu-armv8a:rpserver_ivshmem, qemu-armv8a:rpproxy_ivshmem are not
only based on the ivshmem device but also the virtio-serial, so
remove the "_ivshmem" suffix and update documents.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-06 02:15:43 +08:00
Bowen Wang
0ff7014f75 qemu-armv7a/rpserver and rpproxy: support the rpmsg port uart
Use virtio-serial as the rpmsg-port-uart serial device, so we
can bringup the rpmsg-port-uart in qemu platform.

And update the documents:
nuttx/Documentation/platforms/arm/qemu/boards/qemu-armv7a/index.rst

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-06 02:15:43 +08:00
Bowen Wang
aa0467057c qemu-armv8a/rpserver and rpproxy: support the rpmsg port uart
Use virtio-serial as the rpmsg-port-uart serial device, so we
can bringup the rpmsg-port-uart in qemu platform.

Server command:
qemu-system-aarch64 -cpu cortex-a53 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-chardev stdio,id=con,mux=on -serial chardev:con \
-object memory-backend-file,discard-data=on,id=shmmem-shmem0,mem-path=/dev/shm/my_shmem0,size=4194304,share=yes \
-device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,addr=0xb \
-device virtio-serial-device,bus=virtio-mmio-bus.0 \
-chardev socket,path=/tmp/rpmsg_port_uart_socket,server=on,wait=off,id=foo \
-device virtconsole,chardev=foo \
-mon chardev=con,mode=readline -kernel ./out/nuttx_qemu-armv8a_rpserver_ivshmem/nuttx \
-gdb tcp::7775

Proxy command:
qemu-system-aarch64 -cpu cortex-a53 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-chardev stdio,id=con,mux=on -serial chardev:con \
-object memory-backend-file,discard-data=on,id=shmmem-shmem0,mem-path=/dev/shm/my_shmem0,size=4194304,share=yes \
-device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,addr=0xb \
-device virtio-serial-device,bus=virtio-mmio-bus.0 \
-chardev socket,path=/tmp/rpmsg_port_uart_socket,server=off,id=foo \
-device virtconsole,chardev=foo \
-mon chardev=con,mode=readline -kernel ./out/nuttx_qemu-armv8a_rpproxy_ivshmem/nuttx \
-gdb tcp::7776

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-06 02:15:43 +08:00
yezhonghui
36f91643ae sim/gpiochip: add sim gpiochip for gpio autotest
add sim gpiochip driver

Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2026-01-05 15:10:41 -03:00
Felipe Moura
4662ac5edf docs/applications/smf: added state machine framework example documentation
Update Doc - WIP

SFM doc updated - WIP

Finished first documentation release

Update documentation after source code changes

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-01-05 09:47:23 +08:00
p-szafonimateusz
e1fb0498b2 doc: update citests.rst and move to Testing
update citests.rst and move page from Guides to Testing

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2026-01-04 09:40:12 -03:00
chenzihan1
1528db236a sensor_monitor: add /proc/sensor_monitor
"Sensor procfs - Dynamic sensor debugging tool\n"
  "\n"
  "Usage:\n"
  "  cat /proc/sensor_monitor - Show currently monitored topics\n"
  "  echo <level> <topic> > /proc/sensor_monitor - Add topic(s)\n"
  "  echo rm <topic> > /proc/sensor_monitor - Remove topic(s)\n"
  "  echo add <topic> <topic> > /proc/sensor_monitor"
  " - add/remove topics\n"
  "  echo clean > /proc/sensor_monitor      - Remove all topics\n"
  "\n"
  "Examples:\n"
  "  echo sensor_accel > /proc/sensor_monitor\n"
  "  echo \"sensor_accel sensor_compass\" > /proc/sensor_monitor\n"
  "  echo \"1 sensor_accel sensor_compass\" > /proc/sensor_monitor\n"
  "  echo \"2 sensor_accel sensor_compass\" > /proc/sensor_monitor\n"
  "  echo \"rm sensor_accel\" > /proc/sensor_monitor\n"
  "  echo \"rm sensor_accel sensor_compass\" > /proc/sensor_monitor\n"
  "  echo clean > /proc/sensor_monitor\n"
  "  echo \"add 1 sensor_a rm sensor_b\" > /proc/sensor_monitor\n"
  "\n"
  "Note:\n"
  "  If <level> is not specified, it defaults to 1.\n";

Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
2026-01-04 09:24:30 -03:00
dongjiuzhu1
5ca6581353 Documentation: update capture.rst with notification and fake driver
These documentation updates correspond to commits:
- drivers/capture: add signal notification support for edge capture events
- drivers/capture: add fake capture driver for testing and development

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-01-02 07:46:52 -03:00
wangzhi16
ea180792a3 sched/task: fix Redundant memory allocation.
Since the task and group structures are no longer allocated in the same space, the memory for group is allocated in the group_allocate() function, and no further allocation is needed during the task allocation process.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-01-01 07:25:04 -03:00
dongjiuzhu1
db0b8c59ac Documentation: Add I2C bit-bang IO expander driver documentation
This documentation helps users understand when and how to use IO expander
pins for implementing additional I2C buses in their applications.

Related commit: 06099d492e (drivers/i2c: Add IO expander-based I2C bit-bang)

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-01-01 17:08:47 +08:00
Eren Terzioglu
a8cec9a034 Docs/platforms/esp32s3: Add ostest docs
Add ostest docs for esp32s3

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-01-01 17:03:20 +08:00
Michal Lenc
56dbfe7bb3 Documentation: add pages for supported MTD devices
This moves mtd.rst from special/ directory to its own special/mtd
subdirectory and adds pages for supported devices (NOR/NAND flashes and
EEPROMS) with some basic configuration and initialization description.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-12-31 11:37:49 +08:00
dongjiuzhu1
e1991fd14b Documentaion/ptp: add documentaion about system ptpd
add introduction about ptpd

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-30 10:22:09 -03:00
dongjiuzhu1
890a7a6382 Documentation: Add PTP clock driver framework documentation
This patch adds comprehensive documentation for the PTP (Precision Time
Protocol) clock driver framework in NuttX.

The documentation covers:

1. Overview and Architecture:
   - IEEE 1588 PTP clock framework introduction
   - Upper-half and lower-half driver architecture
   - Integration with POSIX clock APIs

2. Configuration Options:
   - CONFIG_PTP_CLOCK: Main framework configuration
   - CONFIG_PTP_CLOCK_DUMMY: Dummy driver for testing
   - CONFIG_CLOCK_ADJTIME: clock_adjtime() system call support

3. Device Interface:
   - Character device interface (/dev/ptpN)
   - IOCTL commands: PTP_CLOCK_GETTIME, PTP_CLOCK_SETTIME,
     PTP_CLOCK_GETRES, PTP_CLOCK_ADJTIME, PTP_CLOCK_GETCAPS,
     PTP_SYS_OFFSET, PTP_SYS_OFFSET_PRECISE

4. POSIX Clock API (CLOCKFD):
   - Using CLOCKFD() macro to access PTP clocks
   - clock_gettime(), clock_settime(), clock_getres() examples
   - clock_adjtime() with various adjustment modes
   - ADJ_OFFSET, ADJ_FREQUENCY, ADJ_SETOFFSET support

5. Dummy PTP Clock Driver:
   - Software-based implementation for testing
   - Features and initialization details

6. Example Usage:
   - Basic time operations
   - Frequency adjustment examples
   - Time offset adjustment examples

7. Implementing Lower-Half Drivers:
   - Step-by-step guide for hardware driver implementation
   - Required operations and structures
   - Registration process

8. Integration with PTP Daemons:
   - ptp4l, timemaster, ptpd compatibility
   - Standard POSIX clock API usage

9. Performance Considerations:
   - Hardware timestamping requirements
   - Cross-timestamping support
   - Frequency adjustment resolution

10. Debugging:
    - Debug configuration options
    - Debug output examples

The documentation is added to:
- Documentation/components/drivers/special/ptp.rst (new file)
- Documentation/components/drivers/special/index.rst (updated)

This provides developers with complete reference material for using
and implementing PTP clock drivers in NuttX.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-30 10:22:09 -03:00
wangchen
302731ad1a docs: add ICMP ping guide (usage, options, examples)
Add index.rst: ping usage, flags (-c -i -W -s -I), output, examples, errors.

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2025-12-29 22:41:40 +08:00
zhanghongyu
2ad01e2aab net/tcp: support recv packet in the TCP_FIN_WAIT_1/2 state
shutdown should send TCP_FIN packet.

close should send TCP_RST packet when the data in readahead has not been
                                 read and NEW_DATA has arrived.
             send TCP_FIN packet when in other cases.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-29 19:22:23 +08:00
Matteo Golin
0885b324a1 docs/cmocka: Fill out documentation for cmocka
Write documentation for cmocka.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-12-29 19:16:21 +08:00
zhangshuai39
4eb222f0a7 netlib: Supplementing the netlib_check_ipconnectivity documentation
A brief introduction to the interface functions, parameters, and return values.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2025-12-29 19:14:59 +08:00
rovinyu
906279e37a Modify `do while` Statement typo
The following should be correct sample:
do
  {
    ready = !notready();
  }
while (!ready);

senddata();

do
  {
    ptr++;
  }
while (*ptr != '\0');
2025-12-29 09:40:54 +08:00
zhanghongyu
746d68916f net/tcp: add support for the CLOSE_WAIT state
CLOSE-WAIT - represents waiting for a connection termination request
             from the local user.
      TCP A                                                TCP B

  1.  ESTABLISHED                                          ESTABLISHED
  2.  (Close)
      FIN-WAIT-1  --> <SEQ=100><ACK=300><CTL=FIN,ACK>  --> CLOSE-WAIT
  3.  FIN-WAIT-2  <-- <SEQ=300><ACK=101><CTL=ACK>      <-- CLOSE-WAIT
  4.                                                       (Close)
      TIME-WAIT   <-- <SEQ=300><ACK=101><CTL=FIN,ACK>  <-- LAST-ACK
  5.  TIME-WAIT   --> <SEQ=101><ACK=301><CTL=ACK>      --> CLOSED
  6.  (2 MSL)
      CLOSED

in the current state, we can continue to send data until the user
calls shutdown or close, then directly enter the TCP_LAST_ACK state

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-27 21:06:23 +08:00
Matteo Golin
18a5ec8410 docs/testing/nuts: Include preliminary documentation for NUTS
Documentation for the NuttX Unit Test Selection (NUTS) app. Includes
information about the configuration options, build dependencies,
currently included test cases and how to extend the test collection with
new unit tests.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-12-27 20:43:32 +08:00
gaohedong
44bc5ed635 net/vlan: add some macro for vlan
Refer:
https://github.com/torvalds/linux/blob/v6.8/include/linux/if_vlan.h#L73-L76

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-27 11:36:39 +08:00
zhangshuai39
776a6a5d0b netlib: Add IOB statistics interface description
Includes an introduction to the interface, and details about the input parameters and return values.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2025-12-25 08:37:26 -03:00
zhangshuai39
1ec63f72ac paho_mqtt: Add paho_mqtt repository description file
The description includes an introduction to paho_mqtt, configuration management, tool usage, etc.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2025-12-25 13:14:50 +08:00
zhanghongyu
6ad864ff0c mm/iob: add iob_init method to support external buffer init as iob structure
This interface allows different protocol modules to use their own unique IOB
buffer sources and allocation strategies without interfering with each other.
Representative examples are the IP protocol and the CAN protocol. The IP
protocol generally transmits packets of varying lengths and requires
relatively high peak throughput. In this case, to ensure higher performance,
IOB_BUFSIZE is often configured to be relatively large, such as greater than
500. The CAN protocol generally transmits short packets of fixed length.
In this case, to improve memory utilization, IOB_BUFSIZE is often configured
to be relatively small, such as 16 or 64. To optimize the memory utilization
when the IP protocol and the CAN protocol share the same core,
this interface was added.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-25 10:08:49 +08:00
zhanghongyu
1fd47357f7 net/packet: add PACKET_<ADD|DROP>_MEMBERSHIP support
Some third-party network libraries use PACKET_ADD_MEMBERSHIP to add MAC
addresses to devices, and this patch can add support for this.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-25 10:01:43 +08:00
chenzihan1
43b16fdb7c libc/search: add foreach api for hcreate_data
add foreach api for hash table

Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
2025-12-25 09:39:03 +08:00
zhangshuai39
994a786336 netlib: Introduction to IP conflict detection functions
The documentation includes descriptions of the IP conflict function's prototype, parameters, and return value.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2025-12-24 16:53:13 +08:00
zhangshuai39
9a75fc2162 netpkt: Introduction to using netpkt example
The introduction includes an overview, the configuration items that need to be enabled, and how to use them.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2025-12-24 16:50:27 +08:00
rongyichang
3d0f6fcbad boards/risc-v: Add lvgl64_vector configuration for RISC-V QEMU
Add new RISC-V 64-bit QEMU configuration with:
- 64-bit RISC-V (RV64) architecture support
- RISC-V Vector Extension (RVV/V-extension) enabled
- LVGL graphics framework integration
- VirtIO GPU and input device support
- NSH shell with built-in applications

This configuration enables developers to build and test LVGL graphical
applications on 64-bit RISC-V targets with Vector extension support,
providing a foundation for future SIMD optimization work.

Includes:
- defconfig: Complete configuration file with all necessary options
- Updated index.rst: Build and run instructions with QEMU launch command

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2025-12-24 09:44:01 +08:00
Luchian Mihai
172dd3959a docs/guides/lwl: move lwl's README.txt to lwl.rst
This PR moves the lwl's READEME.txt file to Documentation/guides/lwl.rst

Signed-off-by: Luchian Mihai <luchiann.mihai@gmail.com>
2025-12-23 15:20:06 +01:00
zhengyu9
491ce83508 drivers/mtd: add MTDIOC_ISBAD ioctl
add an ioctl item MTDIOC_ISBAD
used for flashtool command to check bad blocks

Signed-off-by: zhengyu9 <zhengyu9@xiaomi.com>
2025-12-23 09:26:34 -03:00
zhanghongyu
37381a9e7d net/pkt: add SOCK_DGRAM support
According to the definitions of PF_PACKET and SOCK_DGRAM,
extend the current protocol stack pkt protocol to support SOCK_DGRAM mode.

Some third-party network libraries use AF_PACKET, SOCK_DGRAM type sockets
to construct packets and send/receive data, This patch can add support
for this.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-23 09:21:18 -03:00