From 00cebaacace8d3c77655bc7ce751a0aa5abd0784 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 28 Feb 2021 05:07:02 +0800 Subject: add RT_KERVICE_USING_STDLIB --- src/Kconfig | 4 ++++ src/kservice.c | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/Kconfig b/src/Kconfig index 803c827e51..5bc9adda52 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -116,6 +116,10 @@ config RT_TIMER_THREAD_STACK_SIZE endif +config RT_KERVICE_USING_STDLIB + bool "Enable kservice to use standard C library" + default n + menuconfig RT_DEBUG bool "Enable debugging features" default y diff --git a/src/kservice.c b/src/kservice.c index 9fc3971c7e..29097bafac 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -17,6 +17,7 @@ * 2013-06-24 Bernard remove rt_kprintf if RT_USING_CONSOLE is not defined. * 2013-09-24 aozima make sure the device is in STREAM mode when used by rt_kprintf. * 2015-07-06 Bernard Add rt_assert_handler routine. + * 2021-02-28 Meco Man add RT_KERVICE_USING_STDLIB */ #include @@ -280,6 +281,8 @@ RT_WEAK void *rt_memcpy(void *dst, const void *src, rt_ubase_t count) } RTM_EXPORT(rt_memcpy); +#ifndef RT_KERVICE_USING_STDLIB + /** * This function will move memory content from source address to destination * address. @@ -506,6 +509,8 @@ rt_size_t rt_strlen(const char *s) } RTM_EXPORT(rt_strlen); +#endif /*RT_KERVICE_USING_STDLIB*/ + #ifdef RT_USING_HEAP /** * This function will duplicate a string. -- cgit v1.3.1