u-boot里添加timing information

前段时间一时兴趣使然,想看看uboot里面的执行时间。

linux kernel里面看timing information是很简单的,menuconfig配置一下就可以了。

但在uboot里面需要打个patch。http://patchwork.ozlabs.org/patch/114159/。注意根据需要patch到printf里面去。

打上补丁之后,出现一些函数未定义的。如

undefined reference to `get_ticks'
undefined reference to `get_tbclk'
undefined reference to `get_ticks'

此时需要在uboot代码下cpu目录下找cortextA8再找mx53目录下的timer.c进行定义。参考http://blog.chinaunix.net/uid-26119896-id-3909033.html

总之是在uboot板级代码下的timer.c。


还是报错

/opt/RSB4210_BSP/cross_compiler/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/libgcc.a(bpabi.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
/opt/RSB4210_BSP/cross_compiler/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'

/opt/RSB4210_BSP/cross_compiler/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'


此部分的错误,不是因为timer.c定义的那些函数没有找到。而是GCC链接时候没有找到`__aeabi_unwind_cpp_pr0。

参考http://lists.denx.de/pipermail/u-boot/2010-May/071363.html即可以解决。根据报错的信息找到

/arch/arm/lib/eabi_compat.c,并且在此定义一个空函数__aeabi_unwind_cpp_pr0。

具体的为什么common.c在使用cpu目录下定义的函数时候需要__aeabi_unwind_cpp_pr0。以后再研究

感谢http://hi.baidu.com/shanruo2008/item/aced1d151b9ab8426826bb1e提供信息。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值