From f508fe98e44d427b4f4a91e7a6e0c7cd6176aa98 Mon Sep 17 00:00:00 2001 From: HZY0117 <504131636@qq.com> Date: Wed, 19 Nov 2025 16:17:40 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=BA=86components\utili?= =?UTF-8?q?ties\libadt=E4=B8=ADKconfig=E7=9A=84help=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=88=E4=BF=AE=E6=AD=A3=EF=BC=9A=E7=A7=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84.config=E5=92=8Crtconfig.h=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/utilities/libadt/Kconfig | 65 +++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/components/utilities/libadt/Kconfig b/components/utilities/libadt/Kconfig index bb421cf8b03d..6665f7e7d2cd 100644 --- a/components/utilities/libadt/Kconfig +++ b/components/utilities/libadt/Kconfig @@ -2,23 +2,88 @@ menuconfig RT_USING_ADT bool "Enable ADT(abstract data type)" default y if ARCH_MM_MMU default n + help + ADT(abstract data type) are a set of general interfaces that encapsulate commonly used data structures. + + ADT's Core Functions and Components: + AVL Tree (RT_USING_ADT_AVL) + Bitmap (RT_USING_ADT_BITMAP) + Hash Table (RT_USING_ADT_HASHMAP) + Reference Counting API (RT_USING_ADT_REF) + + Features and Advantages of ADT: + Abstract Interface: Hides the implementation details of data structures; only a unified interface needs to be called. + Customizability: Reduces system resource consumption through Kconfig configuration. + Generality: Applicable to various scenarios. + + Once enabled, you can use the AVL tree, bitmap, hash table, and reference counting APIs. config RT_USING_ADT_AVL bool "AVL tree" depends on RT_USING_ADT default y + help + An AVL tree (RT_USING_ADT_AVL) is a self-balancing binary search tree. + + Core capabilities: + Supports efficient insertion, deletion, and search operations; + Data is naturally ordered, facilitating range queries. + + Typical scenarios: + Task priority sorting; + Log timestamp indexing; + Ordered management of dynamic configuration items. + + Once enabled, AVL trees can be used (ADT must be enabled). config RT_USING_ADT_BITMAP bool "Bitmap" depends on RT_USING_ADT default y + help + A bitmap (RT_USING_ADT_BITMAP) represents a set of states using consecutive binary bits. + + Core capabilities: + Extreme memory efficiency; + Fast set, clear, and query operations based on bitwise operations. + + Typical scenarios: + Resource allocation flags; + Permission switches; + State set management. + + Once enabled, bitmaps can be used (ADT must be enabled). config RT_USING_ADT_HASHMAP bool "HashMap" depends on RT_USING_ADT default y + help + Hash Table (RT_USING_ADT_HASHMAP) is a storage structure based on key-value mapping. + + Core capabilities: + Average lookup, insertion, and deletion times are close to O(1); + Supports custom hash functions and key comparison rules, adapting to different key types. + + Typical scenarios: + Scenarios requiring fast object lookup using unique identifiers; + String key-value pair configuration; + High-frequency query scenarios. + + Once enabled, HashMap can be used (ADT must be enabled). config RT_USING_ADT_REF bool "Reference API" depends on RT_USING_ADT default y + help + The Reference Counting API (RT_USING_ADT_REF) is a mechanism for managing object lifecycles through a counter. + + Core capabilities: + Simplifies the release logic of shared resources across multiple modules; + automatically maintains the lifecycle without requiring manual tracking of object users. + + Typical scenarios: + Multi-threaded/multi-module shared resources. + + Once enabled, Reference API can be used (ADT must be enabled). From fd14b796f69523174ac08dc12b11e6fd5af26c18 Mon Sep 17 00:00:00 2001 From: HZY0117 <504131636@qq.com> Date: Sun, 23 Nov 2025 11:36:07 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=BA=86rt-thread\compon?= =?UTF-8?q?ents\utilities=E4=B8=8B=E6=89=80=E6=9C=89Kconfig=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE=E9=A1=B9=E7=9A=84help=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/utilities/Kconfig | 129 +++++++++++++++++++++-- components/utilities/rt-link/Kconfig | 31 ++++++ components/utilities/utest/utest/Kconfig | 5 + 3 files changed, 158 insertions(+), 7 deletions(-) diff --git a/components/utilities/Kconfig b/components/utilities/Kconfig index bffc381c748e..3afd0072d6b7 100644 --- a/components/utilities/Kconfig +++ b/components/utilities/Kconfig @@ -3,21 +3,56 @@ menu "Utilities" config RT_USING_RYM bool "Enable Ymodem" default n + help + Ymodem is a file transfer component based on the Ymodem protocol. + It is primarily used for file transfer between embedded devices and host computers. + + Features: + Includes CRC checksum and retransmission mechanism. + File reception and file sending capabilities. + Supports multiple file transfers and batch transfers. + + Typical application scenarios: + Firmware upgrades + Configuration file transfer + Log export + + Once enabled, Ymodem components can be used for transmission (UART serial port needs to be configured as hardware communication medium). if RT_USING_RYM config YMODEM_USING_CRC_TABLE bool "Enable CRC Table in Ymodem" default n + help + YMODEM_USING_CRC_TABLE enables the CRC lookup table method in Ymodem. + + Once enabled, the lookup table method will be used as the default method for CRC checksum calculation + (it is disabled by default, the direct calculation method is used for CRC checksum calculation). config YMODEM_USING_FILE_TRANSFER bool "Enable file transfer feature" depends on RT_USING_DFS default y + help + YMODEM_USING_FILE_TRANSFER controls whether file transfer is enabled. + + It is enabled by default. + Once enabled, received/sent data can be saved to a file, or a file can be read for transfer. + Before enabling, RT-Thread's Device Virtual File System (DFS) (RT_USING_DFS) must be enabled and adapted to the specific storage medium (such as SPI Flash driver, SD card driver). + endif menuconfig RT_USING_ULOG bool "Enable ulog" default n + help + ULOG is a lightweight, highly configurable, multi-output logging framework. + + Core positioning and advantages: + Supports log hierarchies, filtering, formatting, and multiple outputs; + Adaptable to embedded scenarios, suitable for development and debugging. + + Once enabled, the ULOG component in RT-Thread can be used (it is disabled by default). if RT_USING_ULOG if !ULOG_USING_SYSLOG @@ -30,14 +65,29 @@ menuconfig RT_USING_ULOG NOTE: It's not available on syslog mode. config ULOG_OUTPUT_LVL_A bool "Assert" + help + The highest level, used to catch the most serious logical errors. + Level: 0 config ULOG_OUTPUT_LVL_E bool "Error" + help + Used to report serious runtime errors + Level: 3 config ULOG_OUTPUT_LVL_W bool "Warning" + help + Used to report unexpected exceptions that may not cause the program to crash. + Level: 4 config ULOG_OUTPUT_LVL_I bool "Information" + help + Used to record key information during program execution. + Level: 6 config ULOG_OUTPUT_LVL_D bool "Debug" + help + Used to output detailed debugging information during the development and debugging phases. + Level: 7 endchoice endif @@ -51,20 +101,45 @@ menuconfig RT_USING_ULOG NOTE: It's not available on syslog mode. config ULOG_OUTPUT_LVL_EMERG bool "EMERG" + help + The system is in an emergency and is about to crash or is already unavailable. + Level: 0 config ULOG_OUTPUT_LVL_ALERT bool "ALERT" + help + An error that must be fixed immediately was discovered. + Level: 1 config ULOG_OUTPUT_LVL_CRIT bool "CRIT" + help + A serious error exists, causing some core functions of the system to malfunction. + Level: 2 config ULOG_OUTPUT_LVL_ERROR bool "ERR" + help + An error occurred + Level: 3 config ULOG_OUTPUT_LVL_WARNING bool "WARNING" + help + There are potential risks or abnormal situations. + Level: 4 config ULOG_OUTPUT_LVL_NOTICE bool "NOTICE" + help + This is a noteworthy normal event; + it's not an error, but it could indicate an important state change or information that requires administrator awareness. + Level: 5 config ULOG_OUTPUT_LVL_INFO bool "INFO" + help + Used to record general and detailed system operation information. + Level: 6 config ULOG_OUTPUT_LVL_DEBUG bool "DEBUG" + help + Includes detailed debugging information for development and problem diagnosis. + Level: 7 endchoice endif @@ -94,7 +169,9 @@ menuconfig RT_USING_ULOG config ULOG_ASSERT_ENABLE bool "Enable assert check." default y - + help + ULOG_ASSERT_ENABLE controls whether the ASSERT (assertion) function in the ulog logging system is enabled in the firmware. + Once enabled, assertion functionality can be used (enabled by default). config ULOG_LINE_BUF_SIZE int "The log's max width." default 128 @@ -112,6 +189,10 @@ menuconfig RT_USING_ULOG config ULOG_ASYNC_OUTPUT_BUF_SIZE int "The async output buffer size." default 2048 + help + This item will be displayed once ULOG_USING_ASYNC_OUTPUT is enabled. + + ULOG_ASYNC_OUTPUT_BUF_SIZE is used to set the buffer size in asynchronous output mode.(2048 bytes by default) config ULOG_ASYNC_OUTPUT_BY_THREAD bool "Enable async output by thread." @@ -124,11 +205,17 @@ menuconfig RT_USING_ULOG config ULOG_ASYNC_OUTPUT_THREAD_STACK int "The async output thread stack size." default 1024 + help + ULOG_ASYNC_OUTPUT_THREAD_STACK sets the stack size for the asynchronous output thread (1024 bytes by default). + ULOG_ASYNC_OUTPUT_BY_THREAD must be enabled first. config ULOG_ASYNC_OUTPUT_THREAD_PRIORITY int "The async output thread stack priority." range 0 RT_THREAD_PRIORITY_MAX default 30 + help + ULOG_ASYNC_OUTPUT_THREAD_PRIORITY is used to set the priority of the asynchronous output thread (the default value is 30). + ULOG_ASYNC_OUTPUT_BY_THREAD must be enabled first. endif endif @@ -153,23 +240,30 @@ menuconfig RT_USING_ULOG config ULOG_OUTPUT_TIME bool "Enable time information." default y - + help + ULOG_OUTPUT_TIME controls whether timestamps are included in log messages (enabled by default). config ULOG_TIME_USING_TIMESTAMP bool "Enable timestamp format for time." default n depends on ULOG_OUTPUT_TIME - + help + ULOG_TIME_USING_TIMESTAMP controls the display format of time. + It is disabled by default and is only visible and effective when ULOG_OUTPUT_TIME is y. config ULOG_OUTPUT_LEVEL bool "Enable level information." default y - + help + ULOG_OUTPUT_LEVEL controls whether log messages include a log level (enabled by default). config ULOG_OUTPUT_TAG bool "Enable tag information." default y - + help + ULOG_OUTPUT_TAG controls whether log tags are included in log messages (enabled by default). config ULOG_OUTPUT_THREAD_NAME bool "Enable thread information." default n + help + ULOG_OUTPUT_THREAD_NAME controls whether the log message includes the name of the thread that outputs the log (disabled by default). endmenu config ULOG_BACKEND_USING_CONSOLE @@ -205,20 +299,33 @@ menuconfig RT_USING_ULOG select ULOG_OUTPUT_TIME select ULOG_USING_FILTER default n + help + ULOG_USING_SYSLOG switches ulog's log output format and some APIs to a syslog-compliant mode. + + Once ULOG_USING_SYSLOG is selected, ULOG_OUTPUT_TIME will be automatically enabled. + Once ULOG_USING_SYSLOG is selected, ULOG_USING_FILTER will be automatically enabled, allowing ulog's log filtering functionality to be enabled. endif config RT_USING_UTEST bool "Enable utest (RT-Thread test framework)" default n + help + Utest (RT_USING_UTEST) is a lightweight unit testing framework built into RT-Thread. + It allows developers to write automated test cases for their code to verify the correctness of functionality. + + Once enabled, the entire UTest framework is activated (it is not enabled by default). if RT_USING_UTEST config UTEST_THR_STACK_SIZE int "The utest thread stack size" default 4096 + help + UTEST_THR_STACK_SIZE configure the thread stack size used by the UTest framework to execute test cases.(The default size is 4096 bytes.) config UTEST_THR_PRIORITY int "The utest thread priority" default 20 - + help + UTEST_THR_PRIORITY set the priority of the UTest thread(The default priority is 20.) config RT_UTEST_USING_AUTO_RUN bool "Enable auto run test cases" default n @@ -229,6 +336,10 @@ config RT_USING_UTEST config RT_UTEST_MAX_OPTIONS int "Maximum number of utest cases for auto-completion" default 64 + help + RT_UTEST_MAX_OPTIONS is only visible when FINSH_USING_OPTION_COMPLETION (FinSH command-line auto-completion feature) is enabled. + RT_UTEST_MAX_OPTIONS sets the maximum number of test cases that the UTest framework supports for auto-completion. + By default, auto-completion is supported for up to 64 test cases. endif endif @@ -236,11 +347,15 @@ config RT_USING_UTEST config RT_USING_VAR_EXPORT bool "Enable Var Export" default n + help + RT_USING_VAR_EXPORT enables or disables the global variable export function (not enabled by default). config RT_USING_RESOURCE_ID bool "Enable resource id" default n - + help + RT_USING_RESOURCE_ID enables or disables the system resource ID feature (disabled by default). + rsource "libadt/Kconfig" rsource "rt-link/Kconfig" diff --git a/components/utilities/rt-link/Kconfig b/components/utilities/rt-link/Kconfig index 517034785429..9f80883e14ef 100644 --- a/components/utilities/rt-link/Kconfig +++ b/components/utilities/rt-link/Kconfig @@ -2,24 +2,55 @@ menuconfig RT_USING_RT_LINK bool "RT-Link" default n + help + RT-Link is a lightweight, portable data link layer transport protocol. + + Key Features: + Supports data retransmission mechanism + Frame sequence number and status synchronization + Provides a unified API interface + Supports adaptation to various underlying hardware + Built-in CRC checksum + + Typical Application Scenarios: + Short-range communication between low-power devices + Device firmware upgrades, log feedback, etc. + + Not enabled by default,Once enabled, RT-Link components can be used (requires enabling UART or other related hardware transmission media). if RT_USING_RT_LINK choice RT_LINK_USING_CRC prompt"use hw crc device or not" default RT_LINK_USING_SF_CRC + help + In RT-Thread's RT-Link protocol: + CRC check verifies whether the data has been tampered with or corrupted during transmission by calculating the CRC value of the data. + + Once enabled, CRC checksums in RT-Link can be used (software CRC checksums are enabled by default). + You can choose to enable either software CRC checksums or hardware CRC checksums. config RT_LINK_USING_SF_CRC bool "use software crc table" + help + Once enabled, software CRC checksums in RT-Link can be used. config RT_LINK_USING_HW_CRC bool "use hardware crc device" + help + Once enabled, hardware CRC checksums in RT-Link can be used. endchoice menu "rt link debug option" config USING_RT_LINK_DEBUG bool "Enable RT-Link debug" default n + help + USING_RT_LINK_DEBUG enables RT-Link core debugging. + Once enabled, it will output debugging information for the RT-Link protocol layer (disabled by default). config USING_RT_LINK_HW_DEBUG bool "Enable RT-Link hw debug" default n + help + USING_RT_LINK_HW_DEBUG enables RT-Link hardware debugging. + Once enabled, it will output debugging information about the underlying RT-Link hardware (disabled by default). endmenu endif diff --git a/components/utilities/utest/utest/Kconfig b/components/utilities/utest/utest/Kconfig index 17faa65271f9..ee02bcb118a2 100644 --- a/components/utilities/utest/utest/Kconfig +++ b/components/utilities/utest/utest/Kconfig @@ -4,5 +4,10 @@ config RT_UTEST_SELF_PASS bool "UTEST Framework Test" select RT_USING_UTEST default n + help + RT_UTEST_SELF_PASS controls whether the Utest framework's self-test functionality is enabled. + Once enabled, RT_USING_UTEST will be enabled automatically, and the self-test code included with the Utest framework will also be compiled. + Application scenario: + Verifying whether the Utest framework functions correctly. endmenu From 7a31c700ccc3eb6e814cf241bd1bf4af84a69382 Mon Sep 17 00:00:00 2001 From: HZY0117 <504131636@qq.com> Date: Tue, 25 Nov 2025 13:06:28 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=BA=86components/libc?= =?UTF-8?q?=E6=89=80=E6=9C=89Kconfig=E7=9A=84help=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/common/Kconfig | 32 +++++++++++++++++++++++- components/libc/cplusplus/Kconfig | 17 ++++++++++++- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/components/libc/compilers/common/Kconfig b/components/libc/compilers/common/Kconfig index dad2e2e2ff70..bc7bc9f323ff 100644 --- a/components/libc/compilers/common/Kconfig +++ b/components/libc/compilers/common/Kconfig @@ -5,27 +5,57 @@ menu "Timezone and Daylight Saving Time" bool "Enable fully version timezone and daylight saving time with database" select PKG_USING_TZ_DATABASE # select timezone database software package default n + help + RT_LIBC_USING_FULL_TZ_DST controls whether "full timezone and daylight saving time functionality with database" is enabled. + + Essentially, it allows RT-Thread to support precise time conversion based on a global timezone database. + + Features: + Global timezone adaptation + Automatic daylight saving time (DST) handling + Standard time interface compatibility + + Dependencies: + Once enabled (disabled by default), it automatically enables the tz_database package in the RT-Thread software package. + + After enabling RT_LIBC_USING_FULL_TZ_DST, the project will automatically import the tz_database code and data files. + config RT_LIBC_USING_LIGHT_TZ_DST bool "Enable lightweight timezone and daylight saving time" depends on !RT_LIBC_USING_FULL_TZ_DST default y + help + RT_LIBC_USING_LIGHT_TZ_DST is a lightweight timezone and daylight saving time configuration option within the C standard library (libc) component of RT-Thread. + It is a lightweight alternative to RT_LIBC_USING_FULL_TZ_DST (the full timezone solution). + + It achieves local timezone conversion using a fixed time offset, rather than relying on a large timezone database. + + This option is enabled by default, but only one of RT_LIBC_USING_FULL_TZ_DST can be enabled at a time. + When enabled, three sub-configuration options will be displayed. + if RT_LIBC_USING_LIGHT_TZ_DST config RT_LIBC_TZ_DEFAULT_HOUR int "Set the default local timezone (hour)" range -12 12 default 8 + help + The hour offset of the local time zone relative to UTC (range -12~12, default 8, corresponding to UTC+8 Beijing time). config RT_LIBC_TZ_DEFAULT_MIN int "Set the default local timezone (minute)" range -59 59 default 0 - + help + Minute offset (range -59~59, default 0) config RT_LIBC_TZ_DEFAULT_SEC int "Set the default local timezone (second)" range -59 59 default 0 + help + Second offset (range -59~59, default 0) + endif endmenu diff --git a/components/libc/cplusplus/Kconfig b/components/libc/cplusplus/Kconfig index 1dcc6f389ce7..a2adeda741fc 100644 --- a/components/libc/cplusplus/Kconfig +++ b/components/libc/cplusplus/Kconfig @@ -1,6 +1,13 @@ menuconfig RT_USING_CPLUSPLUS bool "Enable C++ features" default n + help + RT_USING_CPLUSPLUS is the master switch for enabling C++ support. + + It is off by default. Once enabled, RT-Thread's build system ensures that a C++ compiler is used to compile .cpp files, + and it links C++ standard libraries (such as libstdc++ or libc++) into the final firmware. + Other C++-related configuration items that depend on it become visible and configurable. + if RT_USING_CPLUSPLUS @@ -11,13 +18,21 @@ if RT_USING_CPLUSPLUS select RT_USING_POSIX_STDIO select RT_USING_PTHREADS select RT_USING_RTC + help + RT_USING_CPLUSPLUS11 controls whether support for multithreading features in the C++11 standard is enabled. + + It is disabled by default. Once enabled, RT_USING_POSIX_FS, RT_USING_POSIX_STDIO, RT_USING_PTHREADS, and RT_USING_RTC will also be enabled. config RT_USING_CPP_WRAPPER bool "Enable RT-Thread APIs C++ wrapper" default n + help + RT_USING_CPP_WRAPPER is used to enable the C++ wrapper for the RT-Thread core API. + When this option is enabled(Off by default), RT-Thread provides an additional set of C++ code that encapsulates the underlying C API using classes and objects. config RT_USING_CPP_EXCEPTIONS bool "Enable C++ exceptions (will increase overhead)" default n - + help + RT_USING_CPP_EXCEPTIONS is used to enable C++ exception handling. endif From c6a8d92ef2b6ffd1ab3a2a2076a8891b6dc26a2b Mon Sep 17 00:00:00 2001 From: HZY0117 <504131636@qq.com> Date: Wed, 3 Dec 2025 15:37:10 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=A1=A5=E5=85=85rt-thread\components\net?= =?UTF-8?q?=E4=B8=8B=E6=89=80=E6=9C=89Kconfig=E7=9A=84help=E5=86=85?= =?UTF-8?q?=E5=AE=B9=20ref=20#10941?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/net/at/Kconfig | 60 ++++++ components/net/lwip/Kconfig | 389 +++++++++++++++++++++++++++++++++- components/net/netdev/Kconfig | 52 ++++- 3 files changed, 498 insertions(+), 3 deletions(-) diff --git a/components/net/at/Kconfig b/components/net/at/Kconfig index de5e11f1f6e8..33b06acdaaa7 100644 --- a/components/net/at/Kconfig +++ b/components/net/at/Kconfig @@ -1,36 +1,73 @@ menuconfig RT_USING_AT bool "Enable AT commands" default n + help + RT_USING_AT is the master switch for the "AT command framework" in the RT-Thread system. + The AT command component provides a standardized framework for AT command parsing, registration, and response, adapting to various peripherals that support AT commands. + + It is disabled by default. if RT_USING_AT config AT_DEBUG bool "Enable debug log output" default n + help + AT_DEBUG is a switch that enables debug logging output for the AT command framework. + When enabled, it prints logs of AT commands, including "sent/received content," "parsing process," "response result," and "error reason." + + It is disabled by default. config AT_USING_SERVER bool "Enable AT commands server" default n + help + AT_USING_SERVERAT is the AT server function switch. + Its core function is to expand the AT command framework from "local serial port interaction mode" to "network/multi-channel service mode." + When enabled, AT commands are no longer limited to local serial port transmission and reception. + They can also receive and respond to AT commands through network channels such as TCP/UDP/virtual serial ports, enabling "remote AT debugging/control." + + It is disabled by default. if AT_USING_SERVER config AT_SERVER_DEVICE string "Server device name" default "uart3" + help + The core function of AT_SERVER_DEVICE is to specify the "underlying data transceiver device name" of the AT server. + The command interaction of the AT server ultimately needs to be bound to a physical/virtual device as a data channel (such as a serial port or network device). + + By default, it is "uart3". config AT_SERVER_RECV_BUFF_LEN int "The maximum length of server data accepted" default 256 + help + The core function of AT_SERVER_RECV_BUFF_LEN is to define the "maximum buffer length" for the AT server to receive a single AT command. + When receiving remote/serial AT commands, the AT server first stores the data in this buffer, and then parses it after the command is fully received. + + The default value is 256. config AT_SERVER_SEND_BUFF_LEN int "The maximum length of server commands buffer" default 256 + help + The core function of AT_SERVER_SEND_BUFF_LEN is to define the "maximum buffer length" for the AT server to send AT command responses/issue commands. + When the AT server returns command responses to a remote terminal/serial port or issues AT commands to a module, it first stores the data in this buffer before sending it in batches. + + The default value is 256. endif config AT_USING_CLIENT bool "Enable AT commands client" default n + help + The core function of AT_USING_CLIENT is to switch the AT framework from a "passive command response mode" to an "active command initiation mode." + When enabled, the AT framework can act as an "AT client," actively sending AT commands to external AT devices and waiting for/parsing responses. + + It is disabled by default. if AT_USING_CLIENT @@ -38,18 +75,29 @@ if RT_USING_AT int "The maximum number of supported clients" default 1 range 1 65535 + help + The core function of AT_CLIENT_NUM_MAX is to define the maximum number of AT client instances that can be created simultaneously within the AT framework. + + By default, the value range is 1-65535. config AT_USING_SOCKET bool "Enable BSD Socket API support by AT commnads" select RT_USING_SAL select SAL_USING_AT default n + help + if AT_USING_SOCKET config AT_USING_SOCKET_SERVER bool "Enable BSD Socket API support about AT server" default n + help + AT_USING_SOCKET is an AT socket adaptation switch within the AT command framework. Its core function is to enable the AT framework to provide a "BSD Socket standard API wrapper." + When enabled, network modules adapted to AT commands can directly call the standard BSD Socket API without needing to concern themselves with the underlying AT command details. + + It is disabled by default; enabling it will also enable RT_USING_SAL and SAL_USING_AT. endif @@ -61,10 +109,22 @@ if RT_USING_AT bool "Enable CLI(Command-Line Interface) for AT commands" default y depends on RT_USING_FINSH + help + AT_USING_CLI is the AT command-line interaction switch within the AT framework. + Its core function is to integrate AT commands into the RT-Thread FinSH command-line console. + When enabled, AT commands can be entered directly in the FinSH terminal without requiring an additional serial port/network channel. + + It is enabled by default, but RT_USING_FINSH must be enabled. config AT_PRINT_RAW_CMD bool "Enable print RAW format AT command communication data" default n + help + AT_PRINT_RAW_CMD is a switch for printing raw AT data within the AT command framework. + Its core function is to print the raw binary/character data during AT command interaction. + When enabled, it outputs unfiltered, unformatted AT transmit and receive data. + + It is disabled by default. endif diff --git a/components/net/lwip/Kconfig b/components/net/lwip/Kconfig index fe019a3f7245..a10ffd2c4a3a 100644 --- a/components/net/lwip/Kconfig +++ b/components/net/lwip/Kconfig @@ -4,6 +4,16 @@ menuconfig RT_USING_LWIP select RT_USING_DEVICE_IPC select SAL_USING_LWIP if RT_USING_SAL default n + help + RT_USING_LWIP enables the LwIP lightweight TCP/IP protocol stack. + + It is disabled by default. Once enabled: + - Enables RT_USING_DEVICE, enabling the RT-Thread device driver framework. + - Enables RT_USING_DEVICE_IPC, enabling the device framework's IPC (Inter-Process Communication) mechanism. + - Enables SAL_USING_LWIP (if RT_USING_SAL is on), binding the SAL (Socket Abstraction Layer) and LwIP adapter layer. + - Compiles the LwIP core source code (tcpip.c, udp.c, ip.c etc.). + - Compiles the LwIP and RT-Thread kernel adapter layer (thread, memory, lock adaptation). + - Compiles the LwIP and network card driver adapter layer (netif integration). if RT_USING_LWIP config RT_USING_LWIP_LOCAL_VERSION @@ -21,18 +31,30 @@ if RT_USING_LWIP config RT_USING_LWIP141 bool "lwIP v1.4.1" + help + RT_USING_LWIP141 is used to control the enabling of lwip version 1.4.1. config RT_USING_LWIP203 bool "lwIP v2.0.3" + help + RT_USING_LWIP141 is used to control the enabling of lwip version 2.0.3. config RT_USING_LWIP212 bool "lwIP v2.1.2" - + help + RT_USING_LWIP141 is used to control the enabling of lwip version 2.1.2. # online version if !RT_USING_LWIP_LOCAL_VERSION config RT_USING_LWIP_LATEST bool "lwIP latest" select PKG_USING_LWIP + help + RT_USING_LWIP_LATEST selects the latest upstream version of LwIP from the RT-Thread package manager. + + This option is only visible when RT_USING_LWIP_LOCAL_VERSION is disabled (not selected). Once enabled: + Automatically selects PKG_USING_LWIP to enable the RT-Thread package management framework. + The latest LwIP source code will be downloaded from the RT-Thread package repository during the build process (network access required). + This version may include the latest features and bug fixes but may have stability risks (not fully validated by RT-Thread). endif endchoice @@ -55,188 +77,383 @@ if RT_USING_LWIP int "Memory alignment" default 8 if ARCH_CPU_64BIT default 4 + help + RT_LWIP_MEM_ALIGNMENT controls the number of memory alignment bytes customized for the LwIP protocol stack. + + 64-bit CPU (ARCH_CPU_64BIT=y): Default 8 bytes + 32-bit CPU (ARCH_CPU_64BIT=n): Default 4 bytes config RT_LWIP_IGMP bool "IGMP protocol" default y + help + RT_LWIP_IGMP controls whether the LwIP protocol stack enables IGMP (Internet Group Management Protocol). + IGMP is a protocol in the TCP/IP protocol suite responsible for IP multicast management, + specifically addressing the questions of "how a device joins/leaves a multicast group and how a router knows the members of a multicast group". + + It is enabled by default. config RT_LWIP_ICMP bool "ICMP protocol" default y + help + RT_LWIP_ICMP controls whether ICMP (Internet Control Message Protocol) is enabled in the LwIP protocol stack. + ICMP is the core protocol for network diagnostics and error feedback in the TCP/IP protocol suite. + It does not handle data transmission and focuses solely on network status notifications, error reporting, and connectivity checks. + + Enabled by default. config RT_LWIP_SNMP bool "SNMP protocol" select RT_LWIP_STATS default n + help + RT_LWIP_SNMP is the core switch in RT-Thread that controls whether SNMP (Simple Network Management Protocol) is enabled in the LwIP protocol stack. + SNMP is an industrial-grade "network device management standard protocol," whose core purpose is to remotely monitor/configure the status of network devices. + + It is disabled by default; once enabled, it will enable RT_LWIP_STATS (LwIP statistics function). config RT_LWIP_DNS bool "Enble DNS for name resolution" select RT_LWIP_UDP default y + help + RT_LWIP_DNS is the core switch in RT-Thread that controls whether the LwIP protocol stack enables DNS (Domain Name System) client functionality. + DNS acts as a "domain name translator" for network communication, resolving the core contradiction of "humans remembering domain names, machines recognizing IP addresses." + + It is enabled by default, and enabling it will also enable RT_LWIP_UDP. config RT_LWIP_DHCP bool "Enable alloc ip address through DHCP" select RT_LWIP_UDP default y + help + RT_LWIP_DHCP is the core switch in RT-Thread that controls whether the LwIP protocol stack enables DHCP (Dynamic Host Configuration Protocol) client functionality. + Its function is to allow devices to automatically obtain network parameters such as IP address, subnet mask, gateway, and DNS server from a DHCP server (such as a router or gateway) on the local area network, + without requiring manual static configuration. It is the "core of automated network configuration" for embedded devices accessing the local area network. + + It is enabled by default, and when enabled, RT_LWIP_UDP will also be enabled. if RT_LWIP_DHCP config IP_SOF_BROADCAST int "SOF broadcast" default 1 + help + IP_SOF_BROADCAST: DHCP broadcast transmission control. + The default value is 1 (1 is enabled, 0 is disabled). config IP_SOF_BROADCAST_RECV int "SOF broadcast recv" default 1 + help + IP_SOF_BROADCAST_RECV: DHCP broadcast receive control. + The default value is 1 (1 is enabled, 0 is disabled). + endif menu "Static IPv4 Address" config RT_LWIP_IPADDR string "IPv4: IP address" default "192.168.1.30" + help + RT_LWIP_IPADDR: The device's own static IPv4 address. + The default value is 192.168.1.30. config RT_LWIP_GWADDR string "IPv4: Gateway address" default "192.168.1.1" + help + RT_LWIP_GWADDR: Default IPv4 gateway address for the local area network. + The default value is 192.168.1.1. config RT_LWIP_MSKADDR string "IPv4: Mask address" default "255.255.255.0" + help + RT_LWIP_MSKADDR: Subnet mask. + The default value is 255.255.255.0. endmenu config RT_LWIP_UDP bool "UDP protocol" default y + help + RT_LWIP_UDP is the core switch in RT-Thread that controls whether the LwIP protocol stack enables UDP (User Datagram Protocol). + UDP is a minimalist transport layer protocol, characterized by connectionless, no acknowledgments, no retransmissions, low overhead, and low latency. + + It is enabled by default, and features such as DHCP, DNS, IGMP, and SNMP will require RT_LWIP_UDP to function. config RT_LWIP_TCP bool "TCP protocol" default y + help + RT_LWIP_TCP is the core switch in RT-Thread that controls whether TCP (Transmission Control Protocol) is enabled in the LwIP protocol stack. + TCP is a transport layer protocol that prioritizes reliability. + Its core features include connection-oriented architecture, three-way handshake, acknowledgment and retransmission, congestion control, and flow control. + + It is enabled by default, and features such as HTTP, HTTPS, MQTT (TCP version), and Telnet rely on RT_LWIP_TCP. config RT_LWIP_RAW bool "RAW protocol" default n + help + RT_LWIP_RAW is the core switch in RT-Thread that controls whether the LwIP protocol stack enables raw sockets. + RAW sockets are a special communication method that "skips the transport layer (UDP/TCP) and directly manipulates the IP layer." + + It is disabled by default, and RT_LWIP_USING_PING (ping function) will force it to depend on RT_LWIP_RAW. config RT_LWIP_PPP bool "PPP protocol" default n + help + RT_LWIP_PPP is the core switch in RT-Thread that controls whether the LwIP protocol stack enables PPP (Point-to-Point Protocol). + PPP is a communication protocol that operates at the "link layer" and is specifically designed to solve the problem of "encapsulating IP packets on serial links (such as serial ports)". + It is disabled by default. if RT_LWIP_PPP config RT_LWIP_PPPOE bool "PPPoE protocol" default n + help + RT_LWIP_PPPOE controls whether PPPoE (Point-to-Point Protocol over Ethernet) is enabled. + It is disabled by default. config RT_LWIP_PPPOS bool "PPPoS protocol" default n + help + RT_LWIP_PPPOS controls whether PPPoS (Point-to-Point Protocol over Serial) functionality is enabled. + It is disabled by default. endif config RT_MEMP_NUM_NETCONN int "the number of struct netconns" default 8 + help + RT_MEMP_NUM_NETCONN specifies the maximum number of struct netconn instances in LwIP (i.e., the size of the netconn memory pool). + struct netconn is the core data structure of the high-level network programming interface (Netconn API) provided by LwIP for the application layer. + + The default value is 8. config RT_LWIP_PBUF_NUM int "the number of PBUF" default 16 + help + RT_LWIP_PBUF_NUM specifies the maximum number of pbuf (packet buffer) structure instances in LwIP. + The pbuf is the most basic and core data structure in the LwIP protocol stack; all network packets flowing within LwIP rely on the pbuf for transport. + + The default value is 16. config RT_LWIP_RAW_PCB_NUM int "the number of raw connection" default 4 + help + RT_LWIP_RAW_PCB_NUM specifies the maximum number of raw_pcb (Raw Protocol Control Block) structure instances in LwIP, i.e., the capacity of the raw_pcb memory pool. + raw_pcb is the core data structure for LwIP to manage "raw IP connections," essentially acting as a "handle" for raw IP communication. + + The default value is 4. config RT_LWIP_UDP_PCB_NUM int "the number of UDP socket" default 8 if RT_USING_DFS_NFS default 4 + help + RT_LWIP_UDP_PCB_NUM specifies the maximum number of udp_pcb (UDP Protocol Control Block) structure instances in LwIP, i.e., the capacity of the UDP control block memory pool. + UDP is a connectionless transport layer protocol, but LwIP still requires a "management unit" to maintain the context of UDP communication; this unit is udp_pcb. + + If the NFS file system is enabled (RT_USING_DFS_NFS=y), the default value is 8; + if NFS is not enabled, the default value is 4. if RT_LWIP_TCP config RT_LWIP_TCP_PCB_NUM int "the number of TCP socket" default 4 + help + RT_LWIP_TCP_PCB_NUM specifies the maximum number of tcp_pcb (TCP Protocol Control Block) structure instances in LwIP, i.e., the total capacity of the TCP control block memory pool. + TCP is a connection-oriented transport layer protocol, and tcp_pcb is the core data structure in LwIP that manages the entire lifecycle of a TCP connection. + The default value is 4. config RT_LWIP_TCP_SEG_NUM int "the number of TCP segment" default 40 + help + RT_LWIP_TCP_SEG_NUM specifies the maximum number of tcp_seg (TCP segment/packet) structure instances in LwIP, i.e., the total capacity of the TCP segment memory pool. + TCP is a byte-stream-oriented protocol; during actual transmission, the byte stream is split into "segments," and tcp_seg is the core data structure in LwIP that manages these segments. + + The default value is 40. config RT_LWIP_TCP_SND_BUF int "the size of send buffer" default 8196 + help + RT_LWIP_TCP_SND_BUF specifies the total size of the send buffer for a single TCP connection in LwIP. + The default value is 8196 bytes. config RT_LWIP_TCP_WND int "the size of TCP send window" default 8196 + help + RT_LWIP_TCP_WND specifies the send window size for TCP connections in LwIP. + The default value is 8196 bytes. endif config RT_LWIP_TCPTHREAD_PRIORITY int "the priority level value of lwIP thread" default 10 + help + RT_LWIP_TCPTHREAD_PRIORITY specifies the priority value of the LwIP core processing thread (usually called tcpip_thread). + tcpip_thread is the "main processing thread" of LwIP, and all core network-related operations are performed by it. + + The default priority is 10. config RT_LWIP_TCPTHREAD_MBOX_SIZE int "the number of mail in the lwIP thread mailbox" default 8 + help + RT_LWIP_TCPTHREAD_MBOX_SIZE specifies the mailbox size for the LwIP core thread (tcpip_thread). + The default mailbox size is 8. config RT_LWIP_TCPTHREAD_STACKSIZE int "the stack size of lwIP thread" default 2048 if ARCH_CPU_64BIT default 1024 + help + RT_LWIP_TCPTHREAD_STACKSIZE specifies the stack size of the LwIP core processing thread (tcpip_thread). + + For 64-bit architectures (ARCH_CPU_64BIT=y), the default stack size is 2048 bytes; + For non-64-bit architectures (such as 32-bit ARM/STM32), the default stack size is 1024 bytes. config LWIP_NO_RX_THREAD bool "Not use Rx thread" default n + help + LWIP_NO_RX_THREAD is a network interface card (NIC) data reception architecture switch when RT-Thread adapts to the LwIP protocol stack. + It is off by default: enabling a separate "receive thread (Rx Thread)" to handle NIC data reception. config LWIP_NO_TX_THREAD bool "Not use Tx thread" default n + help + LWIP_NO_TX_THREAD is a network interface card (NIC) data transmission architecture switch when RT-Thread adapts to the LwIP protocol stack. + It is off by default: enabling a separate "transmission thread (Tx Thread)" to handle NIC data transmission. config RT_LWIP_ETHTHREAD_PRIORITY int "the priority level value of ethernet thread" default 12 + help + RT_LWIP_ETHTHREAD_PRIORITY is used to set the priority of the Ethernet processing thread. + The default priority is 12. config RT_LWIP_ETHTHREAD_STACKSIZE int "the stack size of ethernet thread" default 2048 if ARCH_CPU_64BIT default 1024 + help + RT_LWIP_ETHTHREAD_STACKSIZE sets the stack size for the Ethernet processing thread, directly determining the stack memory space available for the Ethernet thread during runtime. + + For 64-bit CPU architectures, the default stack size is 2048 bytes. + For other architectures (such as 32-bit ARM/MCU), the default stack size is 1024 bytes. config RT_LWIP_ETHTHREAD_MBOX_SIZE int "the number of mail in the ethernet thread mailbox" default 8 + help + RT_LWIP_ETHTHREAD_MBOX_SIZE sets the maximum number of messages a single Ethernet processing thread can hold in its mailbox. + It is a key rate-limiting parameter for asynchronous inter-thread communication. + + The default mailbox capacity is 8 messages. config RT_LWIP_REASSEMBLY_FRAG bool "Enable IP reassembly and frag" default n + help + RT_LWIP_REASSEMBLY_FRAG controls the on/off state of "IP datagram fragmentation and reassembly". + + Enabled (y): Supports sending very large IP datagrams (automatic fragmentation), and can also receive and reassemble fragmented packets from other devices; + Disabled (n): Does not support fragmentation (discards very large datagrams directly), and does not process received fragmented packets (discards directly). + Disabled by default. config LWIP_NETIF_STATUS_CALLBACK int "Enable netif status callback" default 1 + help + LWIP_NETIF_STATUS_CALLBACK is a core switch in the LwIP protocol stack that controls the "Network Interface (NETIF) status callback function," + enabling custom processing logic when a network interface status change is triggered. + When LWIP_NETIF_STATUS_CALLBACK is enabled, LwIP calls the registered callback function when a critical state of the NETIF changes, + allowing the application layer to detect and handle the state change—essentially an "event-driven" network status notification mechanism. + + It is enabled by default. config LWIP_NETIF_LINK_CALLBACK int "Enable netif link status callback" default 1 + help + LWIP_NETIF_LINK_CALLBACK is a core switch in the LwIP protocol stack that focuses on "network interface (netif) link state callbacks", + specifically used to detect the physical link connectivity status of the network interface. + + When LWIP_NETIF_LINK_CALLBACK is enabled, LwIP will trigger the registered "link callback function" when the physical link status of the netif changes. + + Enabled by default. config RT_LWIP_NETIF_NAMESIZE int "netif name length" default 6 + help + RT_LWIP_NETIF_NAMESIZE limits the maximum length of a network interface (NETIF) name; essentially, it allocates a fixed-length memory buffer for the NETIF name. + The default value is 6. config SO_REUSE int "Enable SO_REUSEADDR option" default 1 + help + SO_REUSE is a core switch in the LwIP protocol stack that controls the "SO_REUSEADDR socket option," used to relax address/port multiplexing rules for TCP/UDP socket binding (bind()). + + It is enabled by default. config LWIP_SO_RCVTIMEO int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing." default 1 + help + LWIP_SO_RCVTIMEO is a core switch in the LwIP protocol stack that controls the "socket/network connection (netconn) receive timeout function." + It sets the timeout for receive operations such as recv()/recvfrom()/netconn_recv(), preventing threads from being blocked indefinitely while waiting for data. + + It is enabled by default. config LWIP_SO_SNDTIMEO int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing." default 1 + help + LWIP_SO_SNDTIMEO is a core switch in the LwIP protocol stack that controls the "socket/network connection (netconn) send timeout function." + It is used to set the timeout for send()/sendto()/netconn_send() and other send operations, preventing threads from being permanently blocked while waiting for the send buffer/network link. + + It is enabled by default. config LWIP_SO_RCVBUF int "Enable SO_RCVBUF processing" default 1 + help + LWIP_SO_RCVBUF is a core switch in the LwIP protocol stack that controls the configuration of the socket receive buffer (SO_RCVBUF). + It allows the application layer to customize the receive buffer size through SO_RCVBUF socket options. + + It is enabled by default. config LWIP_SO_LINGER int "Enable SO_LINGER processing" default 0 + help + LWIP_SO_LINGER is a core switch in the LwIP protocol stack that controls the handling of the SO_LINGER option for sockets. + It controls the "delayed close" behavior when closing a TCP socket (using close())————determining whether to wait for any unsent data to complete before closing the socket. + + It is disabled by default. config RT_LWIP_NETIF_LOOPBACK bool "Enable netif loopback" default n + help + LWIP_SO_LINGER enables the "Loopback" function of the LwIP network interface (netif). + Essentially, it allows data to be transmitted in a closed loop within the protocol stack (data packets sent to the local machine do not need to pass through the physical network card). + + It is disabled by default. config LWIP_NETIF_LOOPBACK int @@ -246,10 +463,22 @@ if RT_USING_LWIP config RT_LWIP_STATS bool "Enable lwIP statistics" default n + help + RT_LWIP_STATS controls the core switch for "LwIP Statistics Functions," enabling LwIP's built-in comprehensive network statistics capabilities. + This covers traffic, error, and status statistics at various layers, including TCP/UDP/IP/ICMP/NIC, + and is a crucial configuration for network debugging, performance analysis, and fault location. However, it significantly increases memory usage and incurs a small amount of CPU overhead. + + It is disabled by default. config RT_LWIP_USING_HW_CHECKSUM bool "Enable hardware checksum" default n + help + RT_LWIP_USING_HW_CHECKSUM is a core switch controlling "hardware checksum acceleration." + It's used to offload the "TCP/UDP/IP checksum calculation" in LwIP from software implementation to hardware. + This is a key configuration for reducing CPU overhead and improving network throughput, but it relies on hardware driver support and increases adaptation complexity. + + Disabled by default. config RT_LWIP_USING_PING bool "Enable ping features" @@ -257,151 +486,309 @@ if RT_USING_LWIP select NETDEV_USING_PING select RT_LWIP_ICMP select RT_LWIP_RAW + help + RT_LWIP_USING_PING controls the core master switch for the "Ping function" + It enables devices to support ICMP Echo Request/Reply (i.e., the Ping protocol)—allowing them to respond to ping requests from external devices and also to proactively ping other devices. + It is a fundamental function for network connectivity testing and fault location. + + It is enabled by default. Enabling it will enable NETDEV_USING_PING, RT_LWIP_ICMP, and RT_LWIP_RAW. config LWIP_USING_DHCPD bool "Enable DHCP server" default n + help + LWIP_USING_DHCPD is the core switch in the LwIP protocol stack that controls the "DHCP Server function." + It enables embedded devices to act as DHCP servers—assigning network parameters such as IP addresses, subnet masks, gateways, and DNS to other devices on the local area network. + + It is disabled by default. if LWIP_USING_DHCPD config DHCPD_SERVER_IP string "DHCPD SERVER IP address" default "192.168.169.1" + help + DHCPD_SERVER_IP is an auxiliary configuration for the LwIP DHCP server function, used to define the DHCP server's own static IP address. + The default value is 192.168.169.1. config DHCPD_USING_ROUTER bool "alloc gateway ip for router" default y + help + DHCPD_USING_ROUTER determines whether the DHCP server assigns a gateway IP address to clients. + When enabled, it sends a default gateway IP address (which by default is the DHCP server's own IP address, `DHCPD_SERVER_IP`) to clients. + When disabled, it does not assign a gateway address to clients, only an IP address and subnet mask. + + Enabled by default. config LWIP_USING_CUSTOMER_DNS_SERVER bool "Enable customer DNS server config" default n + help + LWIP_USING_CUSTOMER_DNS_SERVER allows the DHCP server to assign a custom DNS server IP to the client. + The DHCP server will not send DNS addresses to the client. + When enabled, one or more DNS server IPs can be manually configured and sent to the client. + + It is disabled by default. + if LWIP_USING_CUSTOMER_DNS_SERVER config DHCP_DNS_SERVER_IP string "Custom DNS server IP address" default "1.1.1.1" + help + DHCP_DNS_SERVER_IP is a "custom DNS address configuration item" in the LwIP DHCP server. + Its core function is to define the "preferred DNS server IP address" assigned by the DHCP server to clients. + + The default value is 1.1.1.1. + endif endif config RT_LWIP_ENABLE_USER_HOOKS bool "Enable user-defined LWIP hooks" default n + help + The core function of RT_LWIP_ENABLE_USER_HOOKS is to expose "user-defined callback interfaces" for key processes in the LwIP protocol stack. + When enabled, users can register custom functions at core LwIP processing nodes (such as packet sending/receiving, connection establishment/closure, and error handling). + It enables fine-grained monitoring, modification, or extension of protocol stack behavior. + + It is disabled by default. menuconfig RT_LWIP_DEBUG bool "Enable lwIP Debugging Options" default n + help + The core function of RT_LWIP_DEBUG is to enable full-dimensional debug logging for the LwIP protocol stack— + When enabled, it displays detailed debug configuration options (such as IP/TCP/UDP/ICMP layer debugging, log levels), allowing users to enable debug logging at different levels/modules as needed. + It is the "ultimate tool" for locating problems in the LwIP core layer (such as protocol interaction, packet transmission and reception, and error triggering). + + It is disabled by default. if RT_LWIP_DEBUG config RT_LWIP_SYS_DEBUG bool "Enable Debugging of sys.c" default n + help + RT_LWIP_SYS_DEBUG enables debug logging in the LwIP core abstraction layer sys.c. + Enabling this configuration will output debug logs for all operations in sys.c. + + It is disabled by default. config RT_LWIP_ETHARP_DEBUG bool "Enable Debugging of etharp.c" default n + help + RT_LWIP_ETHARP_DEBUG enables debug logging in etharp.c. + Enabling this outputs debug logs for all etharp.c operations. + Disabled by default. config RT_LWIP_PPP_DEBUG bool "Enable Debugging of PPP" default n + help + RT_LWIP_PPP_DEBUG enables debug logging for PPP module. + Enabling this outputs debug logs for all PPP operations. + Disabled by default. config RT_LWIP_MEM_DEBUG bool "Enable Debugging of mem.c" default n + help + RT_LWIP_MEM_DEBUG enables debug logging in mem.c. + Enabling this outputs debug logs for all mem.c operations. + Disabled by default. config RT_LWIP_MEMP_DEBUG bool "Enable Debugging of memp.c" default n + help + RT_LWIP_MEMP_DEBUG enables debug logging in memp.c. + Enabling this outputs debug logs for all memp.c operations. + Disabled by default. config RT_LWIP_PBUF_DEBUG bool "Enable Debugging of pbuf.c" default n + help + RT_LWIP_PBUF_DEBUG enables debug logging in pbuf.c. + Enabling this outputs debug logs for all pbuf.c operations. + Disabled by default. config RT_LWIP_API_LIB_DEBUG bool "Enable Debugging of api_lib.c" default n + help + RT_LWIP_API_LIB_DEBUG enables debug logging in api_lib.c. + Enabling this outputs debug logs for all api_lib.c operations. + Disabled by default. config RT_LWIP_API_MSG_DEBUG bool "Enable Debugging of api_msg.c" default n + help + RT_LWIP_API_MSG_DEBUG enables debug logging in api_msg.c. + Enabling this outputs debug logs for all api_msg.c operations. + Disabled by default. config RT_LWIP_TCPIP_DEBUG bool "Enable Debugging of tcpip.c" default n + help + RT_LWIP_TCPIP_DEBUG enables debug logging in tcpip.c. + Enabling this outputs debug logs for all tcpip.c operations. + Disabled by default. config RT_LWIP_NETIF_DEBUG bool "Enable Debugging of netif.c" default n + help + RT_LWIP_NETIF_DEBUG enables debug logging in netif.c. + Enabling this outputs debug logs for all netif.c operations. + Disabled by default. config RT_LWIP_SOCKETS_DEBUG bool "Enable Debugging of sockets.c" default n + help + RT_LWIP_SOCKETS_DEBUG enables debug logging in sockets.c. + Enabling this outputs debug logs for all sockets.c operations. + Disabled by default. config RT_LWIP_DNS_DEBUG bool "Enable Debugging of DNS" default n + help + RT_LWIP_DNS_DEBUG enables debug logging for DNS module. + Enabling this outputs debug logs for all DNS operations. + Disabled by default. config RT_LWIP_AUTOIP_DEBUG bool "Enable Debugging of autoip.c" default n + help + RT_LWIP_AUTOIP_DEBUG enables debug logging in autoip.c. + Enabling this outputs debug logs for all autoip.c operations. + Disabled by default. config RT_LWIP_DHCP_DEBUG bool "Enable Debugging of dhcp.c" default n + help + RT_LWIP_DHCP_DEBUG enables debug logging in dhcp.c. + Enabling this outputs debug logs for all dhcp.c operations. + Disabled by default. config RT_LWIP_IP_DEBUG bool "Enable Debugging of IP" default n + help + RT_LWIP_IP_DEBUG enables debug logging for IP module. + Enabling this outputs debug logs for all IP operations. + Disabled by default. config RT_LWIP_IP_REASS_DEBUG bool "Enable debugging in ip_frag.c for both frag & reass" default n + help + RT_LWIP_IP_REASS_DEBUG enables debug logging in ip_frag.c. + Enabling this outputs logs for IP fragment & reassembly. + Disabled by default. config RT_LWIP_ICMP_DEBUG bool "Enable Debugging of icmp.c" default n + help + RT_LWIP_ICMP_DEBUG enables debug logging in icmp.c. + Enabling this outputs debug logs for all icmp.c operations. + Disabled by default. config RT_LWIP_IGMP_DEBUG bool "Enable Debugging of igmp.c" default n + help + RT_LWIP_IGMP_DEBUG enables debug logging in igmp.c. + Enabling this outputs debug logs for all igmp.c operations. + Disabled by default. config RT_LWIP_UDP_DEBUG bool "Enable Debugging of UDP" default n + help + RT_LWIP_UDP_DEBUG enables debug logging for UDP module. + Enabling this outputs debug logs for all UDP operations. + Disabled by default. config RT_LWIP_TCP_DEBUG bool "Enable Debugging of TCP" default n + help + RT_LWIP_TCP_DEBUG enables debug logging for TCP module. + Enabling this outputs debug logs for all TCP operations. + Disabled by default. config RT_LWIP_TCP_INPUT_DEBUG bool "Enable Debugging of tcp_in.c" default n + help + RT_LWIP_TCP_INPUT_DEBUG enables debug logging in tcp_in.c. + Enabling this outputs logs for TCP input processing. + Disabled by default. config RT_LWIP_TCP_OUTPUT_DEBUG bool "Enable Debugging of tcp_out.c" default n + help + RT_LWIP_TCP_OUTPUT_DEBUG enables debug logging in tcp_out.c. + Enabling this outputs logs for TCP output processing. + Disabled by default. config RT_LWIP_TCP_RTO_DEBUG bool "Enable debugging in TCP for retransmit" default n + help + RT_LWIP_TCP_RTO_DEBUG enables debug logging for TCP retransmit. + Enabling this outputs logs for TCP retransmission logic. + Disabled by default. config RT_LWIP_TCP_CWND_DEBUG bool "Enable debugging for TCP congestion window" default n + help + RT_LWIP_TCP_CWND_DEBUG enables logging for TCP congestion window. + Enabling this outputs logs for TCP congestion window logic. + Disabled by default. config RT_LWIP_TCP_WND_DEBUG bool "Enable debugging in tcp_in.c for window updating" default n + help + RT_LWIP_TCP_WND_DEBUG enables logging for TCP window updating. + Enabling this outputs logs for TCP window update logic. + Disabled by default. config RT_LWIP_TCP_FR_DEBUG bool "Enable debugging in tcp_in.c for fast retransmit" default n + help + RT_LWIP_TCP_FR_DEBUG enables logging for TCP fast retransmit. + Enabling this outputs logs for TCP fast retransmission logic. + Disabled by default. config RT_LWIP_TCP_QLEN_DEBUG bool "Enable debugging for TCP queue lengths" default n + help + RT_LWIP_TCP_QLEN_DEBUG enables logging for TCP queue lengths. + Enabling this outputs logs for TCP queue length monitoring. + Disabled by default. config RT_LWIP_TCP_RST_DEBUG bool "Enable debugging for TCP with the RST message" default n + help + RT_LWIP_TCP_RST_DEBUG enables logging for TCP RST messages. + Enabling this outputs logs for TCP RST message processing. + Disabled by default. endif diff --git a/components/net/netdev/Kconfig b/components/net/netdev/Kconfig index b45c27951342..26933f22514a 100644 --- a/components/net/netdev/Kconfig +++ b/components/net/netdev/Kconfig @@ -1,33 +1,81 @@ menuconfig RT_USING_NETDEV bool "Enable network interface device" default n + help + RT_USING_NETDEV is used in the RT-Thread operating system to enable the Network Device Driver Framework. + Features: + Compiles the core code of the network device framework + Provides a unified interface for operating network devices + Supports multiple network device types + Enables related network tools and commands + + Disabled by default; RT_USING_NETDEV is available once enabled. if RT_USING_NETDEV config NETDEV_USING_IFCONFIG bool "Enable ifconfig features" default y + help + NETDEV_USING_IFCONFIG is used to enable or disable the ifconfig command functionality in the system. + NETDEV_USING_IFCONFIG is enabled by default. When enabled, ifconfig can be used to perform the following functions: + View network interface information; + Configure network interface parameters. config NETDEV_USING_PING bool "Enable ping features" default y + help + NETDEV_USING_PING enables or disables the ping command functionality on the system. + + Function Description: + Ping is a commonly used network diagnostic tool used to test connectivity between two network devices. + + It is disabled by default; once enabled, the ping function can be used. config NETDEV_USING_NETSTAT bool "Enable netstat features" default y + help + NETDEV_USING_NETSTAT enables or disables the netstat command functionality on your system. + + netstat is a command-line tool used to display network connectivity status, routing tables, and network interface statistics. + It is enabled by default. Once enabled, you can use the netstat command in the shell (FinSH/MSH) to perform the following operations: + View network connectivity status + View network interface statistics + View routing tables config NETDEV_USING_AUTO_DEFAULT bool "Enable default netdev automatic change features" default y - + help + NETDEV_USING_AUTO_DEFAULT enables or disables automatic switching of the default network interface. + + Enabled by default. When enabled, the system automatically monitors the status of all network interfaces. + When a new network interface is enabled and successfully obtains an IP address, the system automatically sets this new interface as the default network interface. + If the current default network interface becomes disconnected, the system will attempt to select one from other connected network interfaces as the new default interface. config NETDEV_USING_LINK_STATUS_CALLBACK bool "Enable netdev callback on link status change" default n - + help + NETDEV_USING_LINK_STATUS_CALLBACK enables the network link state change callback mechanism. + + It is disabled by default. Once enabled, the netdev framework provides a set of link state change callback registration/deregistration interfaces, + allowing users to execute custom business logic when the link state of network devices changes. + config NETDEV_USING_IPV6 bool "Enable IPV6 protocol support" default n + help + NETDEV_USING_IPv6 enables IPv6 protocol stack adaptation. + + Features: + Adds IPv6 address management to network devices; + Supports IPv6 link layer adaptation; + Adapts to the RT-Thread kernel IPv6 protocol stack, providing IPv6 tools such as ping6 and ifconfig6; + Unifies the operation interface for IPv4/IPv6 devices. + Disabled by default. Once enabled, the netdev framework expands from "IPv4 only" to "dual-stack (IPv4+IPv6)/pure IPv6" mode. config NETDEV_IPV4 int default 1 From 2270e236da80832ff038b35665fc398dce6a7750 Mon Sep 17 00:00:00 2001 From: HZY0117 <504131636@qq.com> Date: Tue, 5 May 2026 21:08:59 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=A0=B9=E6=8D=AECopilot=E5=AE=A1=E6=9F=A5?= =?UTF-8?q?=E6=84=8F=E8=A7=81=E4=BF=AE=E6=AD=A3Kconfig=E4=B8=AD=E7=9A=84he?= =?UTF-8?q?lp=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正lwip Kconfig中复制粘贴导致的配置名错误 - 修正at Kconfig中AT_USING_SERVERAT拼写错误和help文本错位 - 补充cplusplus Kconfig中RT_USING_CPP_EXCEPTIONS的完整help信息 - 清理utest Kconfig中的尾部空白 ref #10960 --- components/libc/cplusplus/Kconfig | 7 ++++++- components/net/at/Kconfig | 13 ++++++++----- components/net/lwip/Kconfig | 6 +++--- components/utilities/utest/utest/Kconfig | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/components/libc/cplusplus/Kconfig b/components/libc/cplusplus/Kconfig index a2adeda741fc..c7420c4d5e0f 100644 --- a/components/libc/cplusplus/Kconfig +++ b/components/libc/cplusplus/Kconfig @@ -29,10 +29,15 @@ if RT_USING_CPLUSPLUS help RT_USING_CPP_WRAPPER is used to enable the C++ wrapper for the RT-Thread core API. - When this option is enabled(Off by default), RT-Thread provides an additional set of C++ code that encapsulates the underlying C API using classes and objects. + When this option is enabled (Off by default), RT-Thread provides an additional set of C++ code that encapsulates the underlying C API using classes and objects. config RT_USING_CPP_EXCEPTIONS bool "Enable C++ exceptions (will increase overhead)" default n help RT_USING_CPP_EXCEPTIONS is used to enable C++ exception handling. + + It is disabled by default. Enabling this option pulls in the C++ exception runtime support, which typically increases + code size (flash/ROM usage), RAM consumption, and may add extra runtime overhead for stack unwinding and exception + bookkeeping. On resource-constrained or strict real-time systems, this additional overhead should be evaluated carefully + before turning the option on. endif diff --git a/components/net/at/Kconfig b/components/net/at/Kconfig index 33b06acdaaa7..52edfc878139 100644 --- a/components/net/at/Kconfig +++ b/components/net/at/Kconfig @@ -22,7 +22,7 @@ if RT_USING_AT bool "Enable AT commands server" default n help - AT_USING_SERVERAT is the AT server function switch. + AT_USING_SERVER is the AT server function switch. Its core function is to expand the AT command framework from "local serial port interaction mode" to "network/multi-channel service mode." When enabled, AT commands are no longer limited to local serial port transmission and reception. They can also receive and respond to AT commands through network channels such as TCP/UDP/virtual serial ports, enabling "remote AT debugging/control." @@ -86,18 +86,21 @@ if RT_USING_AT select SAL_USING_AT default n help + AT_USING_SOCKET is an AT socket adaptation switch within the AT command framework. Its core function is to enable the AT framework to provide a "BSD Socket standard API wrapper." + When enabled, network modules adapted to AT commands can directly call the standard BSD Socket API without needing to concern themselves with the underlying AT command details. + It is disabled by default; enabling it will also enable RT_USING_SAL and SAL_USING_AT. if AT_USING_SOCKET config AT_USING_SOCKET_SERVER bool "Enable BSD Socket API support about AT server" default n - help - AT_USING_SOCKET is an AT socket adaptation switch within the AT command framework. Its core function is to enable the AT framework to provide a "BSD Socket standard API wrapper." - When enabled, network modules adapted to AT commands can directly call the standard BSD Socket API without needing to concern themselves with the underlying AT command details. + help + AT_USING_SOCKET_SERVER is used to enable the AT socket server function within the AT command framework. + When enabled, the AT server can be accessed through BSD Socket API. - It is disabled by default; enabling it will also enable RT_USING_SAL and SAL_USING_AT. + It is disabled by default. endif diff --git a/components/net/lwip/Kconfig b/components/net/lwip/Kconfig index a10ffd2c4a3a..cf1530e11705 100644 --- a/components/net/lwip/Kconfig +++ b/components/net/lwip/Kconfig @@ -37,12 +37,12 @@ if RT_USING_LWIP config RT_USING_LWIP203 bool "lwIP v2.0.3" help - RT_USING_LWIP141 is used to control the enabling of lwip version 2.0.3. + RT_USING_LWIP203 is used to control the enabling of lwip version 2.0.3. config RT_USING_LWIP212 bool "lwIP v2.1.2" help - RT_USING_LWIP141 is used to control the enabling of lwip version 2.1.2. + RT_USING_LWIP212 is used to control the enabling of lwip version 2.1.2. # online version if !RT_USING_LWIP_LOCAL_VERSION config RT_USING_LWIP_LATEST @@ -450,7 +450,7 @@ if RT_USING_LWIP bool "Enable netif loopback" default n help - LWIP_SO_LINGER enables the "Loopback" function of the LwIP network interface (netif). + RT_LWIP_NETIF_LOOPBACK enables the "Loopback" function of the LwIP network interface (netif). Essentially, it allows data to be transmitted in a closed loop within the protocol stack (data packets sent to the local machine do not need to pass through the physical network card). It is disabled by default. diff --git a/components/utilities/utest/utest/Kconfig b/components/utilities/utest/utest/Kconfig index ee02bcb118a2..9d1b00a80dec 100644 --- a/components/utilities/utest/utest/Kconfig +++ b/components/utilities/utest/utest/Kconfig @@ -5,7 +5,7 @@ config RT_UTEST_SELF_PASS select RT_USING_UTEST default n help - RT_UTEST_SELF_PASS controls whether the Utest framework's self-test functionality is enabled. + RT_UTEST_SELF_PASS controls whether the Utest framework's self-test functionality is enabled. Once enabled, RT_USING_UTEST will be enabled automatically, and the self-test code included with the Utest framework will also be compiled. Application scenario: