Skip to content

Commit

Permalink
pkgs: 添加kservice中缺少的kconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHAHA committed Aug 22, 2024
1 parent 51fd12f commit 9ca39f8
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pkgs/kservice/rt_memcpy_cm/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

# Kconfig file for package rt_memcpy_cm
menuconfig PKG_USING_RT_MEMCPY_CM
bool "rt_memcpy_cm: Cortex-M kernel assembly accelerated version of rt_memcpy function"
default n

if PKG_USING_RT_MEMCPY_CM

config PKG_RT_MEMCPY_CM_PATH
string
default "/packages/system/enhanced-kservice/rt_memcpy_cm"

choice
prompt "Version"
default PKG_USING_RT_MEMCPY_CM_LATEST_VERSION
help
Select the package version

config PKG_USING_RT_MEMCPY_CM_LATEST_VERSION
bool "latest"
endchoice

config PKG_RT_MEMCPY_CM_VER
string
default "latest" if PKG_USING_RT_MEMCPY_CM_LATEST_VERSION

endif

131 changes: 131 additions & 0 deletions pkgs/kservice/rt_vsnprintf_full/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@

# Kconfig file for package rt_vsnprintf_full
menuconfig PKG_USING_RT_VSNPRINTF_FULL
bool "rt_vsnprintf_full: fully functional version of rt_vsnprintf"
default n

if PKG_USING_RT_VSNPRINTF_FULL

config PKG_RT_VSNPRINTF_FULL_PATH
string
default "/packages/system/enhanced-kservice/rt_vsnprintf_full"

config PKG_VSNPRINTF_SUPPORT_DECIMAL_SPECIFIERS
bool "Support decimal notation floating point conversion specifiers (%f, %F)"
default y
help
Support for the decimal notation floating point conversion specifiers (%f, %F)

config PKG_VSNPRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS
bool "Support exponential notation floating point conversion specifiers (%e, %g, %E, %G)"
default y
help
Support for the exponential notation floating point conversion specifiers (%e, %g, %E, %G)

config PKG_VSNPRINTF_SUPPORT_WRITEBACK_SPECIFIER
bool "Support length write-back specifier (%n)"
default y
help
Support for the length write-back specifier (%n)

config PKG_VSNPRINTF_SUPPORT_LONG_LONG
bool "Support long long integral types"
default y
help
Support for the long long integral types (with the ll, z and t length modifiers for specifiers
%d,%i,%o,%x,%X,%u, and with the %p specifier). Note: 'L' (long double) is not supported.

config PKG_VSNPRINTF_CHECK_FOR_NUL_IN_FORMAT_SPECIFIER
bool "saft check: no NULL end string"
default y
help
Be extra-safe, and don't assume format specifiers are completed correctly
before the format string end.

config PKG_VSNPRINTF_SUPPORT_MSVC_STYLE_INTEGER_SPECIFIERS
bool "Support MSVC style integer specifiers"
default n
help
the integer format specifiers used in Microsoft's Visual C++ (MSVC) compiler.
These specifiers, like %I64d for 64-bit integers, deviate slightly from the standard
C format specifiers and are specific to MSVC. They allow for controlled formatting of
integers in printf()-like functions, accommodating different integer sizes and ensuring
compatibility with MSVC's environment. It's important to note that these specifiers might
not be recognized or function in other compilers due to their MSVC-specific nature.

config PKG_VSNPRINTF_INTEGER_BUFFER_SIZE
int "'ntoa' conversion buffer size"
default 32
help
'ntoa' conversion buffer size, this must be big enough to hold one converted
numeric number including padded zeros (dynamically created on stack)

config PKG_VSNPRINTF_DECIMAL_BUFFER_SIZE
int "printing individual decimal numbers buffer size"
default 32
help
size of the fixed (on-stack) buffer for printing individual decimal numbers.
this must be big enough to hold one converted floating-point value including
padded zeros.

config PKG_VSNPRINTF_DEFAULT_FLOAT_PRECISION
int "floating point conversion specifiers"
default 6
help
Default precision for the floating point conversion specifiers (the C standard sets this at 6)

config PKG_VSNPRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL
int "integral nums printed as float in rt_vsnprint"
default 9
help
According to the C languages standard, printf() and related functions must be able to print any
integral number in floating-point notation, regardless of length, when using the %f specifier -
possibly hundreds of characters, potentially overflowing your buffers. In this implementation,
all values beyond this threshold are switched to exponential notation.

config PKG_VSNPRINTF_LOG10_TAYLOR_TERMS
int "the number of terms in a Taylor series expansion of log_10(x)"
default 4
range 2 99
help
The number of terms in a Taylor series expansion of log_10(x) to
use for approximation - including the power-zero term (i.e. the
value at the point of expansion).

if RT_VER_NUM >= 0x40100
config RT_VSNPRINTF_FULL_REPLACING_SPRINTF
bool "Enable to take over 'sprintf'"
default n

config RT_VSNPRINTF_FULL_REPLACING_SNPRINTF
bool "Enable to take over 'snprintf'"
default n

config RT_VSNPRINTF_FULL_REPLACING_PRINTF
bool "Enable to take over 'printf'"
default n

config RT_VSNPRINTF_FULL_REPLACING_VSPRINTF
bool "Enable to take over 'vsprintf'"
default n

config RT_VSNPRINTF_FULL_REPLACING_VSNPRINTF
bool "Enable to take over 'vsnprintf'"
default n
endif

choice
prompt "Version"
default PKG_USING_RT_VSNPRINTF_FULL_LATEST_VERSION
help
Select the package version

config PKG_USING_RT_VSNPRINTF_FULL_LATEST_VERSION
bool "latest"
endchoice

config PKG_RT_VSNPRINTF_FULL_VER
string
default "latest" if PKG_USING_RT_VSNPRINTF_FULL_LATEST_VERSION

endif

0 comments on commit 9ca39f8

Please sign in to comment.