All of lore.kernel.org
 help / color / mirror / Atom feed
* printf works but how can I make debug() printed to serial port console?
@ 2021-12-22  6:13 Chan Kim
  2021-12-22  6:40 ` ckim
  0 siblings, 1 reply; 2+ messages in thread
From: Chan Kim @ 2021-12-22  6:13 UTC (permalink / raw)
  To: U-Boot Mailing List

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: printf works but how can I make debug() printed to serial port console?
  2021-12-22  6:13 printf works but how can I make debug() printed to serial port console? Chan Kim
@ 2021-12-22  6:40 ` ckim
  0 siblings, 0 replies; 2+ messages in thread
From: ckim @ 2021-12-22  6:40 UTC (permalink / raw)
  To: 'U-Boot Mailing List'

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-bounces@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






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-22  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22  6:13 printf works but how can I make debug() printed to serial port console? Chan Kim
2021-12-22  6:40 ` ckim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.