could not connect to target(Jlink, MCUXpresso)

cancel
Showing results for 
Search instead for 
Did you mean: 

could not connect to target(Jlink, MCUXpresso)

Jump to solution
8,437 Views
topkinschen
Contributor II

MCU:KL17Z64VFM4 , connect to Jlink via SWD.

very strange, only happen on new chip, error info below:

Could not connect to target.
  SEGGER J-Link GDB Server V6.40 Command Line Version
  JLinkARM.dll V6.40 (DLL compiled Oct 26 2018 15:06:02)
  Command line: -nosilent -swoport 2332 -select USB=59402905 -telnetport 2333 -singlerun -endian little -noir -speed auto -port 2331 -vd -device MKL17Z64xxx4 -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:      localhost only
  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:                 MKL17Z64xxx4
  Target interface:              SWD
  Target interface speed:        auto
  Target endian:                 little
  Connecting to J-Link...
  J-Link is connected.
  Device "MKL17Z64XXX4" selected.
  Firmware: J-Link V9 compiled Oct 25 2018 11:46:07
  Hardware: V9.40
  S/N: 59402905
  Feature(s): RDI, GDB, FlashDL, FlashBP, JFlash
  Checking target voltage...
  Target voltage: 2.67 V
  Listening on TCP/IP port 2331
  Connecting to target...InitTarget()
  Found SW-DP with ID 0x0BC11477
  Scanning AP map to find all available APs
  AP[2]: Stopped AP scan as end of AP map has been reached
  AP[0]: AHB-AP (IDR: 0x04770031)
  AP[1]: JTAG-AP (IDR: 0x001C0020)
  Iterating through AP map to find AHB-AP to use
  AP[0]: Core found
  AP[0]: AHB-AP ROM base: 0xF0002000
  CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
  Found Cortex-M0 r0p1, Little endian.
  FPUnit: 0 code (BP) slots and 0 literal slots
  CoreSight components:
  ROMTbl[0] @ F0002000
  InitTarget()
  Found SW-DP with ID 0x0BC11477
  AP map detection skipped. Manually configured AP map found.
  AP[0]: AHB-AP (IDR: Not set)
  AP[0]: Core found
  AP[0]: AHB-AP ROM base: 0xF0002000
  CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
  Found Cortex-M0 r0p1, Little endian.
  FPUnit: 0 code (BP) slots and 0 literal slots
  CoreSight components:
  ROMTbl[0] @ F0002000
  ERROR: Could not connect to target.
  Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
  Shutting down...
  Could not connect to target.
  Please check power, connection and settings.

from the error message,  Jlink could find MCU but fail on later step. then  I try my PCB with IAR 8.2, I can debug under IAR, then I switch to MCUXpresso, it works fine too

I try another new soldered PCB, the same phenomenon,

very strange, sames MCUXpresso can not handle new KL17 chip? but MCUXpresso could debug KL17s which has been download program before(IAR did some config to KL17 that MCUXpresso need?)

I also tried MCUXpresso v10.2.1 , also the same phenomenon.

could someone help on this, thanks very very

0 Kudos
1 Solution
5,996 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please let us know the status after a clean re-installation of MCUXpresso IDE.

And I also suggest to uninstall installed Segger J-Link software at same time.

Thanks for the attention.

best regards,

Mike

View solution in original post

0 Kudos
22 Replies
5,673 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please help to post your KL17 SWD debugger interface circuit for double check.

Please help to external pull up or float the NMI_b pin also.

Thank you for the attention.


Have a great day,
Mike

-------------------------------------------------------------------------------
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 Kudos
5,673 Views
topkinschen
Contributor II

Hi Mike

     thanks for helping.

     1, I connect SWDCLK ,SWDIO and RESET directly to Jlink, with no external pull resistance, configed in MCUXpresso  as below

SDW.PNG

2, NMI_b used as GPIO(PA4), pull up to VCC by a 10k resistor. and PA4 also enable pull up in pin config tools.

thanks.

0 Kudos
5,673 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

From your provided info, I don't find KL17 SWD debugger interface with any hardware issue.

For the new board, there could exist KL17 locked at first time.

Please check below picture to use [Debug Configurations] provided [GUI Flash Tool] to unlock KL17 at first:

pastedImage_2.png

pastedImage_1.png

Wish it helps.


