Can not debug MIMXRT1050-EVK via J-Link

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

Can not debug MIMXRT1050-EVK via J-Link

2,322 Views
ryanshuttlewort
Contributor IV

Hello I am using MCUXpresso IDE, version v10.1.0 [Build 589] [2017-11-14] with an MIMXRT1050-EVK SDK, version  2.3.0 (2017-11-16).  I am attempting to download and debug the hello_world_xip example via a Segger J-Link Plus but I am running into the following error:

cannot_connect_to_jtag.png

I have reviewed the IDE user manual and other posts in other NXP forums which appear to be very similar but the suggestions have had little no no effect. i.e. 890826, 447820, 891538

Once the error has occurred, it will occur instantly with each new debug attempt and I can not attempt the connection process again without a reboot of the IDE.

The j-link console shows what appears to be a successful connection to the processor followed by a sudden "Server has been shut down." message.  I see no obvious errors in the the GDB and JLinkServer output.

[11-12-2017 12:31:15] Executing Server: /opt/SEGGER/JLink_V622c/JLinkGDBServer  -nosilent -swoport 2332 -select USB=600100461 -telnetport 2333 -singlerun -endian little -noir -speed 4000   -port 2331  -vd -device MCIMXRT1052 -if SWD  -halt -reportuseraction
SEGGER J-Link GDB Server V6.22c Command Line Version

JLinkARM.dll V6.22c (DLL compiled Dec  8 2017 15:42:04)

Command line: -nosilent -swoport 2332 -select USB=600100461 -telnetport 2333 -singlerun -endian little -noir -speed 4000 -port 2331 -vd -device MCIMXRT1052 -if SWD -halt -reportuseraction
-----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:      yes
Generate logfile:              off
Verify download:               on
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 MCIMXRT1052
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Device "MCIMXRT1052" selected.
Firmware: J-Link V10 compiled Dec  7 2017 11:13:46
Hardware: V10.10
S/N: 600100461
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 3.33 V
Listening on TCP/IP port 2331
Connecting to target...Found SW-DP with ID 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

Server has been shut down.
682,296 2-gdb-version
682,296 ~"GNU gdb (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 7.12.1.20170417-git\n"
682,307 ~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
682,307 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
682,307 ~"This GDB was configured as \"--host=x86_64-linux-gnu --target=arm-none-eabi\".\nType \"sho\
w configuration\" for configuration details."
682,307 ~"\nFor bug reporting instructions, please see:\n"
682,307 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
682,307 ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/soft\
ware/gdb/documentation/>.\n"
682,307 ~"For help, type \"help\".\n"
682,307 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
682,308 2^done
682,308 (gdb) 
682,314 3-environment-cd /home/colby/workspace-nxp/evkmimxrt1050_demo_apps_hello_world_xip
682,314 3^done
682,314 (gdb) 
682,320 4-gdb-set breakpoint pending on
682,320 4^done
682,320 (gdb) 
682,326 5-enable-pretty-printing
682,327 5^done
682,327 (gdb) 
682,337 6-gdb-set python print-stack none
682,338 6^done
682,338 (gdb) 
682,340 7-gdb-set print object on
682,340 7^done
682,340 (gdb) 
682,354 8-gdb-set print sevenbit-strings on
682,354 8^done
682,363 (gdb) 
682,369 9-gdb-set charset ISO-8859-1
682,370 9^done
682,370 (gdb) 
682,372 10-gdb-set dprintf-style gdb
682,372 10^done
682,372 (gdb) 
682,373 11-gdb-set auto-solib-add on
682,373 11^done
682,374 (gdb) 
682,410 12-gdb-exit
682,411 12^exit

Here is my J-link setup:

jlink-setup-1.png

jlink-setup-2.png

jlink-setup-3.png

j-link-setup-4.png

jlink-setup-5.png

The "Source" and "Common" tabs are in their default state.

Any insight into the j-link error would be appreciated, thanks.

0 Kudos
4 Replies

1,398 Views
ryanshuttlewort
Contributor IV

Fixed, you have to right-click on prroject -> Launch Configurations -> Create New -> Segger J-Link Probes (or what ever your new probe is).  All subsequent debug attempts will use that config. until changed again.

Do not attempt to create launch configurations manually, this just leads to unusual issues.

0 Kudos

1,398 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Ryan,

If a project has no launch configuration i.e. because it has just been created, then on the first debug attempt, a debug probe discovery will be performed - this by default will look for LinkServer, P&E and SEGGER probes. Once a probe is chosen and used, a launch configuration for that probe type will be created automatically and associated with the project.

Once a project has a launch configuration (LinkServer, P&E or SEGGER), a subsequent debug operation will be restricted to the probe type matching the launch configuration (primarily for performance reasons). However this behaviour can be overridden by holding down <SHIFT> and clicking Debug from the Quickstart pane. Note: the existing launch configuration will only be replaced if the debug operation is actually started.

The MCUXpresso IDE User guide discusses this behaviour in the Debug Solutions Overview section.

Yours,

MCUXpresso Support

0 Kudos

1,398 Views
ryanshuttlewort
Contributor IV

Yes, I found the issue as mentioned in my last post and marked it as answered at that time. Thanks.

0 Kudos

1,398 Views
ryanshuttlewort
Contributor IV

An update on the original issue.  There appears to be a bug or "feature" in the IDE such that if J-Link is not present on the very first debug attempt (blue bug button press) you will never be given the opportunity to add j-link again during the probe discovery process on subsequent debug sessions.  The following images demonstrate this.

This is the menu I see on a project where J-Link was not used on the very first debug, as you can see there is no J-Link or P&E Micro probe search options, only CMSIS-DAP probes even though a J-Link probe is present on the system:

actual_probe_discovery.png

The above menu options appear even though auto-discovery of other probes seems to be enabled:

enable_default_probe_discovery.png

Now, if the project is completely deleted and re-imported but this time with a j-link probe attached I get the following screen:

very_first_debug_probe_discovery.png

However, once J-Link is selected I never again get an option to use other probes like CMSIS-DAP even though one is attached:

cant_find_DAP_once_j-link_used.png

This behavior seems to be present on OSX and Linux.

Any ideas how I can get around this without deleting an existing project?

0 Kudos