MCUXpresso 11.0.1 - J-Link support unavailable

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

MCUXpresso 11.0.1 - J-Link support unavailable

9,198 Views
wolfgangschmidt
Contributor II

Today i tried 11.0.1 together with a J-Link Plus debugger.

The result was when pressing the blue Debug button in Quickstart Panel a message occurs :

J-Link support unavailable!

Click on 'Yes' to set the path to J-Link server or 'No' to disable J-Link for future debug connections.

On pressing yes i canselect JLinkGDBServerCL.exe but nothing changes.

A bit later the following message appears:

Error in final launch sequence:

Failed to execute MI command:
-target-select remote localhost:2331

Error message from debugger back end:
localhost:2331: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte.
Failed to execute MI command:
-target-select remote localhost:2331

We used 11.0.0 before and I imported all settings to 11.0.1.

I tried to compare J-Link settings

In 11.0.1 the difference seems to be:

C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe

and 11.0.0 shows as executable:

C:\Program Files (x86)\SEGGER\JLink_V644i\JLinkGDBServerCL.exe

Even if i set the 11.01 to the 644 directory same message keeps reapearing.

I also tried to uninstall MCUXpresso 11.0.1 and reinstall , a few restarts of the system, but everything keeps the same.

OS is Win 10 / 1903.

11.0.0 still works. Also manually start of the Segger GDB Server and then using it from 11.0.1 works, but is giving the same error message first.

25 Replies

6,860 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Thank you for posting this additional information. We have now managed to replicate the problem - and it appears to be related to trying to carry out SEGGER debug connections to MCUs provided by pre-installed part support within MCUXpresso IDE (so mainly older LPC devices). SEGGER debug connections to MCUs supported via the installation of an MCUXpresso SDK do not seem to exhibit the issue.

We'll continue to investigate.

Regards,

MCUXpresso IDE Support

0 Kudos

6,860 Views
wolfgangschmidt
Contributor II

Hi unfortuanally I could not login here until now (neither with chrome nor edge, using opera right now - there was always an auth problem).

We are using LPC1769.

With the patch mentioned by Erich Styger  it works as expected. 

6,860 Views
chrisleroi
Contributor I

Dear Support,

any news or workarounds so far? Thanks for fixing!

Best regards,

Chris

0 Kudos

6,860 Views
BlackNight
NXP Employee
NXP Employee

6,860 Views
chrisleroi
Contributor I

Thank you very much, Erich.

Works like a charm :-)

0 Kudos

6,897 Views
lpcxpresso_supp
NXP Employee
NXP Employee

We have unfortunately still had no luck in reproducing this problem.

Can someone who is experiencing the issue please attach to this thread the following from a workspace where the problem is seen:

1) A screenshot of the J-Link options page from:

  • Window -> Preferences -> MCUXpresso IDE -> J-Link options

2) A copy of the JLink .launch file from a project that exhibits the failure to debug

3) A copy of the .log file from the .metadata folder of their workspace

[Note: To attach these files, use the "Advanced Editor" option when writing your post.]

Regards,

MCUXpresso IDE Support

6,865 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Erich and MCUXpresso IDE support,

I also can reproduce this issue, my PC is win10 64 bit.

Please see my attachment, I also take a video about debug on my side.

Thanks!

BR

Alice

0 Kudos

6,897 Views
volkeroth
Contributor II

Good luck with that, but there is no new information in either the screenshot or the log. Again, something in run() method of the class JLinkGdbServer throws an unhandled exception, so nothing is really logged.The only thing you can see in the log is that the server was not started but this was discussed before in all depth.

And as pointed out before as well, the executable JLinkGDBServerCL.exe is actually found and executed successfully for the probe detection.
So it's not a path or access rights problem.

Anyway, here we go:

JLink Options.png

Note that I patched the serial number of my J-Link in the launch configuration since I don't want it to be used in Chinese clones and the like.

Anyway, there seem to be a few changes in the launch configuration compared to the previous version of MCUXpresso.If J-Link works for some peope in this version, this would be my best guess. Still the most promising approach would be to add better error handling in the run method of JLinkGdbServer. Obviously, the reportError function there itself throws a NullPointer exception, so it fails as well.

0 Kudos

6,895 Views
kevin6
Contributor I

Had same issue with 11.0.1. Tried everything then reinstalled 10.2.1.

0 Kudos

6,895 Views
lpcxpresso_supp
NXP Employee
NXP Employee

So as described in Updating a SEGGER J-Link installation on Windows, SEGGER changed the way they install the J-Link software after the version included with MCUXpresso v11.0.0. MCUXpresso IDE v11.0.1 was updated to default for looking for J-Link software in the new location defaulted to by the SEGGER installer.

Please can you try switching to a completely new workspace, importing an example project for your MCU. Then click on the Debug button in the Quickstart Panel. Do you still see the issue?

If so, please can you confirm the exact location of the GDBServer pointed to by:

  • Windows -> Preferences -> MCUXpresso IDE -> J-Link Options

(as shown in the above blog article).

Please also confirm which versions of SEGGER have been installed onto your PC (including any that you may have installed manually).


Regards,

MCUXpresso IDE Support