Have a great day,
Mike

-------------------------------------------------------------------------------
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 Kudos
5,673 Views
topkinschen
Contributor II

Hi Mike

    thanks for helping.

    your reply helps me ,it sames new chip lock problem.

    but new problem rise up after I unlock the chip and debug

Break at address "0x1c0000c0" with no debug information available, or outside of program code.

无标题.png

 thanks again.

0 Kudos
5,672 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

It looks debugger works, while during debug, the core load the incorrect code from incorrect address.

Please power off and re- power on the board and debugger tool.

Then do the debug again and check if there with the same issue.

best regards,

Mike

0 Kudos
5,673 Views
topkinschen
Contributor II

Hi  Mike

   I did power off and repower jlink and KL17,but the same, this error happen every time i run debug, so i thinks it may some config problem

0 Kudos
5,669 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Could you post the debug config for double check?

Could you use [GUI Flash Tool] to do [Program] and check if the application works or not?

I do a test with FRDM-KL43Z board and MCUXPresso IDE without any issue.

Best regards,

Mike

0 Kudos
5,669 Views
topkinschen
Contributor II

Hi Mike

     I tried build a new KL17 project, but report the same "Break at address ...." error, so it may be my MCUXpresso settings went something wrong.

   use [GUI Flash Tool] to do [Program] report error -1, [erase] also report error -1,[resurrtect locked kinetis device] works.

   you mentioned post the debug config for double check, i don't understand this, where should i snapshot the debug config.

   thanks.

0 Kudos
5,669 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Liang Chen

Please check below pictures to provide debug config info:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

BTW: Could you debug the same board with IAR IDE?

best regards,

Mike

0 Kudos
5,669 Views
topkinschen
Contributor II

Hi Mike

    some updates:

   now use [GUI Flash Tool] to do [Program] works, [erase] works,[resurrtect locked kinetis device] works.

   my debug config is same as yours.

   I can debug with IAR.

   the error "Break at address ...." happen every time as before.

thanks for help.

0 Kudos
5,669 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Thank you for the info.

The [GUI Flash Tool] tool works and program KL17 without issue.

While, there still with debug issue.

I couldn't regenerate this issue with FRDM-KL43Z board.

Could you delete the [.metadata] folder at your MCUXpresso IDE workspace and try with new created project.?

Please let us know the result. Thanks.

best regards,

Mike

0 Kudos
5,669 Views
topkinschen
Contributor II

Hi Mike

    what [.metadata] folder used for, what the consequence for deleting this folder,is it saft to delete this folder,

0 Kudos
5,669 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Liang,

If you worry about the current workspace [.metadata] folder, I would recommend to create a new folder as new workspace for MCUXpresso IDE software. Then you will get a clear workspace.

Wish it helps.

pastedImage_1.png

best regards,

Mike

0 Kudos
5,669 Views
topkinschen
Contributor II

Hi  Mike

    I tried: 1 build a new project in a new workspace;2 delete the old [.metadata] folder, restart IDE then build new project. both lead to the same error"break ar address 0x..." when debug with jlink.

0 Kudos
5,673 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

That's quite strange.

If you can debug any previous working KL17 board with MCUXpresso IDE software?

Or If you have any NXP Kinetis evaluation board, could you debug it or not with MCUXpresso IDE software?

You are using J-Link debugger, if you could change another debugger tool, such as P&E USB Multilink tool.

I couldn't regenerate your issue with FRDM-KL43Z board.

best regards,

Mike

0 Kudos
5,673 Views
topkinschen
Contributor II

Hi Mike

     I thinks it's something wrong with my computer enviroment, I uninstalled MCUXpresso 10.3.0, re-install, the same error, I will do a clean uninstallation of MCUxpresso

0 Kudos
5,997 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please let us know the status after a clean re-installation of MCUXpresso IDE.

And I also suggest to uninstall installed Segger J-Link software at same time.

Thanks for the attention.

best regards,

Mike

0 Kudos
5,653 Views
topkinschen
Contributor II

Hi Mike

     sorry for late reply, just travel back.

     I did a clean uninstall v10.2 and install newest v10.3.1, now everything works fine(the same code).

     thanks again.

0 Kudos
5,653 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Liang Chen,

Glad to know issue fixed.

Thanks for the feedback.

best regards,

Mike

0 Kudos