Debugging U-Boot on iMX6 with BDI3000

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Debugging U-Boot on iMX6 with BDI3000

跳至解决方案
1,701 次查看
armandc_
Contributor III

Hello,

I'm trying to debug U-Boot (version: imx_v2014.04_3.14.28_1.0.0_ga) for a custom board with a BDI3000.

So far I can connect to the target and I see the U-Boot code at the correct location, but after reset the PC is at 0x1ffa870c which is somewhere outside of U-Boot. Here the state after powering up th board with the BDI attached:

IMX6#0>info

    Core number       : 0

    Core state        : debug mode (ARM)

    Debug entry cause : Debug Request

    Current PC        : 0x1ffa870c

    Current CPSR      : 0x600001d3 (Supervisor)

I need to debug from the very first assembler instruction which gets loaded at address 0x17800000 but I don't know how to configure the BDI to achieve this. Does someone would have a BDI configuration file to share?

Armand

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
1,090 次查看
sinanakman
Senior Contributor III

Hi Armand

After iMX6 reset there is a ROM code that runs

and while this code is running JTAG communication

is not possible. Therefore BDI can not halt at the

reset vector and it attempts to HALT as soon as

debug access is available.

If you need to debug from the very first instruction

you could replace the first instruction with an

infinite loop and you could then HALT while

it is looping there.

Hope this helps

Sinan Akman

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,090 次查看
Yuri
NXP Employee
NXP Employee

Please refer to Chapter 1 (Porting U-Boot from an i.MX 6 Reference Board

to an i.MX 6 Custom Board) of “i.MX_6_BSP_Porting_Guide.pdf”in Linux documentation.

In particular, please pay attention on section1.4 (Debugging)

Also the following may be helpful :

http://www.denx.de/wiki/view/DULG/DebuggingUBoot


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,091 次查看
sinanakman
Senior Contributor III

Hi Armand

After iMX6 reset there is a ROM code that runs

and while this code is running JTAG communication

is not possible. Therefore BDI can not halt at the

reset vector and it attempts to HALT as soon as

debug access is available.

If you need to debug from the very first instruction

you could replace the first instruction with an

infinite loop and you could then HALT while

it is looping there.

Hope this helps

Sinan Akman

0 项奖励
回复
1,090 次查看
armandc_
Contributor III

Hello,

Thanks for the clarification. I didn't realize that the JTAG cannot access the processor when the ROM code is executing. I reduced the delay after the reset in my BDI configuration which already helps, but the infinite loop is the real solution.

I can now debug, thanks for your help.

Armand

0 项奖励
回复