Debugging U-Boot on iMX6 with BDI3000

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging U-Boot on iMX6 with BDI3000

Jump to solution
1,863 Views
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

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
1,252 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
1,252 Views
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,253 Views
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 Kudos
Reply
1,252 Views
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 Kudos
Reply