mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-02 14:23:19 +08:00
363 lines
15 KiB
Plaintext
363 lines
15 KiB
Plaintext
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
|
|
choice ULOG_OUTPUT_LOG_LEVEL
|
|
prompt "The static output log level."
|
|
default ULOG_OUTPUT_LVL_D
|
|
help
|
|
When the log level is less than this option and it will stop output.
|
|
These log will not compile into ROM when using LOG_X api.
|
|
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
|
|
|
|
if ULOG_USING_SYSLOG
|
|
choice ULOG_OUTPUT_LOG_LEVEL
|
|
prompt "The static output log level."
|
|
default ULOG_OUTPUT_LVL_DEBUG
|
|
help
|
|
When the log level is less than this option and it will stop output.
|
|
These log will not compile into ROM when using LOG_X api.
|
|
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
|
|
|
|
config ULOG_OUTPUT_LVL
|
|
int
|
|
default 0 if ULOG_OUTPUT_LVL_A
|
|
default 0 if ULOG_OUTPUT_LVL_EMERG
|
|
default 1 if ULOG_OUTPUT_LVL_ALERT
|
|
default 2 if ULOG_OUTPUT_LVL_CRIT
|
|
default 3 if ULOG_OUTPUT_LVL_E
|
|
default 3 if ULOG_OUTPUT_LVL_ERROR
|
|
default 4 if ULOG_OUTPUT_LVL_W
|
|
default 4 if ULOG_OUTPUT_LVL_WARNING
|
|
default 5 if ULOG_OUTPUT_LVL_NOTICE
|
|
default 6 if ULOG_OUTPUT_LVL_I
|
|
default 6 if ULOG_OUTPUT_LVL_INFO
|
|
default 7 if ULOG_OUTPUT_LVL_D
|
|
default 7 if ULOG_OUTPUT_LVL_DEBUG
|
|
default 7
|
|
|
|
config ULOG_USING_ISR_LOG
|
|
bool "Enable ISR log."
|
|
default n
|
|
help
|
|
The log output API can using in ISR (Interrupt Service Routines) also.
|
|
|
|
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
|
|
help
|
|
The buffer size for every line log.
|
|
|
|
config ULOG_USING_ASYNC_OUTPUT
|
|
bool "Enable async output mode."
|
|
default n
|
|
help
|
|
When enable asynchronous output mode. The log output is not immediately and the log will stored to buffer.
|
|
The another thread (Such as idle) will read the buffer and output the log. So it will using more RAM.
|
|
|
|
if ULOG_USING_ASYNC_OUTPUT
|
|
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."
|
|
default y
|
|
help
|
|
This thread will output the asynchronous logs. The logs can output by other user thread when this option is disable.
|
|
|
|
if ULOG_ASYNC_OUTPUT_BY_THREAD
|
|
|
|
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
|
|
|
|
menu "log format"
|
|
config ULOG_OUTPUT_FLOAT
|
|
bool "Enable float number support. It will using more thread stack."
|
|
default n
|
|
select RT_KLIBC_USING_VSNPRINTF_STANDARD
|
|
help
|
|
The default formater is using rt_vsnprint and it not supported float number.
|
|
When enable this option then it will enable libc. The formater will change to vsnprint on libc.
|
|
|
|
if !ULOG_USING_SYSLOG
|
|
config ULOG_USING_COLOR
|
|
bool "Enable color log."
|
|
default y
|
|
help
|
|
The log will has different color by level.
|
|
endif
|
|
|
|
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
|
|
bool "Enable console backend."
|
|
default y
|
|
help
|
|
The low level output using rt_kprintf().
|
|
|
|
config ULOG_BACKEND_USING_FILE
|
|
bool "Enable file backend."
|
|
select RT_USING_DFS
|
|
default n
|
|
help
|
|
The file backend of ulog.
|
|
|
|
config ULOG_USING_FILTER
|
|
bool "Enable runtime log filter."
|
|
default n
|
|
help
|
|
It will enable the log filter.
|
|
Such as level filter, log tag filter, log kw filter and tag's level filter.
|
|
|
|
config ULOG_USING_FINSH_CMD
|
|
bool "Enable ulog finsh/msh commands"
|
|
depends on ULOG_USING_FILTER && RT_USING_FINSH
|
|
default y
|
|
help
|
|
Enable this option to use ulog commands in finsh/msh,
|
|
such as ulog_lvl, ulog_tag, ulog_kw and so on.
|
|
|
|
config ULOG_USING_SYSLOG
|
|
bool "Enable syslog format log and API."
|
|
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
|
|
help
|
|
If enable this option, the test cases will be run automatically when board boot up.
|
|
|
|
if FINSH_USING_OPTION_COMPLETION
|
|
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
|
|
|
|
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"
|
|
|
|
endmenu
|