As the document said, I tried added "#define DEBUG" in each file but it
doesn't work.
If I add "#define debug printf" then, of course debug() is printed.

-----Original Message-----
From: U-Boot <u-boot-boun...@lists.denx.de> On Behalf Of Chan Kim
Sent: Wednesday, December 22, 2021 3:13 PM
To: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: printf works but how can I make debug() printed to serial port
console?

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





Reply via email to