Jlink无法连接RT1064

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

Jlink无法连接RT1064

跳至解决方案
7,461 次查看
colinluan
Contributor III

Hi, @kerryzhou 

我在用在MCUXpresso环境下使用Jlink调试RT1064的时候提示如下错误:

0xdeadbeee.png

确认过Jlink是好的,并且J-Link commander里可以识别RT1064. 之前是可以调试的,不知道为什么突然就出现了这样的问题,Jlink连接时的信息如下:

SEGGER J-Link GDB Server V6.84 GUI Version

JLinkARM.dll V6.84 (DLL compiled Sep  4 2020 16:12:50)

-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     2331
SWO raw output listening port: 2332
Terminal I/O port:             2333
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               on
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
Target connection timeout:     5000 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 MIMXRT1064DVL6A
Target interface:              SWD
Target interface speed:        1000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Device "MIMXRT1064XXX6A" selected.
Firmware: J-Link V10 compiled Jul 17 2020 16:23:38
Hardware: V10.10
S/N: 50124254
Feature(s): GDB
Checking target voltage...
Target voltage: 3.35 V
Listening on TCP/IP port 2331
Connecting to target...
InitTarget() start
InitTarget()
_TargetHalt: CPU halted
InitTarget() end
Found SW-DP with ID 0x0BD11477
DPIDR: 0x0BD11477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770041)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FD000
CPUID register: 0x411FC271. Implementer code: 0x41 (ARM)
Found Cortex-M7 r1p1, Little endian.
FPUnit: 8 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FD000
ROMTbl[0][0]: E00FE000, CID: B105100D, PID: 000BB4C8 ROM Table
ROMTbl[1] @ E00FE000
ROMTbl[1][0]: E00FF000, CID: B105100D, PID: 000BB4C7 ROM Table
ROMTbl[2] @ E00FF000
ROMTbl[2][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[2][1]: E0001000, CID: B105E00D, PID: 000BB002 DWT
ROMTbl[2][2]: E0002000, CID: B105E00D, PID: 000BB00E FPB-M7
ROMTbl[2][3]: E0000000, CID: B105E00D, PID: 000BB001 ITM
ROMTbl[1][1]: E0041000, CID: B105900D, PID: 001BB975 ETM-M7
ROMTbl[1][2]: E0042000, CID: B105900D, PID: 004BB906 CTI
ROMTbl[0][1]: E0040000, CID: B105900D, PID: 000BB9A9 TPIU-M7
ROMTbl[0][2]: E0043000, CID: B105F00D, PID: 001BB101 TSG
Cache: Separate I- and D-cache.

I-Cache L1: 32 KB, 512 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 2 bytes @ address 0x7003B540 (Data = 0xFFFF)
Read 2 bytes @ address 0x7002FB50 (Data = 0x7372)
Read 4 bytes @ address 0x70029CAC (Data = 0x3102E7FE)
Reading 64 bytes @ address 0x20200E80
Read 4 bytes @ address 0x700039DA (Data = 0xF503687B)
Reading 64 bytes @ address 0x20200E40
Reading 8 bytes @ address 0xB8400000
WARNING: Failed to read memory @ address 0xB8400000
WARNING: Failed to read memory @ address 0xB8400000
WARNING: Failed to read memory @ address 0xB8400000
Reading 8 bytes @ address 0xB8400000
WARNING: Failed to read memory @ address 0xB8400000
WARNING: Failed to read memory @ address 0xB8400000
WARNING: Failed to read memory @ address 0xB8400000
Received monitor command: reset
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Resetting target
Downloading 8192 bytes @ address 0x70000000 - Verified OK
Downloading 16144 bytes @ address 0x70002000 - Verified OK
Downloading 15744 bytes @ address 0x70005F10 - Verified OK
Downloading 16128 bytes @ address 0x70009C90 - Verified OK
Downloading 16032 bytes @ address 0x7000DB90 - Verified OK
Downloading 16144 bytes @ address 0x70011A30 - Verified OK
Downloading 16144 bytes @ address 0x70015940 - Verified OK
Downloading 16128 bytes @ address 0x70019850 - Verified OK
Downloading 16128 bytes @ address 0x7001D750 - Verified OK
Downloading 16192 bytes @ address 0x70021650 - Verified OK
Downloading 16096 bytes @ address 0x70025590 - Verified OK
Downloading 16112 bytes @ address 0x70029470 - Verified OK
Downloading 16096 bytes @ address 0x7002D360 - Verified OK
Downloading 16096 bytes @ address 0x70031240 - Verified OK
Downloading 16144 bytes @ address 0x70035120 - Verified OK
Downloading 16192 bytes @ address 0x70039030 - Verified OK
Downloading 16320 bytes @ address 0x7003CF70 - Verified OK
Downloading 15000 bytes @ address 0x70040F30 - Verified OK
Downloading 2956 bytes @ address 0x700449C8 - Verified OK
Downloading 2360 bytes @ address 0x70045554 - Verified OK
Downloading 1748 bytes @ address 0x70045E8C - Verified OK
Downloading 3600 bytes @ address 0x70046560 - Verified OK
ERROR: Failed to download RAMCode.
Failed to prepare for programming.
Failed to download RAMCode!
Writing register (PC = 0x700022f4)
Read 2 bytes @ address 0x7003B540 (Data = 0x31BF)
Read 2 bytes @ address 0x7002FB50 (Data = 0x31BF)
Read 2 bytes @ address 0x7003B540 (Data = 0x31BF)
Read 2 bytes @ address 0x7002FB50 (Data = 0x31BF)
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Reading 64 bytes @ address 0x7002F200
Read 2 bytes @ address 0x7002F220 (Data = 0x31BF)
Received monitor command: semihosting enable
Semi-hosting enabled (Handle on BKPT)
Received monitor command: exec SetRestartOnClose=1
Executed SetRestartOnClose=1
Received monitor command: reset
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Resetting target
Setting breakpoint @ address 0x7002F220, Size = 2, BPHandle = 0x0001
Starting target CPU...
ERROR: Could not start CPU core. (ErrorCode: -1)
ERROR: Cannot read register 15 (R15) while CPU is running
Reading all registers
ERROR: Cannot read register 0 (R0) while CPU is running
ERROR: Cannot read register 1 (R1) while CPU is running
ERROR: Cannot read register 2 (R2) while CPU is running
ERROR: Cannot read register 3 (R3) while CPU is running
ERROR: Cannot read register 4 (R4) while CPU is running
ERROR: Cannot read register 5 (R5) while CPU is running
ERROR: Cannot read register 6 (R6) while CPU is running
ERROR: Cannot read register 7 (R7) while CPU is running
ERROR: Cannot read register 8 (R8) while CPU is running
ERROR: Cannot read register 9 (R9) while CPU is running
ERROR: Cannot read register 10 (R10) while CPU is running
ERROR: Cannot read register 11 (R11) while CPU is running
ERROR: Cannot read register 12 (R12) while CPU is running
ERROR: Cannot read register 13 (R13) while CPU is running
ERROR: Cannot read register 14 (R14) while CPU is running
ERROR: Cannot read register 15 (R15) while CPU is running
ERROR: Cannot read register 16 (XPSR) while CPU is running
ERROR: Cannot read register 17 (MSP) while CPU is running
ERROR: Cannot read register 18 (PSP) while CPU is running
ERROR: Cannot read register 24 (PRIMASK) while CPU is running
ERROR: Cannot read register 25 (BASEPRI) while CPU is running
ERROR: Cannot read register 26 (FAULTMASK) while CPU is running
ERROR: Cannot read register 27 (CONTROL) while CPU is running
ERROR: Cannot read register 32 (FPSCR) while CPU is running
ERROR: Cannot read register 33 (FPS0) while CPU is running
ERROR: Cannot read register 34 (FPS1) while CPU is running
ERROR: Cannot read register 35 (FPS2) while CPU is running
ERROR: Cannot read register 36 (FPS3) while CPU is running
ERROR: Cannot read register 37 (FPS4) while CPU is running
ERROR: Cannot read register 38 (FPS5) while CPU is running
ERROR: Cannot read register 39 (FPS6) while CPU is running
ERROR: Cannot read register 40 (FPS7) while CPU is running
ERROR: Cannot read register 41 (FPS8) while CPU is running
ERROR: Cannot read register 42 (FPS9) while CPU is running
ERROR: Cannot read register 43 (FPS10) while CPU is running
ERROR: Cannot read register 44 (FPS11) while CPU is running
ERROR: Cannot read register 45 (FPS12) while CPU is running
ERROR: Cannot read register 46 (FPS13) while CPU is running
ERROR: Cannot read register 47 (FPS14) while CPU is running
ERROR: Cannot read register 48 (FPS15) while CPU is running
ERROR: Cannot read register 49 (FPS16) while CPU is running
ERROR: Cannot read register 50 (FPS17) while CPU is running
ERROR: Cannot read register 51 (FPS18) while CPU is running
ERROR: Cannot read register 52 (FPS19) while CPU is running
ERROR: Cannot read register 53 (FPS20) while CPU is running
ERROR: Cannot read register 54 (FPS21) while CPU is running
ERROR: Cannot read register 55 (FPS22) while CPU is running
ERROR: Cannot read register 56 (FPS23) while CPU is running
ERROR: Cannot read register 57 (FPS24) while CPU is running
ERROR: Cannot read register 58 (FPS25) while CPU is running
ERROR: Cannot read register 59 (FPS26) while CPU is running
ERROR: Cannot read register 60 (FPS27) while CPU is running
ERROR: Cannot read register 61 (FPS28) while CPU is running
ERROR: Cannot read register 62 (FPS29) while CPU is running
ERROR: Cannot read register 63 (FPS30) while CPU is running
ERROR: Cannot read register 64 (FPS31) while CPU is running
ERROR: Cannot read register 33 (FPS0) while CPU is running
ERROR: Cannot read register 34 (FPS1) while CPU is running
ERROR: Cannot read register 35 (FPS2) while CPU is running
ERROR: Cannot read register 36 (FPS3) while CPU is running
ERROR: Cannot read register 37 (FPS4) while CPU is running
ERROR: Cannot read register 38 (FPS5) while CPU is running
ERROR: Cannot read register 39 (FPS6) while CPU is running
ERROR: Cannot read register 40 (FPS7) while CPU is running
ERROR: Cannot read register 41 (FPS8) while CPU is running
ERROR: Cannot read register 42 (FPS9) while CPU is running
ERROR: Cannot read register 43 (FPS10) while CPU is running
ERROR: Cannot read register 44 (FPS11) while CPU is running
ERROR: Cannot read register 45 (FPS12) while CPU is running
ERROR: Cannot read register 46 (FPS13) while CPU is running
ERROR: Cannot read register 47 (FPS14) while CPU is running
ERROR: Cannot read register 48 (FPS15) while CPU is running
ERROR: Cannot read register 49 (FPS16) while CPU is running
ERROR: Cannot read register 50 (FPS17) while CPU is running
ERROR: Cannot read register 51 (FPS18) while CPU is running
ERROR: Cannot read register 52 (FPS19) while CPU is running
ERROR: Cannot read register 53 (FPS20) while CPU i

可以帮忙分析一下吗,非常感谢!

0 项奖励
回复
1 解答
7,414 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
你可以尝试设置启动模式为 Serial Download,然后进行debug, 等烧录完成后,恢复原先的启动模式再debug, 看看是否还有问题。
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
12 回复数
7,451 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
非常感谢使用NXP产品,很高兴为你提供技术支持!
从截图上看,好像已经进入debug,但是在debug过程中出现了错误,所以我想了解一下这个错误是在调试其他工程的时候有复现吗,在之前的调试中有出现过吗?
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
7,442 次查看
colinluan
Contributor III

你好,之前一直都可以正常调试的,突然间就变成这样了,在此之前一直在尝试调整OCRAM,这个应该没有关系吧?而且一旦出现这种情况后Jlink就无法再次连接,必须重新上电后才能复现。Jlink在另一块ST的板子上确认是可以用的。

0 项奖励
回复
7,429 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
就是说这个问题时最近才出现,而且只在debug i.MX RT1064中出现,那么debug SDK library 中的hello_world, LED等简单例程时有复现问题吗?还是只在debug 特定工程才会出现呢?我觉得你最后回忆一下你做了哪些操作后才出现的问题。
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
7,422 次查看
colinluan
Contributor III

Hi,

所有的工程都会出现一样的情况,现在都卡在这边了,只有这么一块板子。我现在这边还有一个杂牌CMSIS-DAP,好像MCUXpresso也支持DAP协议,但是好像没法识别,这个需要特别的配置吗?

0 项奖励
回复
7,415 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
你可以尝试设置启动模式为 Serial Download,然后进行debug, 等烧录完成后,恢复原先的启动模式再debug, 看看是否还有问题。
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
7,406 次查看
colinluan
Contributor III

对了,忘了说一点,在现在的模式下Jlink可以识别芯片但是无法执行Erase操作

0 项奖励
回复
7,409 次查看
colinluan
Contributor III

进入Serial Download后用官方的工具来烧录吗?

0 项奖励
回复
7,399 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
1) 进入Serial Download后用官方的工具来烧录吗?
-- 不是,直接点击MCUXPresso IDE中debug按钮下载就好了,程序其实也是可以下进去的,就是不能debug.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
7,390 次查看
colinluan
Contributor III

在Serial Download模式下使用Jlink可以在J-Link commander下擦除代码,但是按debug后会显示如下:

 download_mode_jlink.png

 

这个是正常现象吗?有没有办法在 Download模式下运行代码?我尝试在NXP-MCUBootUtility.exe里下载代码并且Start,好像并没有什么反应?

bootUtility_write.png

0 项奖励
回复
7,357 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
正如你在回复中,按debug后会显示如下:

download_mode_jlink.png
这是正确,然后紧跟着退出debug模式,恢复原先的boot mode设置后,再进行debug看看是否还会出现原来的问题。
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
7,345 次查看
colinluan
Contributor III

非常感谢Jeremy的帮忙,我已经解决了问题,恢复到internal mode后,已经可以正常的调试了。

0 项奖励
回复
7,349 次查看
colinluan
Contributor III

这个我等会恢复一下看看,对了,顺便问一下,MCUXpresso里面的cmsis-dap只支持特定的设备吗?我看了官方的文档,似乎有支持其它的CMSIS-DAP设备?可以推荐一款通用型的DAP设备吗?我买了一个野火的DAP设备,IAR下可以用,但是MCUXPresso中无法识别。

0 项奖励
回复