0 Kudos

6,895 Views
volkeroth
Contributor II

All of this has been discussed before. I pointed MCUXpresso to the correct file by all possible means but it refuses to execute it. I actually used Microsoft's ProcMon to try to understand what goes wrong. What I can say is that MCUXpresso successfully opens each and every file in the J-Link folder, including JLinkGDBServerCL.exe. So it finds the file and is able to open it but it still doesn't even seem to try to start the server.

What also puzzles me if that even when I'm asked for the position of JLinkGDBServerCL.exe again and again (endless loop until you give up), it also scans for "redlinkserv.exe". Why would it do that?

Given that this happens with a clear installation of MCUXpresso with the J-Link version it installs or an updated one in the same official folder, I don't see what could be wrong on my side. It's not a total showstopper as using Ozone to debug is more convenient and much faster anyway, but still.

[EDIT]

Managed to catch this NullPointer exception:

java.lang.NullPointerException
      at com.nxp.mcuxpresso.core.debug.support.segger.server.JLinkGdbServer.reportError(JLinkGdbServer.java:467)
      at com.nxp.mcuxpresso.core.debug.support.segger.server.JLinkGdbServer.run(JLinkGdbServer.java:372)
      at com.nxp.mcuxpresso.core.debug.support.segger.override.SeggerGdbDebugServicesFactory.launchServer(SeggerGdbDebugServicesFactory.java:217)
      at com.nxp.mcuxpresso.core.debug.support.segger.override.SeggerGdbDebugServicesFactory.createService(SeggerGdbDebugServicesFactory.java:181)
      at com.nxp.mcuxpresso.core.debug.support.segger.override.JLinkFinalLaunchSequence.stepLaunchServer(JLinkFinalLaunchSequence.java:135)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160)
      at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475)
      at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:390)
      at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437)
      at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391)
      at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

0 Kudos

6,895 Views
BlackNight
NXP Employee
NXP Employee

The debug probe discovery setting is here:

pastedImage_1.png

Maybe it helps if you disable it?

Just trying to find what is causing this issue...

Erich

0 Kudos

6,896 Views
volkeroth
Contributor II

The probe discovering is actually working even though I can't permanently activate the setting. The only thing that is not working is the actual start of the GDB server even though MCUExpresso checked successfully that the file exists.

Actually, the working probe detection also proves that MCUXpresso is actually able to start the gdb server, as it successfully calls it to discover the probes in the getAttached method of JLinkGdbServer:

JLinkGDBServerCL.exe -listprobes USB

What goes wrong though is starting the actual server through ProcessBuilder in the run() method of the class JLinkGdbServer. Somewhere in this method, an unexpected (NullPointer?) exception happens that leads to not starting the server without even outputting a proper error message. Without debugging possibility, it's not really possible to guess what exactly goes wrong there.

Side note: the "new" path handling since version 640 or so seems to only affect Linux/Max. For Windows, there doesn't seem to be any difference (same strings with different names).

0 Kudos

6,896 Views
mike_katz
Contributor I

C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe

This is where the actual file is.  When MCUXpresso asks for the location I point it here and it still fails.

0 Kudos

6,896 Views
mike_katz
Contributor I

I tried three experiments.

The first was opening an existing 10.3 project in 11.0.1. That worked

perfectly.

The second was importing the project from above into a new workspace. 

That did not work

The third was importing a different project into a new workspace. That

also did not work.

0 Kudos

6,896 Views
BlackNight
NXP Employee
NXP Employee

That's strange. Did you import with 'copy' or with 'link to' (I always use link-to as I keep the project in place).

Other than that: does it help if you delete the .lauch to force the IDE to recreate it?

Or if you launch the debug from here:

pastedImage_1.png

I hope this helps,

Erich

0 Kudos

6,896 Views
mike_katz
Contributor I

Two systems here are experiencing the same thing.  A project created under version < 11 works fine on 11.0.1 but a project created under 11.0.1 cannot access the jlinkgdbservercl.exe file.

0 Kudos

6,896 Views
volkeroth
Contributor II

Broken since 11.0.1 for me, too.Tried everything but it's just not working anymore.

Posted this already yesterday, but in this mess of a forum, I can't even find my own thread.

0 Kudos

6,896 Views
BlackNight
NXP Employee
NXP Employee

Just a suggestion to check if this helps: what if you install the J-Link software from the SEGGER page again? I know they changed their installation quite a bit. As for my side, I know I had installed the SEGGER software outside of the IDE installation too.

0 Kudos

6,896 Views
volkeroth
Contributor II

There is no log because the IDE doesn't seem to be able to launch the server JLinkGDBServerCL.exe. No matter if the file is selected directly or entered in the global settings or through the environment variable.

As the thread opener said, the debugger starts if the server is started manually outside MCUXpresso, but the IDE itself seems to be incapable of doing so, no matter what I tried. I wasted hours installing an deinstalling different versions of J-Link and MCUXpresso and nothing matters but the version of MCUXpresso: 11.0 works, 11.0.1 doesn't.

Again, there seems to be a but that stops MCUXpresso from actually spawning JLinkGDBServerCL.exe, but I have no idea what could be the problem.

0 Kudos