i.MX6 u-boot.bin and JTAG

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

i.MX6 u-boot.bin and JTAG

跳至解决方案
2,997 次查看
chris_c
Contributor II

I am trying to load u-boot onto an i.MX6DL board via JTAG without using any other peripherals (ie, USB, SD card, etc).  I am using an ARM DSTREAM JTAG debugger.

In the past, I was able to do this with u-boot 2009.08 using the u-boot elf file.  I would do the following:

1. Connect to board with JTAG

2. Load DDR .ds script to initialize DDR registers

3. Load the u-boot ELF file 

4. Start the debugger 

5. Board would boot that loaded u-boot out of memory.

However, when I try with the current version of u-boot 2016.03, DSTREAM won't even load the u-boot elf file properly. Something has changed in u-boot since 2009 and they use some ELF headers that prevents debuggers from loading the ELF file properly.  So now I am trying to use the "restore" command in DSTREAM to load u-boot.  The procedure I'm tying is:

1. Connect to board with JTAG

2. Load DDR .ds script to initialize DDR registers

3. Execute the following commands on debugger to load u-boot:

# disable IRQs, MMU and cache

set var $Core::$CPSR.I = 0x1
set var $Core::$CPSR.F = 0x1
set var $CP15::$SBanked::$S_SCTLR.M = 0
set var $CP15::$SBanked::$S_SCTLR.C = 0

# Load binary into memory

restore u-boot.bin binary 0x17800000

# load symbols
add-symbol-file u-boot SP:0x0

# set PC
set var $PC = 0x17800000
set debug-from *0x17800000

4. Start the debugger

5. u-boot does not start

I'm assuming NXP uses DSTREAM debuggers to do this, so if anyone can point out what I'm doing wrong I would appreciate it.

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
1,947 次查看
chris_c
Contributor II

I was able to resolve my own issue by turning off the Thumb instruction set.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,948 次查看
chris_c
Contributor II

I was able to resolve my own issue by turning off the Thumb instruction set.

0 项奖励
回复
1,947 次查看
Yuri
NXP Employee
NXP Employee

Hello,


  You may look at the following Community post :

How to Use Trace32 to Run U-boot in the i.MX6Q SABRE Platform 

  Also, I sent You document ;  hope it helps.

Have a great day,

Yuri

 

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct

Answer button. Thank you!

0 项奖励
回复