os/include: Redirect dbg to lldbg for IMXRT board
Implementation of dbg logs is not proper in imxrt. When kernel debug logs
are enabled, board fails to boot up. So, make a temporary fix for the issue
by redirecting dbg logs to lldbg.
@@ -153,8 +153,17 @@ Once LOGM is approved, each module should have its own index
* @details @b #include <debug.h>
* @since TizenRT v1.0
*/
+#ifdef CONFIG_ARCH_CHIP_IMXRT
+/* TODO: This is a temporary fix to redirect dbg messages to lldbg.
+ After IMXRT dbg implementation is fixed, this needs to be removed.
+*/
+#define dbg(format, ...) \
+ lldbg(format, ##__VA_ARGS__)
+#else
#define dbg(format, ...) \
syslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
+#endif
+
#define dbg_noarg(format, ...) \
syslog(LOG_ERR, format, ##__VA_ARGS__)
@@ -190,8 +199,16 @@ Once LOGM is approved, each module should have its own index
* @details @b #include <debug.h>
* @since TizenRT v1.0
*/
+#ifdef CONFIG_ARCH_CHIP_IMXRT
+/* TODO: This is a temporary fix to redirect dbg messages to lldbg.
+ After IMXRT dbg implementation is fixed, this needs to be removed.
+*/
+#define wdbg(format, ...) \
+ llwdbg(format, ##__VA_ARGS__)
+#else
#define wdbg(format, ...) \
syslog(LOG_WARNING, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
+#endif
#ifdef CONFIG_ARCH_LOWPUTC
/**
@@ -225,8 +242,16 @@ Once LOGM is approved, each module should have its own index
* @details @b #include <debug.h>
* @since TizenRT v1.0
*/
+#ifdef CONFIG_ARCH_CHIP_IMXRT
+/* TODO: This is a temporary fix to redirect dbg messages to lldbg.
+ After IMXRT dbg implementation is fixed, this needs to be removed.
+*/
+#define vdbg(format, ...) \
+ llvdbg(format, ##__VA_ARGS__)
+#else
#define vdbg(format, ...) \
syslog(LOG_INFO, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
+#endif
#ifdef CONFIG_ARCH_LOWPUTC
/**
