This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: Adding DEBUG flag in U-boot

Part Number: AM3358

I wanna know how to enable DEBUG flag in U-BOOT code.

I searched it in e2e forum, but I failed to build u-boot  #ref : e2e.ti.com/support/legacy_forums/embedded/linux/f/354/t/627389

I added #define DEBUG in include/configs/am335x_evm.h

my SDK version is ti-processor-sdk-linux-am335x-evm-06.01.00.08-Linux-x86-Install.bin

This is my log:

$:~/ti-sdk$ make u-boot
===================================
Building U-boot
===================================
make -j 4 -C /home/ignis/ti-sdk/board-support/u-boot-* CROSS_COMPILE=/home/ignis/ti-sdk/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am335x_evm_config
make[1]: Entering directory '/home/ignis/ti-sdk/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a'
#
# configuration written to .config
#
make[1]: Leaving directory '/home/ignis/ti-sdk/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a'
make -j 4 -C /home/ignis/ti-sdk/board-support/u-boot-* CROSS_COMPILE=/home/ignis/ti-sdk/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- CONFIG_MKIMAGE_DTC_PATH=/home/ignis/ti-sdk/board-support/u-boot-*/scripts/dtc/dtc
make[1]: Entering directory '/home/ignis/ti-sdk/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a'
scripts/kconfig/conf  --syncconfig Kconfig
  CHK     include/config.h

...
...
...
drivers/usb/musb-new/musb_host.c: In function ‘musb_urb_dequeue’:
include/log.h:156:4: warning: ‘flags’ is used uninitialized in this function [-Wuninitialized]
    printf(pr_fmt(fmt), ##args); \
    ^~~~~~
drivers/usb/musb-new/musb_host.c:2190:17: note: ‘flags’ was declared here
  unsigned long  flags;
                 ^~~~~
  CC      spl/drivers/usb/musb-new/musb_dsps.o
  CC      spl/drivers/usb/musb-new/ti-musb.o
In file included from include/common.h:41,
                 from drivers/usb/musb-new/musb_dsps.c:32:
drivers/usb/musb-new/musb_dsps.c: In function ‘dsps_interrupt’:
include/log.h:156:4: warning: ‘flags’ is used uninitialized in this function [-Wuninitialized]
    printf(pr_fmt(fmt), ##args); \
    ^~~~~~
drivers/usb/musb-new/musb_dsps.c:304:16: note: ‘flags’ was declared here
  unsigned long flags;
                ^~~~~
  CC      spl/drivers/usb/gadget/ether.o
  CC      spl/drivers/usb/gadget/rndis.o
In file included from include/common.h:41,
                 from drivers/usb/musb-new/musb_host.c:22:
drivers/usb/musb-new/musb_host.c: In function ‘musb_urb_enqueue’:
include/log.h:156:4: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    printf(pr_fmt(fmt), ##args); \
    ^~~~~~
drivers/usb/musb-new/musb_host.c:1918:18: note: ‘flags’ was declared here
  unsigned long   flags;
                  ^~~~~
  LD      spl/drivers/usb/musb-new/built-in.o
  LD      spl/drivers/usb/gadget/built-in.o
  LD      spl/drivers/built-in.o
  LD      spl/u-boot-spl
/home/ignis/ti-sdk/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: u-boot-spl section `.rodata' will not fit in region `.sram'
/home/ignis/ti-sdk/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 10932 bytes
scripts/Makefile.spl:377: recipe for target 'spl/u-boot-spl' failed
make[2]: *** [spl/u-boot-spl] Error 1
Makefile:1659: recipe for target 'spl/u-boot-spl' failed
make[1]: *** [spl/u-boot-spl] Error 2
make[1]: Leaving directory '/home/ignis/ti-sdk/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a'
Makefile:199: recipe for target 'u-boot' failed
make: *** [u-boot] Error 2

This is my log