7#ifndef LIB_COMMON_HEADERS_DEBUG_PRINT_H
8#define LIB_COMMON_HEADERS_DEBUG_PRINT_H
11#if defined(SW_RTT_DEBUG)
12#include "SEGGER_RTT.h"
14#if defined(MULTIPLEXING_UART) && defined(TEST_SUITE)
15#include "test_suite_log.h"
21#define PRINT_BT(fmt, arg...)
22#define uapi_at_printf(fmt, arg...)
23#if defined(SW_UART_DEBUG) || defined(FACTORY_TEST)
30#if defined(BUILD_APPLICATION_ROM)
31#if CORE == MASTER_BY_ALL
32 #define PRINT(fmt, arg...) print_str("ROM|" fmt, ##arg)
34 #define PRINT(fmt, arg...) print_str("SEC ROM|" fmt, ##arg)
37#elif defined(BUILD_APPLICATION_SSB)
38#if CORE == MASTER_BY_ALL
39 #define PRINT(fmt, arg...) print_str("SSB|" fmt, ##arg)
41 #define PRINT(fmt, arg...) print_str("SEC SSB|" fmt, ##arg)
44#elif defined(MULTIPLEXING_UART) && defined(TEST_SUITE)
45 #define PRINT(fmt, arg...) test_suite_uart_sendf("TESTSUITE|" fmt, ##arg)
46#elif defined(BUILD_APPLICATION_STANDARD) || defined(TEST_SUITE) || defined(UNIT_TEST)
48 #define PRINT(fmt, arg...) print_str("BT|" fmt, ##arg)
50 #define PRINT(fmt, arg...) print_str("APP|" fmt, ##arg)
52 #define PRINT(fmt, arg...) print_str("SEC|" fmt, ##arg)
54 #define PRINT(fmt, arg...) print_str("GNSS|" fmt, ##arg)
55#elif CORE == CONTROL_CORE
56 void test_suite_uart_sendf(
const char *str, ...);
57 #define PRINT(fmt, arg...) test_suite_uart_sendf(fmt, ##arg)
59 #define PRINT(fmt, arg...)
63 #define PRINT(fmt, arg...) print_str("WIFI|" fmt, ##arg)
64#elif CORE == CONTROL_CORE
65 #define PRINT(fmt, arg...) print_str("CCORE|" fmt, ##arg)
67 #define PRINT(fmt, arg...)
70#elif BOOT_ROM_DFR_PRINT == YES
73#define PRINT(fmt, arg...) print_str("ROM|" fmt, ##arg)
75#elif defined(SW_RTT_DEBUG)
76#define LOG_PROTO(type, color, format, ...) \
77 SEGGER_RTT_printf(0, " %s%s"format"%s", \
83#define print_init() SEGGER_RTT_Init()
84#define PRINT(fmt, arg...) LOG_PROTO("", "", fmt, ##arg)
86#elif defined(TEST_SUITE)
87void test_suite_uart_sendf(
const char *str, ...);
89#define PRINT(fmt, arg...) test_suite_uart_sendf(fmt, ##arg)
93#define PRINT(fmt, arg...)
void sw_debug_uart_deinit(void)
void print_str(const char *str,...)
Definition uart_porting.c:503
void print_exc(const char *str,...)
void sw_debug_uart_init(uint32_t baud_rate)
Definition uart_porting.c:354