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
解決済! 解決策の投稿を見る。
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
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!
-----------------------------------------------------------------------------------------------------------------------
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
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