From 9112dffec8bd249c0c66e4cc87083c8b37c100ae Mon Sep 17 00:00:00 2001 From: zms123456 <85141075+zmshahaha@users.noreply.github.com> Date: Tue, 7 May 2024 08:40:30 +0800 Subject: [PATCH] [src][Kconfig]make RT_ASSERT independent of RT_USING_DEUBG --- include/rtthread.h | 4 ++-- src/Kconfig | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/rtthread.h b/include/rtthread.h index a511a1f5c5..b73f63f38a 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -733,7 +733,7 @@ int __rt_ffs(int value); void rt_show_version(void); -#ifdef RT_USING_DEBUG +#ifdef RT_DEBUGING_ASSERT extern void (*rt_assert_hook)(const char *ex, const char *func, rt_size_t line); void rt_assert_set_hook(void (*hook)(const char *ex, const char *func, rt_size_t line)); void rt_assert_handler(const char *ex, const char *func, rt_size_t line); @@ -745,7 +745,7 @@ if (!(EX)) \ } #else #define RT_ASSERT(EX) -#endif /* RT_USING_DEBUG */ +#endif /* RT_DEBUGING_ASSERT */ #ifdef RT_DEBUGING_CONTEXT /* Macro to check current context */ diff --git a/src/Kconfig b/src/Kconfig index 283ea7e4ab..8a96405ed5 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -220,6 +220,10 @@ menuconfig RT_USING_DEBUG default y if RT_USING_DEBUG + config RT_DEBUGING_ASSERT + bool "Enable assertion debugging" + default y + config RT_DEBUGING_COLOR bool "Enable color debugging log" default y