[U-Boot] u-boot newbie - question about the 'debug( )' function ...

In many of the sources, such as "board.c", I notice calls to 'debug()'. The syntax looks similar to printf(), e.g.: debug ("Stack Pointer at: %08lx\n", addr_sp);
Is this output sent to the BDM, such as bdi2000? or Ethernet? posted to memory?
Also, is debug() related to the setting in 'config.mk' :
DBGFLAGS= -g # DDEBUG
I can't seem to locate where it lives, so uncertain how it works.
Thank You, J.J. Barrow

On Wed, Jan 14, 2009 at 2:45 PM, Jonathan Barrow jj.barrow@gmail.com wrote:
In many of the sources, such as "board.c", I notice calls to 'debug()'. The syntax looks similar to printf(), e.g.: debug ("Stack Pointer at: %08lx\n", addr_sp);
Is this output sent to the BDM, such as bdi2000? or Ethernet? posted to memory?
Also, is debug() related to the setting in 'config.mk' :
DBGFLAGS= -g # DDEBUG
I can't seem to locate where it lives, so uncertain how it works.
It's just a printf that only exists if DEBUG is turned on for the build.

On Wed, 2009-01-14 at 15:45 -0500, Jonathan Barrow wrote:
In many of the sources, such as "board.c", I notice calls to 'debug()'. The syntax looks similar to printf(), e.g.: debug ("Stack Pointer at: %08lx\n", addr_sp);
Is this output sent to the BDM, such as bdi2000? or Ethernet? posted to memory?
Also, is debug() related to the setting in 'config.mk' :
DBGFLAGS= -g # DDEBUG
I can't seem to locate where it lives, so uncertain how it works.
Thank You, J.J. Barrow
Typically, I just put a "#define DEBUG" in a specific file or two that I'm interested in. That has to be done before the #include of "common.h" to be effective.
Rebuild, reflash, read output on serial port.
HTH, jdl
participants (3)
-
Andy Fleming
-
Jon Loeliger
-
Jonathan Barrow