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.

不能设定硬断点,在用CCS6.1.0+仿真器XDS100v2 调试AM335x开发板的uboot 时



您好!

我遇到一个问题需要得到你们的帮助,先谢谢了!

我用环境: CCS6.1.0 + XDS100v2 + 参考文档《基于ARM335x的u-bootSPL的CCS调试_final.pdf》调试 AM335x的一个开发板时 不能设定硬件断点,比如显示:No code is assiciaged with "E:/shareToubuntu/u-boot-2011.09/arch/arm/lib/board.c",line 450 in any loaded symbols.

 上面我已经按照文档说明,编译uboot时,已经把相关编译脚本文件中config.mk相关内容修改了: 去掉 -O2 加 -g 等。

不知到是什么原因,还是不能设定断点,希望得到你们的帮助。

谢谢!

Kim

  • 你是在调试SPL吗?load memory的时候需要load的是u-boot-spl.bin, load symbols的时候需要load的是u-boot-spl,这个没搞错吧。

  • 刘工,我都试了,SPL和UBoot,都能单步调试,能看到源文件中的单步指针在移动,无论.S和.C中,但就是不能设断点。 SPL装载如你上述描述,Uboot 装载Load Program的是u-boot. 设定应该没问题。比如单步运行到 .C文件中, 就在运行指针下面的位置设定断点都设不了,已设定断点就显示上面贴的信息。

  • 参考下面的两条Tips:

    • Although the debug information, the breakpoint can’t be placed in the
    assembly code. So if want to place the breakpoint in the assembly
    code, it is necessary to find the entry address for the assembly function,
    which can be found in the memory map file, and read the code in
    disassembly window to find the correct place.
    • Not every line of C code can place the breakpoint, so it can use the
    above approach as well.

    我想这应该能解释你为啥不能在一些.S和.C文件中设置断点的原因,但如果你在初始化文件C语言的函数中,设置断点过不了,就不太正常了。你设置的断点是硬件断点么?我印象中,当时我做这套流程的时候,用的不是Starterware中的那种断点,而是硬件断点,你可以试试看,然后反馈一下。

  • 我设的是硬件断点。上面信息,我已经注意到了,所以我编译时去掉了 -O2 加了 -g 等编译选项。 并且我没有在汇编代码中设定断点,而是在初始化代码中(.C文件)设定硬断点,比如在:arch/arm/lib/board.c中的函数board_init_r()和board_init_f()任何地方都不能设定断点。

  • 有没有这种可能,就是仿真器有问题,不支持硬件断点设定?我用的是某一家XDS100v2仿真器产品。

  • 之前我是用starterkit调试过,上面自带的XDS100v2,没啥问题。至于其他家的产品,我就不好给commments了。

    PS: 如果是调试uboot的话,直接使用打印更直接吧,我这里很少有客户用CCS的方式来调试uboot,都是直接加打印log的比较多。

  • http://www.deyisupport.com/question_answer/dsp_arm/omap_l1x/f/54/p/94920/335652.aspx#335652

    把CCS workspace下的.metadata和dvt文件夹都删除掉,然后重启CCS,重新加载工程再试试。