printf works but how can I make debug() printed to serial port console?

Chan Kim ckim at etri.re.kr
Wed Dec 22 07:13:27 CET 2021


Hello all,

 

I'm trying to boot from RAM using SPL only. 

(Another scp processor loads the FIT image to the SDRAM before starting
u-boot-spl is started)

Since the debugger doesn't work yet, I have to rely on prints to debug.

The printf works fine (I once asked about initializing serial port here, and
later found serial_init is done in board_init_f ). 

I tried to make debug(xxx) printed to serial port but couldn't figure out
how to do it.

I tried 

1. Adding #define DEBUG to the relevant source file 

2. Giving DEBUG=1 in the make command (or CFLAGS=-DDEBUG)

But it doesn't work (of course I can change debug to printf to see it).

How can I make debug( ) macro output to the serial port?

 

Thank you!

Chan Kim



More information about the U-Boot mailing list