debugging 在PandaBoard ES上启用denx u-boot 2015.04的调试模式

qyyhg6bp  于 2023-03-19  发布在  其他
关注(0)|答案(2)|浏览(122)

我想启用denx u-boot 2015.04的调试模式。但是,我找不到-DDEBUG开关或类似的东西在config.mk。我还试图通过添加#define DEBUG到几个[emif-common.c](https://github.com/malvira/uboot/blob/master/arch/arm/cpu/armv7/omap-common/emif-common.c)文件在arch/arm/cpu/armv7本地启用调试没有成功。

velaa5lx

velaa5lx1#

我补充道:

#ifndef DEBUG
#define DEBUG
#endif

在文件/include/common. h中工作。

sf6xfgos

sf6xfgos2#

自U-boot v2023.01起,添加以下内容:

--- a/include/common.h
 +++ b/include/common.h
 @@ -12,6 +12,8 @@
  #ifndef __COMMON_H_
  #define __COMMON_H_    1
 
 +#define LOG_DEBUG
 +
  #ifndef __ASSEMBLY__       /* put C only stuff in this section */
  #include <config.h>
  #include <errno.h>

然后使用以下更改重新编译u-boot.itb:

make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb

注意:其他部分如u-boot-tpl.bin不应使用此更改进行编译,否则您将获得:

aarch64-linux-gnu-ld.bfd: arch/arm/lib/reset.o: in function `do_reset':
/u-boot/arch/arm/lib/reset.c:42: undefined reference to `reset_cpu'
/u-boot/arch/arm/lib/reset.c:42:(.text.do_reset+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `reset_cpu'

相关问题