Debugging U-Boot on iMX6 with BDI3000

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debugging U-Boot on iMX6 with BDI3000

ソリューションへジャンプ
1,861件の閲覧回数
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,250件の閲覧回数
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,250件の閲覧回数
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,251件の閲覧回数
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,250件の閲覧回数
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 件の賞賛
返信