[src][Kconfig]make RT_ASSERT independent of RT_USING_DEUBG

This commit is contained in:
zms123456 2024-05-07 08:40:30 +08:00 committed by GitHub
parent 12ad1703df
commit 9112dffec8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -733,7 +733,7 @@ int __rt_ffs(int value);
void rt_show_version(void); 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); 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_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); void rt_assert_handler(const char *ex, const char *func, rt_size_t line);
@ -745,7 +745,7 @@ if (!(EX)) \
} }
#else #else
#define RT_ASSERT(EX) #define RT_ASSERT(EX)
#endif /* RT_USING_DEBUG */ #endif /* RT_DEBUGING_ASSERT */
#ifdef RT_DEBUGING_CONTEXT #ifdef RT_DEBUGING_CONTEXT
/* Macro to check current context */ /* Macro to check current context */

View File

@ -220,6 +220,10 @@ menuconfig RT_USING_DEBUG
default y default y
if RT_USING_DEBUG if RT_USING_DEBUG
config RT_DEBUGING_ASSERT
bool "Enable assertion debugging"
default y
config RT_DEBUGING_COLOR config RT_DEBUGING_COLOR
bool "Enable color debugging log" bool "Enable color debugging log"
default y default y