M changelog.md => changelog.md +1 -0
@@ 25,6 25,7 @@
* Fix missing texts in the desktop application.
* Fix occasional cases of no audio during an incoming call.
* Charging state icons in simulator
+* Fix Debug UART conditional enabling
### Changed
M config/ProjectConfig.cmake => config/ProjectConfig.cmake +8 -0
@@ 19,6 19,13 @@ else()
set (USBCDC_ECHO_ENABLED 0 CACHE INTERNAL "")
endif()
+#add Debug LUART enable option
+if (${LOG_REDIRECT} STREQUAL "RTT_LUART")
+ set (LOG_LUART_ENABLED 1 CACHE INTERNAL "")
+else()
+ set (LOG_LUART_ENABLED 0 CACHE INTERNAL "")
+endif()
+
#Config options described in README.md
set(PROJECT_CONFIG_DEFINITIONS
@@ 26,6 33,7 @@ set(PROJECT_CONFIG_DEFINITIONS
LOG_REDIRECT=${LOG_REDIRECT}
SYSTEM_VIEW_ENABLED=${SYSTEM_VIEW_ENABLED}
USBCDC_ECHO_ENABLED=${USBCDC_ECHO_ENABLED}
+ LOG_LUART_ENABLED=${LOG_LUART_ENABLED}
PROJECT_CONFIG_USER_DYNMEM_SIZE=9*1024*1024
CACHE INTERNAL ""
)
M module-bsp/board/rt1051/common/board.cpp => module-bsp/board/rt1051/common/board.cpp +3 -3
@@ 6,7 6,7 @@ extern "C"
#include "fsl_clock.h"
#include "fsl_dcdc.h"
#include "pin_mux.h"
-#if LOG_REDIRECT == RTT_LUART
+#if LOG_LUART_ENABLED
#include "fsl_lpuart.h"
#endif
}
@@ 21,7 21,7 @@ extern std::uint8_t __sdram_cached_start[];
namespace bsp
{
-#if LOG_REDIRECT == RTT_LUART
+#if LOG_LUART_ENABLED
static lpuart_handle_t g_lpuartHandle;
#endif
@@ 46,7 46,7 @@ namespace bsp
/* Initialize debug console. */
static void BOARD_InitDebugConsole(void)
{
-#if LOG_REDIRECT == RTT_LUART
+#if LOG_LUART_ENABLED
/* The user initialization should be placed here */
lpuart_config_t lpuartConfig;