File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 4040 #endif
4141 void uart_write (const char * buf , unsigned int sz );
4242
43- /* turn on small printf support */
43+ /* turn on small printf support in string.c */
4444 #if !defined(PRINTF_ENABLED ) && !defined(NO_PRINTF_UART )
4545 #define PRINTF_ENABLED
4646 #endif
4747#endif
4848
49- #ifdef PRINTF_ENABLED
49+ /* support for wolfBoot_printf logging */
50+ #if defined(PRINTF_ENABLED ) && !defined(WOLFBOOT_NO_PRINTF )
5051# include <stdio.h>
5152# if defined(DEBUG_ZYNQ ) && !defined(USE_QNX )
5253# include "xil_printf.h"
6263# define wolfBoot_printf (_f_ , ...) uart_printf(_f_, ##__VA_ARGS__)
6364# elif defined(__CCRX__ )
6465# define wolfBoot_printf printf
65- # else
66+ # elif defined(WOLFBOOT_LOG_PRINTF )
67+ /* allow output to stdout */
6668# define wolfBoot_printf (_f_ , ...) printf(_f_, ##__VA_ARGS__)
69+ # else
70+ /* use stderr by default */
71+ # define wolfBoot_printf (_f_ , ...) fprintf(stderr, _f_, ##__VA_ARGS__)
6772# endif
6873#else
6974# define wolfBoot_printf (_f_ , ...) do{}while(0)
You can’t perform that action at this time.
0 commit comments