Implement UART debugging by reusing DEBUG_PRINT when ITW not active

This commit is contained in:
2026-06-24 12:58:29 +02:00
parent 89cd1e00d0
commit 0ba8ecda64
4 changed files with 122 additions and 69 deletions
+6 -3
View File
@@ -45,15 +45,18 @@ extern "C" {
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
//#define DEBUG_ITM
//#define DEBUG_ITW
//#define DEBUG_DUMMY_FRAME
#ifdef DEBUG_ITM
#ifdef DEBUG_ITW
#include <stdio.h>
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
#else
#define DEBUG_PRINT(...)
#include <stdarg.h>
void uart_debug_print(const char *fmt, ...);
#define DEBUG_PRINT(...) uart_debug_print(__VA_ARGS__)
#endif
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/