Booting u-boot using jtag not working

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

Booting u-boot using jtag not working

ソリューションへジャンプ
3,866件の閲覧回数
almaz1c
Contributor III

Hi!

Have custom pcb based on IMX6ULL.

Current state of BOOT_MODE[1:0] pins is 10b. ECSPI3 selected as boot interface by GPIO boot override pins

After powering it starts to load from SPI flash IC as expected.

OpenOCD on JTAG interface works well. There are no errors on running following commands:

reset init; arm core_state arm; halt

load_image u_boot.imx 0x877ff400

resume 0x87800000

Now we are developing mass production script to burn fuse bits.

Step 1 - u-boot image to be loaded via jtag using command above;

Step 2 - fuse bits buring from u-boot command line;

But we have lot of errors on jtag interface in a case of BOOT_MODE0 and BOOT_MODE1 both pulled down, e.g. BOOT_MODE[1:0] = 00b:

> reset init; arm core_state arm; halt
adapter speed: 2000 kHz
JTAG scan chain interrogation failed: all zeroes
Check JTAG interface, timings, target power, etc.
Trying to use configured scan chain anyway...
imx6ull.dapA7: IR capture error; saw 0x0f not 0x01
Bypassing JTAG setup events due to errors
Reseting ....
imx6ull.cpu.0: ran after reset and before halt ...
target halted in Thumb state due to debug-request, current mode: Supervisor
cpsr: 0x400001f3 pc: 0x00008890
MMU: disabled, D-Cache: disabled, I-Cache: enabled
core state: ARM
Polling target imx6ull.cpu.0 failed, trying to reexamine
imx6ull.cpu.0: hardware has 6 breakpoints, 4 watchpoints

> load_image u-boot.imx 0x877ff400
DAP transaction stalled (WAIT) - slowing down
Timeout during WAIT recovery
Failed to write memory at 0x80070080
JTAG-DP STICKY ERROR
JTAG-DP STICKY ERROR
Could not read DSCR register
JTAG-DP STICKY ERROR
Could not read DSCR register
JTAG-DP STICKY ERROR
Polling target imx6ull.cpu.0 failed, trying to reexamine
JTAG-DP STICKY ERROR
Could not initialize the APB-AP
Examination failed, GDB will be halted. Polling again in 100ms
JTAG-DP STICKY ERROR
Polling target imx6ull.cpu.0 failed, trying to reexamine
JTAG-DP STICKY ERROR
Could not initialize the APB-AP
Examination failed, GDB will be halted. Polling again in 300ms
JTAG-DP STICKY ERROR
Polling target imx6ull.cpu.0 failed, trying to reexamine
JTAG-DP STICKY ERROR
Could not initialize the APB-AP
Examination failed, GDB will be halted. Polling again in 700ms
JTAG-DP STICKY ERROR
Polling target imx6ull.cpu.0 failed, trying to reexamine
JTAG-DP STICKY ERROR
Could not initialize the APB-AP
Examination failed, GDB will be halted. Polling again in 1500ms

What did I miss? Why does it works when u-boot already booted from SPI IC?

JTAG_MOD pulled up to 3.3V.

ラベル(1)
1 解決策
3,741件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Almaz

recommended to use BOOT_MODE[1:0]=01 Serial Downloader

for jtag connection.

Reason for errors may be similar to described on arm forums, like:

Bare Metal Debug !! - interrupt ERROR(TAD9-NAL52):  ! Unable to stop device Cortex-A9 ! - Arm Develo... 

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

元の投稿で解決策を見る

3 返答(返信)
3,742件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Almaz

recommended to use BOOT_MODE[1:0]=01 Serial Downloader

for jtag connection.

Reason for errors may be similar to described on arm forums, like:

Bare Metal Debug !! - interrupt ERROR(TAD9-NAL52):  ! Unable to stop device Cortex-A9 ! - Arm Develo... 

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

3,740件の閲覧回数
almaz1c
Contributor III

finally got it working by using openOCD. The problem was IMX6ULL header file was not included in openOCD.

0 件の賞賛
3,740件の閲覧回数
almaz1c
Contributor III

Same with JLINK.exe:

PS C:\Program Files (x86)\SEGGER\JLink_V630f> .\JLink.exe -AutoConnect 1 -Device MCIMX6Y2 -If JTAG -Speed 400 -JTAGConf -1,-1 -JLinkScriptFile .\Devices\NXP\iMX6UL\NXP_iMX6ULL.JLinkScript
SEGGER J-Link Commander V6.30f (Compiled Mar 2 2018 17:29:33)
DLL version V6.30f, compiled Mar 2 2018 17:29:18

Connecting to J-Link via USB...O.K.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware version: V8.00
S/N: -1
License(s): RDI,FlashDL,FlashBP,JFlash,GDB
VTref = 3.267V
Device "MCIMX6Y2" selected.


Connecting to target via JTAG
J-Link script: Setting up AP map
TotalIRLen = 13, IRPrint = 0x0101

**************************
WARNING: At least one of the connected devices is not JTAG compliant (IEEE Std 1149.1, 7.1.1.d, IR-cells). (NumDevices = 3, NumBitsSet = 2)

**************************

JTAG chain detection found 3 devices:
#0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP
#1 Id: 0x00000001, IRLen: 05, Unknown device
#2 Id: 0x088C101D, IRLen: 04, JTAG-DP
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[1]: APB-AP (IDR: Not set)
Using preconfigured AP[1] as APB-AP
AP[1]: APB-AP found
ROMTbl[0][0]: CompAddr: 80001000 CID: B105900D, PID:04-001BB961 TMC
ROMTbl[0][1]: CompAddr: 80002000 CID: B105900D, PID:04-004BB906 CTI
ROMTbl[0][2]: CompAddr: 80003000 CID: B105900D, PID:04-004BB912 TPIU
ROMTbl[0][3]: CompAddr: 80004000 CID: B105F00D, PID:04-001BB101 TSG
ROMTbl[0][4]: CompAddr: 80020000 CID: B105100D, PID:04-000BB4A7 ROM Table
ROMTbl[1][0]: CompAddr: 80030000 CID: B105900D, PID:04-005BBC07 Cortex-A7
Found Cortex-A7 r0p5
6 code breakpoints, 4 data breakpoints
Debug architecture ARMv7.1
Data endian: little
Main ID register: 0x410FC075
I-Cache L1: 32 KB, 512 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 32 KB, 128 Sets, 64 Bytes/Line, 4-Way
Unified-Cache L2: 128 KB, 256 Sets, 64 Bytes/Line, 8-Way
System control register:
Instruction endian: little
Level-1 instruction cache enabled
Level-1 data cache disabled
MMU disabled
Branch prediction enabled
Cortex-A7 identified.
J-Link>loadfile u-boot.bin 0x877ff400
Downloading file [u-boot.bin]...
Writing target memory failed.
J-Link>

But I can load file to 0x8000000:

J-Link>loadfile u-boot.bin 0x8000000
Downloading file [u-boot.bin]...
O.K.
J-Link>

0 件の賞賛